NetSoft Computer Networks
Last Updated
March 10th
1997

Mirror Sites
NetSoft LAN
Download the
Software

Network Card
Drivers

Secure
Features
User's Guide
Help
VeriSign

Search
Distribution
Rights

Listserv
Shareware Links
Order Now
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


SymbolsPurpose
{ }Braces indicate a parameter you must use
[ ]Brackets indicate an optional parameter
|Bar indicates a choice of parameters
d:Indicates a drive letter from A: to Z: (LASTDRIVE= parameter must be set in your CONFIG.SYS file if you wish to use drives F: through Z:)
pathIndicates a drive and directory (e.g. C:\ACCOUNTS)
password1-8 or 1-16 character password
/rights/R /W /RW /WC /RWC Read, Write, Create (only take effect if PROTECT.COM is loaded)
deviceA DOS device name: PRN, LPT1, LPT2, LPT3 or LPT4, COM1, COM2, COM3 or COM4
network name1-8 characters that represent a drive and path or device name
computername1-15 characters identifying a computer starting with a double backslash ('\\')
number1-25 digit telephone number that may include Hayes dial syntax commands
commandAny valid NET command or sub command
/dIndicates that you wish to cancel a previous NET SHARE command or NET USE command

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 MODEM


This 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 commands

There 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 Procedure

The 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 ANSWER


This 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 DIAL


This 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 REDIAL


This 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 HANGUP


This 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 site

As 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 INIT


This 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 RESET


This 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 STATUS


This 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 OFF


The 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 ON


The 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 modems


You 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.
NET MODEM

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 LINKA


The 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.


               Procedure A
   (Assumes local machine contains the
                  modem)

C:\>
C:\>CD\DOSNET
C:\DOSNET>NET RESET

Command sent to Modem Driver

C:\DOSNET>NET INIT

Command sent to Modem Driver

C:\DOSNET>NET LINKA

Command Sent to Modem Drive

C:\DOSNET>
C:\DOSNET>

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 LINKB


The 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.


               Procedure B
   (Assumes local machine contains the
                  modem)

C:\>
C:\>CD\DOSNET
C:\DOSNET>NET RESET

Command sent to Modem Driver

C:\DOSNET>NET INIT

Command sent to Modem Driver

C:\DOSNET>NET LINKB

Command Sent to Modem Driver

C:\DOSNET>
C:\DOSNET>

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.


[Top of Page]
[Chapter 4] [Chapter 2]
[Table of Contents] [Home Page]

Prices and World Wide Ordering Information

Copyright © 1997 NetSoft Computer Networks. All Rights Reserved.
20 Sea Road, Galway, Ireland.
Tel (353)+91-529607.