How many do you master the common commands for network maintenance?

CCNA 200-301

CCNA 200-301

CCNP Enterprise

CCNP Enterprise

CCNP Security

CCNP Security

CCIE Enterprise Lab

CCIE Enterprise Lab

CCIE Security Lab

CCIE Security Lab

CCNP Service Provider

CCNP Service Provider

CCNP Data Center

CCNP Data Center

CCNP Collaboration

CCNP Collaboration

CCIE DC Lab

CCIE DC Lab

ic_r
ic_l
How many do you master the common commands for network maintenance?
images

Ping is a very frequently used utility that is primarily used to determine network connectivity. No matter a Cisco Certified engineer or Other network engineers, you should mater the basic command. This is useful for determining if the network is properly connected and for the state of the network connection. To put it simply, Ping An is a test program. If the flat operation is correct, the faults of the network access layer, network card, modem input and output lines, cables and routers can be eliminated, thereby narrowing the problem.

Ping can display the amount of time between sending a request and returning a response in milliseconds. If the response time is short, it means that the datagram does not have to go through too many routers or networks, and the connection speed is faster. The TTL (time to live, lifetime) value is no longer displayed. The TTL value can be used to estimate how many routers the packet passes.

(1) Command format

Ping hostname

Ping domain

Ping IP address

As shown in the figure, use the ping command to check the connectivity of the computer with the IP address 210.43.16.17. This example is normal. A total of four test packets were sent and four packets were received correctly.

 (2) Basic application of the ping command

In general, users can use a series of ping commands to find out where the problem is, or to verify that the network is running.

A typical test sequence and corresponding possible faults are given below:

1 ping 127.0.0.1

If the test is successful, it indicates that the network card, TCP/IP protocol installation, IP address, and subnet mask are set properly. If the test is unsuccessful, it indicates that there is a problem with the installation or setup of TCP/IP.

2 ping the local IP address

If the test is unsuccessful, it indicates that there is a problem with the local configuration or installation. Network devices and communication media should be tested, checked, and excluded.

3 ping other IPs in the LAN

If the test is successful, the network card and carrier in the local network are running correctly. However, if you receive 0 echo responses, it means that the subnet mask is incorrect or the network card is configured incorrectly or there is a problem with the cable system.

4 ping gateway IP

If this command is answered correctly, it means that the gateway router in the LAN is running and able to respond.

5 ping remote IP

If a correct response is received, the default gateway is successfully used. For dial-up users, it means that they can successfully access the Internet (but not to rule out the ISP's DNS).

6 ping localhost

Local host is the system's network reserved name, which is an alias for 127.0.0.1, and each computer should be able to translate the name into that address. Otherwise, there is a problem in the host file (/Windows/host).

7 ping www.yahoo.com (a famous website domain name)

To execute the Ping command on this domain name, the computer must first convert the domain name to an IP address, usually through a DNS server. If there is a failure here, it means that the IP address of the local DNS server is not configured correctly, or the DNS server it accesses is faulty. 

If all the ping commands listed above work properly, then there is basically no problem with the local and remote communication of the computer. However, the success of these commands does not mean that all your network configurations are ok. For example, some subnet mask errors may not be detected by these methods.

(3) Common parameter options for the ping command

Ping IP -t: pings the IP address continuously until it is interrupted by the user with Ctrl+C.

Ping IP -l 2000: Specifies the specific data length in the ping command (here 2000 bytes) instead of the default 32 bytes.

Ping IP -n 20: A ping command that executes a specific number of times (here 20).

Note: As the firewall function is widely used in the network, when you ping other hosts or other hosts to ping your host, and the display host is unreachable, do not rush to conclusions. It's best to compare the ping results with a "well-set" host.

 2. ipconfig command

The ipconfig utility can be used to display the settings of the current TCP/IP configuration. This information is generally used to verify that the manually configured TCP/IP settings are correct.

Moreover, if the computer and the local area network use the dynamic host configuration protocol DHCP, use the ipconfig command to find out if your computer successfully leased an IP address. If you have already rented it, you can know what address it is currently getting. Includes network configuration information such as IP address, subnet mask, and default gateway.

The most common options are given below:

(1) ipconfig: When using the ipconfig command without any parameter option, the IP address, subnet mask and default gateway value of each configured interface are displayed.

(2) ipconfig /all: When using the all option, ipconfig can display the configured and all additional information for the DNS and WINS servers, and can display the physical address (MAC) built into the local NIC. If the IP address is leased from a DHCP server, ipconfig will display the IP address assigned by the DHCP server and the date the leased address is expected to expire. The picture shows the result window for running the ipconfig /all command.

(3) ipconfig /release and ipconfig /renew: These two additional options can only be used on computers that lease IP addresses to DHCP servers. If you enter ipconfig /release, the leased IP address of all interfaces is re-delivered to the DHCP server (returning the IP address). If the user enters ipconfig /renew, the local computer tries to get in touch with the DHCP server and leases an IP address. In most cases the network card will be reassigned to the same IP address as previously given.

3. arp command (address translation protocol)

ARP is an important protocol in the TCP/IP protocol suite for determining the physical address of a network card corresponding to an IP address.

Use the arp command to view the current contents of the ARP cache on the local or another computer. In addition, the arp command can be used to manually set a static NIC physical address/IP address pair. This method can be used for local static configuration of common hosts such as the default gateway and the local server, which helps reduce the amount of information on the network.

By default, the items in the ARP cache are dynamic, and ARP automatically adds the item whenever it sends data to the specified location and the current project does not exist in the cache.

Common command options:

(1) arp –a: Used to view all items in the cache.

(2) arp -a IP: If there are multiple network cards, use arp -a plus the IP address of the interface to display only the ARP cache entries associated with the interface.

(3) arp -s IP Physical Address: Manually enter a static entry into the ARP cache. The project will remain active during the computer boot process, or the manually configured physical address will automatically update the project in the event of an error.

(4)arp -d IP: Use this command to manually delete a static project.

4. nbtstat command

Use the nbtstat command to view some information about the network configuration on your computer. You can also use this command to find some private information on someone else's computer. If you want to view the network information on your computer, you can run nbtstat -n to get your working group, computer name and network card address, etc. If you want to check other computers on the network, run nbtstat -a *.* .*.*, where *.*.*.* is replaced with an IP address will return some information on that host.