March 10th 1997 Mirror Sites ![]() Download the Software Network Card Drivers ![]() Features User's Guide Help ![]() Search Distribution Rights Listserv Shareware Links ![]() Order the Software Help Us Promote NetSoft LAN Dealer Enquires Welcome Home Page | http://www.netsoft.ie/ CHAPTER 3 The NET Command
NET Command Syntax Chart
You must include all punctuation (except braces, brackets and bars) such as periods, equal signs, forward slashes and backslashes, where illustrated in the syntax. NET MODEMThis section details all of the NET commands relating to Wide Area Networking and Modems. Although all of the NET commands relating to this topic do not start with "NET MODEM", this term will be used when discussing them as a general group. With NetSoft LAN, you can connect two machines together via two modems. Before linking the two machines, the modem driver (MODEM.COM) must be loaded on each machine. If one or both machines are connected to a network using NetSoft LAN, the NET MODEM commands establish a wide area network between the two local area networks. As a result, any commands available to local-site users are now available to remote-site users. Local and remote users can also access each other in full peer-to-peer mode (at the same time). The only real problem with networking using modems, is the fact that most modems are very slow. Consequently, in most cases you will simply connect to your remote-site network, copy a few files across the wire and hang-up (disconnect). If, however, you have a lease line or your calls are free, then you may want to do network tasks that take a bit longer to execute (e.g., printing documents to remote site printers, electronic mail or remote control etc.). If you are familiar with the NET MODEM commands and just need to refresh your memory, simply read the Command Syntax In Brief. If you are not familiar with the NET MODEM commands, it is recommended that you read the Command Syntax In Depth. Command Syntax In Brief Hang-up modem to disconnect the line NET HANGUP | HAN [x] [\\computername] Set modem to automatic answer mode NET ANSWER | ANS [x] [\\computername] Dial a number and connect to remote modem NET DIAL [x] [\\computername\]{number} Redial the last number and connect to remote modem NET REDIAL [x] [\\computername] Initialise modem NET INIT [x] [\\computername] Reset modem NET RESET [x] [\\computername] Display connection status NET STATUS [x] [\\computername] Release control of modem to system NET MODEM OFF [x] [\\computername] Regain control of modem from system NET MODEM ON [x] [\\computername] Start local test mode NET LINKA [x] [\\computername] and NET LINKB [x] [\\computername] Command Syntax In Depth Using the NET MODEM commandsThere are nine NET commands relating to modems and wide area networking. There are also two test commands. All of theses commands perform standard modem functions.Before you can use the NET MODEM commands, you must load the modem driver (MODEM.COM) on the machines which contain the modems. The modem may be an internal or external modem and must be Hayes compatible. The majority of internal fax/modems may also be used. Basic ProcedureThe basic procedure for setting up a wide area network is as follows:Install your local NetSoft LAN network (using network cards etc.) as normal. Load the MODEM.COM driver on the machine which contains the modem. Issue the NET RESET and NET INIT command to the modem. Issue the NET ANSWER command (to set auto-answer mode). Issue the NET DIAL command to dial your remote-site modem (which would have issued NET ANSWER). Once a connection is established, NetSoft LAN sees the remote site machines as if they were locally connected to your LAN. Therefore each machine's name and node number must be unique. In addition, the UserCount= parameter in the DOSNET.INI file must be set to the total number of machines on the network (Local LAN and remote LAN). NOTE It is sometimes more practical to use the remote control option (NET RC) to gain control of a machine on the remote LAN rather than connecting to it using the NET USE command. The procedure for using the remote control option across the modem is the same as for local LAN remote control (see NET RC for details). The modem driver (MODEM.COM) treats your Hayes-compatible modem as if it were a network card, therefore NetSoft LAN or DOS cannot tell the difference between local LAN and remote LAN machines. All network commands may be applied to your remote site network as if they are part of your local LAN. NET ANSWERThis command sets the modem to automatic answer mode. It must be issued on the answering machine before a connection can be established. Syntax: NET ANSWER | ANS To set automatic answer mode on modem number 1 on local machine, use the following command: NET ANSWER This command will send the request to the local machines modem number 1. The modem will answer the next incoming call and establish a network communications connection. If the incoming call does not make a connection, the NET ANSWER command does not need to be repeated, as automatic answer mode will remain active until cancelled. To cancel the NET ANSWER command, you can use either the NET RESET or NET INIT commands. Both of these commands will cancel automatic answer mode. The NET ANSWER command may also be issued to another machine on your local area network to be executed by another machine that contains a modem. Syntax: NET ANSWER | ANS [x] [\\computername] To issue the NET ANSWER command to the machine known as \\SERVER1 for execution, use the following command: NET ANSWER \\SERVER1 This command sends a request to the machine known as \\SERVER1 requesting that it sets its modem number 1 to automatic answer mode. If the machine known as \\SERVER1 has two modems installed, to send the command to the second modem use the following command: NET ANSWER 2 \\SERVER1 This command sends a request to the machine known as \\SERVER1 requesting that it sets its modem number 2 to automatic answer mode. Once the communications link is established by the modems, you may use the NET USE command to connect with the remote-site servers shared resources. The NET ANSWER command is ignored if the modem is ON-LINE (in communications mode) or the modem is in a disabled state (i.e. the NET MODEM OFF command has been issued). NET DIALThis command requests that the modem dials a number and establishes a communications connection with the remote-site modem. Syntax: NET DIAL {number} The {number} parameter is the normal telephone number you would use when dialling from a normal telephone. To use the NET DIAL command on modem number 1 on a local machine, type the following command: NET DIAL 123456789 This command will send a dial request to the local machine's modem number 1. The modem will dial the specified number and establish a communications connection with the remote-site modem. If you do not make a connection, the NET DIAL or the NET REDIAL command must be issued a second time. You can also use Hayes dial prefix commands such as P or T, to specify pulse or tone dialling as part of the telephone number. In addition, any other dialling parameters such as the dial-pause command (normally denoted by the comma ","), may be used. To use the NET DIAL command to open line 9 using Tone dial, type the following: NET DIAL T9,123456789 The T9, means use Tone dial and send number 9 to the modem. The comma means wait for a second dial tone, then dial the number 123456789. The NET DIAL command may also be issued to another machine on your local area network. This may be useful if you want to connect to a remote site from a machine that does not contain the actual modem. Syntax: NET DIAL [x] [\\computername] To issue the NET DIAL command to the machine known as \\SERVER1 for execution, type the following command: NET DIAL \\SERVER1\123456789 This command sends a request to the machine known as \\SERVER1 requesting that it dials the number 123456789, and establishes a communications connection with the remote-site modem. If the machine known as \\SERVER1 has two modems installed and you wish to send the command to the second modem, use the following command: NET DIAL 2 \\SERVER1\123456789 This command sends a request to the machine known as \\SERVER1 requesting that it dials out on modem number 2. Once the communications link is established by the modems, you may use the NET USE command to connect with the remote-site servers shared resources. The NET DIAL command is ignored if the modem is ON-LINE (in communications mode) or the modem is in a disabled state (i.e. the NET MODEM OFF command has been issued). NET REDIALThis command requests that the modem redial the last number issued and establishes a communications connection with the remote-site modem. Syntax: NET REDIAL The NET DIAL command must have previously been issued before this command will work. To use the NET REDIAL command on modem number 1 on a local machine, type the following command: NET REDIAL Syntax: NET REDIAL [x] [\\computername] To issue the NET REDIAL command to the machine known as \\SERVER1 for execution, type the following command: NET REDIAL \\SERVER1 This command sends a request to the machine known as \\SERVER1 requesting that it redials the last number again (e.g. 123456789), and establish a communications connection with the remote-site modem. Once the communications link is established by the modems, you may use the NET USE command to connect with the remote-site servers shared resources. The NET REDIAL command is ignored if the modem is ON-LINE (in communications mode) or the modem is in a disabled state (i.e. the NET MODEM OFF command has been issued). NET HANGUPThis command requests that the modem hang-up the line to disconnect the communications connection. This command must be issued before connection is terminated. Syntax: NET HANGUP | HAN To use the NET HANGUP command to terminate a previous connection, type the following: NET HANGUP This command will send a request to the modem, to hang-up (disconnect) the communications link. If this command does not terminate the communications link, you can issue the command via the remote-site instead. The NET HANGUP command may also be issued to another machine on your local area network or remote site network, to be executed by the machine which contains the modem. Syntax: NET HANGUP | HAN [x] [\\computername] This following command sends a request to the machine known as \\SERVER1 requesting that it terminates the communications connection. NET HANGUP \\SERVER1 If the machine known as \\SERVER1 has two modems installed, to send the command to the second modem, issue the following command: NET HANGUP 2 \\SERVER1 Requesting a remote site hang-up, from the local siteAs mentioned above, you may terminate the connection either locally or remotely.The syntax is the same as for the local hang-up except that you must specify the remote site machine name where the call and connection originated. For example: NET HANGUP \\REMOTESITE This command sends a request to the machine known as \\REMOTESITE requesting that it terminates the communications link. The NET HANGUP command is ignored if the modem is in a disabled state (i.e. the NET MODEM OFF command has been issued). NET INITThis command sends the initialisation strings as specified in the DOSNET.INI file to the modem, This command should be issued after the NET RESET command and before establishing a communications connection. Syntax: NET INIT To use the NET INIT command to initialise modem number 1 on the local machine, type the following: NET INIT This command will send the initialisation strings to the modem number 1. The NET INIT command can also be issued to another machine on your local area network to be executed by the machine which contains a modem. Syntax: NET INIT [x] [\\computername] The following command sends a request to the machine known as \\SERVER1 requesting that it initialises modem number 1. NET INIT \\SERVER1 If the machine known as \\SERVER1 has two modems installed, to send the command to the second modem, issue the following command: NET INIT 2 \\SERVER1 The NET INIT command is ignored if the modem is ON-LINE (in communications mode) or the modem is in a disabled state (i.e. the NET MODEM OFF command has been issued). NET RESETThis command sends the reset string (ATZ) to the modem and it should be issued before the NET INIT command and before establishing a communications connection. Syntax: NET RESET To use the NET RESET command to reset modem number 1 on the local machine, type the following: NET RESET The NET RESET command may also be issued to another machine on your local area network, to be executed by the machine which contains a modem. Syntax: NET RESET [x] [\\computername] The following command sends a request to the machine known as \\SERVER1 requesting that it reset modem number 1. NET RESET \\SERVER1 If the machine known as \\SERVER1 has two modems installed, to send the command to the second modem, issue the following command: NET RESET 2 \\SERVER1 The NET RESET command is ignored if the modem is ON-LINE (in communications mode) or the modem is in a disabled state (i.e. the NET MODEM OFF command has been issued). NET STATUSThis command returns information about the current status of the modem driver and communications connection. This command should be used to verify that the modem is ON-LINE after establishing a connection and OFF-LINE after ending a connection. In addition, this command shows other technical information that varies from modem to modem. Syntax: NET STATUS To use the NET STATUS command to view the status from modem number 1 on the local machine, type the following: NET STATUS The NET STATUS command may also be issued to another machine on your local or wide area network, to be executed by the machine which contains a modem. Syntax: NET STATUS [x] [\\computername] The following command sends a request to the machine known as \\SERVER1 requesting the modem status of modem number 1. NET STATUS \\SERVER1 If the machine known as \\SERVER1 has two modems installed, to send the command to the second modem, issue the following command: NET STATUS 2 \\SERVER1 The NET STATUS command may be issued when the modem is in an ON-LINE or OFF LINE state. NET MODEM OFFThe modem driver (MODEM.COM) is a TSR (Terminate and Stay Resident driver) that permanently controls the modem. It is sometimes useful to be able to use the modem to connect to other services, bulletin boards or send faxes without unloading the network or booting the machine. This command returns control of the modem back to the system and disables the modem driver until the NET MODEM ON command is issued. Once the NET MODEM OFF command has been issued, you may use the modem to send faxes or connect to other services using the modem. You will not, however, be able to connect to another NetSoft LAN Wide Area Network until the NET MODEM ON command is issued to the modem. Syntax: NET MODEM OFF To use the NET MODEM OFF command to disable modem number 1 on the local machine, type the following: NET MODEM OFF The NET MODEM OFF command may also be issued to another machine on your local area network, to be executed by the machine that contains a modem. Syntax: NET MODEM OFF [x] [\\computername] The following command sends a request to the machine known as \\SERVER1 requesting that modem number 1 be disabled. NET MODEM OFF \\SERVER1 If the machine known as \\SERVER1 has two modems installed, to send the command to the second modem, issue the following command: NET MODEM OFF 2 \\SERVER1 The NET MODEM OFF command is ignored if the modem is ON-LINE (in communications mode) or the modem is already in a disabled state (i.e. the NET MODEM OFF command has already been issued). NET MODEM ONThe modem driver (MODEM.COM) is a TSR (Terminate and Stay Resident driver) that permanently controls the modem. It is sometimes useful to be able to use the modem to connect to other services, bulletin boards or send faxes without unloading the network or booting the machine. This command regains control of the modem for use as a Wide Area Network driver after a previous NET MODEM OFF command was issued. Once the NET MODEM ON command has been issued, you may use the modem as normal for network services. You will not, however, be able to connect to other services or use the modem to send faxes until the NET MODEM OFF command is issued. Syntax: NET MODEM ON To use the NET MODEM ON command to enable modem number 1 on the local machine, type the following: NET MODEM ON The NET MODEM ON command may also be issued to another machine on your local area network, to be executed by the machine which contains a modem. Syntax: NET MODEM ON [x] [\\computername] The following command sends a request to the machine known as \\SERVER1 requesting that modem number 1 be enabled. NET MODEM ON \\SERVER1 If the machine known as \\SERVER1 has two modems installed, to send the command to the second modem, issue the following command: NET MODEM ON 2 \\SERVER1 The NET MODEM ON command is ignored if the modem is ON-LINE (in communications mode) or the modem is already in an enabled state (this is the default state when the modem driver is loaded). Testing your modem link using two modemsYou can test your modem set-up by using a standard telephone cable to connect the two modems directly to each other. This also means that you can test all your software across the network, without running up your telephone bill. To start the modem link-test, connect a cable between your two modems (plug each end of the cable into the socket marked "LINE" on the modems). Next, assign one modem as Modem A, and the other as Modem B. On Modem A, follow the procedure shown under the heading NET LINKA On Modem B, follow the procedure shown under the heading NET LINKB NOTE The NET LINKA commands (on Modem A)should be issued just before the NET LINKB commands for successful connection. If you do not get a connection the first time, try again. ![]() NOTE The following tests using the NET LINKA and NET LINKB commands may not work with all modems. The reason for this is that some countries have regulations that restrict the way in which the modem functions. In this particular case, the NET LINKA and NET LINKB commands issue the ATX3A and ATX3D commands to the modems respectively. These commands request that the modems go off-hook in answer and dial mode respectively. The problem is with the X3 part of the command. This tells the modem to ignore the fact that there is no dial tone and establish a connection anyway. In some countries the regulations (stated above) force the modem to insist there is a dial tone before a connection can be established. All of the NET MODEM commands will work correctly when connected to a real telephone line (where there is a real dial tone) regardless of regulations. NET LINKAThe box below shows the commands that you should type. You should type only the commands shown in the BOLD COURIER font. The first of which is CD\DOSNET. NET LINKA Procedure 1. Reset Modem. 2. Initialise Modem. 3. Special Answer Mode. Modem A will start its auto answer sequence. Some unusual noises from the modem will follow. The connection should occur within a few seconds.
Once connected, you can test the connection using all the standard network commands such as NET SERVERS, to display a list of machines on the network. In addition, you may also use the NET STATUS command to verify the status of the connection. You may also use NET SHARE and NET USE commands to connect to the remote machine. Once connected, you can list directories, copy files, and run programs etc., across the test modem cable link. The only difference between the test cable link and using the actual telephone lines is line quality. The modem driver (MODEM.COM) is designed to tolerate bad quality telephone connections. NET LINKBThe box below shows the commands that you should type. You should type only the commands shown in the BOLD COURIER font. The first of which is CD\DOSNET. NET LINKB Procedure 1. Reset Modem. 2. Initialise Modem. 3. Special Dial Mode. Modem B will start its special dial sequence. Some unusual noises will follow. The connection should occur within a few seconds. If it fails to connect, use the NET HANGUP command to hang up the modem, and try again.
Once connected, you can test the connection using all the standard network commands such as NET SERVERS, to display a list of machines on the network. In addition, you may also use the NET STATUS command to verify the status of the connection. You may also use NET SHARE and NET USE commands to connect to the remote machine. Once connected, you can list directories, copy files, and run programs etc., across the test modem cable link. The only difference between the test cable link and using the actual telephone lines is quality. The modem driver (MODEM.COM) is designed to tolerate bad telephone connections. [Chapter 4] [Chapter 2] [Table of Contents] [Home Page] | |||||||||||||||||||||||||||||||
![]() | ![]() | ![]() |