One-Way link Detection Mode eliminates switch error diagnosis

Source: Internet
Author: User

Most vswitches provide the self-diagnosis function.

When the switch or switch port fails for some reason, the Administrator will be notified of the error through the indicator. However, in some cases, the vswitch may be incorrectly diagnosed. If the switch port operating indicator clearly indicates normal, but the user reflects the network failure. If it is just a common user, the problem is not very big. However, if this port happens to be used for backup, the situation will be worse. To avoid this problem, many network administrators prefer the UDLD mode of the vswitch to eliminate the incorrect diagnosis of the vswitch.

1. Under what circumstances will a false diagnosis occur?

The error diagnosis mainly occurs when the port indicator of the link or switch is normal (that is, the port status is UP), but the interface still cannot transmit data traffic normally. This error is often calledUnidirectional Link. Generally, this error occurs when an interface fault, software fault, hardware failure, or other causes of an exception occur. With the current technical means, the switch cannot fundamentally avoid such errors. For this reason, only other methods are used to enhance the detection of the switch port to detect such errors as soon as possible. On Cisco Series switches, The UDLD mode is used to solve the false diagnosis in this case.

In theory, UDLD is a protocol that works on the second layer. However, from the actual situation, it often has a deep relationship with the content at the first layer. That is to say, the UDLD mode is not only able to operate on the second layer, but also works together with the relevant mechanisms at the first layer. The main idea is that the UDLD protocol runs between Layer 1 and Layer 2 to determine the actual working status of the link. When "the link UP status is normal but no traffic is transferred" is found, the UDLD protocol will immediately trigger an alarm.

Specifically, in the first layer, the automatic negotiation function is used to observe the operation of related parameters such as physical signaling. The UDLD Protocol completes tasks that cannot be executed by the automatic negotiation mechanism. When an exception occurs in physical signaling during Automatic negotiation, the port is not automatically converted from the UP status to other statuses, resulting in a fault of one-way links. The UDLD protocol can accept parameters passed by the automatic negotiation mechanism, and then immediately shut down the switch port when detecting a fault. It can be seen that the UDLD mode uses not only one protocol, but also the result of the interaction between the UDLD protocol and the automatic negotiation mechanism. If the network administrator wants to start the UDLD mode, the UDLD protocol and automatic negotiation mechanism must be enabled at the same time, and the responsibilities and collaboration between the first and second layers should be carried out through their respective departments, to prevent physical or logical one-way connections, so as to fundamentally eliminate the incorrect diagnosis of the switch.

The network administrator needs to understand that the UDLD is not a supplement to the original diagnostic system of the switch, but an independent diagnostic method. In other words, it diagnoses the running status of each port of the vswitch from another perspective. There is basically no conflict or overlap between the two. In practice, traditional diagnostic methods and the UDLD mode are often used at the same time.

Ii. Reasonably configure parameters in UDLD Mode

If both the UDLD protocol and the automatic negotiation mechanism are enabled, the UDLD mode is enabled. In this case, an interface of the switch regularly sends a UDLD protocol datagram to the adjacent port. Under normal circumstances, this interface of the switch receives the response packet before the scheduled timer expires. If the interface for the switch to send the UDLD data packet does not receive a response before the timer expires, the UDLD protocol will think that a fault has occurred, that is, a one-way link failure occurs (in fact, it is more accurate to say that automatic negotiation has found this fault and informed the UDLD protocol ). When the UDLD knows this situation, it immediately closes the faulty switch interface.

When configuring the UDLD, you must first consider this timer. That is to say, it is better to set the time to a specific value. If the time setting is relatively short, not only unnecessary data traffic will be generated, but also data delay and other reasons may cause the failure to receive response packets within a reasonable period of time. However, if you set the timer for a long time, you may not be able to find problems in a short time. You know, a minute may not feel much for users. However, it takes a long time for data network transmission. By default, this timer is 15 seconds.

In actual work, the network administrator may need to set this parameter according to different situations. Consider the Network Complexity and wiring length of an enterprise. For example, according to the previous situation, enterprises may often encounter network congestion and so on, and this congestion is also temporary, so we need to extend the timer and so on. I suggest you set the timer a little longer at the beginning, and then reduce it slowly. Finally, a reasonable value is obtained.

3. improve port Applicability

When a common interface is used, when an interface fails to receive a response message from the UDLD, the interface is closed. This also has a defect. For example, enterprises may experience network congestion, such as temporary backup and so on. At this time, the sender may not be able to receive the response message before the timer expires. In this case, if the port of the switch is set to disabled, it will obviously cause no trouble. The network administrator wants to "correct" the network. Therefore, on the basis of the original UDLD mode, CISCO switches also propose the concept of active UDLD mode. The main difference between the two modes is that the latter gives the network a chance to correct errors.

In the active UDLD mode, when the switch interface finds that it cannot normally receive the UDLD response message, it will not immediately set this port to disabled, but will continue to send the UDLD packet. Generally, the UDLD packet is sent eight times. If you still cannot receive the UDLD packet eight times after sending the packet, the UDLD protocol changes the port status to Err-disable. If the sending port can receive any response during this interruption, it will be considered normal. Obviously, a positive UDLD model may effectively avoid misjudgment caused by network congestion.

Another reason for adopting the active UDLD mode is the routing black hole. What is routing black hole? This definition is not easy to say. I will give an example. For example, when Layer 2 or the routing interface is experiencing a one-way link, the interface is always UP, so the switch will continue to switch traffic to this interface. But the final result is that the data packet will never reach the corresponding interface of the remote device. This is a simple example of routing black hole. If the traditional UDLD mode is used, it cannot be avoided. On the contrary, if you adopt the active UDLD mode, you can effectively avoid network faults caused by routing black holes.

In addition to the number of messages sent, the active UDLD mode has two special features. First, when the port on one side of the link is congested, The UDLD protocol in positive mode also sets the port to Error and displays relevant measures. However, the traditional UDLD mode does not respond to this situation. Second, when one side of the link is in the UP state and the other side is in the Down state, an error message is displayed if the active UDLD mode is used, and set the port to the error status. However, if the traditional UDLD mode is used, there will be no response. This is exactly what I have mentioned above to solve the problem of black holes on the road through the active UDLD mode.

4. Restart the vswitch interface after the fault recovery

Whether it is the traditional UDLD mode or the active UDLD mode, there is one thing in common: After the port is set to Error-disable, even if the fault is resolved, the vswitch cannot automatically restore the interface. In other words, when this happens, the network administrator needs to manually restore the interface. In general, first shut down the port using the command shutdown, and then use the command no shutdown to enable it.

In short, as long as the switch supports, you can enable the UDLD mode, or even enable the active UDLD mode, which can effectively avoid the misdiagnosis of one-way links. Especially when the active mode is used, the network problem of routing black hole can also be solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.