TCP/IP command
1. ping (this command is used in both Windows 95/98 and Windows NT) This program is used to detect the time required for a frame of data to be transferred from the current host to the target host. It sends small data packets and receives response information to determine whether the network between the two computers is connected. When a fault occurs during network operation, it is very effective to use this utility to predict the fault and determine the fault source. If ping fails, you can predict the failure in the following aspects: network connection, network adapter configuration, and IP address availability; if the ping operation is successful and the network is still unavailable, the problem may be caused by the software configuration of the network system. If the ping operation is successful, only a physical path can be connected between the current host and the target host. It also provides many parameters, such as-t, so that the current host continuously sends data to the target host until Ctrl-C is interrupted; -n: you can determine the number of times a message is sent to the target host. The ping command format is as follows: (enter ping in the command line state to display the format and parameter description in English) ping [-t] [-a] [-n count] [-l size] [-f] [-I TTL] [-v TOS] [-r count] [- s count] [[-j host-list] | [-k host-list] [-w timeout] destination-list the parameters are described as follows: -t enables the current host to continuously send data to the target host until Ctrl-C is interrupted;-a displays the network address in the IP address format (not in the Host Name format; -n count specifies the number of ping requests, where count is a positive integer;-l size indicates the size of the data packet sent;-f indicates that the echo group is not grouped by the Intermediate gateway; -I TTL specifies the time range of the ping group. TTL indicates the number of gateways that must be passed before the IP address is stopped.-v TOS service type;-r count Specify the number of routes to be recorded (deprecated and returned);-s count specifies the time used for each round of routing when the-r parameter is used; -j host-list specifies the route for the group. The-k host-list parameter is basically the same as the-j parameter, but no additional host is allowed; -w timeout specifies the timeout interval (unit: milliseconds). The default value is 1000. Generally, we use many parameters such as-t,-n, and-w. For example, if you ping a network address www.sohu.com, "Reply from 202.106.156.197: bytes = 32 time = 541 ms TTL = 245 "indicates that the line between the local IP address and the network address is smooth. If" Request timed out "appears ", it indicates that the small data packet sent at this time cannot reach the destination. There may be two situations: network failure and network connectivity. In this case, you can also use Ping with parameters to determine the situation. For example, ping www.sohu.com-t-w 3000 to continuously send data to the target host, and the response time increases to 3000 ms. If "Reply timed out" is displayed ", it indicates that the network is disconnected. If not all "Reply times out" is displayed, the website is still accessible, but the response time is long or the communication status is poor. Some people use the TTL value to determine the Operating System. Yan Bing believes that, relatively speaking, it is a bit unrealistic. 2. winipcfg (ipconfig/ifconfig) both winipcfg and ipconfig are used to display the IP Protocol configuration information in the host. Only winipcfg applies to Windows 95/98, while ipconfig applies to Windows NT, and ifconfig is in UNIX. If you run winipcfg directly without a parameter, it displays the specific information in the form of a Windows window. The information includes the physical address of the network adapter, the IP address of the host, the subnet mask, and the default gateway. Click "other information" to view the host information, for example: host Name, DNS server, and node type. The physical address of the network adapter is useful when detecting network errors. The Command Format of ipconfig is as follows: ipconfig [/? |/All |/release [adapter] |/renew [adapter] the parameters are described as follows :/? Display the ipconfig format and parameters in English;/all display all configuration information;/release for the specified adapter (or all the adapters) release the IP address (only applies to DHCP ); /renew updates the IP address (only for DHCP) for the specified adapter (or all adapters ). Use the ipconfig command without parameters to obtain the following information: IP address, subnet mask, and default gateway. With ipconfig/all, you can get more information: Host Name, DNS server, node type, physical address of the network adapter, IP address of the host, subnet mask, and default gateway. 3. tracert (this command is also used in Windows 95/98 and Windows NT) the function of this program is to determine the path of the data packet to the target host, display the list of relay nodes and the arrival time of the data packet. The format of the tracert command is as follows: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name the parameters are described as follows: -d does not parse the host name;-h maximum_hops specifies the maximum number of rounds to search for the destination address;-j host-list releases the source route along the host list; -w timeout specifies the timeout interval (in milliseconds ). Because most of our technology networks use satellite Internet access, domestic fees are free, and international fees are 4 RMB/M, you must use the tracert command to determine whether a website belongs to a domestic website or an international website. if the 159.226.1.189 route appears in the routing table, it indicates that the website belongs to an international website and is charged for use. If 159.226.1.189 is not displayed in the routing table, the website is a domestic website and is free of charge. In UNIX, there is a tool called traceroute, which is a diagnostic tool written by Van jacbson with the same functions. 4. netstat (this command is used in both Windows 95/98 and Windows NT) helps us understand the overall usage of the network. It displays the details of the currently active network connection, such as the protocol type used, the current host and the remote host (one or more) and the connection status between them. Use netstat? The Command Format and parameter description are displayed. The netstat command format is as follows: netstat [-a] [-e] [-n] [-s] [-p proto] [-r] [interval] the parameters are described as follows: -a: displays the port numbers of all hosts;-e: displays Ethernet statistics;-n: displays the address and port in a digital table;-p proto: displays the specific usage information of specific protocols; -r displays the content of the local route table;-s displays the usage status of each Protocol (including TCP, UDP, and IP); interval re-displays the selected status, the interval (in seconds) between each display. Press Ctrl + C to stop the display again. 5. arp (this command is also used in Windows 95/98 and Windows NT) arp commands are mainly used to display and modify the NIC address of a specific IP address. In fact, there are many useful functions, I will not go into details here. I still remember I wrote a detailed method for arp. Use arp /? The Command Format and parameter description are displayed. The Command Format of arp is as follows: arp-s inet_addr eth_addr [if_addr] arp-d inet_addr [if_addr] arp-a [inet_addr] [-N if_addr] the parameters are described as follows: inet_addr IP address; eth_addr Ethernet Card address;-a displays the network card address of an IP address (without an IP address, displays the network card address of all Activated IP addresses) (ping An IP address before using this parameter);-d: Delete the host with the specified IP address;-s: add the host and the ethernet card address corresponding to the IP address. To run these programs, you only need to enter the program name in the "DOS" or "Windows Start Menu" Running Bar as a command line. Flexible use of these programs not only gives you a general understanding of the network usage of your host, but also allows you to manage the network, such as checking whether the network line is smooth, whether IP addresses are stolen in the LAN. Note: Except for the winipcfg (ipconfig) and netstat commands that are not followed by the host address (IP address or host name), the other three commands (ping, tracert, arp) the host address must be followed.