Network Command List (absolutely practical)

zhaozj2021-02-16  89

When you open your browser, when you are free to travel in the Internet world of Hao Rhai, is it addicted to various utility software? Among them, a large part is the network tool! But please don't ignore your front -windows (including Win98 and NT), there are many network utilities, which is relatively simple, but is not simple. Based on the principle of "simple is beautiful", the following will show you Fengming ...

Ping

Ping is a utility that uses a high frequency that determines if the local host can exchange (send and receive) datagrams with another host. According to the information returned, you can infer whether the TCP / IP parameter is set correctly and if it is running. It should be noted that the TCP / IP configuration is correct if the TCP / IP configuration is successful, and you must perform a large number of local hosts and remote hosting data reports to be sure that TCP / The correctness of IP.

  simple saying, ping is a test program. If ping is running correctly, you can rule out the network access layer, network card, and modem input output line, cable and router, etc., thereby reducing the scope of the problem. . However, since the size of the issued datagram and endless high-speed transmission can be customized, Ping is also used as a tool with some people as a DDOS (reject service attack) tool, the front time Yahoo is a hacker with hundreds of high-speed access The Internet's computer continuously sends a large amount of PING datagram.

According to the default settings, the ping command running on Windows sends 4 ICMP (Internet Control Packet Protocol) to return requests, each 32-byte data, if everything is normal, you should get 4 reply answers.

The ping can display the time quantity between the sendback request to the return response in milliseconds. If the response is short, it means that the datagram does not have to pass too much router or network connection speed. Ping also displays the TTL (Time to Live existence time) value, you can calculate how many routers have passed through the TTL value: Source site TTL start value (ie, the number of two multipliers to returning TTL slightly larger ) - The TTL value is returned. For example, returning a TTL value of 119, then it is possible to estimate the TTL start value of 128, and the source location to the target location to pass 9 router network segments (128-119); if the TTL value is 246, The TTL start value is 256, and the source location to the target location to pass 9 router network segments.

Typical order of network failures through ping

Under normal circumstances, when you use the ping command to find the problem or verify the network operation, you need to use many ping commands, if all are running correctly, you can believe that the basic connectivity and configuration parameters are no problem; if Some ping commands have a run failure, which can also indicate where to find problems. A typical detection order and corresponding possible faults are given below:

Ping 127.0.0.1 - This ping command is sent to the IP software of the local computer, which never exits the computer. If this does not do this, it means that there is some most basic issues for the installation or running of TCP / IP.

Ping Native IP - This command is sent to the IP address configured by your computer, and your computer should have a response to the ping command. If not, there is a problem with the local configuration or installation. This issue occurs, LAN users disconnect the network cable and resend the command. If the network is turned off, this command is correct, then another computer may have the same IP address.

Ping LAN Other IPs - This command should leave your computer, reach other computers through the NIC and network cable, return. Received a return response indicates that the NIC and the carrier in the local network operate correctly. But if you receive 0 feedback answers, then the subnet mask (when subnet split, the network part of the IP address and the host part) is incorrect or the network card configuration error or the cable system has problems. Ping Gateway IP - This command If the answer is correct, it indicates that the gateway router in the LAN is running and can make a response.

Ping Remote IP - If you receive 4 answers, the default gateway is used to successfully use. For dial-up users, they represent the accessible Internet (but do not rule out the ISP DNS).

Ping localhost - localhost is a network reserved name of the system, which is an alias of 127.0.0.1, each of which should be able to convert the name into this address. If there is no such band, there is a problem in the host file (/ windows / host).

Ping www.yahoo.com - Erupted this domain name, your computer must first convert the domain name into an IP address, usually by DNS server if there is a failure here, indicating that the IP address of the DNS server is incorrect or DNS server There is a fault (for dial-up users, some ISPs have no need to set up DNS servers). By the way: You can also use this command to implement the switching function of the domain name on the IP address.

If all the ping commands listed above can run normally, then you can rest assured that you can make local and remote communications in your computer. However, the success of these commands does not mean that all your network configurations are no problem, for example, some subnet mask errors may not be detected by these methods.

Common Parameter Options for Ping Commands

PING IP -T - Continuously performs the ping command until the user is interrupted by the user in Ctrl C.

Ping IP -L 2000 - Specifies the length of the data in the ping command to 2000 bytes instead of the default 32 bytes.

PING IP -N - Performs a ping command for a specific number of times.

Netstat

NetStat is used to display statistics related to IP, TCP, UDP, and ICMP protocols, generally used to verify network connectivity of each port of this unit.

If your computer is sometimes accepted, you don't have to feel strange, TCP / IP can allow these types of errors and can automatically return the datagram. However, if the number of accumulated errors accounts for a considerable percentage of the received IP datagram, or its number is rapidly increased, then you should use NetStat to check why these situations.

Some common options for NetStat:

NetStat -s - This option can display its statistics in accordance with each protocol. If your application (such as a web browser) runs slower, or if you cannot display data such as the web page, you can use this option to see the information displayed. You need to carefully check the rows of statistics, find the keywords of the error, and then determine the problem.

NetStat-E - This option is used to display statistics about Ethernet. It lists the items that include the total number of bytes of the transmitted datagram, the number of errors, the number of deletions, the number of datagrams, and the number of broadcasts. These statistics have both transmitted data reports, as well as the number of received data. This option can be used to count some basic network traffic).

NetStat -R - This option can display information about the routing table, similar to the information you see when the Route print command is used later. In addition to displaying valid routing, it also displays currently valid connections.

NetStat -a-- This option displays a list of all valid connection information, including the established connection (ESTABLISHED), which also includes those connections to the Listening request. NetStat -N - Displays all established effective connections.

NetStat's wonderful

Regular Internet access people usually use ICQ, I don't know if you are harassing by some annoying people, I don't dare to go online, I want to complaint but I don't know and start? In fact, you only need to know the IP of the other party, you can complain to the ISP of him. But how can I know the other's IP through ICQ? If the other party selects the IP address when setting ICQ, you can't see it in the information bar. In fact, you can easily do this with NetStat: When he is connected to you through ICQ or other tools (for example, sending him an ICQ message or send you a message), you immediately Enter netstat -n or netstat -a under DOS PROMPT to see the IP or ISP domain used when the other party is networked. Even the port used is completely exposed, if you want to give him some lessons, this information is enough ...

IPConfig

IPCONFIG utility and its equivalent graphical user interface - WinDows 95/98 WiniPCFG can be used to display the current TCP / IP configuration settings. This information is generally used to verify that manually configured TCP / IP settings is correct. However, if your computer and the local area network use the dynamic host configuration protocol (Dynamic Host Configuration Protocol, DHCP - Windows NT assigns less IP addresses to more hosting protocols, similar to dial-up Internet access Dynamic IP assignment), the information displayed by this program may be more practical. At this time, IPConfig allows you to know if your computer is successful to rent to an IP address, if you rent it, you can understand what the address is currently allocated. Understanding the current IP address of the computer, the subnet mask, and the default gateway are actually the necessary items for testing and fault analysis.

The most common option:

ipconfig - Do not take any parameter options when using IPConfig, then display IP addresses, subnet masks, and default network values ​​for each configured interface.

IPCONFIG / ALL - When using all options, IPConfig can display additional information it has configured and needed for the DNS and WINS servers, and display the physical address (MAC) in the local network card. If the IP address is rented from the DHCP server, IPConfig will display the DHCP server's IP address and rental addresses are expected to expire (for details on DHCP server, please see other books for NT servers or ask your network management), its output Information is shown in the lower half of Figure 6.

IPConfig / Release and IPConfig / Renew - This is two additional options that can only work on a computer that leases its IP address to the DHCP server. If you enter ipconfig / release, then rent the IP address of all interfaces is re-delivered to the DHCP server (returned to the IP address). If you enter ipconfig / renew, the local computer is trying to get in touch with the DHCP server and rent an IP address. Note that in most cases the NIC will be re-emphasized and the same IP address previously given.

  If you use Windows 95/98, then you should be more accustomed to use WiniPCFG instead of IPConfig, because it is a graphical user interface, and the information displayed is the same as IPConfig, and also provides publishing and updating dynamic IP addresses. Option If you purchased a Windows NT Resource Kit (NT resource package), Windows NT also contains a graphic replacement interface, the name of the utility is WntipCFG, and WINDOWS 95/98 WiniPCFG is similar. ARP (Address Conversion Protocol)

ORP is an important TCP / IP protocol and is used to determine the physical address of the network card corresponding to the IP address. Practical ARP commands, you can view current content in the ARP cache of local computers or another computer. In addition, use the ARP command, you can also use the static network card physical / IP address, you might use this way for the default gateway and local server, etc., help to reduce the network. The amount of information.

According to the default setting, the project in the ARP cache is dynamic. Whenever a data report for a specified location is sent, the ARP will automatically add the item when there is no current project in the cache. Once the cache project is entered, they have begun to go to the failure state. For example, in a Windows NT network, if you do not use it after entering the project, the physical / IP address pair will fail within 2 to 10 minutes. Therefore, if the project is rare or at all in the ARP cache, please don't be strange, you can add it through another computer or router's PING command. So, when you need to view the contents of the cache via the ARP command, please take the computer first PIN (you can't send the ping command).

Common command options:

ARP -A or ARP -G - all items used to view the cache. The result of the -a and -g parameters is the same, and -g has always been an option to display all items in the ARP cache in the UNIX platform, and Windows is ARP -A (-A can be considered ALL, That is, all the meaning), but it can also accept comparing traditional -g options.

ARP -A IP - If you have multiple NIC, use the ARP -A plus the IP address of the interface, you can display only the ARP cache item related to the interface.

ARP -S IP Physical Address - You can manually enter a static project from the ARP cache. The project will remain active during the computer boot process, or when an error occurs, the manually configured physical address will automatically update the item.

ARP -D IP - Use this command to manually delete a static project.

 

  Seeing this, you may have been tired ... In fact, it is enough for general users - you can use ipconfig and ping command to view your own network configuration and determine if it is correct, you can use NetStat to view others with you The connection established and identifies the IP information hidden by ICQ users, you can use the ARP to view the MAC address of the NIC - these have made you lose the title of the rookie. If you are not satisfied, then "hard scalp" (below the content may be somewhat boring) Continue Follow ME ...

Tracert

When the datagram passes from your computer to the destination, the tracert command can be used to track the route (path) of the datagram. The utility tracking path is a path to the source computer to the destination, and it cannot be guaranteed or considered to follow this path. If your configuration uses DNS, you often get the name of the city, address, and common communication company from the generated response. Tracert is a slower command (if your designated target address is relatively far), you need to give it 15 seconds for each router.

The use of trafficert is very simple, just need to follow an IP address or URL after Tracert, Tracert will perform the corresponding domain name conversion. Tracert is generally used to detect the location of the fault. You can use the Tracert IP to have problems, although there is still no problem, but it has already told our problem where you are, you can also tell it. Others - a certain problem. Route

Most hosts are generally located on a network segment that is only connected to a router. Since there is only one router, there is no problem that uses which router to publish the datagram to the remote computer, the IP address of the router can be entered as the default gateway of all computers on the network segment.

However, when there are two or more routers on the network, you don't have to rely on the default gateway. In fact, you may want to pass some of the remote IP addresses through a particular router, while other remote IPs are passed through another router.

In this case, you need the corresponding routing information, which is stored in the routing table, each host and each router comes with its own unique routing table. Most routers use specialized routing protocols to exchange and dynamically update the routing table between the routers. However, in some cases, it must be manually added to the router and the routing table on the host. Route is used to display, manually add and modify routing table items.

General use options:

Route Print - This command is used to display the current item in the routing table, and the output results on the single router network segment are shown in Figure 12, since the NIC is configured with an IP address, all of these items are automatically added.

Route Add - Use this command to add a pathway project to the routing table. For example, if you want to set a route to the destination network 209.98.32.33, there is a 5 router network segment, first go through a router on the local network, the device IP is 202.96.123.5, the subnet mask is 255.255.255.224 Then you should enter the following command:

Route Add 209.98.32.33 Mask 255.255.255.224 202.96.123.5 Metric 5

Route Change - You can use this command to modify the transmission route of the data, but you can't use this command to change the destination of the data. The following example can change the route of the data to another router, which uses a straight path containing 3 network segments:

Route Add 209.98.32.33 Mask 255.255.255.224 202.96.123.250 metric 3

Route delete - Use this command to delete routing from the routing table. For example: Route delete 209.98.32.33

NBTSTAT

  nbtstat (NetBIOS statistics on TCP / IP) utility is used to provide statistics about NetBIOS. With NetBIOS, you can view NetBIOS name forms on your local computer or remote computer.

Common options:

NBTSTAT-N - Display the local name and service program

NBTSTAT-C- This command is used to display the contents of the NetBIOS name cache. The NetBIOS name cache is used to inch the NetBIOS name and IP address pair of other computers that have recently communicated with this computer.

NBTSTAT -R - This command is used to clear and reload the NetBIOS name cache.

NBTSTAT -A IP - Displays the physical address and name list of another computer via IP, the content you have displayed is like the other computers running NBTSTAT-N

NBTSTAT -S IP - Displays the NetBIOS connection table for another computer of the Practical IP address.

Net

Net commands have many functions for practical and verification of NetBIOS connections between computers. Here I only introduce two most common: Net View and Net Use. Net View UNC - Use this command, you can view the shared point name on the target server. People in any local area can issue this command and do not need to provide user ID or password. UNC names always start with //, followed by the name of the target computer. For example, Net View // LX is a shared point for the computer that views the host name LX (see Figure 15).

NET USE This site target computer sharing point - This command is used to establish or uncheck the image driver of a particular shared point (if needed, you must provide the user ID or password). For example, you enter NET USE F: // LX / MP3 is to connect the image drive F: Connect to // LX / MP3 shared point, you can access F: you can access // lx / mp3 sharing point, this is to you Right-click "My Computer" to select the mapping network drive.

Transfer from http://www.hacker-bbs.com/

转载请注明原文地址:https://www.9cbs.com/read-14076.html

New Post(0)