![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-26 23:21 |
47,812 topics / 349,912 posts / today 2 new / 48,264 members |
| 其它操作系统综合讨论区 » Common network commands commonly used under DOS |
| Printable Version 1,813 / 8 |
| Floor1 oookillooo | Posted 2007-02-05 00:48 |
| 新手上路 Posts 4 Credits 11 | |
|
Common Network Commands under DOSSample Text
Arp Displays and modifies the address translation table used by the Address Resolution Protocol (ARP) for Ethernet or Token Ring physical addresses. This command is only available after the TCP/IP protocol is installed. arp -a ] arp -d inet_addr arp -s inet_addr ether_addr Parameters -a Displays current ARP entries by querying TCP/IP. If inet_addr is specified, only the IP and physical addresses for the specified computer are displayed. -g Same as -a. inet_addr Specifies an IP address in dotted-decimal notation. -N Displays ARP entries for the network interface specified by if_addr. if_addr Specifies the IP address of the interface whose address translation table should be modified (if any). If not specified, the first applicable interface is 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 by 6 hexadecimal bytes separated by hyphens. Use dotted-decimal notation to specify the IP address. The entry is permanent, meaning it is not automatically deleted from the cache after the timeout expires. ether_addr Specifies the physical address. Finger Displays information about users on the specified system running the Finger service. Output varies depending on the remote system. This command is only available after the TCP/IP protocol is installed. finger @computer Parameters -l Displays information in long format. user Specifies the user for whom information is to be obtained. Omit the user parameter to display information for all users on the specified computer: @computer Ftp Transfers files to or from a remote computer running an FTP service (sometimes called a daemon). Ftp can be used interactively. Click "Related Topics" and then "ftp commands" to get descriptions of available ftp subcommands. This command is only available after the TCP/IP protocol is installed. Ftp is a service that, once started, creates a sub-environment where ftp commands can be used. You can return to the Windows 2000 command prompt from this sub-environment by typing the quit subcommand. When the ftp sub-environment is running, it is represented by the ftp command prompt. ftp Parameters -v Suppresses display of remote server responses. -n Suppresses automatic logon to the initial connection. -i Turns off interactive prompting during multiple file transfers. -d Enables debugging, displaying all ftp commands passed between the client and server. -g Disables filename grouping, which allows wildcard characters (* and ?) in local filenames and pathnames. (See the glob command in the online "Command Reference.") -s: filename Specifies a text file containing ftp commands; these commands are automatically run when 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, 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 only available after the TCP/IP protocol is installed. nbtstat Parameters -a remotename Lists the name table for the remote computer using its name. -A IP address Lists the name table for the remote computer using its IP address. -c Lists the contents of the NetBIOS name cache, giving the IP address for each name. -n Lists local NetBIOS names. "Registered" indicates that the name has been registered by broadcast (Bnode) or WINS (other node types). -R Reloads the Lmhosts file after clearing all names from the NetBIOS name cache. -r Lists name resolution statistics for Windows network name resolution. On a Windows 2000 computer configured to use WINS, this option returns the number of names resolved and registered by broadcast or WINS. -S Displays client and server sessions, listing remote computers only by IP address. -s Displays client and server sessions. Attempts to convert remote computer IP addresses to names using the host file. interval Redisplays selected statistics, pausing interval seconds between each display. Press CTRL+C to stop redisplaying 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 only available after the TCP/IP protocol is installed. netstat Parameters -a Displays all connections and listening ports. Server connections are not usually displayed. -e Displays Ethernet statistics. This parameter can be combined with the -s option. -n Displays addresses and port numbers in numerical format (instead of trying to look up 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 default subset. -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 selected statistics, pausing interval seconds between each display. Press CTRL+B to stop redisplaying statistics. If this parameter is omitted, netstat prints the current configuration information once. Ping Verifies connections to remote computers. This command is only available after the TCP/IP protocol is installed. ping | ] destination-list Parameters -t Pings the specified computer until interrupted. -a Resolves addresses to computer names. -n count Sends count specified ECHO packets. 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. The packet will not be fragmented by gateways along 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 for 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 a time stamp for the number of hops specified by count. -j computer-list Routes packets using the list of computers specified by computer-list. Intermediate gateways can separate consecutive computers (sparse source route). The maximum number allowed by IP is 9. -k computer-list Routes packets using the list of computers specified by computer-list. Intermediate gateways cannot separate consecutive computers (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 Windows 2000 computers and systems running the remote shell port monitor rshd. The rcp command is a connection command that can also be used to copy files between two computers running rshd when issued from a Windows 2000 computer. The rshd port monitor can be used on UNIX computers but not on Windows 2000, so Windows 2000 computers 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. This mode converts carriage return/linefeed characters to carriage returns on outgoing files and linefeeds to carriage return/linefeeds on incoming files. This mode is the default transfer mode. -b Specifies binary image transfer mode. No carriage return/linefeed conversion is performed. -h Transfers source files marked as hidden attributes on the Windows 2000 computer. Without this option, specifying a hidden file on the rcp command line has the same effect as the file not existing. -r Recursively copies the contents of all subdirectories of source to destination. Both source and destination must be directories, although using -r works even if 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 current logged-on Windows 2000 username 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 username. 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. In the remote system, this is the remote user's login directory. A period (.) represents the current directory. Use escape characters (\, " or ') in remote paths to use wildcards on the remote computer. Rexec Runs a command on a remote computer running the REXEC service. The rexec command verifies the username on the remote computer before executing the specified command and is only available after the TCP/IP protocol is installed. rexec computer command Parameters computer Specifies the remote computer on which to run command. -l username Specifies the username on the remote computer. -r Redirects the input of rexec to NULL. command Specifies the command to run. Route Controls the network routing table. This command is only available after the TCP/IP protocol is installed. route ] Parameters -f Clears the routing table of all gateway entries. If this parameter is combined with a command, the routing table is cleared before the command is run. -p When used with the add command, makes the route persistent between system boots. By default, routes are not retained when the system restarts. When used with the print command, displays a list of registered persistent routes. Ignores all other commands that always affect the corresponding persistent route. command Specifies one of the following commands. Command Purpose print Prints routes add Adds a route delete Deletes a route change Changes 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. Symbolic names used for all destination or gateway are referenced in the network database file named Networks and the computer name database file named Hosts. If the command is print or delete, the destination and gateway can also use wildcards, and the gateway parameter can be omitted. metric costmetric Assigns an integer hop count (from 1 to 9999) used when calculating the fastest, most reliable, and/or cheapest route. Rsh Runs a command on a remote computer running the RSH service. This command is only available after the TCP/IP protocol is installed. rsh computer command Parameters computer Specifies the remote computer on which to run command. -l username Specifies the username used on the remote computer. If omitted, the logged-on username is used. -n Redirects the input of rsh to NULL. command Specifies the command to run. Tftp Transfers files to or from a remote computer running a TFTP service. This command is only available after the TCP/IP protocol is installed. tftp computer source Parameters -i Specifies binary image transfer mode (also called "octet"). In binary image mode, files are transferred one byte at a time. Use this mode when transferring binary files. If -i is omitted, files are transferred in ASCII mode. This is the default transfer mode. This mode converts EOL characters to UNIX carriage returns and personal computer carriage return/linefeeds. Use this mode when transferring text files. If the file transfer is successful, the data transfer rate is 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. Specify put if you want to transfer the file file-two on the local computer to the file file-one on the remote computer. Specify get if you want to transfer the file file-two on the remote computer to the file file-one on the remote computer. Because the tftp protocol does not support user authentication, the user must be logged on 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 on stdout (if getting) or read from stdin (if putting). destination Specifies the location to which the file is 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 with different Time To Live (TTL) values to the target to determine the route taken to reach the target. Each router on the required path must decrement the TTL on the forwarded packet by at least 1, so TTL is an effective hop count. When the TTL on the packet reaches 0, the router should send an "ICMP Time Exceeded" message back to the source system. Tracert first sends an echo packet with TTL 1 and increments the TTL by 1 in subsequent sends until the target responds or the TTL reaches the maximum, thus determining the route. The route is determined by examining the "ICMP Time Exceeded" messages sent back by intermediate routers. However, some routers silently forward packets with expired TTL values, which tracert does not see. tracert target_name Parameters /d Specifies not to resolve addresses to computer names. -h maximum_hops Specifies the maximum number of hops to search for the target. -j computer-list Specifies a sparse source route along computer-list. -w timeout Waits timeout microseconds for each response. target_name The name of the target computer. [ Last edited by oookillooo on 2007-2-8 at 09:41 AM ] |
|
| Floor2 electronixtar | Posted 2007-02-07 00:50 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
No valuable answer, identified and completed
|
|
| Floor3 bluesky22 | Posted 2007-03-24 05:21 |
| 新手上路 Posts 5 Credits 8 | |
|
Hehe, newcomers don't understand, experts disdain to look.
|
|
| Floor4 gmaroman101 | Posted 2007-03-24 07:53 |
| 新手上路 Posts 1 Credits 2 | |
|
pathping和tracert的组合工具,叫做pathping。那portqry又是什么呢?
|
|
| Floor5 time868 | Posted 2007-04-01 07:24 |
| 初级用户 Posts 29 Credits 56 | |
|
It seems a bit useful, but when using it, it doesn't work...
|
|
| Floor6 fulminate | Posted 2008-03-14 01:48 |
| 新手上路 Posts 5 Credits 10 | |
Originally posted by bluesky22 at 2007-3-24 05:21 AM: There is still some reference value |
|
| Floor7 shuiyin313 | Posted 2008-03-18 02:42 |
| 初级用户 Posts 85 Credits 177 | |
|
A little bit useful, but can't see the classification clearly, and the specific use
|
|
| Floor8 haiy | Posted 2008-10-10 15:35 |
| 新手上路 Posts 6 Credits 12 | |
| Floor9 clarence001 | Posted 2008-10-15 17:08 |
| 新手上路 Posts 3 Credits 5 | |
|
It's very comprehensive, but many things are not known how to use.
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |