Windows Network command line program parameter description

Source: Internet
Author: User

Windows command line program
C: \> nslookup www.jb51.net
Server: www
Address: 192.168.5.8
Non-authoritative answer:
Name: www.jb51.net
Address: 202.103.69.64
This part includes:
Shi
Use ipconfig/all to view configurations
Use ipconfig/renew to refresh the configuration
For Windows 95 and Windows 98 that enable DHCP, use the release and renew options of the winipcfg command instead of the ipconfig/release and ipconfig/renew commands to manually release or update the customer's IP configuration lease.
Use ipconfig to manage DNS and DHCP category IDS
Use Ping test to connect to ping-a 0.0.0.0ip address is to resolve the NETBIOS Host Name
You can use the-w (wait) option to specify a longer timeout period.
C:> ping-n 2-l 1450 172.16.48.10
Pinging 172.16.48.10 with 1450 bytes of data:
Reply from 172.16.48.10: bytes = 1450 time <10 ms TTL = 32
Reply from 172.16.48.10: bytes = 1450 time <10 ms TTL = 32
Use Arp to solve hardware address problems
Use nbtstat to resolve NetBIOS names to IP addresses
Use netstat to display connection statistics
Use tracert to track Network Connections
Use pathping to test the vro
Netstat-a displays all ports currently open to your computer
Netstat-s-e displays your network information in detail, including statistics on TCP, UDP, ICMP, and IP addresses.
Detects 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
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
10. Route Tracking command
How Tracert works
By sending "Internet Control Message Protocol (ICMP)" response packets with different TTL values to the target, the Tracert diagnostic program determines the route adopted by the target. Each vro on the path must at least decrease the TTL of the data packet by 1 before forwarding the data packet. When the TTL value on the data packet is reduced to 0, the router should send the "ICMP timeout" message back to the source system.
Tracert sends a response packet whose TTL is 1, and increases TTL by 1 in each subsequent sending process until the target response or TTL reaches the maximum value to determine the route. Check the ICMP timeout message sent back by the Intermediate router to determine the route. Some routers directly discard TTL expired data packets without asking, which is not seen in the Tracert utility.
The Tracert command prints out the list of nearby router interfaces in the path that returns the "ICMP timeout" message in sequence. If the-d option is used, the Tracert utility does not query DNS on each IP address.
A. tracert pop.pcpop.com
C: \> tracert-d 202.103.96.112
Tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name
Option description
-D: do not resolve the IP address to the host name.
-H maximum_hops specifies the number of hops to track the route of the host called target_name.
-J host-list specifies the list of router interfaces in the path used by the Tracert utility package.
-W timeout: the number of milliseconds specified for each reply.
The target host name or IP address of target_name.
B. In addition to displaying routes, pathping pop.pcpop.com also provides S analysis to calculate the % of the dropped packets.
Use pathping to test the vro
The pathping command is a routing tracking tool that combines the ping and tracert commands with other information not provided by the two tools. The pathping Command sends data packets to each vro in the path to the destination within a period of time, and then returns the data packet-based computer results from each hop. Because the command shows how much data packets are lost on any given vro or link, it is easy to determine the vro or link that may cause network problems. Some options are available, as shown in the following table.
Option name Function
-N Hostnames does not resolve the address to the host name.
-H Maximum hops: the Maximum number of hops for a search target.
-G Host-list: Release the source route along the route list.
-P Period: the number of milliseconds that a ping can wait.
-Q Num_queries: the number of queries per hop.
-W Time-out indicates the number of milliseconds each reply takes.
-T Layer 2 tag connects the Layer 2nd priority mark (for example, for IEEE 802.1 p) to the data packet and sends it to each network device in the path. This helps identify network devices that are not correctly configured with Layer 2 priority. The-T switch is used to test QoS connectivity.
-R rsvp isbase Che check to determine whether each vro in the path supports the resource retention Protocol (RSVP), which allows the host to retain a certain amount of bandwidth for the data stream. The-R switch is used to test QoS connectivity.
The default number of hops is 30, and the default waiting time before timeout is 3 seconds. The default time is 250 milliseconds, and the number of queries per vro along the path is 100.
Detects the arp binding (Dynamic and Static) List, displays all the computers connected to me, and displays the IP addresses and MAC addresses of each other.
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
View the shared resources on this IP address.
C: \> net view 192.168.10.8
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.
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.
Set static IP
CMD
Netsh
Netsh> int
Interface> ip
Interface ip> set add "Local Link" static ip Address mask gateway
Run the "route print" command to check the current route table. There should be no routes 61.132.122.118 and 61.132.122.117. If so, run the "route delete (ip)" command to delete the route table. Use commands
Route add-p 61.132.122.118 10.84.0.1
Route add-p 61.132.122.117 10.84.0.3
Route usage tips
Most hosts usually reside in the CIDR block that is connected to only one vro. Because there is only one vro, no vro is used to publish the data to a remote computer. the IP address of the vro can be input as the default gateway of all computers in the CIDR block.
However, when two or more vrouters exist on the network, we do not necessarily want to rely on the default gateway. In fact, we may want to transfer some of our remote IP addresses through a specific vro, while other remote IP addresses are transmitted through another vro.
In this case, we need the corresponding routing information, which is stored in the routing table. Each host and each router has its own unique route table. Most routers use dedicated routing protocols to exchange and dynamically update route tables between routers. However, in some cases, you must manually add the project to the router and Host Routing tables. Route is used to display, manually add, and modify Route table items.
General options:
· Route print
This command is used to display the current project in the route table and the output on the network segment of a single router. Because the network adapter is configured with an IP address, all these items are automatically added.
· Route add
Use this command to add a mail route entry to the route table. For example, if you want to set a route to the destination network of 209.98.32.33, the route must go through five vro CIDR blocks. First, you must go through a vro on the local network with the IP address 202.96.123.5, if the subnet mask is too many then we should enter the following command:
Route add 209.98.32.33 mask merge limit 202.96.123.5 metric 5
· Route change
We can use this command to modify the data transmission route. However, we cannot use this command to change the data destination. In the following example, you can change the data route to another vro, which uses a straight path containing three CIDR blocks:
Route add 209.98.32.33 mask merge limit 202.96.123.250 metric 3
· Route delete
Use this command to delete a route entry from the route table. Example: route delete 209.98.32.33
The interface IP address, subnet mask, and default gateway configurations automatically determine the number of hops in the route table. 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.
For the print or delete 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 delete 10.41.0.0 mask 255.255.0.0
To delete all routes starting with 10 in the IP route table, type:
Route delete 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
How to change the IP address in Windows Server cmd ■-> Windows 2 k/2003 Server
Change the IP address under the command line
Windows is a popular operating system and has powerful functions. It can even do a lot of work in the command line like Unix. The following method is used to change the IP address in the command line. It is introduced to you (annotations in brackets and manual input in bold ):
C: \> ipconfig (use the ipconfig command to check the IP address before the change)
Windows 2000 IP Configuration
Ethernet adapter local connection:
Connection-specific DNS Suffix .:
IP Address ......: 10.1.1.94 (the ip Address before the local connection is changed)
Subnet Mask ......: 255.255.255.0
Default Gateway ......: 10.1.1.254
C: \> netsh (entering the Setting Mode)
Netsh> interface
Interface> ip
Interface ip> set address "Local Connection" static 10.1.1.111 255.255.255.0 10.1.1.254
Interface ip> exit
The set command described above is explained as follows:
Set address-set the IP address and default gateway of the specified interface.
Set dns-set the DNS server mode and address.
Set wins-set the WINS server mode and address.
C: \> ipconfig (use the ipconfig command to check whether the change is successful)

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.