Summary of common network commands under DOS

Time:2021-12-3

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.
Arp
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]
parameter
-a
By asking   TCP/IP   Show current   ARP   Item. If specified   inet_ Addr, only the of the specified computer is displayed   IP   And physical address.
-g
And  – a   Same.
inet_addr
Specified in dotted decimal notation   IP   Address.
-N
Display by   if_ addr   Specified network interface   ARP   Item.
if_addr
Specifies the interface whose address translation table needs to be modified   IP   Address (if any). If not, the first applicable interface will be used.  
-d
Delete by   inet_ addr   The specified item.
-s
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.
ether_addr
Specify the physical address.
Finger
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[…]
parameter
-l
Displays information in a long list format.  
user
Specify the user to get the relevant information. Omit user parameters to display information for all users on the specified computer:
@computer
Ftp
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]
parameter
-v
Disable the display of remote server responses.
-n
Disable automatic login to the initial connection.
-i
Turn off interactive prompts when transferring multiple files.
-d
Enable debugging and display all messages passed between the client and the server   ftp   Command.
-g
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   (>  )。
-a
Use any local interface when bundling data connections.
-w:windowsize
Override default size is   four thousand and ninety-six   Transfer buffer for.
computer
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.
Nbtstat
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]
parameter
-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.
-c
Given each name   IP   Address and list   NetBIOS   Name the contents of the cache.
-n
List local   NetBIOS   name. “Registered” indicates that the name has been broadcast   (Bnode)   perhaps   Wins (other node types) registration.
-R
eliminate   NetBIOS   Reload all names in the name cache   Lmhosts   File.
-r
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.
-S
Show client and server sessions, only through   IP   Address lists the remote computers.
-s
Displays client and server sessions. Attempt to connect the remote computer   IP   The address is converted to the name of the host file used.
interval
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.
Netstat
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]
parameter
-a
Displays all connection and listening ports. Server connections are not normally displayed.
-e
Displays Ethernet statistics. This parameter can be associated with  – s   Option.
-n
Displays the address and port number in numeric format (instead of trying to find the name).
-s
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。
-r
Displays the contents of the routing table.
interval
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.
Ping
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
parameter
-t
Ping   The specified computer until interrupted.
-a
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。
-f
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.
Rcp
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
parameter
-a
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.
-b
Specifies the binary image transfer mode. Carriage return / line feed conversion was not performed.
-h
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.
-r
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.
Rexec
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
parameter
computer 
Specify to run   command   Remote computer for.
-l username 
Specify the user name on the remote computer.
-r
take   rexec   Redirect input to   NULL。
command 
Specify the command to run.
Route
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]]
parameter
-f
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.
-p
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.
command
Specify one of the following commands.
command   objective  
print   Print route  
add   Add route  
delete   Delete route  
change   Change existing route  
destination
Specify send   command   Your computer.
mask subnetmask
Specifies the subnet mask associated with the route entry. If not specified, the   255.255.255.255。
gateway 
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.
Rsh
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
parameter
computer
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.
-n
take   rsh   Redirect input to   NULL。
command
Specify the command to run.
Tftp
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]
parameter
-i
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.  
computer
Specify a local or remote computer.
put
Files on the local computer   destination   Files transferred to a remote computer   source。
get
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.
source
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.
destination
Specifies the location to which the file will be transferred. If omitted   Destination, which assumes that   source   Same name.
Tracert
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
parameter
/d
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.
target_name
The name of the target computer.
In addition, there are ipconfig, DNR and other commands, which will not be introduced one by one here.