What is Network Troubleshooting and How to Fix? [Full Guide]

Network issues are frequent in our daily work, so learning effective network troubleshooting steps can help you resolve connectivity problems swiftly.

5 Basic Steps and Commands for Network Troubleshooting

The five basic ideas are as follows:

(1) Check whether there is any problem with the physical link;

(2) Check whether there are any problems with the local IP address, routing, and DNS settings;

(3) Test the smoothness of the gateway or router. Test the gateway first and then the router, testing one level at a time;

(4) Test the smoothness of pinging the public network IP (usually remember several external IPs);

(5) To test the DNS connectivity, you can directly ping the website address;

If the user is using the Windows operating system, the following commands are very important:

Network Troubleshooting

Detailed Steps for Network Troubleshooting

To better describe the process and ideas of network troubleshooting, assume the following network environment:

Network Troubleshooting Steps

Next, we will take the above network environment as an example to introduce the network troubleshooting ideas in detail:

Step 1: Check if there is a problem with the physical link

I often hear friends say that their computers cannot access the Internet and they need to troubleshoot. After a long time, they still cannot find the problem. Finally, when they are desperate, they find that the network cable is not connected to the computer. This kind of network troubleshooting idea is wrong in itself, so clear thinking is very important to avoid detours.

Maybe not everyone can go to the computer room to check the switch wiring, so in this step, our focus should be on the following areas as shown in the figure below:

At this step, the following points need to be checked:

1. Check if there is any problem with the computer’s network card;

2. Confirm whether there is any problem with the connected network cable (check the connection of the crystal head and network cable and the quality of the network cable);

3. The switch to which the machine is connected (if you can go to the computer room to check);

If all of the above points are correct, then the problem is with other devices in the network environment. This range of troubleshooting is relatively simple because it only involves physical link connectivity issues.

Step 2: Check whether there is any problem with the local IP address, routing, and DNS settings

In the first step above, there is no problem with the physical link. That is to say after the computer is connected to the network cable, the computer responds and can be recognized, but the network is still not accessible. At this step, you should first focus on the computer settings.

At this stage, our focus is on:

1. IP address settings

If you use the DHCP automatic acquisition method, then you only need to check whether the automatic IP acquisition setting is turned on in your machine settings and whether the related services are turned on;

If you are using a static IP, you must pay attention to whether the IP address is filled in correctly (usually given by the network administrator) and whether there is a problem with the subnet mask of the IP address (this is very important. For static IP, many people make mistakes here).

It is also worth mentioning that when assigning an IP address to a computer, it is best to bind it to the MAC address to prevent users from privately changing the IP address and causing IP conflicts.

Generally, you can use the following command to view:

2. Routing settings

For servers and PCs, it generally refers to the setting of the default gateway; for the router itself or a three-layer switch, it is a question of setting static routing or dynamic routing.

3. DNS settings

The main thing is to make sure whether the DNS server address you set provides domain name resolution service or whether there is a failure. You have to set a correct DNS server address or obtain it automatically. On Windows, you can check it with the following command:

Step 3: Test the connectivity of the gateway or router for network troubleshooting

Test the gateway first and then the router, testing one level at a time.

In the above network environment, when the network is connected, we use the tracert -d command on the computer and get the following results:

Through this test result, we can know the direction of data when the computer accesses the Internet:

According to the data trend, we can get an important idea, which is to detect the smoothness of the network according to the data trend! Therefore, we can divide it into two steps:

1. Test the connection between the computer and the gateway 192.168.2.254

We can ping the gateway address on our computer to see if there is a response.

Generally, this judgment method is relatively fast, but sometimes, no matter how hard you try, you can’t ping the router. Then there may be the following situations:

a. The gateway device is set to prohibit ping;

b. The gateway interface or gateway device fails.

For a, it is generally rare to restrict ping on these devices. There is no need to do so, except for very strict network security requirements. After pinging the 192.168.2.254 gateway, ping 172.16.13.1 to confirm that there is no problem from the computer to the entire gateway device.

If ping fails, it is recommended to perform the following operations on the computer:

arp -a: Gateway address and gateway MAC address. This command has been explained in detail in the previous section of the Weak Current Industry Network.

That is, check whether the computer itself can obtain the MAC address of the gateway. Obviously, if there is no MAC address of the gateway, it is impossible to ping the gateway. After eliminating the problem of the previous computer settings, you can guess that there is a problem with the gateway device. At this time, you can contact the network engineer to test the gateway device.

2. Test the connectivity to other routers

The previous step is fine, that is, the communication between the computer and the gateway is normal. Then test the smoothness of the gateway to the exit router:

Here, we can use the tracert -d command:

Of course, if you find that it doesn’t work, then it may be the following:

a. Physical link problem between the gateway device and the router;

b. Setup issues between the gateway device and the router, such as routing protocols, interface configuration, etc.

If the above situation occurs, then it is a problem for the network engineer. Of course, if you are a network engineer, you should immediately check the status of the device to see if there is a problem with the device.

The above steps are completed. Assuming that there is no problem with your egress router settings, such as NAT and default routing settings, then we can roughly know that the basic communication of the intranet is normal (at least there is no problem with the communication between your computer and the egress router). We need to see whether the computer can access the Internet.

Step 4: Test the smoothness of pinging the public network IP (usually remember several external IPs)

When you come to this step, it means that there is no problem with the previous three steps, that is, the communication of the local area network is normal. What you need to do now is to determine whether there is a problem with the communication between the local area network and the external network (public network):

The method adopted here is to directly ping the public network address to exclude the influence of DNS (in case your DNS settings have problems). As for what kind of public network address to ping, my suggestion is that you can ping some public DNS server addresses that are not prohibited from pinging, such as 114.114.114.114 and 8.8.8.8:

After that, you can confirm that there is no problem with the network. If you can ping the external network, it means that there is no problem with the network. Of course, this does not mention the situation of placing a firewall at the exit. The idea is the same, but you need to consider whether your access data is filtered by the firewall. Is it filtered when the data goes out or when the data comes back? Since it also involves the setting of the firewall, it will not be mentioned here, but you still need to pay attention to this point.

Step 5: Test the DNS connectivity by directly pinging the website address

As the title says, you can directly ping the website address to see if the IP address is echoed. Whether it works or not is another matter. As long as the IP address can be echoed, then there is no problem with DNS. However, I still want to talk about the nslookup command here. It is a very useful command.

Of course, you can also use it like this:

The nslookup command has two functions:

1. Help you test whether there is any problem with the DNS server you set;

2. Without considering whether the DNS server is intelligent, you can roughly judge the quality of the DNS server based on the speed of echoing the IP address;

So you can make full use of the nslookup command.

Conclusion

It is very important to have ideas about network troubleshooting and master some basic commands. Although the function of a single command is not particularly large, using them in combination can solve many problems.