Classic Network command line Overview

Source: Internet
Author: User
Tags file transfer protocol net send nslookup

Classic Network command line> Windows 2 k/2003 Server
1. The most basic and commonly used physical network testing
Ping 192.168.10.88-T. The-t parameter is used to wait for the user to stop the test.
2. View DNS, IP, Mac, etc.
A. Win98: winipcfg
B. Win2000 or above: ipconfig/all
C. NSLookup: for example, view the DNS in Hebei
C: \> NSLookup
Default Server: ns.hesjptt.net.cn
Address: 202.99.160.68
> Server 202.99.41.2: Change DNS to 41.2
> Pop.pcpop.com
Server: ns.hesjptt.net.cn
Address: 202.99.160.68
Non-Authoritative Answer:
Name: pop.pcpop.com
Address: 202.99.160.212
3. Network messenger
Net send computer name/IP | * (broadcast) transmits content, note that it cannot cross-network segment
Net stop messenger stops the messenger service, or you can modify the service on the panel.
Net start messenger starts the Messenger Service
4. Detect the peer computer name, group, domain, and current user name
Ping-a ip-t to display only NetBIOS names
NBTSTAT-A 192.168.10.146
5. netstat-A shows all the ports currently open to your computer
Netstat-s-e displays your network information in detail, including statistics on TCP, UDP, ICMP, and IP addresses.
6. Check the ARP binding (Dynamic and Static) list. All the computers connected to me are displayed.
ARP-
7. On the proxy server side
Bind IP addresses and MAC addresses to prevent IP address theft in the LAN:
ARP-s 192.168.10.59 00-50-ff-6c-08-75
Unbind the IP address of the NIC from the MAC address:
ARP-d nic ip Address
8. Hide your computer on the network neighbor
Net config server/hidden: Yes
Net config server/hidden: No is enabled
9. Several net commands
A. The net view of the current workgroup server list is displayed. When you use this command without the option, it displays the list of computers in the current domain or network.
For example, you can view the shared resources on this IP address.
C: \> net view 192.168.10.8
Share resources on 192.168.10.8
Resource Sharing name type usage comment
--------------------------------------
Website Service Disk
The command is successfully completed.
B. view the user account list on the computer. Net user
C. view the network connection. net use
For example, net use Z: \ 192.168.10.8 \ movie maps the movie shared directory of this IP address to a local Z disk.
D. Record the link to the net session
For example:
C: \> net session
Computer User Name customer type open idle time
-------------------------------------------------------------------------------
\ 192.168.10.110 Rome Windows 2000 2195 0 00:03:12
\ 192.168.10.51 Rome Windows 2000 2195 0 00:00:39
The command is successfully completed.

10. Route Tracking command
A. tracert pop.pcpop.com
B. In addition to displaying routes, pathping pop.pcpop.com also provides S analysis to calculate the % of the dropped packets.
11. Several commands on shared security
A. view the shared resources of your machine. NET Share
B. manually delete shares
NET Share C $/d
NET Share d $/d
NET Share IPC $/d
NET Share ADMIN $/d
Note that there is a space after $.
C. Add a share:
C: \ net share mymovie = E: \ downloads \ movie/users: 1
Mymovie is shared successfully.
At the same time, the number of connected users is limited to 1.
12. Set static IP addresses in DOS lines
A. Set static IP addresses
CMD
Netsh
Netsh> int
Interface> ip
Interface ip> set Add "Local Link" static IP Address Mask Gateway
B. View IP settings
Interface ip> show address
ARP
Displays and modifies the items in the "Address Resolution Protocol (ARP)" cache. The ARP cache contains one or more tables, which are used to store IP addresses and Their resolved physical IP addresses over Ethernet or card rings. Each Ethernet or ring network adapter installed on the computer has its own independent table. If no parameters are available, the ARP command displays help information.
Syntax
ARP [-A [inetaddr] [-N ifaceaddr] [-G [inetaddr] [-N ifaceaddr] [-D inetaddr [ifaceaddr] [-s inetaddr etheraddr [ifaceaddr]
Parameters
-A [inetaddr] [-N ifaceaddr]
Displays the current ARP cache table for all interfaces. To display the ARP cache entry of the specified IP address, use ARP-A with the inetaddr parameter. inetaddr here represents the specified IP address. To display the ARP cache table for the specified interface, use the-n ifaceaddr parameter. ifaceaddr here represents the IP address assigned to the specified interface. The-N parameter is case sensitive.
-G [inetaddr] [-N ifaceaddr]
Same as-.
-D inetaddr [ifaceaddr]
Delete the specified IP address. inetaddr here represents the IP address. To delete an item in a table for the specified interface, use the ifaceaddr parameter. ifaceaddr here represents the IP address assigned to the interface. To delete all items, use the asterisk (*) wildcard to replace inetaddr.
-S inetaddr etheraddr [ifaceaddr]
Add a static entry that parses the IP address inetaddr into the physical address etheraddr to the ARP cache. To add a static ARP cache entry to the table of the specified interface, use the ifaceaddr parameter. ifaceaddr here represents the IP address assigned to the interface.
/?
Display help at the command prompt.
Note
The IP addresses of inetaddr and ifaceaddr are represented in decimal notation with dots.
The physical address etheraddr consists of six bytes, which are expressed in hexadecimal notation and separated by hyphens (for example, 00-aa-00-4f-2a-9c ).
The items added through the-S parameter are static items that do not time out in the ARP cache. If the TCP/IP protocol is terminated and then started, these items will be deleted. To create a permanent static ARP cache entry, use the appropriate ARP command in the batch processing file and run the batch processing file at startup through the scheduler program.
This command is available only when the Internet Protocol (TCP/IP) is installed as a component of the network adapter attribute in a network connection.
Example
To display the ARP cache tables for all interfaces, enter ARP-.
For an interface whose IP address is 10.0.0.99, to display its ARP cache table, enter ARP-a-n 10.0.0.99.
To add a static ARP cache entry that resolves the IP address 10.0.0.80 to the physical address 00-aa-00-4f-2a-9c, enter ARP-s 10.0.0.80 00-aa-00-4f-2a-9c.
At/
If the command to be run is not an executable (.exe) file, use CMD/C to load cmd.exe before the command as follows:
CMD/C dir> C: \ test. Out.
Rsh
Run commands on the remote computer that runs the RSH service. Windows XP and Windows 2000 do not provide the RSH service. Windows 2000 Server Resource Kit provides the RSH service named rshsvc.exe. Use RSH without parameters to display help.
Syntax: RSH [host] [-l username] [-N] [command]
Parameter host
Specifies the remote computer that runs the command.
-L Username
Specifies the user name used on the remote computer. If this parameter is omitted, the name of the currently logged on user is used.
-N
Redirects the RSH input to a null device. This prevents display of local computer command results.
Command
Specify the command to run.
/?
Display help at the command prompt.
Comment on standard operations
The rsh command copies the standard input to the remote command, the standard output of the Remote Command to its standard output, and the standard error of the Remote Command to its standard error. RSH is usually terminated when a remote command is terminated.
Use a redirection symbol
To enable redirection on a remote computer, enclose the redirection symbol in quotation marks (for example, "> "). If no quotation marks are used, redirection occurs on the local computer. For example, the following command attaches the remote file "remotefile" to the local file "localfile:
Rsh othercomputer cat remotefile> localfile
Run the following command to append the remote file remotefile to the remote file otherremotefile:
Rsh othercomputer cat remotefile ">" otherremotefile
Use RSH
When using a computer that has logged on to a domain and runs Windows XP Professional, the primary domain controller for this domain must be available to confirm that the user name or rsh command fails.
. Rhosts file
The. rhosts file usually permits the network access permission of the UNIX system .. The rhosts file lists the names of computers that can access the remote computer and their associated logon names. When you run the RCP, rexec, or rsh command on a remote computer with the. rhosts file correctly configured, you do not have to provide logon and password information for the remote computer.
The. rhosts file is a text file. Each row in this file is an entry. An entry consists of a local computer name, a local user name, and all comments about the entry. Each entry is separated by a tab or space. The comment is preceded by a symbol. For example:
Host7 # This computer is in room 31a
The. rhosts file must be in the user's home directory of the remote computer. For more information about specific execution of remote computer. rhosts files, see remote system documentation.
This command is available only when the Internet Protocol (TCP/IP) is installed as a component of the network adapter attribute in a network connection.
Example
To run the telcon command on the remote computer vax1 with the name admin1, type:
Rsh vax1-l admin1 telcon

TFTP
Transfers files to remote computers running the Common File Transfer Protocol (TFTP) service or daemon (especially UNIX computers) or from a remote computer running the Common File Transfer Protocol (TFTP) services or daemon remote computers (especially computers running UNIX) transfer files.
Syntax TFTP [-I] [host] [{GET | put}] [Source] [destination]
Parameters
-I
Specify the binary image transfer mode (also known as the octal mode ). In binary image mode, a file is transmitted in one byte. This mode is used when binary files are transmitted. If-I is omitted, the file is transmitted in ASCII mode. This is the default transfer mode. This mode converts the end of a line (EoL) to the appropriate format of the specified computer. This mode is used for transferring text files. If the file is successfully transferred, the data transfer rate is displayed.
Host
Specifies the local or remote computer.
Put
Transfers the destination file on the local computer to the source file on the remote computer. Because TFTP does not support user authentication, users must log on to a remote computer and files must be writable on the remote computer.
Get
Transfers the destination file on the remote computer to the source file on the local computer.
Source
Specifies the file to be transferred.
Destination
Specifies the location to which the file is transferred. If destination is omitted, it is assumed that it has the same name as source.
/?
Display help at the command prompt.
Note
Use get Parameters
If you want to transmit the file filetwo on the local computer to the file fileone on the remote computer, specify put. If you want to transmit filetwo files from a remote computer to fileone files on the remote computer, you must specify get.
Windows XP or Windows 2000 does not provide general-purpose TFTP servers. The TFTP Server service provided by Windows 2000 only provides remote boot for Windows XP and Windows 2000 client computers.
This command is available only when the Internet Protocol (TCP/IP) is installed as a component of the network adapter attribute in a network connection.
Example
To transmit the file users.txt to users19.txt on vax1 from a local computer, type:
TFTP vax1 put users.txt users19.txt
NBTSTAT
Displays NetBIOS statistics, NetBIOS name table, and NetBIOS name cache for local and remote computers based on the TCP/IP protocol. NBTSTAT can refresh the NetBIOS name cache and the registered Windows Internet Name Service (WINS) Name. Use NBTSTAT without parameters to display help.
Syntax
NBTSTAT [-A remotename] [-A IPaddress] [-C] [-N] [-R] [-R] [-rr] [-S] [-S] [interval]

Parameters
-A remotename
The NetBIOS name table of the remote computer is displayed. remotename is the name of the remote computer NetBIOS. The NetBIOS name table is a list of NetBIOS names used by applications running on the computer.
-A IPaddress
The NetBIOS name table of the remote computer is displayed, which is specified by the IP address of the remote computer (separated by decimal points ).
-C
The NetBIOS name cache content, NetBIOS name table, and resolved addresses are displayed.
-N
Displays the NetBIOS name table of the local computer. The status in registered indicates that the name is registered through a broadcast or WINS server.
-R
Displays statistics on NetBIOS name resolution. On a Windows XP Computer configured to use wins, this parameter returns a name number that has been parsed and registered through broadcast and wins.
-R
Clear the content cached by NetBIOS Name and re-load the project with the # pre mark from the LmHosts file.
-Rr
Release and refresh the NetBIOS Name of the Local Computer registered with wins.
-S
Displays NetBIOS client and server sessions and tries to convert the target IP address to a name.
-S
Displays NetBIOS client and server sessions, and lists remote computers only through IP addresses.
Interval
Resend the selected statistics to interrupt the specified number of seconds in interval between each display. Press Ctrl + C to stop displaying statistics again. If this parameter is omitted, netstat displays the current configuration information only once.
/?
Display help at the command prompt.
Note
The nbtstat command line parameters are case sensitive.
The following table lists the column headers generated by NBTSTAT. Title Description
The number of bytes received by input.
The number of bytes sent by output.
In/out whether the connection is from the computer (outgoing) or other computers to the local computer (incoming ).
The time that the lift name table cache items remain before they are cleared.
Local name the local NetBIOS name is associated with the connection.
The name or IP address of the remote host related to the remote computer.
<03> convert to the last byte of the hex NetBIOS name. Each NetBIOS name is a string of 16 characters. Because the last byte usually has a special meaning, because the same name (only the last byte is different) may appear several times on a computer. For example, <20> An ASCII text is a space.
Type name type. The name can be a single name or a group name.
Status: whether the NetBIOS service ("registered") is running on the remote computer, or whether the same service has been registered for the same computer name ("conflicted ").
State the status of the NetBIOS connection.
The following table lists possible NetBIOS connection statuses. Status description
The connected session has been created.
The end point of the connected connection has been created and associated with the IP address.
The endpoint is available for the inner connection.
Idle the end point has been opened and cannot receive connections.
The connection session is in the connection phase. In this phase, the ing from name to IP address of the selected target is being resolved.
Accepting inbound sessions is currently being accepted and will be connected within a short period of time.
Reconnect session attempts to reconnect (if the first connection fails ).
The outbound session is in the connection phase. A TCP connection is being created at this stage.
The inbound session is in the connection period.
Disconnecting Session is being disconnected.
The connection to the local computer has been interrupted and is waiting for confirmation from the remote system.
This command is available only when the Internet Protocol (TCP/IP) is installed as a component of the network adapter attribute in a network connection.
Example
To display the NetBIOS name table for a remote computer named "corp07", type:
NBTSTAT-A corp07
To display the NetBIOS name table of the remote computer with the assigned IP address 10.0.0.99, type:
NBTSTAT-A 10.0.0.99
To display the NetBIOS name table of the Local Computer, type:
NBTSTAT-n
To display the content cached by the Local Computer NetBIOS name, type:
NBTSTAT-C
To clear the NetBIOS name cache and reload the project marked with # pre in the local LmHosts file, type:
NBTSTAT-R
To release the NetBIOS name registered through the WINS server and re-register it, type: NBTSTAT-rr
To display NetBIOS session statistics at an IP address every 5 seconds, type:
NBTSTAT-S 5
Netstat
Displays active TCP connections, computer listening ports, Ethernet statistics, IP Route tables, and IPv4 statistics (for IP, ICMP, TCP, and UDP protocols) and IPv6 statistics (for IPv6, ICMPv6, TCP over IPv6, and UDP over IPv6 ). If no parameter is required during use, netstat displays the active TCP connection.
Syntax: netstat [-A] [-E] [-N] [-O] [-P Protocol] [-R] [-S] [interval]
Parameters
-
Display All active TCP connections and TCP and UDP ports listened by the computer.
-E
Displays Ethernet statistics, such as the number of bytes sent and received, and the number of packets. This parameter can be used with-s.
-N
The active TCP connection is displayed. However, the address and port number are displayed only in numbers, but the name is not determined.
-O
Displays the active TCP connection and the ID of each connection process (PID ). You can find PID-based applications on the processes tab in Windows Task Manager. This parameter can be used with-a,-N, and-P.
-P protocol

Displays the connection of the Protocol specified by protocol. In this case, protocol can be TCP, UDP, tcpv6, or udpv6. If this parameter is used with-s to display statistics by Protocol, the Protocol can be TCP, UDP, ICMP, IP, tcpv6, udpv6, ICMPv6, or IPv6.
-S
Displays statistics by protocol. By default, statistics on TCP, UDP, ICMP, and IP protocols are displayed. If the IPv6 protocol of Windows XP is installed, statistics about the TCP, UDP, ICMPv6, and IPv6 protocols on IPv6 are displayed. You can use the-p parameter to specify the Protocol set.
-R
Displays the content of the IP route table. This parameter is equivalent to the route print command.
Interval
The selected information is re-displayed every interval seconds. Press Ctrl + C to stop displaying statistics again. If this parameter is omitted, netstat prints the selected information only once.
/?
Display help at the command prompt.
Note
Parameters Used with this command must be prefixed with a hyphen (-) instead of a forward slash.
Netstat provides the following statistics:
PROTO
The name of the Protocol (TCP or UDP ).
Local Address
The IP address and port number of the local computer. If the-n parameter is not specified, the local computer name corresponding to the IP address and port name is displayed. If the port has not been created, the port is displayed as a star number.
Foreign address
The IP address and port number of the remote computer connected to the slot. If the-n parameter is not specified, the name corresponding to the IP address and port is displayed. If the port has not been created, the port is displayed as a star number.
(State)
Indicates the status of the TCP connection. The possible status is as follows:
Close_wait
Closed
Established
Fin_wait_1
Fin_wait_2
Last_ack
Listen
Syn_received
Syn_send
Timed_wait
For TCP connection status information, see RFC 793.
This command is available only when the Internet Protocol (TCP/IP) is installed as a component of the network adapter attribute in a network connection.
Example
To display Ethernet statistics and all protocols statistics, enter the following command:
Netstat-e-s
To display only the statistics of TCP and UDP protocols, enter the following command:
Netstat-s-p TCP UDP
To display the active TCP connection and process ID every five seconds, enter the following command:
NBTSTAT-O 5
To display active TCP connections and process IDs in numbers, enter the following command:
NBTSTAT-n-o
RunAs
Allows users to run specified tools and programs with other permissions, rather than the permissions provided by the user's current logon.
Syntax
RunAs [{/profile |/noprofile}] [/ENV] [/netonly] [/smartcard] [/showtrustlevels] [/trustlevel]/User: useraccountname Program
Parameters
/Profile
Load the user's configuration file. /Profile is the default value.
/No profile
/Noprofile indicates that the user's configuration file is not loaded. This makes the application load faster, but it also causes errors in some applications.
/Env
Specify the current network environment, rather than the local environment of the user.
/Netonly
Specifies that the specified user information is only used for remote access.
/Smartcard
/Smartcard indicates whether the creden。 are provided by the smart card.
/Showtrustlevels
LIST/trustlevel toggle.
/Trustlevel
Specifies the authorization level of the application running. Use/showtrustlevels to view available trust levels.
/User: useraccountname
Specifies the name of the user account under which the program runs. The format of the user account should be user @ domain or domain \ User.
Program
Specifies the program or command to run with the account specified in/user.
/?
Display help at the command prompt.
Note
An administrator can use an account with limited permissions to perform daily and non-administrative tasks. An account with more permissions is used only when a specific management task is executed. You can log on to a general account and run the RunAs command to run the tool that requires greater permissions.
For more information about how to use the RunAs command, see related topics ".
Although RunAs is generally used by the Administrator account, it is not limited to the administrator account. Any user with multiple accounts can use alternate creden。 to run programs, MMC console, or control panel items.
To use the Administrator account on a computer, for/User:, type one of the following parameters:
/User: administrat10000countname @ computername
/User: computername \ administrat10000countname
To use this command as a domain administrator, type one of the following parameters:
/User: administrat10000countname @ domainname
/User: domainname \ administrat10000countname
The RunAs command allows you to run a program (*. EXE), save the MMC console (*. MSC), program and save the shortcut of the MMC console, and "Control Panel" items. When you log on to a computer as a member of another group (such as the "users" or "Power Users" group), you can run it as an administrator.
You can use the RunAs command to start any program, MMC controller, or control panel item. As long as appropriate user accounts and password information are provided, user accounts can log on to the computer, the program, MMC console, and control panel items can be used in the system and for this user account.

The RunAs command allows you to manage servers in other domains (the computers running the tool and the servers to be managed are in different domains ).
If you try to use RunAs to start a program, MMC console, or control panel from a network location, it may fail because the creden。 used to connect to the network share are different from those used to start the program. The creden of the latter may not be able to access the same network share.
Some items, such as the "Printer" folder and desktop items, are indirectly opened by Windows 2000 and cannot be started using the RunAs command.
If the RunAs command fails, it may be because the RunAs Service is not running or the user account used is invalid. To check the status of the RunAs Service, click services and applications in Computer Management and then click Services ". To test the user account, try to use this account to log on to the appropriate domain.
Example
To start the Windows 2000 command line instance as an administrator on a local computer, type:
RunAs/User: localmachinename \ Administrator cmd
Enter the administrator password when prompted.
To start the "Computer Management" snap-in instance using the domain administrator account named companydomain \ domainadmin, type:
RunAs/User: companydomain \ domainadmin "MMC % WINDIR % \ system32 \ compmgmt. msc"
Enter the account password when prompted. To start the "Notepad" instance using the domain administrator account user in the domain named domain.microsoft.com, type:
RunAs/User: user@domain.microsoft.com "Notepad my_file.txt"
Enter the account password when prompted.
To start an instance of a command prompt window, saved MMC console, control panel item, or program that manages servers in other locations, type:
RunAs/netonly/User: domain \ Username "command"
Domain \ USERNAME must be a user with sufficient permissions to manage the server. Enter the account password when prompted.
Route
Display and modify entries in the local IP address routing table. Use a route without parameters to display help.
Syntax
Route [-F] [-p] [Command [destination] [mask netmask] [gateway] [metric] [If interface]
Parameters
-F
Clear all routes that are not the primary route (the network mask is 255.255.255.255), back-to-network route (the target is 127.0.0.0, and the network mask is 255.255.255.0), or Multicast Route (the target is 224.0.0.0, the route table of the route entry whose network mask is 240.0.0.0. If it is used with one of the commands (such as ADD, change, or), the table is cleared before running the command.
-P
When used together with the Add command, specify that the route is added to the Registry and initialize the IP route table when starting the TCP/IP protocol. By default, the added route is not saved when the TCP/IP protocol is enabled. When used with the print command, the permanent route list is displayed. All other commands ignore this parameter. The permanent route is stored in the registry at HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Tcpip \ Parameters \ persistentroutes.
Command
Specify the command to run. The following table lists valid commands. Command Purpose
Add route entry
Change to change an existing route
Delete A route
Print route
Destination
The Network destination address of the route. The destination address can be an IP network address (where the host address bit of the network address is set to 0), the host route is an IP address, and the default route is 0.0.0.0.
Mask subnetmask
Specifies the netmask (also called the subnet mask) associated with the target network address ). The subnet mask can be an appropriate subnet mask for IP addresses, 255.255.255.255.255 for host routes, and 0.0.0.0 for default routes. If this parameter is ignored, the subnet mask 255.255.255.255 is used. When defining a route, the destination address cannot be more detailed than the corresponding subnet mask due to the relationship between the destination address and subnet mask. In other words, if one of the subnet masks is 0, the corresponding bit in the target address cannot be set to 1.
Gateway
Specify the previous or next hop IP address that exceeds the reachable address set defined by the Network target and subnet mask. For a local connection subnet route, the gateway address is the IP address assigned to the connection subnet interface. For a remote route that can be used only by one or more routers, the gateway address is an IP address that can be directly reached allocated to the adjacent router.
Metric
Specify the integer (range: 1 ~ 9999). It is used to select the route that best matches the destination address in the forwarding packet among multiple routes in the routing table. The selected route has the minimum number of hops. The number of hops reflects the quantity, speed, reliability, throughput, and management attributes of the hops.
If Interface
Specify the interface index of the interface that the target can reach. Use the route print command to display the index list of the interface and its corresponding interface. The interface index can be in decimal or hexadecimal format. For hexadecimal values, add 0x before the hexadecimal number. When the if parameter is ignored, the interface is determined by the gateway address.
/?
Display help at the command prompt.

Note
The value in the number of hops column in the route table is large because TCP/IP is allowed to automatically determine the number of hops in the route table based on the IP address, subnet mask, and default gateway configuration of each LAN interface.. By default, the auto-determine interface hops determine the speed of each interface and adjust the route hops of each interface. Therefore, the routes created by the fastest interface have the lowest hops. To delete the number of hops, disable automatic interface hops in the Advanced properties of the TCP/IP protocol for each LAN connection.
If an appropriate entry exists in the local network file of the systemroot \ system32 \ drivers \ etc folder, the name can be used for destination. As long as the name can be resolved to an IP address through the standard host name resolution technology such as "Domain Name System" (DNS) query, it can be used for gateway, DNS query uses the local host file and NetBIOS name stored in the systemroot \ system32 \ drivers \ etc folder for resolution.
If it is a print or command, you can ignore the gateway parameter and use wildcards to indicate the target and gateway. The value of destination can be a wildcard specified by the asterisk. If the specified target contains an asterisk (*) or question mark (?), It is regarded as a wildcard and only prints or deletes matched target routes. An asterisk represents a sequence of any character, and a question mark represents any character. For example, 10. *. 1,192. 168. *, 127. *, and * 224 * are all effective use of the asterisk wildcard.
An error message "route: Bad gateway address netmask" is displayed when an invalid combination of target and subnet mask (netmask) values is used. This error occurs when one or more bits in the target are set to 1 and their corresponding bits in the subnet mask are set to 0. You can use binary notation to indicate the target and subnet mask to check this situation. The subnet mask in binary format includes a series of 1 representing the destination network address and a series of 0 representing the destination host address. Check whether some bits of the target host address (defined by the subnet mask) are set to 1.
Only the route commands of Windows NT 4.0, Windows 2000, Windows Millennium Edition, and Windows XP support the-p parameter. The route command of Windows 95 or Windows 98 does not support this parameter.
This command is available only when the Internet Protocol (TCP/IP) is installed as a component of the network adapter attribute in a network connection.
Example
To display the complete content of the IP route table, type:
Route print
To display routes starting with 10 in the IP route table, type:
Route print 10 .*
To add a default route entry whose default gateway address is 192.168.12.1, type:
Route add 0.0.0.0 mask 0.0.0.0 192.168.12.1
To add a route entry whose destination is 10.41.0.0, whose subnet mask is 255.255.0.0, and whose next hop address is 10.27.0.1, type:
Route add 10.41.0.0 mask 255.255.0.0 10.27.0.1
To add a permanent route whose destination is 10.41.0.0, The subnet mask is 255.255.0.0, And the next hop address is 10.27.0.1, type:
Route-P add 10.41.0.0 mask route 255.0.0 10.27.0.1
To add a route entry with the target 10.41.0.0, subnet mask 255.0.0, Next Hop address 10.27.0.1, and number of hops 7, type:
Route add 10.41.0.0 mask 255.255.0.0 10.27.0.1 metric 7
To add a route entry whose destination is 10.41.0.0, The subnet mask is 255.0.0, the next hop address is 10.27.0.1, and the interface index is 0x3, type:
Route add 10.41.0.0 mask route 0.0 10.27.0.1 if 0x3
To delete a route whose destination is 10.41.0.0 and subnet mask is 255.255.0.0, type:
Route 10.41.0.0 mask route 0.0
To delete all routes starting with 10 in the IP route table, type:
Route 10 .*
To change the next hop address of the route whose destination is 10.41.0.0 and whose subnet mask is 255.255.0.0 from 10.27.0.1 to 10.27.0.25, type:
Route change 10.41.0.0 mask 255.255.0.0 10.27.0.25
Routing ip ospf add // show routefilter add, delete, configure, or display the routing filtering of OSPF external routes.
Routing ip ospf show areastats displays OSPF region statistics.
Routing ip ospf show lsdb displays the OSPF link status database.
Routing ip ospf show virtifstats displays OSPF Virtual link statistics.
Routing IP relay set global configuration "DHCP relay agent" global settings.
Routing IP relay add // set interface add, delete, or configure "DHCP relay agent" settings on the specified interface.
Routing IP relay Add/dhcpserver add or delete the IP address of the DHCP server in the DHCP server address list.
Routing IP relay show ifbinding display interface IP Address binding.
Routing IP relay show ifconfig displays the "DHCP relay agent" configuration for each interface.
Routing IP relay show ifstats displays DHCP statistics for each interface.
Routing IP rip set/show global configure IP rip global settings.
Routing IP rip add // set/show interface add or configure IP rip settings on the specified interface.
Routing IP rip Add/peerfilter add or delete rip peer filters.
Routing IP rip Add/acceptfilter add or delete rip route filters in the list of accepted routes.
Routing IP rip Add/announcefilter add or delete rip route filters in the published route list.
Routing IP rip add // show neighbor add or delete rip neighbors.
Routing IP rip set/show flags configure advanced IP rip settings on the specified interface.
Routing IP rip show globalstats displays global rip parameters.
Routing IP rip show ifbinding display interface IP Address binding.
Routing IP rip show ifstats displays the rip statistics for each interface.
IPX netsh routing command
Routing IPX Add/set staticroute add or configure a static IPX route in the IPX route table.
Routing IPX Add/set staticservice add or configure the static sap service in the SAP service table.
Routing IPX Add/set filter add or configure IPX packet filter on the specified interface.
Routing IPX Add/set interface enables IPX routing on the request dialing interface, or configures IPX settings on the specified interface.
Routing IPX set global configuration global IPX route settings.
Routing IPX rip Add/set filter add and configure the rip route filter.
Routing IPX rip set global configuration rip settings for global IPX.
The routing IPX rip set interface configures the rip settings of IPX on the specified interface.
Routing IPX sap Add/set filter add or configure the sap service filter.
Routing IPX sap set global configuration sap settings for global IPX.
Routing IPX sap set interface configure the sap settings of IPX on the specified interface.
Routing IPX NetBIOS add nbname Add the static NetBIOS name to the IPX NetBIOS name table.
Routing IPX NetBIOS set interface configure IPX-based NetBIOS settings on the specified interface.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.