What about network failures? Clear troubleshooting is the key!
What about network failures? Clear troubleshooting is the key! (Foto Pixabay)

Network failure is the most common problem in weak current work, especially when we weak current people often deal with the network, how can we conduct network investigation and quickly solve the problem? These basic technologies are essential, let’s take a look together.

First Network troubleshooting

Why do you need the necessary conditions? Because the network troubleshooting mentioned here is not just about using a small command, but a systematic method. Without these conditions, it is difficult to use it flexibly in the project. So let’s take a look at these basic conditions first.

1. Understand the basic equipment of network communication and its corresponding OSI level

The most basic network equipment such as switches, layer 3 switches, routers, and firewalls should have some understanding, especially their corresponding OSI levels and functions. For example, ordinary layer 2 switches correspond to the data link layer in the OSI seven layer model Can isolate conflict domains, and may also use virtual local area network (VLAN) to isolate broadcast domains. Layer 2 switches implement data frame forwarding through a layer 2 address or MAC address; another example is a router, which corresponds to the network layer and can provide routing addressing Functions and so on.

2. Understand the basic architecture of the SME network

Generally, the basic architecture of small and medium-sized enterprise networks is this: access layer-convergence layer-core layer-network egress. Here is a picture:

If the network environment is relatively large, there will be both an aggregation layer and a core layer. As here, generally, a small network does not directly have an aggregation layer, but the idea is the same. The following troubleshooting is actually explained for the user’s PC. The network troubleshooting in the data center is similar. No matter how complicated the network environment is it’s almost the same as this.

3. Know commonly used network troubleshooting commands

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

These commands are the basic commands that will be used during network troubleshooting and inspection.

4. Clearly understand an important principle of network troubleshooting

Network troubleshooting is not just about judging what is wrong with the network, so you have to know where the data is going.

So this important principle is: focus on the direction of data.

The network troubleshooting ideas described below are step by step to narrow down the network fault point by tracking the data trend, so it is very important to keep this in mind at all times! This is why the above needs to let you understand the basic architecture of the small and medium-sized enterprise network. .

Second, the basic idea of ​​network troubleshooting

The basic idea is as follows, which should be similar to what most people online write.

  • Check the physical link for problems
  • Check if there is any problem with the machine’s IP address, routing, DNS settings
  • Test the patency of the gateway or router. Test the gateway first, then the router, test level by level
  • Test the smoothness of the ping public network IP (usually remember a few external IPs)
  • To test the smoothness of DNS, you can directly ping the website address

Third Detailed steps of network troubleshooting

To better describe the network troubleshooting process and ideas, suppose we have the following network environment:

Below, we will take the above network environment as an example to introduce our network troubleshooting ideas in detail, how to do each step, why each step is to be done, and what information we can get after doing so, we will make an explanation.

1. Check the physical link for problems

This step is the first step that I think must be done when doing network troubleshooting! I often hear friends say that the leader ’s computer ca n’t get to the Internet, and I need to troubleshoot in the past. When desperate, he found that the network cable was not connected to the computer. This is a tragedy, a lot of time is wasted, not to mention that such network troubleshooting ideas are inherently wrong, so clear thinking is very important to avoid detours.

Because not everyone can go to the computer room to check the wiring of the switch, so in this step, the focus of our investigation should be placed in the place shown in the following figure:

In this step, the following points need to pay attention to investigation:

  • Confirm whether there is any problem with the network card of the computer itself
  • 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)
  • The switch to which the machine is connected (if you can go to the machine room to check it)

If there is no problem with the above points, then there is a problem with other devices in the network environment. The investigation of this range is relatively simple, because it only involves the connection of physical links.

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

In the first step above, there is no problem with the physical link. That is to say, after the computer is connected to the Internet cable, the computer has responded and can be identified, but the network is still unreachable. At this step, you should first put the scope of attention In the computer settings.

In this step, our focus is:

(1) IP address setting

If you use the method of DHCP automatic acquisition, then you only need to see whether the setting of automatic IP acquisition is turned on and whether related services are turned on in the settings of your machine; if you use a static IP, you must pay attention to it Are there any errors in filling in the IP address (given by the general network administrator), and is there any problem with the subnet mask of the IP address (this is very important, for static IP, many people set the error here).

It is also worth mentioning that when assigning an ip address to a computer, it is best to bind 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 the three-layer switch, it is the setting of 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 it can be obtained automatically. On windows, you can view it with the following command:

3. Test the patency of the gateway or router

Test the gateway first and then the router, test level by level.

In the above network environment, in the case of network connectivity, we use the command tracert -d command on the computer, you will get the following results:

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

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

(1) First test the smoothness of the computer to the gateway 192.168.2.254

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

Generally, this method of judgment is relatively fast, but sometimes, pinging is impossible no matter what, then there may be the following situations:

  • The gateway device is set to prohibit ping
  • Gateway interface or gateway device failure

Regarding a, it is generally rare to perform ping restriction operations on these devices. There is no need to do so. Of course, except for very strict requirements such as network security. After pinging the 192.168.2.254 gateway, ping 172.16.13.1 again to confirm that the computer has no problem with the entire gateway device.

For ping failure, I personally also recommend the following operations on the computer: arp -a: gateway address and gateway mac address, this command has been explained in detail in the weak current industry network.

That is, check whether the computer itself has obtained the MAC address of the gateway. If there is no MAC address of the gateway, it is impossible to ping the gateway. After excluding the problem of the previous computer settings, you can guess that the gateway device is out. Problem, you can contact the network engineer to test the gateway device.

(2) Test the smoothness of other routers

There is no problem in the previous step, that is, the communication between the computer and the gateway is normal, and then test the smoothness of the gateway to the exit router:

Here, we can use the tracert -d command:

Of course, if it is found unfeasible, then it may be the following situation:

  • The physical link between the gateway device and the router
  • Setup problems between the gateway device and the router, such as routing protocol, interface configuration, etc.

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

The above steps are completed, assuming that your egress router settings are no problem, such as NAT and default routing settings, then we can roughly know that a basic communication on the intranet is normal (at least your computer and egress There is no problem with the communication of the router), we have to see if the computer can access the Internet.

Fourth, test the ping of the public network IP (usually remember a few external IP)

When you come to this step, it means that the first three steps are no problem, that is to say, the communication of the local area network is normal, all you have to do at this time is to judge the connection between the local area network and the external network (public network) Is there any problem with communication:

The method used here is to directly ping the public network address, to rule out the influence of DNS (in case your DNS settings have problems), as for what kind of public network address to ping, personal advice is that you can ping some without prohibiting ping The public DNS server addresses, such as 114.114.114.114 and 8.8.8.8:

After this, you can determine that the network is free of problems. Being able to ping the external network means that there is no problem with the network. Of course, there is no mention of the firewall placed at the exit. The idea is the same. However, you need to consider whether your access data is blocked by the firewall. Is it filtered out, is it filtered when the data goes out, or is it filtered when the data comes back? Because it also involves the firewall settings, it will not be mentioned here, just pay attention to this.

Fifth To test the smoothness of DNS, you can directly ping the website address

For example, you can directly ping the website address to see if there is an IP address echoed. As for the unavailability, it is another matter. As long as the IP address can be echoed, there is no problem with DNS, but here we still have to talk about the nslookup command. It is a very easy-to-use command. I usually use it when troubleshooting the network:

Of course, it can also be used as follows:

Using the nslookup command has two effects:

  • Help you test whether there is any problem with the DNS server you set
  • Without considering whether the DNS server is intelligent, you can roughly judge the pros and cons of the DNS server according to the speed of the echoed IP address.

So you can make full use of nslookup command.

Therefore, it is still very important for the network troubleshooting ideas and the grasp of some basic commands. Although the function of using a single command is not particularly large, it can solve many problems when used in combination.

LEAVE A REPLY

Please enter your comment!
Please enter your name here