Arp
Displays and modifies the IP-to-Ethernet or Token Ring physical address translation tables used by the Address Resolution Protocol (ARP). This command is available only after the TCP/IP protocol has been installed.
arp -a ]
arp -d inet_addr
arp -s inet_addr ether_addr
Parameters
-a
Displays the current ARP entries by querying TCP/IP. If inet_addr is specified, only the IP and physical address of the specified computer are displayed.
-g
Same as -a.
inet_addr
Specifies an IP address in dotted decimal notation.
-N
Displays the ARP entries for the network interface specified by if_addr.
if_addr
Specifies the IP address of the interface whose address translation table is to be modified, if any. If none exists, the first applicable interface will be used.
-d
Deletes the entry specified by inet_addr.
-s
Adds an entry to the ARP cache, associating the IP address inet_addr with the physical address ether_addr. The physical address is given as 6 hexadecimal bytes separated by hyphens. The IP address is specified in dotted decimal notation. The entry is permanent, that is, after the timeout expires the entry is automatically deleted from the cache.
ether_addr
Specifies the physical address.
Finger
Displays information about users on the specified system running the Finger service. The variables differ depending on the output of the remote system. This command is available only after the TCP/IP protocol has been installed.
finger @computer
Parameters
-l
Displays information in long list format.
user
Specifies the user whose information is to be obtained. Omit the user parameter to display information about all users on the specified computer:
@computer
Ftp
Transfers files to a remote computer running the FTP service or from a remote computer running the FTP service (sometimes called a daemon). Ftp can be used interactively. Click “ftp command” in the “Related Topics” list to get descriptions of the available “ftp” subcommands. This command is available only after the TCP/IP protocol has been installed. Ftp is a service; once started, it creates a subenvironment in which ftp commands can be used. By typing the quit subcommand, you can return from the subenvironment to the Windows 2000 command prompt. When the ftp subenvironment is running, it is represented by the ftp command prompt.
ftp
Parameters
-v
Suppresses display of responses from the remote server.
-n
Suppresses automatic logon upon initial connection.
-i
Turns off interactive prompting during multiple file transfers.
-d
Enables debugging and displays all ftp commands passed between client and server.
-g
Disables filename grouping, which allows wildcard characters (* and ?) in local file and path names. (See the glob command in the online “Command Reference”.)
-s: filename
Specifies a text file containing ftp commands; these commands will run automatically after ftp starts. No spaces are allowed in this parameter. Use this switch instead of redirection (> ).
-a
Uses any local interface when binding the data connection.
-w:windowsize
Overrides the default transfer buffer size of 4096.
computer
Specifies the computer name or IP address of the remote computer to connect to. If specified, the computer must be the last parameter on the line.
Nbtstat
This diagnostic command uses NBT (NetBIOS over TCP/IP) to display protocol statistics and current TCP/IP connections. This command is available only after the TCP/IP protocol has been installed.
nbtstat
Parameters
-a remotename
Lists the remote computer's name table by its name.
-A IP address
Uses the remote computer's IP address and lists the name table.
-c
Displays the contents of the NetBIOS name cache and gives the IP address for each name.
-n
Lists the local NetBIOS names. “Registered” indicates that the name has been registered by broadcast (Bnode) or by WINS (other node types).
-R
Purges all names from the NetBIOS name cache and reloads the Lmhosts file.
-r
Lists name resolution statistics for Windows network name resolution. On Windows 2000 computers configured to use WINS, this option returns the number of names resolved and registered via broadcast or WINS.
-S
Displays client and server sessions, listing remote computers by IP address only.
-s
Displays client and server sessions. Attempts to convert remote computer IP addresses into names using the hosts file.
interval
Redisplays the selected statistics, pausing interval seconds between each display. Press CTRL+C to stop redisplaying the statistics. If this parameter is omitted, nbtstat prints the current configuration information once.
Netstat
Displays protocol statistics and current TCP/IP network connections. This command is available only after the TCP/IP protocol has been installed.
netstat
Parameters
-a
Displays all connections and listening ports. Server connections are usually not displayed.
-e
Displays Ethernet statistics. This parameter can be combined with the -s option.
-n
Displays addresses and port numbers in numeric format (instead of trying to resolve names).
-s
Displays statistics for each protocol. By default, statistics for TCP, UDP, ICMP, and IP are displayed. The -p option can be used to specify a subset of the default.
-p protocol
Displays connections for the protocol specified by protocol; protocol can be tcp or udp. If used with the -s option to display statistics for each protocol, protocol can be tcp, udp, icmp, or ip.
-r
Displays the contents of the routing table.
interval
Redisplays the selected statistics, pausing interval seconds between each display. Press CTRL+B to stop redisplaying the statistics. If this parameter is omitted, netstat prints the current configuration information once.
Ping
Verifies the connection to a remote computer. This command is available only after the TCP/IP protocol has been installed.
ping | ] destination-list
Parameters
-t
Pings the specified computer until interrupted.
-a
Resolves addresses to computer names.
-n count
Sends the number of ECHO packets specified by count. The default is 4.
-l length
Sends ECHO packets containing the amount of data specified by length. The default is 32 bytes; the maximum is 65,527.
-f
Sends the “don't fragment” flag in the packet. Then the packet will not be fragmented by gateways on the route.
-i ttl
Sets the “time to live” field to the value specified by ttl.
-v tos
Sets the “type of service” field to the value specified by tos.
-r count
Records the route of outgoing and returning packets in the “record route” field. count can specify a minimum of 1 and a maximum of 9 computers.
-s count
Specifies timestamps for the number of hops specified by count.
-j computer-list
Routes packets using the list of computers specified by computer-list. Consecutive computers can be separated by intermediate gateways (loose source route). The maximum number allowed by IP is 9.
-k computer-list
Routes packets using the list of computers specified by computer-list. Consecutive computers cannot be separated by intermediate gateways (strict source route). The maximum number allowed by IP is 9.
-w timeout
Specifies the timeout interval in milliseconds.
destination-list
Specifies the remote computer to ping.
Rcp
Copies files between a Windows 2000 computer and a system running the remote shell port monitor rshd. The rcp command is a connection command; when issued from a Windows 2000 computer, it can also be used for other transfers to copy files between two computers running rshd. The rshd port monitor can be used on UNIX computers but not on Windows 2000, so a Windows 2000 computer can only participate as the system issuing the command. The remote computer must also provide the rcp utility by running rshd.
rcp source1 source2 ... sourceN destination
Parameters
-a
Specifies ASCII transfer mode. In this mode, carriage return/line feed characters in outgoing files are converted to carriage returns, and line feeds in incoming files are converted to carriage return/line feed. This mode is the default transfer mode.
-b
Specifies binary image transfer mode. No carriage return/line feed conversion is performed.
-h
Transfers source files on the Windows 2000 computer that are marked with the hidden attribute. Without this option, specifying a hidden file on the rcp command line has the same effect as if the file did not exist.
-r
Recursively copies all subdirectory contents of the source to the destination. Both source and destination must be directories, although using -r will still work even if the source is not a directory. But there will be no recursion.
source and destination
The format must be :]filename. If the :] part is omitted, the computer is assumed to be the local computer. If the part is omitted, the currently logged-in Windows 2000 user name is used. If a fully qualified computer name containing period (.) separators is used, must be included. Otherwise, the last part of the computer name will be interpreted as the user name. If multiple source files are specified, destination must be a directory.
If the filename does not start with a UNIX forward slash (/) or a Windows 2000 system backslash (\), it is assumed to be relative to the current working directory. In Windows 2000, this is the directory from which the command is issued. On remote systems, this is the remote user's login directory. A period (.) indicates the current directory. Use escape characters (\、" or '
in remote paths so that wildcard characters can be used on the remote computer.
Rexec
Runs commands on a remote computer running the REXEC service. Before executing the specified command, the rexec command verifies the user name on the remote computer. This command can be used only after the TCP/IP protocol has been installed.
rexec computer command
Parameters
computer
Specifies the remote computer on which to run command.
-l username
Specifies the user name on the remote computer.
-r
Redirects rexec input to NULL.
command
Specifies the command to run.
Route
Controls the network routing table. This command is available only after the TCP/IP protocol has been installed.
route ]
Parameters
-f
Clears the routing table of all gateway entries. If this parameter is used with a command, the routing table will be cleared before the command is run.
-p
When used with the add command, this parameter makes a route persistent across system boots. By default, routes are not preserved when the system restarts. When used with the print command, it displays the list of registered persistent routes. All other commands that always affect the corresponding persistent routes are ignored.
command
Specifies one of the following commands.
Command Purpose
print Print routes
add Add a route
delete Delete a route
change Modify an existing route
destination
Specifies the computer to which the command is sent.
mask subnetmask
Specifies the subnet mask associated with this route entry. If not specified, 255.255.255.255 is used.
gateway
Specifies the gateway.
The symbolic names used for destination or gateway are all referenced in the network database file named Networks and the computer name database file named Hosts. If the command is print or delete, destination and gateway can also use wildcard characters, and the gateway parameter can be omitted.
metric costmetric
Assigns an integer hop count (from 1 to 9999) used in calculating the fastest, most reliable, and/or cheapest route.
Rsh
Runs commands on a remote computer running the RSH service. This command can be used only after the TCP/IP protocol has been installed.
rsh computer command
Parameters
computer
Specifies the remote computer on which to run command.
-l username
Specifies the user name to use on the remote computer. If omitted, the logged-in user name is used.
-n
Redirects rsh input to NULL.
command
Specifies the command to run.
Tftp
Transfers files to a remote computer running the TFTP service or from a remote computer running the TFTP service. This command can be used only after the TCP/IP protocol has been installed.
tftp computer source
Parameters
-i
Specifies binary image transfer mode (also called “octet”). In binary image mode, files are moved byte by byte. Use this mode when transferring binary files.
If -i is omitted, files are transferred in ASCII mode. This is the default transfer mode. In this mode, EOL characters are converted to UNIX carriage returns and PC carriage return/line feed. If the file transfer succeeds, the data transfer rate will be displayed.
computer
Specifies the local or remote computer.
put
Transfers the file destination on the local computer to the file source on the remote computer.
get
Transfers the file destination on the remote computer to the file source on the local computer.
If you are transferring the file file-two on the local computer to the file file-one on the remote computer, specify put. If you are transferring the file file-two on the remote computer to the file file-one on the remote computer, specify get.
Because the tftp protocol does not support user authentication, the user must be logged in, and the file must be writable on the remote computer.
source
Specifies the file to transfer. If the local file is specified as -, the remote file is printed to stdout (if getting), or read from stdin (if putting).
destination
Specifies where the file is to be transferred. If destination is omitted, it is assumed to have the same name as source.
Tracert
This diagnostic utility sends Internet Control Message Protocol (ICMP) echo packets containing different time-to-live (TTL) values to the target in order to determine the route taken to reach the target. Each router on the path must decrement the TTL on a forwarded packet by at least 1, so TTL is effectively a hop count. When the TTL on a packet reaches 0, the router should send an “ICMP Time Exceeded” message back to the source system. Tracert first sends an echo packet with a TTL of 1, then increments the TTL by 1 with each subsequent transmission until the target responds or the TTL reaches its maximum, thus determining the route. The route is determined by examining the “ICMP Time Exceeded” messages sent back by intermediate routers. However, some routers quietly forward packets containing expired TTL values, and tracert cannot see them.
tracert target_name
Parameters
/d
Specifies that addresses are not resolved to computer names.
-h maximum_hops
Specifies the maximum number of hops to search for the target.
-j computer-list
Specifies loose source routing along computer-list.
-w timeout
The number of microseconds to wait for each reply, as specified by timeout.
target_name
The name of the target computer.
Displays and modifies the IP-to-Ethernet or Token Ring physical address translation tables used by the Address Resolution Protocol (ARP). This command is available only after the TCP/IP protocol has been installed.
arp -a ]
arp -d inet_addr
arp -s inet_addr ether_addr
Parameters
-a
Displays the current ARP entries by querying TCP/IP. If inet_addr is specified, only the IP and physical address of the specified computer are displayed.
-g
Same as -a.
inet_addr
Specifies an IP address in dotted decimal notation.
-N
Displays the ARP entries for the network interface specified by if_addr.
if_addr
Specifies the IP address of the interface whose address translation table is to be modified, if any. If none exists, the first applicable interface will be used.
-d
Deletes the entry specified by inet_addr.
-s
Adds an entry to the ARP cache, associating the IP address inet_addr with the physical address ether_addr. The physical address is given as 6 hexadecimal bytes separated by hyphens. The IP address is specified in dotted decimal notation. The entry is permanent, that is, after the timeout expires the entry is automatically deleted from the cache.
ether_addr
Specifies the physical address.
Finger
Displays information about users on the specified system running the Finger service. The variables differ depending on the output of the remote system. This command is available only after the TCP/IP protocol has been installed.
finger @computer
Parameters
-l
Displays information in long list format.
user
Specifies the user whose information is to be obtained. Omit the user parameter to display information about all users on the specified computer:
@computer
Ftp
Transfers files to a remote computer running the FTP service or from a remote computer running the FTP service (sometimes called a daemon). Ftp can be used interactively. Click “ftp command” in the “Related Topics” list to get descriptions of the available “ftp” subcommands. This command is available only after the TCP/IP protocol has been installed. Ftp is a service; once started, it creates a subenvironment in which ftp commands can be used. By typing the quit subcommand, you can return from the subenvironment to the Windows 2000 command prompt. When the ftp subenvironment is running, it is represented by the ftp command prompt.
ftp
Parameters
-v
Suppresses display of responses from the remote server.
-n
Suppresses automatic logon upon initial connection.
-i
Turns off interactive prompting during multiple file transfers.
-d
Enables debugging and displays all ftp commands passed between client and server.
-g
Disables filename grouping, which allows wildcard characters (* and ?) in local file and path names. (See the glob command in the online “Command Reference”.)
-s: filename
Specifies a text file containing ftp commands; these commands will run automatically after ftp starts. No spaces are allowed in this parameter. Use this switch instead of redirection (> ).
-a
Uses any local interface when binding the data connection.
-w:windowsize
Overrides the default transfer buffer size of 4096.
computer
Specifies the computer name or IP address of the remote computer to connect to. If specified, the computer must be the last parameter on the line.
Nbtstat
This diagnostic command uses NBT (NetBIOS over TCP/IP) to display protocol statistics and current TCP/IP connections. This command is available only after the TCP/IP protocol has been installed.
nbtstat
Parameters
-a remotename
Lists the remote computer's name table by its name.
-A IP address
Uses the remote computer's IP address and lists the name table.
-c
Displays the contents of the NetBIOS name cache and gives the IP address for each name.
-n
Lists the local NetBIOS names. “Registered” indicates that the name has been registered by broadcast (Bnode) or by WINS (other node types).
-R
Purges all names from the NetBIOS name cache and reloads the Lmhosts file.
-r
Lists name resolution statistics for Windows network name resolution. On Windows 2000 computers configured to use WINS, this option returns the number of names resolved and registered via broadcast or WINS.
-S
Displays client and server sessions, listing remote computers by IP address only.
-s
Displays client and server sessions. Attempts to convert remote computer IP addresses into names using the hosts file.
interval
Redisplays the selected statistics, pausing interval seconds between each display. Press CTRL+C to stop redisplaying the statistics. If this parameter is omitted, nbtstat prints the current configuration information once.
Netstat
Displays protocol statistics and current TCP/IP network connections. This command is available only after the TCP/IP protocol has been installed.
netstat
Parameters
-a
Displays all connections and listening ports. Server connections are usually not displayed.
-e
Displays Ethernet statistics. This parameter can be combined with the -s option.
-n
Displays addresses and port numbers in numeric format (instead of trying to resolve names).
-s
Displays statistics for each protocol. By default, statistics for TCP, UDP, ICMP, and IP are displayed. The -p option can be used to specify a subset of the default.
-p protocol
Displays connections for the protocol specified by protocol; protocol can be tcp or udp. If used with the -s option to display statistics for each protocol, protocol can be tcp, udp, icmp, or ip.
-r
Displays the contents of the routing table.
interval
Redisplays the selected statistics, pausing interval seconds between each display. Press CTRL+B to stop redisplaying the statistics. If this parameter is omitted, netstat prints the current configuration information once.
Ping
Verifies the connection to a remote computer. This command is available only after the TCP/IP protocol has been installed.
ping | ] destination-list
Parameters
-t
Pings the specified computer until interrupted.
-a
Resolves addresses to computer names.
-n count
Sends the number of ECHO packets specified by count. The default is 4.
-l length
Sends ECHO packets containing the amount of data specified by length. The default is 32 bytes; the maximum is 65,527.
-f
Sends the “don't fragment” flag in the packet. Then the packet will not be fragmented by gateways on the route.
-i ttl
Sets the “time to live” field to the value specified by ttl.
-v tos
Sets the “type of service” field to the value specified by tos.
-r count
Records the route of outgoing and returning packets in the “record route” field. count can specify a minimum of 1 and a maximum of 9 computers.
-s count
Specifies timestamps for the number of hops specified by count.
-j computer-list
Routes packets using the list of computers specified by computer-list. Consecutive computers can be separated by intermediate gateways (loose source route). The maximum number allowed by IP is 9.
-k computer-list
Routes packets using the list of computers specified by computer-list. Consecutive computers cannot be separated by intermediate gateways (strict source route). The maximum number allowed by IP is 9.
-w timeout
Specifies the timeout interval in milliseconds.
destination-list
Specifies the remote computer to ping.
Rcp
Copies files between a Windows 2000 computer and a system running the remote shell port monitor rshd. The rcp command is a connection command; when issued from a Windows 2000 computer, it can also be used for other transfers to copy files between two computers running rshd. The rshd port monitor can be used on UNIX computers but not on Windows 2000, so a Windows 2000 computer can only participate as the system issuing the command. The remote computer must also provide the rcp utility by running rshd.
rcp source1 source2 ... sourceN destination
Parameters
-a
Specifies ASCII transfer mode. In this mode, carriage return/line feed characters in outgoing files are converted to carriage returns, and line feeds in incoming files are converted to carriage return/line feed. This mode is the default transfer mode.
-b
Specifies binary image transfer mode. No carriage return/line feed conversion is performed.
-h
Transfers source files on the Windows 2000 computer that are marked with the hidden attribute. Without this option, specifying a hidden file on the rcp command line has the same effect as if the file did not exist.
-r
Recursively copies all subdirectory contents of the source to the destination. Both source and destination must be directories, although using -r will still work even if the source is not a directory. But there will be no recursion.
source and destination
The format must be :]filename. If the :] part is omitted, the computer is assumed to be the local computer. If the part is omitted, the currently logged-in Windows 2000 user name is used. If a fully qualified computer name containing period (.) separators is used, must be included. Otherwise, the last part of the computer name will be interpreted as the user name. If multiple source files are specified, destination must be a directory.
If the filename does not start with a UNIX forward slash (/) or a Windows 2000 system backslash (\), it is assumed to be relative to the current working directory. In Windows 2000, this is the directory from which the command is issued. On remote systems, this is the remote user's login directory. A period (.) indicates the current directory. Use escape characters (\、" or '
in remote paths so that wildcard characters can be used on the remote computer.Rexec
Runs commands on a remote computer running the REXEC service. Before executing the specified command, the rexec command verifies the user name on the remote computer. This command can be used only after the TCP/IP protocol has been installed.
rexec computer command
Parameters
computer
Specifies the remote computer on which to run command.
-l username
Specifies the user name on the remote computer.
-r
Redirects rexec input to NULL.
command
Specifies the command to run.
Route
Controls the network routing table. This command is available only after the TCP/IP protocol has been installed.
route ]
Parameters
-f
Clears the routing table of all gateway entries. If this parameter is used with a command, the routing table will be cleared before the command is run.
-p
When used with the add command, this parameter makes a route persistent across system boots. By default, routes are not preserved when the system restarts. When used with the print command, it displays the list of registered persistent routes. All other commands that always affect the corresponding persistent routes are ignored.
command
Specifies one of the following commands.
Command Purpose
print Print routes
add Add a route
delete Delete a route
change Modify an existing route
destination
Specifies the computer to which the command is sent.
mask subnetmask
Specifies the subnet mask associated with this route entry. If not specified, 255.255.255.255 is used.
gateway
Specifies the gateway.
The symbolic names used for destination or gateway are all referenced in the network database file named Networks and the computer name database file named Hosts. If the command is print or delete, destination and gateway can also use wildcard characters, and the gateway parameter can be omitted.
metric costmetric
Assigns an integer hop count (from 1 to 9999) used in calculating the fastest, most reliable, and/or cheapest route.
Rsh
Runs commands on a remote computer running the RSH service. This command can be used only after the TCP/IP protocol has been installed.
rsh computer command
Parameters
computer
Specifies the remote computer on which to run command.
-l username
Specifies the user name to use on the remote computer. If omitted, the logged-in user name is used.
-n
Redirects rsh input to NULL.
command
Specifies the command to run.
Tftp
Transfers files to a remote computer running the TFTP service or from a remote computer running the TFTP service. This command can be used only after the TCP/IP protocol has been installed.
tftp computer source
Parameters
-i
Specifies binary image transfer mode (also called “octet”). In binary image mode, files are moved byte by byte. Use this mode when transferring binary files.
If -i is omitted, files are transferred in ASCII mode. This is the default transfer mode. In this mode, EOL characters are converted to UNIX carriage returns and PC carriage return/line feed. If the file transfer succeeds, the data transfer rate will be displayed.
computer
Specifies the local or remote computer.
put
Transfers the file destination on the local computer to the file source on the remote computer.
get
Transfers the file destination on the remote computer to the file source on the local computer.
If you are transferring the file file-two on the local computer to the file file-one on the remote computer, specify put. If you are transferring the file file-two on the remote computer to the file file-one on the remote computer, specify get.
Because the tftp protocol does not support user authentication, the user must be logged in, and the file must be writable on the remote computer.
source
Specifies the file to transfer. If the local file is specified as -, the remote file is printed to stdout (if getting), or read from stdin (if putting).
destination
Specifies where the file is to be transferred. If destination is omitted, it is assumed to have the same name as source.
Tracert
This diagnostic utility sends Internet Control Message Protocol (ICMP) echo packets containing different time-to-live (TTL) values to the target in order to determine the route taken to reach the target. Each router on the path must decrement the TTL on a forwarded packet by at least 1, so TTL is effectively a hop count. When the TTL on a packet reaches 0, the router should send an “ICMP Time Exceeded” message back to the source system. Tracert first sends an echo packet with a TTL of 1, then increments the TTL by 1 with each subsequent transmission until the target responds or the TTL reaches its maximum, thus determining the route. The route is determined by examining the “ICMP Time Exceeded” messages sent back by intermediate routers. However, some routers quietly forward packets containing expired TTL values, and tracert cannot see them.
tracert target_name
Parameters
/d
Specifies that addresses are not resolved to computer names.
-h maximum_hops
Specifies the maximum number of hops to search for the target.
-j computer-list
Specifies loose source routing along computer-list.
-w timeout
The number of microseconds to wait for each reply, as specified by timeout.
target_name
The name of the target computer.
http://dos.e-stone.cn/dosbbs
uploadImages/200311161145850422.swf
uploadImages/200311161145850422.swf



