Link fault handling method, apparatus, electronic equipment and medium

The method addresses inefficient link failure handling in neural network training by enabling rapid routing switching through device identifier-based forwarding entry updates, enhancing training efficiency by minimizing downtime.

JP2026516295APending Publication Date: 2026-05-20NEW H3C TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
NEW H3C TECH CO LTD
Filing Date
2023-12-27
Publication Date
2026-05-20

AI Technical Summary

Technical Problem

Current link failure handling in neural network training processes, particularly for large-scale AI traffic models, is inefficient due to lengthy failure notification and routing recalculation times, which delays the training process and affects efficiency.

Method used

A method and apparatus for handling link failures in network devices by quickly updating forwarding entries based on device identifiers and status information, allowing for rapid routing switching without relying on control plane processing.

Benefits of technology

Enables faster routing recovery, improving the efficiency of large-scale neural network training by quickly invalidating failed links and switching to alternative paths, thus reducing the impact of link failures on training time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026516295000001_ABST
    Figure 2026516295000001_ABST
Patent Text Reader

Abstract

This embodiment provides a link failure handling method, apparatus, electronic equipment, and medium, relating to the field of communications. The technical solution of this embodiment includes the following: the forwarding chip of a first network device receives a first packet transmitted from a second network device, the first packet includes a device identifier and status information of a third network device; and if the status information indicates that the second network device and the third network device are unreachable to each other, the forwarding chip of the first network device searches for a first forwarding entry whose transmission interface is the first interface and whose device identifier is the device identifier of the third network device, and sets the status of the first forwarding entry to an invalid state. This enables faster routing switching when a link between network devices fails.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and particularly to a method and apparatus for link failure handling, an electronic device, and a medium.

Background Art

[0002] When training a large-scale neural network model, it is necessary to use multiple image processing units (Graphics Processing Units, GPUs) of multiple hosts, and it is necessary to frequently interact between each GPU during the training process. For example, the left figure in FIG. 1 is a communication traffic diagram between each GPU when training a conventional data center (DC) traffic model, and the right figure is a communication traffic diagram between each GPU when training a large-scale artificial intelligence (AI) traffic model. In both traffic diagrams in FIG. 1, the horizontal axis represents time and the vertical axis represents bandwidth. Thus, it can be seen that the training of the conventional DC traffic model involves a large number of flows, the total training time is short, that is, there are many communication links between GPUs, and the communication time at each communication link is short. Therefore, the influence of the communication quality of the communication link on the convergence of the DC traffic model is small. On the other hand, the training of the AI traffic model involves a small number of flows, but has the characteristics of high network utilization rate and wide bandwidth, and the total training time is long. For example, the training usually takes 10 to 90 days. It is necessary to maintain the network in a high-performance state during the training process. If one communication link fails during the training process, the time taken for one training process is extended, and as a result, an error occurs in the training process, and thus it is necessary to resume the training process. Therefore, in the process of training the AI traffic model, the network quality has an important impact on the training efficiency.

[0003] During the training process, each host communicates with other networks via network devices such as switches or routers. Currently, if a link failure occurs between network devices, the network device must notify other network devices of the failure through a routing update mechanism after detecting the failure. After a network device receives a routing update message, its control plane recalculates the routing, modifies the forwarding entry in the forwarding chip, and avoids continued communication through the failed link. However, the time required for failure notification and routing recalculation in the above process is long, delaying the resolution of the failure and affecting the training efficiency of the AI ​​traffic model. [Overview of the project]

[0004] The objective of this embodiment is to provide a link failure handling method, apparatus, electronic equipment, and medium that enable faster routing switching when a link between network devices fails. The specific technical proposal is as follows.

[0005] In a first embodiment, the present invention provides a link fault handling method applied to a forwarding chip of a first network device, wherein the first network device includes a first interface and is connected to a second network device via the first interface, the second network device is connected to a third network device, the first network device includes a plurality of forwarding entries, the forwarding entry includes a destination address, a transmission interface, and a device identifier, the device identifier is the identifier of the network device accessed by the host belonging to the destination address, and the link fault handling method is: Receiving a first packet transmitted from the second network device, wherein the first packet includes the device identifier and status information of the third network device, and the status information is for indicating whether the second network device and the third network device are reachable from each other. If the status information indicates that the second network device and the third network device are unreachable to each other, then a first forwarding entry is searched for where the transmission interface is the first interface and the device identifier is the device identifier of the third network device. This includes setting the state of the first forwarding entry to an invalid state.

[0006] Preferably, before receiving the first packet transmitted from the second network device, the link failure handling method performs the following actions: The second network device receives a routing update packet forwarded via the first interface, wherein the routing update packet includes the first IP address of a host connected to the third network device and the device identifier of the third network device. The further includes generating the first forwarding entry based on the first interface, the first IP address, and the device identifier of the third network device.

[0007] Preferably, the second network device includes a second interface and is connected to the first network device via the second interface, and before receiving the first packet transmitted from the second network device, the link failure handling method: Sending a second packet containing the device identifier of the first network device to the second network device so that the second network device records a first correspondence between the second interface and the device identifier of the first network device, The further includes receiving a third packet containing the device identifier of the second network device transmitted from the second network device, and recording a second correspondence between the first interface and the device identifier of the second network device.

[0008] Preferably, setting the state of the first transfer entry to an invalid state is This includes changing the status flag bit of the first transfer entry to a first value, wherein the first value represents an invalid state.

[0009] Preferably, after receiving the first packet transmitted from the second network device, the link failure processing method: If the status information indicates that the second network device and the third network device are reachable from each other, then a first forwarding entry is searched where the transmission interface is the first interface and the device identifier is the device identifier of the third network device. This further includes setting the state of the first forwarding entry to the enabled state.

[0010] Preferably, the first packet is a first link layer broadcast packet, and the payload of the first link layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information, or The first packet is a first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information.

[0011] Preferably, the second packet is a second link layer broadcast packet, and the payload of the second link layer broadcast packet includes the device identifier of the first network device, or the second packet is a second IP multicast packet, and the payload of the second IP multicast packet includes the device identifier of the first network device. The third packet is a third link layer broadcast packet, and the payload of the third link layer broadcast packet includes the device identifier of the second network device, or the third packet is a third IP multicast packet, and the payload of the third IP multicast packet includes the device identifier of the second network device.

[0012] Preferably, the routing update packet includes an extended community attribute, and the extended community attribute includes the device identifier of the third network device.

[0013] In a second embodiment, the present invention provides a link failure handling method applicable to a forwarding chip of a second network device. The second network device is connected to a third network device, the second network device is connected to a first interface of a first network device, the first network device includes a plurality of forwarding entries, the forwarding entry includes a destination address, a transmission interface, and a device identifier, the device identifier is the identifier of the network device accessed by the host belonging to the destination address, and the link failure handling method is: The acquisition of status information, wherein the status information is intended to indicate whether the second network device and the third network device are reachable from each other, The first packet is transmitted to the first network device, and if the status information indicates that the second network device and the third network device are unreachable to each other, the first packet includes the device identifier of the third network device and the status information, such that the first network device searches for a first forwarding entry whose transmission interface is the first interface and whose device identifier is the device identifier of the third network device, and sets the state of the first forwarding entry to an invalid state.

[0014] Preferably, before acquiring the status information, the link failure processing method Receiving a routing update packet transmitted from the third network device, wherein the routing update packet includes the first IP address of a host connected to the third network device and the device identifier of the third network device. The further includes forwarding the routing update packet to the first network device such that the first network device generates the first forwarding entry based on the first interface, the first IP address, and the device identifier of the third network device.

[0015] Preferably, the second network device includes a third interface and is connected to the third network device via the third interface, and the third network device includes a fourth interface and is connected to the second network device via the fourth interface, and before acquiring the status information, the link failure processing method, To record the third correspondence between the fourth interface and the device identifier of the second network device, a fourth packet containing the device identifier of the second network device is transmitted to the third network device, The further includes receiving a fifth packet containing the device identifier of the third network device transmitted from the third network device, and recording a fourth correspondence between the third interface and the device identifier of the third network device.

[0016] Preferably, before transmitting the first packet to the first network device, the link failure handling method performs the following: This further includes obtaining the device identifier of the third network device corresponding to the third interface from the fourth correspondence relationship.

[0017] Preferably, there are multiple links between the second network device and the third network device, and the acquisition of the status information is When all of the plurality of links are failed, determining that the state information indicates that the second network device and the third network device are unreachable from each other, or when any one of the plurality of links is not failed, determining that the state information indicates that the second network device and the third network device are reachable from each other, is further included.

[0018] Preferably, the first packet is a first link layer broadcast packet, and the payload of the first link layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and the state information, or the first packet is a first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and the state information.

[0019] Preferably, the fourth packet is a fourth link layer broadcast packet, and the payload of the fourth link layer broadcast packet includes the device identifier of the second network device, or the fourth packet is a fourth IP multicast packet, and the payload of the fourth IP multicast packet includes the device identifier of the second network device, the fifth packet is a fifth link layer broadcast packet, and the payload of the fifth link layer broadcast packet includes the device identifier of the third network device, or the fifth packet is a fifth IP multicast packet, and the payload of the fifth IP multicast packet includes the device identifier of the third network device.

[0020] Preferably, the routing update packet includes an extended community attribute, and the extended community attribute includes the device identifier of the third network device. [[ID=IS]]

[0021] As a third aspect, the embodiment of the present application provides a link failure processing apparatus applied to a transfer chip of a first network device. The first network device includes a first interface, is connected to a second network device via the first interface, the second network device is connected to a third network device, the first network device includes a plurality of transfer entries, the transfer entry includes a destination address, a transmission interface, and a device identifier, the device identifier is an identifier of a network device accessed by a host belonging to the destination address, and the link failure processing apparatus includes: a receiving module that receives a first packet transmitted from the second network device, where the first packet includes a device identifier of the third network device and status information, and the status information is for indicating whether the second network device and the third network device can reach each other; a search module that searches for a first transfer entry when the status information indicates that the second network device and the third network device cannot reach each other, where the transmission interface is the first interface and the device identifier is the device identifier of the third network device; a setting module that sets the status of the first transfer entry to an invalid status.

[0022] Preferably, before receiving the first packet transmitted from the second network device, the receiving module is further used to receive a routing update packet transferred by the second network device via the first interface, and the routing update packet includes a first IP address of a host connected to the third network device and the device identifier of the third network device. The link failure processing apparatus further includes: a generation module that generates the first transfer entry based on the first interface, the first IP address, and the device identifier of the third network device.

[0023] Preferably, the second network device includes a second interface and is connected to the first network device via the second interface, and the link fault processing device is The system further includes a transmitting module that, before receiving a first packet transmitted from the second network device, transmits a second packet containing the device identifier of the first network device to the second network device so that the second network device records a first correspondence between the second interface and the device identifier of the first network device. The receiving module is further used to receive a third packet containing the device identifier of the second network device transmitted from the second network device, and to record a second correspondence between the first interface and the device identifier of the second network device.

[0024] Preferably, the configuration module specifically, This is used to change the status flag bit of the first transfer entry to a first value, the first value of which represents an invalid state.

[0025] Preferably, the search module is further used to search for a first forwarding entry in which, after receiving a first packet transmitted from the second network device, the status information indicates that the second network device and the third network device are reachable from each other, the transmission interface is the first interface and the device identifier is the device identifier of the third network device. The configuration module is further used to set the state of the first transfer entry to an enabled state.

[0026] Preferably, the first packet is a first link layer broadcast packet, and the payload of the first link layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information, or The first packet is a first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information.

[0027] Preferably, the second packet is a second link layer broadcast packet, and the payload of the second link layer broadcast packet includes the device identifier of the first network device, or the second packet is a second IP multicast packet, and the payload of the second IP multicast packet includes the device identifier of the first network device. The third packet is a third link layer broadcast packet, and the payload of the third link layer broadcast packet includes the device identifier of the second network device, or the third packet is a third IP multicast packet, and the payload of the third IP multicast packet includes the device identifier of the second network device.

[0028] Preferably, the routing update packet includes an extended community attribute, and the extended community attribute includes the device identifier of the third network device.

[0029] In a fourth aspect, the present embodiment provides a link fault processing device applied to the forwarding chip of a second network device. The second network device is connected to a third network device, the second network device is connected to a first interface of a first network device, the first network device includes a plurality of forwarding entries, the forwarding entry includes a destination address, a transmission interface, and a device identifier, the device identifier is the identifier of the network device accessed by the host belonging to the destination address, and the link fault processing device is An acquisition module for acquiring status information, wherein the status information is for indicating whether the second network device and the third network device are reachable from each other, A transmitting module that transmits a first packet to the first network device, wherein if the status information indicates that the second network device and the third network device are unreachable to each other, the first network device searches for a first forwarding entry in which the transmitting interface is the first interface and the device identifier is the device identifier of the third network device, and sets the state of the first forwarding entry to an invalid state, the first packet includes the device identifier of the third network device and the status information, and the transmitting module includes

[0030] Preferably, the link fault processing device is A receiving module that receives a routing update packet transmitted from the third network device before acquiring the status information, wherein the routing update packet includes the first IP address of a host connected to the third network device and the device identifier of the third network device, further comprising: The transmitting module further forwards the routing update packet to the first network device so that the first network device generates the first forwarding entry based on the first interface, the first IP address, and the device identifier of the third network device.

[0031] Preferably, the second network device includes a third interface and is connected to the third network device via the third interface, and the third network device includes a fourth interface and is connected to the second network device via the fourth interface. The transmitting module is further used to transmit a fourth packet containing the device identifier of the second network device to the third network device so that the third network device records a third correspondence between the fourth interface and the device identifier of the second network device, before acquiring the status information. The link fault processing device further includes a receiving module used to receive a fifth packet containing the device identifier of the third network device transmitted from the third network device, and to record a fourth correspondence between the third interface and the device identifier of the third network device.

[0032] Preferably, the acquisition module is further used to acquire the device identifier of the third network device corresponding to the third interface from the fourth correspondence before transmitting the first packet to the first network device.

[0033] Preferably, there are multiple links between the second network device and the third network device, and the acquisition module specifically, The status information is used to determine that the second network device and the third network device are unreachable to each other if all of the aforementioned links have failed, or to determine that the second network device and the third network device are reachable to each other if any one of the aforementioned links has not failed.

[0034] Preferably, the first packet is a first link layer broadcast packet, and the payload of the first link layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information, or The first packet is a first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information.

[0035] Preferably, the fourth packet is a fourth link layer broadcast packet, and the payload of the fourth link layer broadcast packet includes the device identifier of the second network device, or the fourth packet is a fourth IP multicast packet, and the payload of the fourth IP multicast packet includes the device identifier of the second network device. The fifth packet is a fifth link layer broadcast packet, and the payload of the fifth link layer broadcast packet includes the device identifier of the third network device, or the fifth packet is a fifth IP multicast packet, and the payload of the fifth IP multicast packet includes the device identifier of the third network device.

[0036] Preferably, the routing update packet includes an extended community attribute, and the extended community attribute includes the device identifier of the third network device.

[0037] In a fifth aspect, the present embodiment provides a first network device. The first network device includes a first interface, which is connected to a second network device via the first interface, the second network device is connected to a third network device, the first network device includes a plurality of forwarding entries, each forwarding entry includes a destination address, a transmission interface, and a device identifier, the device identifier being the identifier of the network device accessed by the host belonging to the destination address, the first network device includes a processor, a transceiver, and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor, and the machine-executable instructions are transmitted to the processor, Receiving a first packet transmitted from the second network device, wherein the first packet includes the device identifier and status information of the third network device, and the status information is for indicating whether the second network device and the third network device are reachable from each other. If the status information indicates that the second network device and the third network device are unreachable to each other, then a first forwarding entry is searched for where the transmission interface is the first interface and the device identifier is the device identifier of the third network device. The state of the first transfer entry is set to disabled, and the following is performed.

[0038] Preferably, the machine-executable instruction is further provided to the processor, Before receiving the first packet transmitted from the second network device, the second network device receives a routing update packet forwarded to it via the first interface, wherein the routing update packet includes the first IP address of a host connected to the third network device and the device identifier of the third network device. The system generates the first forwarding entry based on the first interface, the first IP address, and the device identifier of the third network device.

[0039] Preferably, the second network device includes a second interface and is connected to the first network device via the second interface, and the machine-executable instructions are further transmitted to the processor, Before receiving the first packet transmitted from the second network device, the second network device is sent a second packet containing the device identifier of the first network device so that the second network device records a first correspondence between the second interface and the device identifier of the first network device. The system receives a third packet containing the device identifier of the second network device transmitted from the second network device, and records a second correspondence between the first interface and the device identifier of the second network device.

[0040] Preferably, the machine-executable instruction is further provided to the processor, The state flag bit of the first transfer entry is changed to a first value, the first value being such that it represents an invalid state.

[0041] Preferably, the machine-executable instruction is further provided to the processor, After receiving the first packet transmitted from the second network device, if the status information indicates that the second network device and the third network device are reachable from each other, then a first forwarding entry is searched for where the transmission interface is the first interface and the device identifier is the device identifier of the third network device. The state of the first transfer entry is set to the enabled state, and the following is performed.

[0042] Preferably, the first packet is a first link layer broadcast packet, and the payload of the first link layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information, or The first packet is a first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information.

[0043] Preferably, the second packet is a second link layer broadcast packet, and the payload of the second link layer broadcast packet includes the device identifier of the first network device, or the second packet is a second IP multicast packet, and the payload of the second IP multicast packet includes the device identifier of the first network device. The third packet is a third link layer broadcast packet, and the payload of the third link layer broadcast packet includes the device identifier of the second network device, or the third packet is a third IP multicast packet, and the payload of the third IP multicast packet includes the device identifier of the second network device.

[0044] Preferably, the routing update packet includes an extended community attribute, and the extended community attribute includes the device identifier of the third network device.

[0045] In a sixth aspect, the present embodiment provides a second network device. The second network device is connected to a third network device, the second network device is connected to a first interface of a first network device, the first network device includes a plurality of forwarding entries, the forwarding entries include a destination address, a transmission interface, and a device identifier, the device identifier is the identifier of the network device accessed by the host belonging to the destination address, the second network device includes a processor, a transceiver, and a machine-readable storage medium, the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, the machine-executable instructions are transmitted to the processor, The acquisition of status information, wherein the status information is intended to indicate whether the second network device and the third network device are reachable from each other, The first packet is transmitted to the first network device, and if the status information indicates that the second network device and the third network device are unreachable to each other, the first packet includes the device identifier of the third network device and the status information, such that the first network device searches for a first forwarding entry whose transmission interface is the first interface and whose device identifier is the device identifier of the third network device, and sets the state of the first forwarding entry to an invalid state.

[0046] Preferably, the machine-executable instruction is further provided to the processor, Before obtaining the status information, the routing update packet transmitted from the third network device is received, wherein the routing update packet includes the first IP address of a host connected to the third network device and the device identifier of the third network device. The first network device is instructed to forward the routing update packet so that it generates the first forwarding entry based on the first interface, the first IP address, and the device identifier of the third network device.

[0047] Preferably, the second network device includes a third interface and is connected to the third network device via the third interface, the third network device includes a fourth interface and is connected to the second network device via the fourth interface, and the machine executable instructions are further transmitted to the processor, Before acquiring the status information, the third network device is sent a fourth packet containing the device identifier of the second network device to the third network device so that the third network device records the third correspondence between the fourth interface and the device identifier of the second network device. The system receives a fifth packet containing the device identifier of the third network device transmitted from the third network device, and records the fourth correspondence between the third interface and the device identifier of the third network device.

[0048] Preferably, the machine-executable instruction is further provided to the processor, Before sending the first packet to the first network device, the device identifier of the third network device corresponding to the third interface is obtained from the fourth correspondence relationship.

[0049] Preferably, there are multiple links between the second network device and the third network device, and the machine-executable instructions are further transmitted to the processor, If all of the aforementioned links are faulty, the system determines, based on the status information, that the second network device and the third network device are unreachable to each other, or, if any one of the aforementioned links is not faulty, the system determines, based on the status information, that the second network device and the third network device are reachable to each other.

[0050] Preferably, the first packet is a first link layer broadcast packet, and the payload of the first link layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information, or The first packet is a first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information.

[0051] Preferably, the fourth packet is a fourth link layer broadcast packet, and the payload of the fourth link layer broadcast packet includes the device identifier of the second network device, or the fourth packet is a fourth IP multicast packet, and the payload of the fourth IP multicast packet includes the device identifier of the second network device. The fifth packet is a fifth link layer broadcast packet, and the payload of the fifth link layer broadcast packet includes the device identifier of the third network device, or the fifth packet is a fifth IP multicast packet, and the payload of the fifth IP multicast packet includes the device identifier of the third network device.

[0052] Preferably, the routing update packet includes an extended community attribute, and the extended community attribute includes the device identifier of the third network device.

[0053] As a seventh embodiment, the present invention provides a machine-readable storage medium in which machine-executable instructions are stored, wherein when called and executed by a processor, the machine-executable instructions cause the processor to implement the link failure processing method described in the first or second embodiment.

[0054] As an eighth aspect, the present embodiment provides a computer program product that enables the processor to implement the link failure processing method described in the first or second aspect.

[0055] Beneficial Effects of the Embodiments of the Present Application: In the link failure handling method, apparatus, electronic equipment, and medium provided in the embodiments of the present application, the forwarding chip of the first network device can quickly sense the connection status between the second network device and the third network device by obtaining whether the second network device and the third network device are reachable from each other based on the first packet transmitted from the second network device. If the second network device and the third network device are unreachable from each other, the forwarding chip of the first network device can quickly set the first forwarding entry, whose next-hop address is the source address of the first packet and whose device identifier is the device identifier of the third network device, to an invalid state, that is, invalidate the forwarding path including the link between the second network device and the third network device, thereby allowing the forwarding chip to subsequently select another forwarding entry and forward the packet to a host connected to the third network device. In other words, in this embodiment, when a link failure occurs between two network devices, the other network device can be quickly notified, and the network device can directly set the state of the forwarding entry related to the failed link to an invalid state by the forwarding chip, regardless of the processing of received packets by the control plane. Therefore, by performing routing switching faster and more quickly, the training efficiency of the AI ​​traffic model can be improved. [Brief explanation of the drawing]

[0056] The drawings described herein are for further understanding of the present application and are intended to constitute part of the present application. The exemplary embodiments and descriptions herein are for illustrative purposes only and are not intended to limit the present application. [Figure 1] Figure 1 is a comparison diagram of network traffic provided in the embodiment of the present invention. [Figure 2] Figure 2 is a schematic diagram of the configuration of the communication system provided in the embodiment of the present invention. [Figure 3] Figure 3 is a flowchart of the link failure handling method provided in the embodiment of the present invention. [Figure 4]Figure 4 is a schematic diagram of the format of the extended community attribute provided in the embodiment of the present invention. [Figure 5] Figure 5 is an illustrative schematic diagram of the packet format of a first link layer broadcast packet provided in the embodiment of the present invention. [Figure 6] Figure 6 is an illustrative schematic diagram of the packet format of the first IP multicast packet provided in the embodiment of the present invention. [Figure 7] Figure 7 is a schematic diagram of the format of the payload included in the first packet provided in the embodiment of the present invention. [Figure 8] Figure 8 is a schematic diagram of the format of the payload included in the topology discovery packet provided in the embodiment of the present invention. [Figure 9] Figure 9 is a flowchart of another link failure handling method provided in the embodiment of the present invention. [Figure 10] Figure 10 is an illustrative schematic diagram of another communication system provided in the embodiment of the present invention. [Figure 11] Figure 11 is a schematic diagram of the configuration of a link fault treatment device provided in the present embodiment. [Figure 12] Figure 12 is a schematic diagram of the configuration of another link fault treatment device provided in the present embodiment. [Figure 13] Figure 13 is a schematic diagram of the configuration of the first network device provided in the embodiment of the present invention. [Figure 14] Figure 14 is a schematic diagram of the configuration of the second network device provided in the embodiment of the present invention. [Modes for carrying out the invention]

[0057] To further clarify the object, technical concept, and advantages of the present invention, the present invention will be described in more detail below with reference to the drawings and examples. It is clear that the examples described are merely some examples of the present invention, and not all examples. All other examples that can be obtained by those skilled in the art based on the examples of the present invention are all within the scope of protection of the present invention.

[0058] The training scale of a neural network model is categorized according to the number of GPUs used for training, and is divided into Single-Scale, Small-Scale, Medium-Scale, Large-Scale, and Extra-Large-Scale. Single-Scale refers to using a single GPU training model, Small-Scale refers to using at least 8 GPU training models, Medium-Scale refers to using at least 100 GPU training models, Large-Scale refers to using at least 1000 GPU training models, and Extra-Large-Scale refers to using at least 10000 GPU training models.

[0059] As neural network models become increasingly large in scale, a single GPU can no longer meet the computational and storage resource demands when training them. For example, AI traffic models are typically large-scale or extra-large-scale. Therefore, currently, multi-GPU collaborative training is commonly used to speed up model training. For example, each training dataset can be divided into multiple parts, and each part of the training data can be distributed to different GPUs. This makes it easier for each GPU to process different training data using the AI ​​traffic model, and the loss value can be jointly calculated based on the processing results of each GPU, allowing the network parameters of the AI ​​traffic model to be adjusted accordingly. Alternatively, different GPUs can each process data with different dimensions in the training dataset using the AI ​​traffic model, and the loss value can be jointly calculated based on the processing results of each GPU, allowing the network parameters of the AI ​​traffic model to be adjusted accordingly. Such collaborative training methods typically involve many GPUs, requiring frequent interaction between them.

[0060] While GPUs can communicate with each other based on network devices, a routing switchover is necessary if a link failure occurs between network devices. The following briefly describes the current routing switchover process with reference to Figure 2. The communication system shown in Figure 2 includes host H1, host H2, network devices R11, R12, R21, and R22. If the link between network device R11 and network device R22 fails, network device R11 detects the link failure with network device R22 using either Bidirectional Forwarding Detection (BFD) or Connectivity Fault Management (CFM). Subsequently, network device R11 switches the routing stored within itself using either Equal-Cost Multi-Path Routing (ECMP) or Fast Reroute (FRR). Then, network device R11 sends a notification message to network device R21 using either Internet Gateway Protocol (IGP) link state propagation or Border Gateway Protocol (BGP) route updates. After receiving the notification message, network device R21 recalculates the routing using its control plane, deletes the forwarding entry related to the faulty link in the forwarding chip, and determines the equal-cost routing of the deleted forwarding entry using either a BGP programmable interrupt controller (PIC) or IGP route calculation convergence. Subsequently, network device R21 sends a packet to host H2 over the link from network device R21 to network device R12 and then to network device R22.

[0061] Here, the convergence times for BFD and CFM range from a few milliseconds to a few seconds. The convergence times for ECMP and FRR range from a few milliseconds and are affected by the fault detection time. The convergence times for IGP LinkState propagation and BGP route updates range from a few milliseconds to a few seconds and are affected by the scale of network equipment and the number of communication routes in the communication system. The convergence times for BGP PIC and IGP route calculation convergence range from several hundred milliseconds to a few seconds and are affected by the fault notification time and the scale of network equipment in the communication system. The time required for fault notification and routing recalculation is long, which delays fault convergence and affects the training efficiency of the AI ​​traffic model.

[0062] To enable more rapid routing switching in the event of a connection failure between network devices, this embodiment provides a link failure handling method applicable to a first network device. The first network device includes a first interface and is connected to a second network device via the first interface, and the second network device is connected to a third network device. The first network device includes a plurality of forwarding entries, each forwarding entry including a destination address, a transmission interface, and a device identifier. The first, second, and third network devices may all be devices with packet forwarding capabilities, such as switches or routers. This embodiment can be applied to a leaf-leaf network architecture.

[0063] As shown in Figure 3, the link failure processing method provided in the embodiment of the present invention includes the following steps.

[0064] S301 receives the first packet transmitted from the second network device.

[0065] The first packet contains the device identifier (identity document, ID) and status information of the third network device. Here, the status information indicates whether the second network device and the third network device are reachable from each other, that is, whether the link between the second network device and the third network device is broken.

[0066] Preferably, the first packet may further include the device identifier of the second network device.

[0067] S302, If the status information indicates that the second network device and the third network device are unreachable to each other, search for the first forwarding entry in which the transmission interface is the first interface and the device identifier is the device identifier of the third network device.

[0068] Here, the first network device includes a plurality of forwarding entries, each forwarding entry including a destination address, a transmission interface, and a device identifier, the device identifier being the identifier of the network device accessed by the host belonging to the destination address. Preferably, the host may be a device with packet transmission and reception capabilities, such as a laptop computer, desktop computer, or server.

[0069] A forwarding entry includes a next-hop address; for example, the next-hop address of the first forwarding entry is the Internet Protocol (IP) address of the second network device.

[0070] S303, Set the status of the first forwarding entry to disabled.

[0071] The transfer path represented in the first transfer entry needs to pass through the link between the second network device and the third network device. However, since the second network device and the third network device are unreachable to each other, meaning the link between the second network device and the third network device is broken, the transfer path is currently unavailable, and therefore the state of the first transfer entry can be set to invalid.

[0072] Subsequently, when the first network device forwards a service packet, even if it is determined that the destination address of the service packet and the destination address of the first forwarding entry are the same, it is understood that the packet forwarding will not be performed using the first forwarding entry. Instead, the device will directly search for a forwarding entry that matches the destination address of another service packet, and the service packet will be forwarded using the found forwarding entry. This corresponds to the routing switchover of the first network device being completed after the state of the first forwarding entry is set to the disabled state.

[0073] In the link failure handling method provided in the embodiment of the present invention, the forwarding chip of the first network device can quickly sense the connection status between the second network device and the third network device by obtaining whether the second network device and the third network device are reachable from the first packet transmitted from the second network device. If the second network device and the third network device are unreachable from each other, the forwarding chip of the first network device quickly sets the first forwarding entry, whose next-hop address is the source address of the first packet and whose device identifier is the device identifier of the third network device, to an invalid state, that is, it invalidates the forwarding path including the link between the second network device and the third network device, thereby allowing it to subsequently select another forwarding entry and forward the packet to a host connected to the third network device. In other words, in this embodiment, when a link failure occurs between two network devices, the other network device can be quickly notified, and the network device can directly set the state of the forwarding entry related to the failed link to an invalid state by the forwarding chip, regardless of the processing of received packets by the control plane. Therefore, by performing routing switching faster and more quickly, the training efficiency of the AI ​​traffic model can be improved.

[0074] In the embodiment of the present invention, the first network device in S301 may generate a first forwarding entry before receiving the first packet transmitted from the second network device, and the generation method includes the following steps.

[0075] Step 1: The first network device receives a route update packet forwarded to the second network device via the first interface.

[0076] Here, the routing update packet includes the Internet Protocol (IP) address of the host connected to the third network device and the device identifier of the third network device.

[0077] As an example, the routing update packet may specifically be a BGP route update packet, and the third network device can learn the IP address of a host connected to it and then send a BGP route update packet with that IP address. In this embodiment, the device identifier of the third network device is added to the BGP route update packet. This is equivalent to the BGP route update packet containing the device identifier of the original network device that sent the BGP route update packet. As a result, other network devices can identify the original source device of the BGP route update packet after receiving it.

[0078] Step 2, the first network device generates a first forwarding entry based on the first interface, the first IP address, and the device identifier of the third network device.

[0079] A first forwarding entry may be generated by combining the device identifier of the third network device with the first IP address as the destination address and the first interface as the sending interface. This first forwarding entry further includes a next-hop address, which is understood to be the IP address of the second network device.

[0080] In this embodiment, the routing update packet includes an extended community attribute, and the extended community attribute includes the device identifier of the third network device.

[0081] The format of the extended community attribute is shown in Figure 4. The extended community attribute includes the Type, Sub-Type, Reserved (Res), and Device ID.

[0082] By the method described above, in this embodiment of the application, the routing update packet sent from the second network device to the first network device includes the device identifier of the third network device. This allows the first network device to understand the device identifier of the network device accessed by the host belonging to the first IP address included in the routing update packet and record it in the forwarding entry. In other words, by dynamically learning the device identifier of the remote network device, the network device can then more quickly search for the first forwarding entry corresponding to the faulty link when it subsequently determines a link failure between the second and third network devices. This enables faster routing switching and improves fault resolution efficiency.

[0083] Furthermore, by including the device identifier of the third network device in the extended community attribute of the routing update packet, this can be implemented more easily without having to add a separate packet to carry the device identifier.

[0084] In this embodiment, the second network device includes a second interface and connects to the first network device via the second interface. Before the first packet transmitted from the second network device in S301, the first network device transmits a second packet to the second network device, and the second packet may include the device identifier of the first network device, thereby causing the second network device to record a first correspondence between the second interface and the device identifier of the first network device. Preferably, once the first network device has established a connection with the second network device, it can transmit the second packet to the second network device.

[0085] Accordingly, the first network device can further receive a third packet transmitted from the second network device, where the third packet includes the device identifier of the second network device. The first network device can then record a second correspondence between the first interface and the device identifier of the second network device. Preferably, once the second network device establishes a connection with the first network device, it can transmit a third packet to the first network device, that is, once the first network device establishes a connection with the second network device, it can receive a third packet transmitted from the second network device.

[0086] When a connection is established between the first network device and the second network device, the first network device sets the interface state of the first interface to the up state and sends the second packet to the second network device. Furthermore, when a connection is established between the first network device and the second network device, the second network device sets the interface state of the second interface to the up state and sends the third packet to the first network device.

[0087] Through the above method, the first network device can determine the device identifier of the network device connected to its first interface, and the second network device can determine the device identifier of the network device connected to its second interface. In other words, network devices can dynamically learn the device identifier of the other network device and maintain the logic topology relationships between network devices. Subsequently, when the second network device notifies other network devices via packets whether the first network device is reachable, it will have the device identifier of the first network device and be able to quickly notify them of any failure.

[0088] Once a connection is established between two other network devices, the above method can also be used to send packets containing its own device identifier and record the correspondence.

[0089] Alternatively, using a static placement method, each network device can be pre-assigned the device identifier of the other network device connected to each interface of that network device.

[0090] Preferably, the third packet may further include a serial number, which is used to distinguish between new and old packets; that is, each time the second network device sends a third packet to the first network device via the second interface, it adds 1 to the serial number in the third packet. Based on this, the first network device recording a second correspondence between the first interface and the device identifier of the second network device is achieved by recording the second correspondence between the first interface and the device identifier and serial number of the second network device.

[0091] In the embodiment of the present invention, the first packet received by the first network device in S301 may be a first link layer broadcast packet, and the payload of the first link layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and status information.

[0092] Referring to Figure 5, the first link-layer broadcast packet includes a first Ethernet header (Eth), a payload, and a Cyclic Redundancy Check (CRC) code. The first Eth includes the Destination Source Media Access Control Address (DMAC), the Source Media Access Control Address (SMAC), and Type. The SMAC is the MAC address of the network device sending the first link-layer broadcast packet, and the DMAC is a pre-configured multicast MAC address. In the first link-layer broadcast packet, the DMAC occupies 6 bytes, the SMAC occupies 6 bytes, the Type occupies 2 bytes, the payload occupies 46 to 1500 bytes, and the CRC code occupies 4 bytes. In this embodiment, by improving the value of the Type field in the first Eth, the value of the Type field defines the first link-layer broadcast packet as a packet for fault notification. The value of the Type field may be set according to the actual situation, and this embodiment is not limited thereto.

[0093] Alternatively, the first packet is the first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and status information.

[0094] Referring to Figure 6, the first IP multicast packet includes the second Eth, payload, and frame check sequence (FCS). The second Eth includes the destination address, source address, 802.1Q tag, and length / type. The 802.1Q tag includes the type, priority (PRI), canonical format indicator (CFI), and virtual local area network identifier (VLAN ID, VID). The FCS may be obtained using the CRC-32 algorithm. In the first IP multicast packet, the Destination Address occupies 6 bytes, the Source Address occupies 6 bytes, the 802.1Q Tag occupies a total of 4 bytes, of which the Type occupies 2 bytes, the PRI occupies 3 bits, the CFI occupies 1 bit, the VID occupies 12 bits, the Length / Type occupies 2 bytes, the payload occupies 45 to 1500 bytes, and the FCS occupies 4 bytes. In this embodiment, by improving the value of the Type field in the second Eth, the value of the Type field defines the first IP multicast packet as a packet for fault notification. The value of the Type field may be set according to the actual situation, and this embodiment is not limited thereto.

[0095] Preferably, the payload of the first packet may further include a serial number, which is used to distinguish between new and old packets.

[0096] The packet format of the first packet's payload is shown in Figure 7, and the payload includes version, type, packet length, source device identifier (SRC Device ID), destination device identifier (Dest Device ID), serial number, destination port identifier (DPortID), and status. The SRC Device ID is the device identifier of the second network device, the Dest Device ID is the device identifier of the third network device, and the DportID is the third interface identifier or virtual interface identifier for connecting the third network device to the second network device, with virtual interfaces representing each interface connected to the third network device in the second network device. Status indicates whether the second and third network devices are reachable from each other, and specifically represents the interface status of the interface represented by the DportID.

[0097] When there is a link between the second network device and the third network device, the second network device is connected to the third network device via the third interface, and in this case, DportID is the identifier of the third interface. If Status=0, it indicates that the interface state of the third interface is faulty, meaning that the link between the second network device and the third network device is broken. If Status=1, it indicates that the third interface is not faulty, meaning that the link between the second network device and the third network device is not broken.

[0098] When there are multiple links between the second network device and the third network device, the second network device connects to the third network device via multiple interfaces, and each interface included in the second network device corresponds to one link. In this case, DportID is the virtual interface identifier of the second network device. If Status=0, it indicates that the virtual interface is in a fault state, meaning that all links between the second network device and the third network device are failing. If Status=1, it indicates that the virtual interface is in a non-fault state, meaning that there are non-faulting links between the second network device and the third network device.

[0099] The first packet may be a packet generated by BGP or IGP.

[0100] In the embodiment of the present invention, the second packet is a second link layer broadcast packet, and the payload of the second link layer broadcast packet includes the device identifier of the first network device, or the second packet is a second IP multicast packet, and the payload of the second IP multicast packet includes the device identifier of the first network device. Similarly, the third packet is a third link layer broadcast packet, and the payload of the third link layer broadcast packet contains the device identifier of the second network device, or the third packet is a third IP multicast packet, and the payload of the third IP multicast packet contains the device identifier of the second network device.

[0101] The headers of the second and third packets are the same as the header of the first packet, and can be referred to in the explanation above.

[0102] The payload format in the second and third packets is the same, and as shown in Figure 8, the payload includes version, type, packet-Length, SRC Device ID, and source port identifier (Src PortID). Preferably, referring to Figure 8, the payloads of the second and third packets may further include a serial number. Here, the SRC Device ID is the device identifier of the source network device itself that sends the packet, and the Src PortID represents the identifier of the interface used when the source network device sends the packet.

[0103] In the embodiments of this disclosure, the first packet may be referred to as a fast notification packet, and the second and third packets may be referred to as topology discovery packets. Both the fast notification packet and the topology discovery packet are packets added to the embodiments of this application, and the headers of the two types of packets may be the same. Network devices can distinguish between these two types of packets by the Type included in the packet payload. For example, as shown in Figure 7, they can be distinguished by the Type=2 included in the payload of the fast notification packet, and as shown in Figure 8, by the Type=1 included in the payload of the topology discovery packet.

[0104] In this embodiment, the first network device includes at least one equal-cost multi-path routing (ECMP) group, the ECMP group includes at least two forwarding entries, and the destination addresses of each forwarding entry included in the ECMP group are all the same.

[0105] In the embodiment of the present invention, setting the state of the first forwarding entry to an invalid state in S303 can be achieved by changing the state flag bit of the first forwarding entry to a first value. The first value represents the invalid state, and for example, the first value is 0.

[0106] In this embodiment, the first network device can directly manage forwarding entries using a forwarding chip, thereby increasing the speed of routing switching.

[0107] In the embodiment of the present invention, after the first network device in S301 receives the first packet transmitted from the second network device, if the status information indicates that the second network device and the third network device are reachable from each other, the first network device can search for a first forwarding entry whose transmission interface is the first interface and whose device identifier is the device identifier of the third network device, and set the state of the first forwarding entry to the enabled state.

[0108] The method for searching for a forwarding entry on the first network device can be found by referring to the specific embodiment in S302 above, and will not be explained here.

[0109] The first network device changes the status flag bit of the first forwarding entry to the second value, which represents the valid state; for example, the second value is 1.

[0110] By using the method described above, network devices can quickly update the state of their stored forwarding entries in response to the first packet received, thereby enabling rapid routing switching.

[0111] Based on the same concept, the present embodiment further provides a link failure handling method applicable to a second network device. The second network device is connected to a third network device, and the second network device is connected to a first interface of the first network device, and the first network device includes a plurality of forwarding entries, each forwarding entry including a destination address, a transmission interface, and a device identifier, the device identifier being the identifier of the network device accessed by the host belonging to the destination address. As shown in Figure 9, the link failure handling method includes the following steps.

[0112] S901 retrieves status information. Here, the status information indicates whether the second network device and the third network device are reachable from each other.

[0113] S902, when the first packet is sent to the first network device and the status information indicates that the second network device and the third network device are unreachable to each other, the first packet includes the device identifier and status information of the third network device so that the first network device searches for a first forwarding entry whose transmission interface is the first interface and whose device identifier is the device identifier of the third network device, and sets the state of the first forwarding entry to an invalid state.

[0114] The first network device is a network device connected to the second network device, and the link between it and the second network device is not faulty. The first network device may be one or more, and this embodiment of the application will be explained as an example where there is one first network device.

[0115] The second network device transmits the first packet to the first network device via multicast or broadcast. Preferably, the second network device transmits the first packet periodically. Alternatively, the second network device may transmit the first packet at preset time intervals when the connection state of the link between it and the network device connected to it changes, and transmit it consecutively for a preset number of times. For example, the preset time interval is 10 milliseconds and the preset number of times is 10.

[0116] The specific method by which the first network device searches for the first forwarding entry and sets the state of the first forwarding entry to disabled can be found in the explanation above, and is omitted here.

[0117] In the link failure handling method provided in the embodiment of the present invention, the forwarding chip of the first network device can quickly sense the connection status between the second network device and the third network device by obtaining whether the second network device and the third network device are reachable from the first packet transmitted from the second network device. If the second network device and the third network device are unreachable from each other, the forwarding chip of the first network device can quickly set the first forwarding entry, whose next-hop address is the source address of the first packet and whose device identifier is the device identifier of the third network device, to an invalid state, that is, invalidate the forwarding path including the link between the second network device and the third network device, thereby allowing the forwarding chip to subsequently select another forwarding entry and forward the packet to a host connected to the third network device. In other words, in this embodiment, when a link failure occurs between two network devices, the other network device can be quickly notified, and the network device can directly set the state of the forwarding entry related to the failed link to an invalid state by the forwarding chip, regardless of the processing of received packets by the control plane. Therefore, by performing routing switching faster and more quickly, the training efficiency of the AI ​​traffic model can be improved.

[0118] In this embodiment, before acquiring the second network device status information in S901, the second network device may further receive a routing update packet sent from the third network device and forward the routing update packet to the first network device, so that the first network device generates a first forwarding entry based on the first interface, the first IP address, and the device identifier of the third network device. Here, the routing update packet includes the first IP address of a host connected to the third network device and the device identifier of the third network device.

[0119] The routing update packet includes an extended community attribute, which includes the device identifier of the third network device. The format of the routing update packet can be found in the description above.

[0120] The specific method for generating the first forwarding entry on the first network device can be found in the explanation above, and will not be explained here.

[0121] In this embodiment, the second network device includes a third interface and connects to the third network device via the third interface, and the third network device includes a fourth interface and connects to the second network device via the fourth interface. Before acquiring the second network device status information in S901, the second network device may send a fourth packet to the third network device, and the fourth packet may include the device identifier of the second network device, thereby causing the third network device to record the third correspondence between the fourth interface and the device identifier of the second network device. Preferably, the second network device may send a fourth packet to the third network device once it has established a connection with the third network device.

[0122] Before acquiring the second network device status information in S901 above, the second network device may receive the fifth packet transmitted from the third network device and record the fourth correspondence between the third interface and the device identifier of the third network device. Here, the fifth packet includes the device identifier of the third network device. Preferably, once the third network device establishes a connection with the second network device, it can transmit the fifth packet to the second network device, that is, once the second network device establishes a connection with the third network device, it can receive the fifth packet transmitted from the third network device.

[0123] The fourth and fifth packets may be referred to as topology discovery packets, and the format of the topology discovery packets can be found in the description above.

[0124] In the embodiment of the present invention, when there are multiple links between the second network device and the third network device, the acquisition of status information by the second network device in S901 includes the following two situations.

[0125] In scenario 1, if all links between the second network device and the third network device fail, the status information determines that the second network device and the third network device are unreachable to each other.

[0126] In scenario 2, if one of the multiple links between the second network device and the third network device is not failing, the status information is determined to indicate that the second network device and the third network device are reachable from each other.

[0127] The second network device may detect whether each link is faulty using BFD or CFM, or by other methods, and the embodiment of this application does not specifically limit this.

[0128] Before the second network device sends the first packet to the first network device in S902 above, the second network device may obtain the device identifier of the third network device corresponding to the third interface from the fourth correspondence relationship.

[0129] In this embodiment, the first packet is a first link layer broadcast packet, and the payload of the first link layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and status information, or The first packet is the first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and status information.

[0130] In the embodiment of the present invention, the fourth packet is a fourth link layer broadcast packet, and the payload of the fourth link layer broadcast packet includes the device identifier of the second network device, or the fourth packet is a fourth IP multicast packet, and the payload of the fourth IP multicast packet includes the device identifier of the second network device.

[0131] The fifth packet is a fifth link layer broadcast packet, and the payload of the fifth link layer broadcast packet contains the device identifier of the third network device, or the fifth packet is a fifth IP multicast packet, and the payload of the fifth IP multicast packet contains the device identifier of the third network device.

[0132] Here, both the fourth and fifth packets may be referred to as topology discovery packets, and the format of the topology discovery packets can be found in the description above.

[0133] Referring to Figure 10, the complete process of link failure handling provided in the embodiment of this application is described below.

[0134] The communication system shown in Figure 10 consists of Host-1, Host-2, Host-3, Host-4, Leaf-1, Leaf-2, Leaf-3, Leaf-4, Spine-1, and Spine-2. The device ID of Leaf-1 is 11, Leaf-2 is 12, Leaf-3 is 13, Leaf-4 is 14, Spine-1 is 21, and Spine-2 is 22. Leaf-1 is connected to Host-1, Leaf-2 is connected to Host-2, Leaf-3 is connected to Host-3, and Leaf-4 is connected to Host-4. Spine-1 and Spine-2 are connected to Leaf-1 through Leaf-4 respectively, and communication between the spines and leaves is based on the BGP protocol. Each Leaf connects Spine-1 and Spine-2 via its own different interface; for example, the interface on Leaf-1 connecting to Spine-1 is leaf-1-interface-1, and the interface on Leaf-1 connecting to Spine-2 is leaf-1-interface-2. Each Leaf stores forwarding entries for hosts other than the one it connects to.

[0135] For example, the transfer entries stored in Leaf-1 are as follows:

[0136] The destination address is a forwarding entry included in ECMP 1 of the Host-2 address. Next hop 1 points to Spine-1, next hop address 1 is the address of Spine-1, the transmit interface is leaf-1-interface-1, and the device ID is 12. Next hop 2 is pointed to Spine-2, the transmit interface is leaf-1-interface-2, and the device ID is 12.

[0137] The destination address is a forwarding entry included in ECMP 2 for the Host-3 address. Next hop 1 is pointed to Spine-1, the transmit interface is leaf-1-interface-1, and the device ID is 13. Next hop 2 is pointed to Spine-2, the transmit interface is leaf-1-interface-2, and the device ID is 13.

[0138] The destination address is a forwarding entry included in ECMP 3 for the Host-4 address. Next hop 1 is pointed to Spine-1, the transmit interface is leaf-1-interface-1, and the device ID is 14. Next hop 2 is pointed to Spine-2, the transmit interface is leaf-1-interface-2, and the device ID is 14.

[0139] If the first network device is Leaf-1, the second network device is Spine-1, and the third network device is Leaf-4, that is, if the link between Spine-1 and Leaf-4 is broken, Spine-1 may send a first packet to Leaf-1, and the first packet includes device ID 21, device ID 14, and Status=0.

[0140] After receiving the first packet, Leaf-1 searches for the first forwarding entry in ECMP 3, i.e., the one with device ID 14 and transmission interface leaf-1-interface-1, and sets the state of that forwarding entry to disabled. Subsequently, when Leaf-1 attempts to forward a packet to Host-4, it can perform packet forwarding based on other forwarding entries in ECMP 3, namely, "next hop 2 points to Spine-2, transmission interface is leaf-1-interface-2, and device ID is 14".

[0141] With the above method, in this embodiment of the present invention, if the link between two network devices fails, i.e., the two network devices become unreachable to each other, the other network device is promptly notified. This allows the other network device to quickly find the forwarding entry corresponding to the faulty link according to the transmit interface identifier and device identifier, thereby enabling rapid routing switching, improving fault convergence efficiency, and consequently improving the training efficiency of the AI ​​traffic model.

[0142] Based on the same concept, the present embodiment further provides a link fault processing device applied to the forwarding chip of a first network device. The first network device includes a first interface and is connected to a second network device via the first interface, the second network device is connected to a third network device, the first network device includes a plurality of forwarding entries, each forwarding entry includes a destination address, a transmission interface, and a device identifier, the device identifier being the identifier of the network device accessed by the host belonging to the destination address, and as shown in Figure 11, the link fault processing device includes a receiving module 1101, a search module 1102, and a configuration module 1103. The receiving module 1101 is used to receive the first packet transmitted from the second network device, and the first packet contains the device identifier and status information of the third network device, the status information indicating whether the second network device and the third network device are reachable from each other. The search module 1102 is used to search for a first forwarding entry where the transmission interface is the first interface and the device identifier is the device identifier of the third network device, when the status information indicates that the second network device and the third network device are unreachable to each other. The configuration module 1103 is used to set the state of the first transfer entry to an invalid state.

[0143] Preferably, The receiving module 1101 is further used to receive routing update packets forwarded by the second network device via the first interface before receiving the first packet transmitted from the second network device, the routing update packets include the first IP address of the host connected to the third network device and the device identifier of the third network device, The link fault processing device further includes: It includes a generation module that generates a first forwarding entry based on a first interface, a first IP address, and a device identifier of a third network device.

[0144] Preferably, the second network device includes a second interface and is connected to the first network device via the second interface, and the link fault processing device further includes: A transmitting module includes sending a second packet containing the device identifier of the first network device to the second network device so that the second network device records a first correspondence between the second interface and the device identifier of the first network device, before receiving the first packet transmitted from the second network device. The receiving module 1101 is further used to receive a third packet containing the device identifier of the second network device transmitted from the second network device, and to record a second correspondence between the first interface and the device identifier of the second network device.

[0145] Preferably, the setting module 1103 specifically, It is used to change the status flag bit of the first transfer entry to its first value, which represents the invalid state.

[0146] Preferably, after receiving a first packet transmitted from a second network device, the search module 1102 is further used to search for a first forwarding entry in which the transmission interface is the first interface and the device identifier is the device identifier of the third network device, if the status information indicates that the second network device and the third network device are reachable from each other. The configuration module 1103 is further used to set the state of the first transfer entry to the enabled state.

[0147] Preferably, the first packet is a first link layer broadcast packet, and the payload of the first link layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and status information, or the first packet is a first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and status information.

[0148] Preferably, the second packet is a second link layer broadcast packet, and the payload of the second link layer broadcast packet includes the device identifier of the first network device, or the second packet is a second IP multicast packet, and the payload of the second IP multicast packet includes the device identifier of the first network device. The third packet is a third link layer broadcast packet, and the payload of the third link layer broadcast packet contains the device identifier of the second network device, or the third packet is a third IP multicast packet, and the payload of the third IP multicast packet contains the device identifier of the second network device.

[0149] Preferably, the routing update packet includes an extended community attribute, and the extended community attribute includes the device identifier of the third network device.

[0150] Based on the same concept, the present embodiment further provides a link fault processing device applied to the forwarding chip of a second network device. The second network device is connected to a third network device, the second network device is connected to a first interface of the first network device, the first network device includes a plurality of forwarding entries, each forwarding entry includes a destination address, a transmission interface, and a device identifier, the device identifier includes the identifier of the network device accessed by the host belonging to the destination address, and as shown in Figure 12, the link fault processing device includes an acquisition module 1201 and a transmission module 1202. The acquisition module 1201 is used to acquire status information, which indicates whether the second network device and the third network device are reachable from each other. The transmitting module 1202 is used to transmit a first packet to a first network device. If the status information indicates that the second network device and the third network device are unreachable to each other, the first packet includes the device identifier of the third network device and status information, so as to search for a first forwarding entry where the transmitting interface is the first interface and the device identifier is the device identifier of the third network device, and set the state of the first forwarding entry to an invalid state.

[0151] Preferably, the link fault processing device further includes: A receiving module that receives routing update packets sent from a third network device before acquiring status information, wherein the routing update packets include the first IP address of a host connected to the third network device and the device identifier of the third network device, The transmitting module 1202 is further used to forward routing update packets to the first network device so that the first network device generates a first forwarding entry based on the first interface, the first IP address, and the device identifier of the third network device.

[0152] Preferably, the second network device includes a third interface and is connected to the third network device via the third interface, and the third network device includes a fourth interface and is connected to the second network device via the fourth interface. The transmitting module 1202 is further used to transmit a fourth packet containing the device identifier of the second network device to the third network device so that the third network device records the third correspondence between the fourth interface and the device identifier of the second network device, before acquiring status information. The link fault processing device further includes: The system includes a receiving module that receives a fifth packet containing the device identifier of the third network device transmitted from the third network device, and records a fourth correspondence between the third interface and the device identifier of the third network device.

[0153] Preferably, the acquisition module 1201 is further used to acquire the device identifier of the third network device corresponding to the third interface from the fourth correspondence before transmitting the first packet to the first network device.

[0154] Preferably, there are multiple links between the second network device and the third network device, and the acquisition module 1201 specifically, If all links fail, the status information determines that the second network device and the third network device are unreachable to each other, or, If one of the multiple links is not failing, the status information determines that the second network device and the third network device are reachable from each other.

[0155] Preferably, the first packet is a first link-layer broadcast packet, and the payload of the first link-layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and status information, or The first packet is the first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and status information.

[0156] Preferably, the fourth packet is a fourth link layer broadcast packet, and the payload of the fourth link layer broadcast packet includes the device identifier of the second network device, or the fourth packet is a fourth IP multicast packet, and the payload of the fourth IP multicast packet includes the device identifier of the second network device. The fifth packet is a fifth link layer broadcast packet, and the payload of the fifth link layer broadcast packet contains the device identifier of the third network device, or the fifth packet is a fifth IP multicast packet, and the payload of the fifth IP multicast packet contains the device identifier of the third network device.

[0157] Preferably, the routing update packet includes an extended community attribute, and the extended community attribute includes the device identifier of the third network device.

[0158] Based on the same concept, the present embodiment provides a first network device. The first network device includes a first interface and is connected to a second network device via the first interface, the second network device is connected to a third network device, the first network device includes a plurality of forwarding entries, each forwarding entry includes a destination address, a transmission interface, and a device identifier, the device identifier being the identifier of the network device accessed by the host belonging to the destination address, as shown in Figure 13, the first network device includes a processor 1301, a transceiver 1304, and a machine-readable storage medium 1302, the machine-readable storage medium 1302 storing machine-executable instructions that can be executed by the processor 1301, the machine-executable instructions are sent to the processor 1301, The first packet is received from the second network device, the first packet containing the device identifier and status information of the third network device, and the status information is intended to indicate whether the second network device and the third network device are reachable from each other. If the status information indicates that the second network device and the third network device are unreachable to each other, then the first forwarding entry is searched for, where the transmission interface is the first interface and the device identifier is the device identifier of the third network device. Set the status of the first transfer entry to disabled, and execute the following.

[0159] Preferably, the machine-executable instructions are further transmitted to the processor 1301. Before receiving the first packet transmitted from the second network device, the second network device receives a routing update packet forwarded via the first interface, wherein the routing update packet includes the first IP address of a host connected to the third network device and the device identifier of the third network device. The system is configured to generate a first forwarding entry based on the first interface, the first IP address, and the device identifier of the third network device.

[0160] Preferably, the second network device includes a second interface and is connected to the first network device via the second interface, and the machine-executable instructions are further transmitted to the processor 1301. Before receiving the first packet transmitted from the second network device, the second network device is sent a second packet containing the device identifier of the first network device so that the second network device records the first correspondence between the second interface and the device identifier of the first network device. The system receives a third packet containing the device identifier of the second network device, which was transmitted from the second network device, and records the second correspondence between the first interface and the device identifier of the second network device.

[0161] Preferably, the machine-executable instructions are further transmitted to the processor 1301. The state flag bit of the first transfer entry is changed to its first value, which represents the invalid state.

[0162] Preferably, the machine-executable instructions are further transmitted to the processor 1301. After receiving the first packet transmitted from the second network device, if the status information indicates that the second network device and the third network device are reachable from each other, then the first forwarding entry is searched for, where the transmission interface is the first interface and the device identifier is the device identifier of the third network device. Set the status of the first transfer entry to the enabled state and execute the following.

[0163] Preferably, the first packet is a first link-layer broadcast packet, and the payload of the first link-layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and status information, or The first packet is the first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and status information.

[0164] Preferably, the second packet is a second link layer broadcast packet, and the payload of the second link layer broadcast packet includes the device identifier of the first network device, or the second packet is a second IP multicast packet, and the payload of the second IP multicast packet includes the device identifier of the first network device. The third packet is a third link layer broadcast packet, and the payload of the third link layer broadcast packet contains the device identifier of the second network device, or the third packet is a third IP multicast packet, and the payload of the third IP multicast packet contains the device identifier of the second network device.

[0165] Preferably, the routing update packet includes an extended community attribute, and the extended community attribute includes the device identifier of the third network device.

[0166] Figure 13 may further include a communication bus 1303. The processor 1301, the machine-readable storage medium 1302, and the transceiver 1304 communicate with each other via the communication bus 1303, which may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus is divided into an address bus, a data bus, a control bus, etc. The transceiver 1304 may be a wireless communication module, and the transceiver 1304 performs data interaction with other devices under the control of the processor 1301.

[0167] The machine-readable storage medium 1302 may include random access memory (RAM) or non-volatile memory (NVM), and may be, for example, at least one magnetic disk memory. The machine-readable storage medium may also be at least one storage device located away from the aforementioned processor.

[0168] The processor 1301 may be a general-purpose processor including a Central Processing Unit (CPU), a Network Processor (NP), etc., or a general-purpose processor including a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other reprogrammable logic device, a discrete gate or transistor logic device, or a discrete hardware assembly.

[0169] Based on the same concept, the present invention provides a second network device. The second network device is connected to a third network device, and the second network device is connected to the first interface of the first network device, and the first network device includes a plurality of forwarding entries, each forwarding entry including a destination address, a transmission interface, and a device identifier, the device identifier being the identifier of the network device accessed by the host belonging to the destination address, and as shown in Figure 14, the second network device includes a processor 1401, a transceiver 1404, and a machine-readable storage medium 1402, the machine-readable storage medium 1402 stores machine-executable instructions that can be executed by the processor 1401, and the machine-executable instructions are sent to the processor 1401, This involves obtaining status information, which indicates whether the second network device and the third network device are reachable from each other. The first packet is sent to the first network device, and if the status information indicates that the second network device and the third network device are unreachable to each other, the first packet contains the device identifier of the third network device and the status information so that the first network device searches for a first forwarding entry whose transmission interface is the first interface and whose device identifier is the device identifier of the third network device, and sets the state of the first forwarding entry to an invalid state.

[0170] Preferably, the machine-executable instructions are further transmitted to the processor 1401. Before obtaining status information, the system receives a routing update packet sent from the third network device, the routing update packet containing the first IP address of the host connected to the third network device and the device identifier of the third network device. The first network device is instructed to forward a routing update packet so that it generates a first forwarding entry based on the first interface, the first IP address, and the device identifier of the third network device.

[0171] Preferably, the second network device includes a third interface and is connected to the third network device via the third interface, the third network device includes a fourth interface and is connected to the second network device via the fourth interface, and the machine executable instructions are further transmitted to the processor 1401. Before acquiring status information, the third network device sends a fourth packet containing the device identifier of the second network device to the third network device so that the third network device records the third correspondence between the fourth interface and the device identifier of the second network device. The system receives a fifth packet containing the device identifier of the third network device transmitted from the third network device, and records the fourth correspondence between the third interface and the device identifier of the third network device.

[0172] Preferably, the machine-executable instruction further causes the processor 1401 to obtain the device identifier of the third network device corresponding to the third interface from the fourth correspondence before sending the first packet to the first network device.

[0173] Preferably, there are multiple links between the second network device and the third network device, and the machine-executable instructions are further transmitted to the processor 1401. If all links fail, the status information will indicate that the second network device and the third network device are unreachable to each other, or If one of the multiple links is not failing, the system will determine, based on the status information, that the second network device and the third network device are reachable from each other.

[0174] Preferably, the first packet is a first link-layer broadcast packet, and the payload of the first link-layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and status information, or The first packet is the first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and status information.

[0175] Preferably, the fourth packet is a fourth link layer broadcast packet, and the payload of the fourth link layer broadcast packet includes the device identifier of the second network device, or the fourth packet is a fourth IP multicast packet, and the payload of the fourth IP multicast packet includes the device identifier of the second network device. The fifth packet is a fifth link layer broadcast packet, and the payload of the fifth link layer broadcast packet contains the device identifier of the third network device, or the fifth packet is a fifth IP multicast packet, and the payload of the fifth IP multicast packet contains the device identifier of the third network device.

[0176] Preferably, the routing update packet includes an extended community attribute, and the extended community attribute includes the device identifier of the third network device.

[0177] Figure 14 may further include a communication bus 1403. The processor 1401, the machine-readable storage medium 1402, and the transceiver 1404 communicate with each other via the communication bus 1403, which may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus is divided into an address bus, a data bus, a control bus, etc. The transceiver 1404 may be a wireless communication module, and the transceiver 1404 performs data interaction with other devices under the control of the processor 1401.

[0178] The machine-readable storage medium 1402 may include random access memory (RAM) and non-volatile memory (NVM), and may be, for example, at least one magnetic disk memory. The machine-readable storage medium may also be at least one storage device located away from the aforementioned processor.

[0179] The processor 1401 may be a general-purpose processor including a Central Processing Unit (CPU), a Network Processor (NP), etc., or a general-purpose processor including a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other reprogrammable logic device, a discrete gate or transistor logic device, or a discrete hardware assembly.

[0180] Based on the same concept, the present embodiment further provides a machine-readable storage medium storing machine-executable instructions that can be executed by a processor, through the link failure processing method provided in the above embodiment. The machine-executable instructions cause the processor to implement any of the steps of the above link failure processing method.

[0181] Further embodiments provided in this application provide a computer program product including instructions. When the computer program product is executed on a computer, the computer is made to perform a step of any of the link failure handling methods in the above embodiments.

[0182] In this specification, relational terms such as “First” and “Second” are used solely to distinguish one entity or operation from another, and do not require or suggest that there is any actual relationship or order between these entities or operations. Furthermore, the terms “includes,” “contains,” or any other variation of “contains” mean non-exclusive “contains.” Thus, a flow, method, article, or device containing a set of elements does not include only those elements, but also other elements not explicitly mentioned, or elements specific to such a flow, method, article, or device. Unless otherwise specified, an element limited by the phrase “contains one…” does not preclude the presence of other identical elements in a flow, method, article, or device containing the described element.

[0183] Each example in this specification is described in relation to the others, and any identical or similar parts between examples can be cross-referenced. The emphasis in each example differs from that of the others. In particular, the apparatus examples are described briefly because they are essentially similar to the method examples. For relevant points, please refer to the description in the method examples section.

[0184] The foregoing description is merely a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present application should be included within the scope of protection of the present application.

Claims

1. A link failure handling method applied to the forwarding chip of a first network device, wherein the first network device includes a first interface and is connected to a second network device via the first interface, the second network device is connected to a third network device, the first network device includes a plurality of forwarding entries, each forwarding entry includes a destination address, a transmission interface, and a device identifier, the device identifier is the identifier of the network device accessed by the host belonging to the destination address, and the link failure handling method is: Receiving a first packet transmitted from the second network device, wherein the first packet includes the device identifier and status information of the third network device, and the status information is for indicating whether the second network device and the third network device are reachable from each other. If the status information indicates that the second network device and the third network device are unreachable to each other, then a first forwarding entry is searched for where the transmission interface is the first interface and the device identifier is the device identifier of the third network device. The following is characterized by including setting the state of the first transfer entry to an invalid state: Link failure handling method.

2. Before receiving the first packet transmitted from the second network device, the link failure handling method further Receiving a routing update packet forwarded from the second network device via the first interface, wherein the routing update packet includes the first IP address of a host connected to the third network device and the device identifier of the third network device. The method is characterized by generating the first forwarding entry based on the first interface, the first IP address, and the device identifier of the third network device, The link failure handling method according to claim 1.

3. The second network device includes a second interface and is connected to the first network device via the second interface. Before receiving the first packet transmitted from the second network device, the link failure handling method further: To transmit a second packet containing the device identifier of the first network device to the second network device so that the second network device records a first correspondence between the second interface and the device identifier of the first network device, The method is characterized by receiving a third packet containing the device identifier of the second network device transmitted from the second network device, and recording a second correspondence between the first interface and the device identifier of the second network device, The link failure handling method according to claim 1.

4. Setting the status of the first forwarding entry to a disabled state means The method is characterized by changing the status flag bit of the first transfer entry to a first value, wherein the first value represents an invalid state. The link failure handling method according to claim 1.

5. After receiving the first packet transmitted from the second network device, the link failure handling method further: If the status information indicates that the second network device and the third network device are reachable from each other, then a first forwarding entry is searched where the transmission interface is the first interface and the device identifier is the device identifier of the third network device. The following is characterized by including setting the state of the first transfer entry to an enabled state: The link failure handling method according to claim 1.

6. The first packet is a first link layer broadcast packet, and the payload of the first link layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information, or The first packet is a first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information, characterized in that The link failure handling method according to claim 1.

7. The second packet is a second link layer broadcast packet, and the payload of the second link layer broadcast packet includes the device identifier of the first network device, or the second packet is a second IP multicast packet, and the payload of the second IP multicast packet includes the device identifier of the first network device. The third packet is a third link layer broadcast packet, and the payload of the third link layer broadcast packet includes the device identifier of the second network device, or the third packet is a third IP multicast packet, and the payload of the third IP multicast packet includes the device identifier of the second network device, characterized in that The link failure handling method according to claim 3.

8. The routing update packet includes an extended community attribute, and the extended community attribute includes the device identifier of the third network device, characterized in that The link failure handling method according to claim 2.

9. A link failure handling method applied to the forwarding chip of a second network device, wherein the second network device is connected to a third network device, the second network device is connected to a first interface of a first network device, the first network device includes a plurality of forwarding entries, the forwarding entry includes a destination address, a transmission interface, and a device identifier, the device identifier is the identifier of the network device accessed by a host belonging to the destination address, and the link failure handling method is: The acquisition of status information, wherein the status information is intended to indicate whether the second network device and the third network device are reachable from each other, If the status information indicates that the second network device and the third network device are unreachable to each other, the first network device searches for a first forwarding entry whose transmission interface is the first interface and whose device identifier is the device identifier of the third network device, and transmits a first packet to the first network device containing the device identifier of the third network device and the status information, so as to set the state of the first forwarding entry to an invalid state. Link failure handling method.

10. Before acquiring the aforementioned status information, the link failure processing method further: Receiving a routing update packet transmitted from the third network device, wherein the routing update packet includes the first IP address of a host connected to the third network device and the device identifier of the third network device. The routing update packet is forwarded to the first network device such that the first network device generates the first forwarding entry based on the first interface, the first IP address, and the device identifier of the third network device, characterized in that The link failure handling method according to claim 9.

11. The second network device includes a third interface and is connected to the third network device via the third interface, and the third network device includes a fourth interface and is connected to the second network device via the fourth interface, and before acquiring the status information, the link failure processing method further, To record the third correspondence between the fourth interface and the device identifier of the second network device, a fourth packet containing the device identifier of the second network device is transmitted to the third network device, The system is characterized by receiving a fifth packet containing the device identifier of the third network device transmitted from the third network device, and recording a fourth correspondence between the third interface and the device identifier of the third network device, The link failure handling method according to claim 9.

12. Before transmitting the first packet to the first network device, the link failure handling method further: This is characterized by including obtaining the device identifier of the third network device corresponding to the third interface from the fourth correspondence relationship, The link failure handling method according to claim 11.

13. There are multiple links between the second network device and the third network device, and obtaining the status information is possible. If all of the aforementioned links fail, the status information determines that the second network device and the third network device are unreachable to each other, or The system is characterized by determining, based on the status information, that the second network device and the third network device are reachable from each other if any one of the multiple links is not malfunctioning. The link failure handling method according to claim 9.

14. The first packet is a first link layer broadcast packet, and the payload of the first link layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information, or The first packet is a first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information, characterized in that The link failure handling method according to claim 9.

15. The fourth packet is a fourth link layer broadcast packet, and the payload of the fourth link layer broadcast packet includes the device identifier of the second network device, or the fourth packet is a fourth IP multicast packet, and the payload of the fourth IP multicast packet includes the device identifier of the second network device. The fifth packet is a fifth link layer broadcast packet, and the payload of the fifth link layer broadcast packet includes the device identifier of the third network device, or the fifth packet is a fifth IP multicast packet, and the payload of the fifth IP multicast packet includes the device identifier of the third network device, characterized in that The link failure handling method according to claim 11.

16. The routing update packet includes an extended community attribute, and the extended community attribute includes the device identifier of the third network device, characterized in that The link failure handling method according to claim 10.

17. A link fault processing device applied to the forwarding chip of a first network device, wherein the first network device includes a first interface and is connected to a second network device via the first interface, the second network device is connected to a third network device, the first network device includes a plurality of forwarding entries, the forwarding entry includes a destination address, a transmission interface, and a device identifier, the device identifier is the identifier of the network device accessed by the host belonging to the destination address, and the link fault processing device is A receiving module that receives a first packet transmitted from the second network device, wherein the first packet includes a device identifier and status information of the third network device, and the status information indicates whether the second network device and the third network device are reachable from each other; If the status information indicates that the second network device and the third network device are unreachable to each other, a search module searches for a first forwarding entry in which the transmission interface is the first interface and the device identifier is the device identifier of the third network device. A setting module that sets the state of the first transfer entry to an invalid state, is characterized by including Link fault treatment device.

18. The receiving module further receives a routing update packet forwarded by the second network device via the first interface before receiving the first packet transmitted from the second network device, the routing update packet includes the first IP address of a host connected to the third network device and the device identifier of the third network device, The aforementioned link failure processing device further, The present invention includes a generation module that generates the first forwarding entry based on the first interface, the first IP address, and the device identifier of the third network device, The link failure processing device according to claim 17.

19. The second network device includes a second interface and is connected to the first network device via the second interface, and the link fault processing device further includes, The system includes a transmitting module that, before receiving a first packet transmitted from the second network device, transmits a second packet containing the device identifier of the first network device to the second network device so that the second network device records a first correspondence between the second interface and the device identifier of the first network device, The receiving module is further used to receive a third packet containing the device identifier of the second network device transmitted from the second network device, and to record a second correspondence between the first interface and the device identifier of the second network device, characterized in that The link failure processing device according to claim 17.

20. The aforementioned configuration module is It is used to change the status flag bit of the first transfer entry to a first value, and the first value is used to represent an invalid state, characterized in that A link fault processing device according to any one of claims 17 to 19.

21. The search module is further used to search for a first forwarding entry in which, after receiving a first packet transmitted from the second network device, the status information indicates that the second network device and the third network device are reachable from each other, the transmission interface is the first interface and the device identifier is the device identifier of the third network device. The setting module is further used to set the state of the first transfer entry to an enabled state, The link failure processing device according to claim 17.

22. The first packet is a first link layer broadcast packet, and the payload of the first link layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information, or The first packet is a first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information, characterized in that The link failure processing device according to claim 17.

23. The second packet is a second link layer broadcast packet, and the payload of the second link layer broadcast packet includes the device identifier of the first network device, or the second packet is a second IP multicast packet, and the payload of the second IP multicast packet includes the device identifier of the first network device. The third packet is a third link layer broadcast packet, and the payload of the third link layer broadcast packet includes the device identifier of the second network device, or the third packet is a third IP multicast packet, and the payload of the third IP multicast packet includes the device identifier of the second network device, characterized in that The link failure processing device according to claim 19.

24. The routing update packet includes an extended community attribute, and the extended community attribute includes the device identifier of the third network device, characterized in that The link failure processing device according to claim 18.

25. A link fault processing device applied to the forwarding chip of a second network device, wherein the second network device is connected to a third network device, the second network device is connected to a first interface of a first network device, the first network device includes a plurality of forwarding entries, the forwarding entry includes a destination address, a transmission interface, and a device identifier, the device identifier is the identifier of the network device accessed by the host belonging to the destination address, and the link fault processing device is An acquisition module for acquiring status information, wherein the status information is for indicating whether the second network device and the third network device are reachable from each other, A transmission module for transmitting a first packet to the first network device, wherein, if the status information indicates that the second network device and the third network device are unreachable to each other, the first network device searches for a first forwarding entry in which the transmission interface is the first interface and the device identifier is the device identifier of the third network device, and sets the state of the first forwarding entry to an invalid state, the first packet includes the device identifier of the third network device and the status information, characterized in that the transmission module includes the device identifier of the third network device and the status information, Link fault treatment device.

26. A receiving module that receives a routing update packet transmitted from the third network device before acquiring the status information, wherein the routing update packet includes the first IP address of a host connected to the third network device and the device identifier of the third network device, The transmission module further comprises a transmission module that forwards the routing update packet to the first network device such that the first network device generates the first forwarding entry based on the first interface, the first IP address, and the device identifier of the third network device. The link failure processing device according to claim 25.

27. The second network device includes a third interface and is connected to the third network device via the third interface, and the third network device includes a fourth interface and is connected to the second network device via the fourth interface, The transmitting module is further used to transmit a fourth packet containing the device identifier of the second network device to the third network device so that the third network device records a third correspondence between the fourth interface and the device identifier of the second network device, before acquiring the status information. The aforementioned link failure processing device further, The system is characterized by including a receiving module that receives a fifth packet containing the device identifier of the third network device transmitted from the third network device, and records a fourth correspondence between the third interface and the device identifier of the third network device. The link failure processing device according to claim 25.

28. The acquisition module is further used to acquire the device identifier of the third network device corresponding to the third interface from the fourth correspondence relationship before transmitting the first packet to the first network device, characterized in that The link failure processing device according to claim 27.

29. There are multiple links between the second network device and the third network device, and the acquisition module is If all of the aforementioned links fail, the status information determines that the second network device and the third network device are unreachable to each other, or This is characterized by being used to determine, based on the status information, that the second network device and the third network device are reachable from each other if any one of the multiple links is not malfunctioning. The link failure processing device according to claim 25.

30. The first packet is a first link layer broadcast packet, and the payload of the first link layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information, or The first packet is a first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information, characterized in that The link failure processing device according to claim 25.

31. The fourth packet is a fourth link layer broadcast packet, and the payload of the fourth link layer broadcast packet includes the device identifier of the second network device, or the fourth packet is a fourth IP multicast packet, and the payload of the fourth IP multicast packet includes the device identifier of the second network device. The fifth packet is a fifth link layer broadcast packet, and the payload of the fifth link layer broadcast packet includes the device identifier of the third network device, or the fifth packet is a fifth IP multicast packet, and the payload of the fifth IP multicast packet includes the device identifier of the third network device, characterized in that The link failure processing device according to claim 27.

32. The routing update packet includes an extended community attribute, and the extended community attribute includes the device identifier of the third network device, characterized in that The link failure processing device according to claim 26.

33. A first network device, the first network device includes a first interface, is connected to a second network device via the first interface, the second network device is connected to a third network device, the first network device includes a plurality of forwarding entries, the forwarding entry includes a destination address, a transmission interface, and a device identifier, the device identifier is the identifier of the network device accessed by the host belonging to the destination address, and the first network device is, Processor and Transmitter and receiver, A machine-readable storage medium is included, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the machine-executable instructions are provided to the processor. Receiving a first packet transmitted from the second network device, wherein the first packet includes the device identifier and status information of the third network device, and the status information is for indicating whether the second network device and the third network device are reachable from each other. If the status information indicates that the second network device and the third network device are unreachable to each other, then a first forwarding entry is searched for where the transmission interface is the first interface and the device identifier is the device identifier of the third network device. The following is characterized by setting the state of the first transfer entry to an invalid state and causing the execution of First network device.

34. The aforementioned machine-executable instructions are further provided to the processor, Before receiving the first packet transmitted from the second network device, the second network device receives a routing update packet forwarded to it via the first interface, wherein the routing update packet includes the first IP address of a host connected to the third network device and the device identifier of the third network device. The system is characterized by generating a first forwarding entry based on the first interface, the first IP address, and the device identifier of the third network device, The first network device according to claim 33.

35. The second network device includes a second interface and is connected to the first network device via the second interface, and the machine-executable instructions are further transmitted to the processor, Before receiving the first packet transmitted from the second network device, the second network device is sent a second packet containing the device identifier of the first network device so that the second network device records a first correspondence between the second interface and the device identifier of the first network device. The system is characterized by receiving a third packet containing the device identifier of the second network device transmitted from the second network device, and recording a second correspondence between the first interface and the device identifier of the second network device. The first network device according to claim 33.

36. The aforementioned machine-executable instructions are further provided to the processor, The system is characterized by changing the status flag bit of the first transfer entry to a first value, wherein the first value represents an invalid state. The first network device according to any one of claims 33 to 35.

37. The aforementioned machine-executable instructions are further provided to the processor, After receiving the first packet transmitted from the second network device, if the status information indicates that the second network device and the third network device are reachable from each other, a first forwarding entry is searched for where the transmission interface is the first interface and the device identifier is the device identifier of the third network device. The following is characterized by setting the state of the first transfer entry to an enabled state and causing the execution of The first network device according to claim 33.

38. The first packet is a first link layer broadcast packet, and the payload of the first link layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information, or The first packet is a first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information, characterized in that The first network device according to claim 33.

39. The second packet is a second link layer broadcast packet, and the payload of the second link layer broadcast packet includes the device identifier of the first network device, or the second packet is a second IP multicast packet, and the payload of the second IP multicast packet includes the device identifier of the first network device. The third packet is a third link layer broadcast packet, and the payload of the third link layer broadcast packet includes the device identifier of the second network device, or the third packet is a third IP multicast packet, and the payload of the third IP multicast packet includes the device identifier of the second network device, characterized in that The first network device according to claim 35.

40. The routing update packet includes an extended community attribute, and the extended community attribute includes the device identifier of the third network device, characterized in that The first network device according to claim 34.

41. A second network device, the second network device is connected to a third network device, the second network device is connected to a first interface of a first network device, the first network device includes a plurality of forwarding entries, the forwarding entry includes a destination address, a transmission interface, and a device identifier, the device identifier is the identifier of the network device accessed by the host belonging to the destination address, and the second network device is, Processor and Transmitter and receiver, A machine-readable storage medium is included, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the machine-executable instructions are provided to the processor. The acquisition of status information, wherein the status information is intended to indicate whether the second network device and the third network device are reachable from each other, The first packet is transmitted to the first network device, and if the status information indicates that the second network device and the third network device are unreachable to each other, the first packet includes the device identifier of the third network device and the status information so that the first network device searches for a first forwarding entry whose transmission interface is the first interface and whose device identifier is the device identifier of the third network device, and sets the state of the first forwarding entry to an invalid state. Second network device.

42. The aforementioned machine-executable instructions are further provided to the processor, Before obtaining the status information, the routing update packet transmitted from the third network device is received, wherein the routing update packet includes the first IP address of a host connected to the third network device and the device identifier of the third network device. The first network device is instructed to forward the routing update packet so that it generates the first forwarding entry based on the first interface, the first IP address, and the device identifier of the third network device, and the following is performed: The second network device according to claim 41.

43. The second network device includes a third interface and is connected to the third network device via the third interface, the third network device includes a fourth interface and is connected to the second network device via the fourth interface, and the machine executable instructions further to the processor, Before acquiring the status information, the third network device is sent a fourth packet containing the device identifier of the second network device to the third network device so that the third network device records the third correspondence between the fourth interface and the device identifier of the second network device. The system is characterized by receiving a fifth packet containing the device identifier of the third network device transmitted from the third network device, and recording a fourth correspondence between the third interface and the device identifier of the third network device. The second network device according to claim 41.

44. The aforementioned machine-executable instructions are further provided to the processor, The system is characterized by obtaining the device identifier of the third network device corresponding to the third interface from the fourth correspondence relationship before transmitting the first packet to the first network device. The second network device according to claim 43.

45. There are multiple links between the second network device and the third network device, and the machine-executable instructions are further transmitted to the processor, If all of the aforementioned links fail, the status information determines that the second network device and the third network device are unreachable to each other, or The system is characterized by determining, based on the status information, that if any one of the aforementioned links is not malfunctioning, the second network device and the third network device are reachable from each other. The second network device according to claim 41.

46. The first packet is a first link layer broadcast packet, and the payload of the first link layer broadcast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information, or The first packet is a first IP multicast packet, and the payload of the first IP multicast packet includes the device identifier of the second network device, the device identifier of the third network device, and the status information, characterized in that The second network device according to claim 41.

47. The fourth packet is a fourth link layer broadcast packet, and the payload of the fourth link layer broadcast packet includes the device identifier of the second network device, or the fourth packet is a fourth IP multicast packet, and the payload of the fourth IP multicast packet includes the device identifier of the second network device. The fifth packet is a fifth link layer broadcast packet, and the payload of the fifth link layer broadcast packet includes the device identifier of the third network device, or the fifth packet is a fifth IP multicast packet, and the payload of the fifth IP multicast packet includes the device identifier of the third network device, characterized in that The second network device according to claim 43.

48. The routing update packet includes an extended community attribute, and the extended community attribute includes the device identifier of the third network device, characterized in that The second network device according to claim 42.

49. A machine-readable storage medium storing machine-executable instructions, characterized in that, when called and executed by a processor, the machine-executable instructions cause the processor to implement the link failure processing method described in any one of claims 1 to 8 or 9 to 16. Machine-readable storage medium.

50. The processor is characterized by implementing the link failure processing method described in any one of claims 1 to 8 or 9 to 16. Computer program products.