Windows common network command details

xiaoxiao2021-03-06  55

First, the use skills of the ping command ping is a utility that is extremely high, used to determine if the local host exchanges (send and receives) datagrams with another host. According to the returned information, we 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, and we must perform a large number of local hosts and remote hosts to be exchanged to be sure that TCP / The correctness of IP. Simply put, ping is a test program. If ping is running correctly, we can rule out the network access layer, network card, modem input and output line, cable, router, etc., thereby reducing the scope of the problem. However, since the size of the issued datagram and endless high-speed transmission, ping is also used as a tool for DDOS (denial of service attack), such as many large sites, can be high-speed The computer connected to the Internet continuously sends a large amount of PING datagram. Follow the default settings, the ping command running on Windows sends 4 ICMP (Internet Control Packet Protocol) to return the request, each 32-byte data, if everything is normal, we should get 4 reply answers. Ping can display the time quantity between the sending feedback request to returns 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 can also display TTL (Time to Live Existing Time) Value, we can calculate how many routers have passed through the TTL value: Source point TTL start value (ie, a number of multipliers that returns to 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. 1. In normal case of the typical order of the PING detection network fault, when we use the ping command to find the problem or verify the network operation, we need to use many ping commands. If all all run correctly, we can believe that the basic connectivity There is no problem with sexual and configuration parameters; if some ping commands run the fault, it can also specify where to find problems. A typical detection order and corresponding possible faults: • 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 This command is sent to the IP address configured by our computer, and our computer should always respond 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 IP This command should leave our 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 is correct if the response is correct, indicating the gateway router in the local area network is running and can make a response.

• Ping Remote IP If you receive 4 answers, it means that the default gateway is used. 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, and each computer 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.xxx.com (such as www.yesky.com) Execute ping www.xxx.com address for this domain name, usually via DNS server if there is a failure here, the IP address configuration of the DNS server is incorrect or DNS servers have faults (for dial-up users, some ISPs have no need to set up DNS servers). By the way: We 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 we can rest assured that our computer is used locally and remote communication. However, the success of these commands does not mean that all of our network configurations have no problems, for example, some subnet mask errors may not be detected by these methods. 2, the common parameter option for the ping command • Ping IP CT continuously performs the ping command until the user is interrupted by the user in Ctrl C. • Ping IP -L 3000 Specifies the length of 3,000 bytes in the ping command instead of the default 32 bytes. • Ping IP CN performs a ping command for a specific number of times.

Second, the NetStat command is used to display statistics related to IP, TCP, UDP, and ICMP protocols, typically used to verify network connectivity of each port of this unit. If our computer is sometimes accepted by the datagram that causes the error data to delete or malfunction, we 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 inclusions accounts for a considerable percentage of the received IP datagram, or its number is rapidly increased, then we should use NetStat to check why these situations. 1. Some common options for NetStat. • NetStat CS This option can display its statistics in accordance with each protocol. If our application (such as a web browser) runs slower, or cannot display data such as the web page, then we can use this option to see the information displayed. We need to carefully view the rows of statistics, find the keywords of the error, and then determine the problem. · NetStat CE 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 CR This option can display information about the routing table, similar to the information you see when using the route print command later. In addition to displaying valid routing, it also displays currently valid connections. • NetStat CA This option displays a list of all effective connection information, including the established connection (ESTABLISHED), including those connections to the Listening request. · NetStat CN Displays all established effective connections.

The following is an example of the output of netstat: C: /> netstat -e Interface Statistics Received Sent Bytes 3995837940 47224622 Unicast packets 120099 131015 Non-unicast packets 7579544 3823 Discards 0 0 Errors 0 0 Unknown protocols 363054211 C: /> netstat -a Active Connections Proto Local Address Foreign Address State TCP CORP1: 1572 172.16.48.10:nbsession ESTABLISHED TCP CORP1: 1589 172.16.48.10:nbsession ESTABLISHED TCP CORP1: 1606 172.16.105.245:nbsession ESTABLISHED TCP CORP1: 1632 172.16.48.213:nbsession ESTABLISHED TCP CORP1: 1659 172.16 .48.169: nbsession ESTABLISHED TCP CORP1: 1714 172.16.48.203:nbsession ESTABLISHED TCP CORP1: 1719 172.16.48.36:nbsession ESTABLISHED TCP CORP1: 1241 172.16.48.101:nbsession ESTABLISHED UDP CORP1: 1025 *: * UDP CORP1: snmp *: * UDP Corp1: nbname *: * udp corp1: nbdatagram *: * udp corp1: nbname *: * udp corp1: nbdatagram *: * c: /> netstat -s ip statistics Packets Received = 5378528 Received Header Errors = 738854 Received Address Errors = 23150 Datagrams Forwarded = 0 Unknown Protocols Received = 0 Received Packets Discarded = 0 Received Packets Delivered = 4616524 Output Requests = 132702 Routing Discards = 157 Discarded Output Packets = 0 Output Packet No Route = 0 Reassembly Required = 0 Reassembly Successful = 0 Reassembly Failures = DataGrams SuccessFully Fragmentation = 0 DATAGRAMS FAILING FRAGMENTATION = 0 fragments created =

0 ICMP Statistics Received Sent Messages 693 4 Errors 0 0 Destination Unreachable 685 0 Time Exceeded 0 0 Parameter Problems 0 0 Source Quenches 0 0 Redirects 0 0 Echoes 4 0 Echo Replies 0 4 Timestamps 0 0 Timestamp Replies 0 0 Address Masks 0 0 Address Mask replies 0 0 TCP Statistics Active Opens = 597 Passive Opens = 135 Failed Connection Attempts = 107 Reset Connections = 91 Current Connections = 8 Segments Received = 106770 Segments Sent = 118431 Segments Retransmitted = 461 UDP Statistics Datagrams Received = 4157136 No Ports = 351928 Receive Errors = 2 DataGrams Sent = 13809 2 In fact, we 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, we can't see it in the information bar. In fact, we only need to do this with NetStat: When he is connected to us through ICQ or other tools (for example, we send him an ICQ message or send us a message), we immediately The DOS command prompt enters netstat -n or netstat -a to see the IP or ISP domain used when the other party is online, and even the port used is completely exposed.

Third, the use of ipconfig commands IPConfig utility and its equivalent graphical user interface ---- WinIPCFG in Windows 95/98 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 our computer and the local area network uses the Dynamic Host Configuration Protocol (DHCP), the information displayed by this program may be more practical. At this time, IPConfig allows us to understand whether the computer is successful to a IP address, if leased, 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. 1. IPCONFIG's most common option • IPConfig does 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 (such as IP addresses, etc.) it configured and to be used for 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 expect the date of failure. · IPConfig / Release and IPConfig / Renew This is two additional options that can only work on a computer that rents its IP address to the DHCP server. If we enter ipconfig / release, then renting the IP address of all interfaces is re-delivered to the DHCP server (returned to the IP address). If we enter ipconfig / renew, the local computer will try 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. The following example is the ipconfig / all command output, which is configured to dynamically configure TCP / IP using the DHCP server and use the WINS and DNS server to resolve the name.

Windows 2000 IP Configuration Node Type .......................: No Ethernet Adapter Local Area Connection: Host Name .... Corp1.microsoft.com DNS Servers............................: 00-60-08- 3E-46-07 DHCP enabled.................................: 255.255. 0.0 default Gateway.................................................... .................................: Friday, September 18, 1998 10:32:13 AM If we use Windows 95 / 98, then we 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 an option to publish and update the dynamic IP address.

Fourth, ARP (Address Conversion Protocol) Using Skills ARP is an important TCP / IP protocol and is used to determine a network card physical address corresponding to the IP address. Practical ARP commands, we 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 in manual mode, which may use this way for the default gateway and local servers, which help to reduce the network. The amount of information. According to the default setting, the project in the ARP cache is dynamic, and whenever a data report for a specified location and there is no current project in the cache, the ARP will automatically add the item. Once the cache project is entered, they have begun to go to the failure state. For example, in the Windows NT / 2000 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). ARP Common Command Options: • ARP -A or ARP CG is used to see all items in 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 we have multiple network cards, 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 We can manually enter a static project in 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 uses this command to manually delete a static project. For example, in the command prompt, type ARP CA; if we use the ping command test and verify the connectivity of the host from this computer to the IP address 10.0.0.99, the ARP cache displays the following items: Interface: 10.0.0.1 On Interface 0x1 Internet Address Physical Address Type 10.0.0.99 00-E0-98-00-7C-DC DYNAMIC In this case, the cache item points to the remote host in 10.0.0.99 resolves into 00-E0-98-00-7C- DC's media access control address, which is assigned in the network card hardware of the remote computer. The media access control address is the address of the computer for physical communication with the remote TCP / IP host with the network. At this point, we can use the ipconfig and ping commands to view your own network configuration and determine if it is correct. You can use NetStat to view the connection we have established by others and identify IP information hidden by ICQ users. You can use ARP to view the MAC address of the NIC. .

V. Tracert, Route and NBT / 16.SHTML 'TARGET =' _ blank 'Class =' ​​Article '> BTSTAT Tips 1, Tracert's Usage Tips If there is a network connectivity problem, you can use the tracert command to check the target IP The path of the address and the record result. The tracert command displays a set of IP routers for transferring packets from the computer to the target location, as well as the time required for each hop. If the packet cannot be passed to the target, the Tracert command will display the last router that successfully forwards the packet. When the datagram is transmitted from our 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 our configuration uses DNS, then we often get the name of the city, address, and common communication company from the generated response. Tracert is a slower command (if we specify the target address is far), we need to give it 15 seconds for each router. The use of Tracert is very simple, just need to follow an IP address or URL behind Tracert, Tracert will perform the corresponding domain name conversion. Tracert's most common usage: Tracert IP address [-d] This command returns the router list to the IP address. By using the -d option, the router path will be displayed more quickly, because Tracert does not attempt to resolve the name of the router in the path. Tracert is generally used to detect the location of the fault. Can we use Tracert IP to have problems, although there is still no problem, but it has already told our problem, we can also tell it. Others ---- a certain place. 2, Route's use skills 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, we don't have to rely on the default gateway. In fact, we 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, we need the corresponding routing information, which is stored in the routing table, each host and each router 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, the output on the single router network segment; because the NIC is configured with the IP address, all of these items are automatically added. · Route add uses this command to add a pathway project to the routing table.

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

New Post(0)