Summary of common network commands under DOS


Microsoft under DOS   Network   Client and windows   9x DOS window and other environments, there are many useful network commands that are not included in the DOS built-in commands. So, what are these commands? The following describes the commands commonly used in them.
Display and modify address resolution protocol (ARP)   To Ethernet used   IP   Or token ring physical address translation table. This command is only available when installed   TCP/IP   Only available after agreement.
arp -a [inet_addr] [-N [if_addr]]
arp -d inet_addr [if_addr]
arp -s inet_addr ether_addr [if_addr]
By asking   TCP/IP   Show current   ARP   Item. If specified   inet_ Addr, only the of the specified computer is displayed   IP   And physical address.
And  – a   Same.
Specified in dotted decimal notation   IP   Address.
Display by   if_ addr   Specified network interface   ARP   Item.
Specifies the interface whose address translation table needs to be modified   IP   Address (if any). If not, the first applicable interface will be used.  
Delete by   inet_ addr   The specified item.
stay   ARP   Add item to cache   IP   address   inet_ addr   And physical address   ether_ addr   relation. Physical addresses are separated by hyphens   six   Given hexadecimal bytes. Specify with dotted decimal markers   IP   Address. Items are permanent, that is, they are automatically deleted from the cache after the timeout expires.
Specify the physical address.
Running   Finger   Displays information about the user on the specified system of the service. Output different variables according to the remote system. This command is only available when installed   TCP/IP   Only available after agreement.
finger [-l] [user]@computer[…]
Displays information in a long list format.  
Specify the user to get the relevant information. Omit user parameters to display information for all users on the specified computer:
Transfer files to running   FTP   The remote computer or from which the service is running   FTP   Transfer files (sometimes referred to as   daemon)。 Ftp   Can be used interactively. Click FTP in the related topics list   Command to get a description of the available FTP subcommands. This command is only available when installed   TCP/IP   Only available after agreement. Ftp   Is a service that, once started, will be created in which it can be used   ftp   Command, by typing   quit   Subcommands can be returned from the sub environment to the   Windows   two thousand   Command prompt.
When   ftp   When the sub environment runs, it is controlled by   ftp   The command prompt represents.
ftp [-v] [-n] [-i] [-d] [-g] [-s:filename] [-a] [-w:windowsize] [computer]
Disable the display of remote server responses.
Disable automatic login to the initial connection.
Turn off interactive prompts when transferring multiple files.
Enable debugging and display all messages passed between the client and the server   ftp   Command.
Disables the file name group, which allows wildcard characters (*   and  ?)。 (see in the online command reference.)   glob   Command.)
-s: filename
Specify include   ftp   Command text file; When   ftp   When started, these commands will run automatically. No spaces are allowed in this parameter. Use this switch instead of redirection   (>  )。
Use any local interface when bundling data connections.
Override default size is   four thousand and ninety-six   Transfer buffer for.
Specify the computer name or name of the remote computer to connect to   IP   Address. If specified, the computer must be the last parameter of the line.
This diagnostic command uses   NBT(TCP/IP   Upper   NetBIOS) displays protocol statistics and current   TCP/IP   connect. This command is only available when installed   TCP/IP   Only available after agreement.
nbtstat [-a remotename] [-A IP address] [-c] [-n] [-R] [-r] [-S] [-s] [interval]
-a remotename
Use the name of the remote computer to list its name table.
-A IP address
Using remote computer   IP   Address and list the name table.
Given each name   IP   Address and list   NetBIOS   Name the contents of the cache.
List local   NetBIOS   name. “Registered” indicates that the name has been broadcast   (Bnode)   perhaps   Wins (other node types) registration.
eliminate   NetBIOS   Reload all names in the name cache   Lmhosts   File.
list   Windows   Name resolution statistics for network name resolution. Use in configuration   WINS   of   Windows   two thousand   On your computer, this option returns the information you want to broadcast or   WINS   The number of names resolved and registered.
Show client and server sessions, only through   IP   Address lists the remote computers.
Displays client and server sessions. Attempt to connect the remote computer   IP   The address is converted to the name of the host file used.
Redisplay the selected statistics and pause between each display   interval   Seconds. Press   CTRL+C   Stop redisplaying statistics. If this parameter is omitted, nbtstat   Print the current configuration information once.
Display protocol statistics and current   TCP/IP   Network connection. This command is only available when installed   TCP/IP   It can only be used after the agreement.
netstat [-a] [-e] [-n] [-s] [-p protocol] [-r] [interval]
Displays all connection and listening ports. Server connections are not normally displayed.
Displays Ethernet statistics. This parameter can be associated with  – s   Option.
Displays the address and port number in numeric format (instead of trying to find the name).
Displays statistics for each protocol. By default, the   TCP、UDP、ICMP   and   IP   Statistics- p   Option can be used to specify the default subset.  
-p protocol
Display by   protocol   Connection of the specified protocol; protocol   Can be   tcp   or   udp。 If and  – s   Option to display the statistics of each protocol   Can be   tcp、udp、icmp   or   ip。
Displays the contents of the routing table.
Redisplay the selected statistics and pause between displays   interval   Seconds. Press   CTRL+B   Stop redisplaying statistics. If this parameter is omitted, netstat   The current configuration information will be printed once.
Verify the connection to the remote computer. This command is only available when installed   TCP/IP   It can only be used after the agreement.
ping [-t] [-a] [-n count] [-l length] [-f] [-i ttl] [-v tos] [-r count] [-s count] [[-j computer-list] | [-k computer-list]] [-w timeout] destination-list
Ping   The specified computer until interrupted.
Resolve the address to the computer name.
-n count
send out   count   designated   ECHO   Number of packets. The default value is   4。
-l length
Send include by   length   Of the specified amount of data   ECHO   Data packet. Default to   thirty-two   Byte; The maximum is   65,527。
Send the “do not segment” flag in the packet. Packets are not segmented by the gateway on the route.
-i ttl
Set the lifetime field to   ttl   The specified value.
-v tos
Set the service type field to   tos   The specified value.
-r count
Record the routes of outgoing and return packets in the record route field. count   You can specify a minimum   one   Sets, up to   Computers.
destine to   ping   Remote computer for.
stay   Windows   two thousand   Computer and running remote shell port monitor   rshd   Copy files between systems. rcp   Command is a connection command from   Windows   two thousand   When the computer issues this command, it can also be used for other transmissions to run on both computers   rshd   Copy files between computers. rshd   The port monitor can   UNIX   Use on a computer, and   Windows   two thousand   Can’t be used on, so   Windows   two thousand   The computer can only participate as the system issuing the command. The remote computer must also be running   rshd   provide   rcp   Utilities.
rcp [-a | -b] [-h] [-r] source1 source2 … sourceN destination
appoint   ASCII   Transmission mode. This mode converts carriage return / line feed characters to carriage return characters on outgoing files and to carriage return / line feed characters on incoming files. This mode is the default transmission mode.
Specifies the binary image transfer mode. Carriage return / line feed conversion was not performed.
transmission   Windows   two thousand   Source files marked as hidden properties on the computer. If this option is not available, in   rcp   Specifying a hidden file on the command line has the same effect as if the file did not exist.
Recursively copy the contents of all subdirectories of the source to the destination. source   and   destination   Must be a directory, although even if the source is not a directory, use  – r   Can also work. But there will be no recursion.
source   and   destination
Format must be   [computer[.user]:]filename。 If you ignore   [computer[.user]:]   In this section, the computer will be assumed to be a local computer. If omitted   [.user]   Section, the currently logged in will be used   Windows   two thousand   user name. If a fully qualified computer name is used, it contains a period   (.)   Separator, must contain   [.user]。 Otherwise, the last part of the computer name is interpreted as the user name. If more than one source file is specified, the   destination   Must be a directory.  
If the file name is not   UNIX   Forward slash   (/)   or   Windows   two thousand   System backslash   (\)   First, it is assumed to be relative to the current working directory. stay   Windows   two thousand   In, this is the directory where the command is issued. In the remote system, this is the login directory of the remote user. Period   (.)   Represents the current directory. Use escape characters in remote paths (\“   or  ‘), To use wildcards on remote computers.
Running   REXEC   Run the command on the remote computer of the service. rexec   Command before executing the specified command, verify the user name on the remote computer. Only   TCP/IP   This command can only be used after the protocol is.
rexec computer [-l username] [-n] command
Specify to run   command   Remote computer for.
-l username 
Specify the user name on the remote computer.
take   rexec   Redirect input to   NULL。
Specify the command to run.
Control network routing table. This command is only available when installed   TCP/IP   It can only be used after the agreement.
route [-f] [-p] [command [destination] [mask subnetmask] [gateway] [metric costmetric]]
Clear the routing table of all gateway entries. If this parameter is used in combination with a command, the routing table will be cleared before running the command.
This parameter is the same as   add   When used with the command, the route will persist between system bootstrappers. By default, routes are not retained when the system restarts. And   print   When used with the command, displays a list of registered persistent routes. Ignore all other commands that always affect the corresponding persistent route.
Specify one of the following commands.
command   objective  
print   Print route  
add   Add route  
delete   Delete route  
change   Change existing route  
Specify send   command   Your computer.
mask subnetmask
Specifies the subnet mask associated with the route entry. If not specified, the。
Specify the gateway.
be known as   Networks   The network database file and name are   Hosts   All computer names are referenced in the database file   destination   or   gateway   The symbol name used. If the command is   print   or   Delete, the target and gateway can also use wildcards or omit gateway parameters.
metric costmetric
Assign integer metric from   one   reach   9999) used when calculating the fastest, most reliable and / or cheapest route.
Running   RSH   Run the command on the remote computer of the service. This command is only available when installed   TCP/IP   It can only be used after the agreement.
rsh computer [-l username] [-n] command
Specify run   command   Remote computer for.
-l username
Specifies the user name to use on the remote computer. If omitted, the logged in user name is used.
take   rsh   Redirect input to   NULL。
Specify the command to run.
Transfer files to running   TFTP   The remote computer or from which the service is running   TFTP   Transfer files to the remote computer of the service. This command is only available when installed   TCP/IP   It can only be used after the agreement.
tftp [-i] computer [get | put] source [destination]
Specifies the binary image transfer mode (also known as octets). In binary image mode, files move word for word byte by byte. Use this mode when transferring binaries.
If omitted  – i. The file will be displayed in   ASCII   Mode transfer. This is the default delivery mode. This mode will   EOL   Character conversion to   UNIX   Carriage return for and carriage return / line feed for personal computers. This mode should be used when transferring text files. If the file transfer is successful, the data transfer rate is displayed.  
Specify a local or remote computer.
Files on the local computer   destination   Files transferred to a remote computer   source。
File on remote computer   destination   Files transferred to the local computer   source。
If files on the local computer   file-two   Files transferred to a remote computer   File one, please specify   put。 If a file on a remote computer   file-two   Files transferred to a remote computer   File one, please specify   get。
because   tftp   The protocol does not support user authentication, so the user must log in and the file must be writable on the remote computer.
Specify the file to transfer. If the local file is specified as  -, Then the remote file is   stdout   Print on (if available), or from   Stdin (if placed) reads.
Specifies the location to which the file will be transferred. If omitted   Destination, which assumes that   source   Same name.
The diagnostic utility will contain different lifetimes   (TTL)   Value   Internet   Control message protocol   (ICMP)   Echo packets are sent to the destination to determine the route to reach the destination. To be on a forwarded packet   TTL   Before at least decreasing   1. Each router on the required path, so   TTL   Is a valid hop count. On packet   TTL   arrive   0   When, the router should “ICMP”   The message “timed out” is sent back to the source system. Tracert   Send first   TTL   by   one   The echo packet will be sent in each subsequent sending process   TTL   Increasing   1, until the target responds or   TTL   The maximum value is reached to determine the route. The route checks the ICMP sent back by the intermediate router   “Timed out” message to determine the route. However, some routers quietly send expired content   TTL   Value, and   tracert   Out of sight.
tracert [-d] [-h maximum_hops] [-j computer-list] [-w timeout] target_name
Specifies that the address is not resolved to a computer name.
-h maximum_hops
Specifies the maximum metric of the search target.
-j computer-list
Specify edge   computer-list   Sparse source routing.
-w timeout
Wait for each reply   timeout   The specified number of microseconds.
The name of the target computer.
In addition, there are ipconfig, DNR and other commands, which will not be introduced one by one here.