(19)
(11)EP 3 694 150 A1

(12)EUROPEAN PATENT APPLICATION
published in accordance with Art. 153(4) EPC

(43)Date of publication:
12.08.2020 Bulletin 2020/33

(21)Application number: 18879832.6

(22)Date of filing:  31.10.2018
(51)International Patent Classification (IPC): 
H04L 12/24(2006.01)
H04L 12/26(2006.01)
(86)International application number:
PCT/CN2018/112848
(87)International publication number:
WO 2019/096001 (23.05.2019 Gazette  2019/21)
(84)Designated Contracting States:
AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR
Designated Extension States:
BA ME
Designated Validation States:
KH MA MD TN

(30)Priority: 14.11.2017 CN 201711120430

(71)Applicant: Huawei Technologies Co. Ltd.
Shenzhen, Guangdong 518129 (CN)

(72)Inventors:
  • ZHANG, Yaokun
    Shenzhen Guangdong 518129 (CN)
  • LI, Juan
    Shenzhen Guangdong 518129 (CN)

(74)Representative: Grünecker Patent- und Rechtsanwälte PartG mbB 
Leopoldstraße 4
80802 München
80802 München (DE)

  


(54)LINK FAULT DETECTION METHOD, DEVICE, AND SYSTEM


(57) Embodiments of the present invention relate to the communications field, and provide a link fault detection method, an apparatus, and a system, to resolve a prior-art problem that when data traffic of a same service is transmitted by using a plurality of LSPs, a fault state of the data traffic on the plurality of LSPs cannot be detected. A first network device sends data traffic to a second network device by using a plurality of first LSPs; the first network device determines, by using each of the plurality of first LSPs within a preset period, whether a first link detection packet from the second network device is received; the first network device determines an LSP for which the first link detection packet is not received and that is of the plurality of first LSPs as a first faulty LSP; the first network device calculates a first unavailability of the plurality of first LSPs based on the first faulty LSP; and when determining that the first unavailability is greater than a preset threshold, the first network device triggers the plurality of first LSPs to stop transmitting the data traffic. Technical solutions provided in the embodiments may be applied to an MPLS architecture.




Description


[0001] This application claims priority to Chinese Patent Application No. 201711120430.7, filed with the Chinese Patent Office on November 14, 2017 and entitled "LINK FAULT DETECTION METHOD, APPARATUS, AND SYSTEM", which is incorporated herein by reference in its entirety.

TECHNICAL FIELD



[0002] Embodiments of the present invention relate to the communications field, and in particular, to a link fault detection method, an apparatus, and a system.

BACKGROUND



[0003] To ensure normal transmission of the service data, the router needs to perform fault detection on the link through which the service data passes. When a link fault is detected, the router performs switching to a secondary link in time to transmit the service data.

[0004] In the prior art, fault detection is mainly performed on a link by using a method such as bidirectional forwarding detection (bidirectional forwarding detection, BFD) or operation, administration and maintenance (operation, administration and maintenance, OAM). Specifically, in a BFD architecture or in an OAM architecture, two routers that have a communication relationship may send a BFD detection packet or an OAM detection packet to a peer end at a preset time interval. If a current router that transmits service data receives, within a preset period, no BFD detection packet or OAM detection packet sent by a communications peer router, the current router determines that a link between the current router and the peer router is faulty.

[0005] However, in a process of implementing the present invention, the inventor finds that, in the link fault detection method provided in the prior art, the BFD detection packet or the OAM detection packet is sent by a router for each link, and whether each link is faulty is determined according to whether the BFD detection packet or the OAM detection packet is received within the preset period. However, in an actual use process, for example, in a multi-protocol label switched (multi-protocol label switched, MPLS) network, a data procedure of a same service flow may be transmitted by using a plurality of label switched paths (label switched path, LSP) links. If link detection is performed by using the BFD or OAM method provided in the prior art, only a fault state of each link can be detected, but fault states of all the links for the service flow cannot be detected. Therefore, unavailability of the plurality of links cannot be accurately determined. Consequently, a data packet loss is caused, and data transmission reliability is reduced.

SUMMARY



[0006] Embodiments of the present invention provide a link fault detection method, an apparatus, and a system, applied to an MPLS network. When a same service flow is transmitted by using a plurality of LSPs, a fault state of a link can be determined based on an unavailability of the plurality of LSPs, thereby improving data transmission reliability.

[0007] Technical solutions provided in the embodiments of this application are as follows:

[0008] According to a first aspect, a link fault detection method is provided, including: sending, by a first network device, data traffic to a second network device by using a plurality of first label switched paths LSPs, where the data traffic transmitted by using the plurality of first LSPs belongs to a same service flow; determining, by the first network device by using each of the plurality of first LSPs within a preset period, whether a first link detection packet from the second network device is received; determining, by the first network device, an LSP for which the first link detection packet is not received and that is of the plurality of first LSPs as a first faulty LSP; calculating, by the first network device, a first unavailability of the plurality of first LSPs based on the first faulty LSP, where the first unavailability is used to indicate a degradation degree of the plurality of first LSPs for transmitting the data traffic; and when the first network device determines that the first unavailability is greater than a preset threshold, triggering, by the first network device, the plurality of first LSPs to stop transmitting the data traffic.

[0009] Based on the technical solution provided in this embodiment, the first network device can determine the first faulty LSP from the plurality of first LSPs used for the data traffic, and calculate the first unavailability of the plurality of first LSPs based on the first faulty LSP, so that a fault state of a link is accurately determined based on the first unavailability, thereby improving data transmission reliability.

[0010] In a possible implementation solution of the first aspect, the method further includes: transmitting, by the first network device, the data traffic to a third network device by using a plurality of second LSPs between the first network device and the third network device.

[0011] In the first aspect, optionally, the transmitting, by the first network device, the data traffic to a third network device by using a plurality of second LSPs between the first network device and the third network device includes: determining, by the first network device by using each of the plurality of second LSPs within the preset period, whether a second link detection packet from the third network device is received; determining, by the first network device, an LSP for which the second link detection packet is not received and that is of the plurality of second LSPs as a second faulty LSP; calculating, by the first network device a second unavailability of the plurality of second LSPs based on the second faulty LSP, where the second unavailability is used to indicate a degradation degree of the plurality of second LSPs for transmitting the data traffic; and when determining that the second unavailability is less than the first unavailability, transmitting, by the first network device, the data traffic to the third network device by using the plurality of second LSPs between the first network device and the third network device.

[0012] In the first aspect, optionally, the calculating, by the first network device, a first unavailability of the plurality of first LSPs based on the first faulty LSP may include: obtaining, by the first network device, a weight of each of the plurality of first LSPs; determining, by the first network device, a state value of each of the plurality of first LSPs, where the state value is used to indicate a fault state of the LSP; and calculating, by the first network device, a weighted sum of the state value of each of the plurality of first LSPs based on the weight of each of the plurality of first LSPs, to obtain the first unavailability.

[0013] Based on the technical solutions provided in the foregoing embodiment, the first network device may determine the second unavailability of the plurality of second LSPs, and transmits the data traffic to the third network device by using the plurality of second LSPs only when the second unavailability is less than the first unavailability. When the plurality of first LSPs and the plurality of second LSPs are all faulty, a link with a relatively minor fault can be properly selected for transmitting the data traffic, thereby relatively improving data transmission reliability.

[0014] In another possible implementation solution of the first aspect, the first network device is a first aggregation site gateway ASG, the second network device is a cell site gateway CSG, the plurality of first LSPs include a third LSP and a fourth LSP, the third LSP is an LSP between the first ASG and the CSG, and the fourth LSP is an LSP that goes from the first ASG to the CSG via a second ASG, and the method further includes: sending, by the first ASG, a notification packet to a radio network controller site gateway RSG by using a fifth LSP, where the notification packet is used to trigger the RSG to stop sending the data traffic to the first ASG

[0015] In the first aspect, optionally, the calculating, by the first network device, a first unavailability of the plurality of first LSPs based on the first faulty LSP may include: determining, by the first network device, a state value of the third LSP and a state value of the fourth LSP, where the state value is used to indicate a fault state of the LSP; and calculating, by the first network device, a logical AND of the state value of the third LSP and the state value of the fourth LSP, to obtain the first unavailability.

[0016] Based on the technical solution provided in the foregoing embodiment, there is a linkage relationship among the third LSP, the fourth LSP, and the fifth LSP. When the first network device determines that both the third LSP and the fourth LSP are faulty, even if the fifth LSP is not faulty, the first network device instructs the RSG to stop transmitting the data traffic by using the fifth LSP, so as to avoid a data transmission failure caused by transmitting the data traffic by the RSG by using the fifth LSP, thereby improving data transmission reliability.

[0017] In the first aspect, optionally, the first link detection packet and the second link detection packet are bidirectional forwarding detection BFD detection packets or network management function OAM detection packets.

[0018] According to a second aspect, a first network device is provided, including a transmitter, a receiver, and a processor, where the transmitter is configured to send data traffic to a second network device by using a plurality of first label switched paths LSPs, where the data traffic transmitted by using the plurality of first LSPs belongs to a same service flow; the receiver is configured to receive a first link detection packet from the second network device by using each of the plurality of first LSPs; and the processor is configured to: determine, within a preset period, whether the first link detection packet is received; determine an LSP for which the first link detection packet is not received and that is of the plurality of first LSPs as a first faulty LSP; calculate a first unavailability of the plurality of first LSPs based on the first faulty LSP; and when determining that the first unavailability is greater than a preset threshold, trigger the plurality of first LSPs to stop transmitting the data traffic, where the first unavailability is used to indicate a degradation degree of the plurality of first LSPs for transmitting the data traffic.

[0019] In a possible design of the second aspect, after the processor triggers the plurality of first LSPs to stop transmitting the data traffic, the transmitter is further configured to transmit the data traffic to a third network device by using a plurality of second LSPs between the first network device and the third network device.

[0020] In the second aspect, optionally, the receiver is further configured to receive a second link detection packet from the third network device by using each of the plurality of second LSPs, and the processor is further configured to: determine, within the preset period, whether the second link detection packet is received; determine an LSP for which the second link detection packet is not received and that is of the plurality of second LSPs as a second faulty LSP; calculate a second unavailability of the plurality of second LSPs based on the second faulty LSP; and when determining that the second unavailability is less than the first unavailability, instruct the transmitter to transmit the data traffic to the third network device by using the plurality of second LSPs between the first network device and the third network device, where the second unavailability is used to indicate a degradation degree of the plurality of second LSPs for transmitting the data traffic.

[0021] In the second aspect, optionally, that the processor calculates the first unavailability of the plurality of first LSPs based on the first faulty LSP includes: obtaining, by the processor, a weight of each of the plurality of first LSPs; determines a state value of each of the plurality of first LSPs; and calculates a weighted sum of the state value of each of the plurality of first LSPs based on the weight of each of the plurality of first LSPs, to obtain the first unavailability, where the state value is used to indicate a fault state of the LSP.

[0022] In another possible design of the second aspect, the first network device is a first ASG, the second network device is a CSG, the plurality of first LSPs include a third LSP and a fourth LSP, the third LSP is an LSP between the first ASG and the CSG, and the fourth LSP is an LSP that goes from the first ASG to the CSG via a second ASG; and the transmitter is further configured to send a notification packet to a radio network controller site gateway RSG by using a fifth LSP, where the notification packet is used to trigger the RSG to stop transmitting the data traffic to the first ASG

[0023] In the second aspect, optionally, the method used by the processor to calculate the first unavailability of the plurality of first LSPs based on the first faulty LSP includes: determining, by the processor, a state value of the third LSP and a state value of the fourth LSP, and calculating a logical AND of the state value of the third LSP and the state value of the fourth LSP, to obtain the first unavailability, where the state value is used to indicate a fault state of the LSP.

[0024] According to a third aspect, a network device is provided, including at least one processor and a memory, where the memory is configured to store a computer program; and the at least one processor executes the computer program to implement the method in any one of the first aspect or the possible implementations of the first aspect. Specifically, the first network device includes a module configured to perform the method in any one of the first aspect or the possible implementations of the first aspect.

[0025] According to a fourth aspect, a link fault detection system is provided, including at least two network devices, where each of the at least two network devices is the first network device in the second aspect or the third aspect.

[0026] According to a fifth aspect, a computer readable storage medium is provided, where a computer program is stored on the computer readable storage medium. When the program is executed by a processor, the link fault detection method in the first aspect is implemented.

[0027] In the foregoing solutions, based on the link fault detection method, an apparatus, and a system that are provided in the embodiments of the present invention, in an MPLS network, the first network device can determine the first faulty LSP from the plurality of first LSPs used for the data traffic, and calculate the first unavailability of the plurality of first LSPs based on the first faulty LSP, so that a fault state of a link is accurately determined based on the first unavailability, and transmitting the data traffic by using the plurality of first LSPs is stopped, thereby improving data transmission reliability, and avoiding a high packet loss rate that is caused by a high first unavailability of the plurality of first LSPs and that is of the data traffic transmitted by using the plurality of first LSPs.

BRIEF DESCRIPTION OF DRAWINGS



[0028] 

FIG. 1 is a flowchart of a link fault detection method according to an embodiment of the present invention;

FIG. 2 is a flowchart 1 of step 104 in the link fault detection method shown in FIG. 1 according to the embodiment of the present invention;

FIG. 3 is a flowchart 2 of step 104 in the link fault detection method shown in FIG. 1 according to the embodiment of the present invention;

FIG. 4 is a flowchart of a link fault detection method according to another embodiment of the present invention;

FIG. 5 is a flowchart of step 106 in the link fault detection method shown in FIG. 4 according to the another embodiment of the present invention;

FIG. 6 is a schematic diagram of a network architecture in which a link fault detection method is applied to an L3 VPN load sharing scenario according to an embodiment of the present invention;

FIG. 7A and FIG. 7B are flowcharts in which a link fault detection method is applied to an L3VPN load sharing scenario according to an embodiment of the present invention;

FIG. 8 is a schematic diagram of a network architecture of a link fault detection method applied to an L2VPN + L3VPN scenario according to an embodiment of the present invention;

FIG. 9 is a flowchart of a link fault detection method applied to an L2VPN + L3VPN scenario according to an embodiment of the present invention;

FIG. 10 is a schematic structural diagram of a first network device according to an embodiment of the present invention;

FIG. 11 is a schematic diagram of a hardware structure of a first network device according to an embodiment of the present invention; and

FIG. 12 is a schematic diagram of a link fault detection system according to an embodiment of the present invention.


DESCRIPTION OF EMBODIMENTS



[0029] It should be noted that embodiments in this application and features in the embodiments may be mutually combined in the case of no conflict. This application is described below in detail with reference to accompanying drawings and the embodiments.

[0030] To resolve a prior-art problem that an overall fault state of a link used for service data cannot be correctly detected when same service data is transmitted by using a plurality of links, the embodiments of the present invention provide a link fault detection method, an apparatus, and a system.

[0031] A technology described in this specification may be applied to various communications systems, such as current 2G and 3G communications systems and a next-generation communications system, such as a global system for mobile communications (GSM, global system for mobile communications), a code division multiple access (CDMA, code division multiple access) system, a time division multiple access (TDMA, time division multiple access) system, wideband code division multiple access (WCDMA, wideband code division multiple access wireless), a frequency division multiple access (FDMA, frequency division multiple addressing) system, an orthogonal frequency division multiple access (OFDMA, orthogonal frequency division multiple access) system, a single-carrier FDMA (SC-FDMA) system, a general packet radio service (GPRS, general packet radio service) system, a long term evolution (LTE, long term evolution) system, a PTN network system, a router network system, a multi-service transmission platform (MSTP, multi-service transmission platform) network system, and such a type of other communications system.

[0032] As shown in FIG. 1, a link fault detection method provided in an embodiment of the present invention includes the following steps.

[0033] Step 101. A first network device sends data traffic to a second network device by using a plurality of first LSPs, where the data traffic transmitted by using the plurality of first LSPs belongs to a same service flow.

[0034] In this embodiment, the plurality of first LSPs may transmit, in a load sharing manner, the data traffic that belongs to the same service flow. Service flows may be distinguished based on at least one of the following conditions: a site, a virtual private network (virtual private network, VPN), and a service type.

[0035] For example, a same service flow may be a service flow from a same site. For example, the first network device is a provider edge (provider edge, PE) device, and the first network device is connected to a first customer edge (customer edge, CE) device and a second CE device. The same service flow may be a service flow from the first CE device.

[0036] For example, a same service flow may be a service flow from a same VPN instance. For example, the first network device is a PE device, and the first network device is connected to a first CE device, a second CE device, and a third CE device. The first network device includes a first VPN instance and a second VPN instance, the first VPN instance corresponds to the first CE device and the second CE device, and the second VPN instance corresponds to the third CE device. The same service flow may be a service flow from the first VPN instance, that is, a service flow from the first CE device and the second CE device. The VPN may be a layer 2 virtual private network (layer 2 virtual private network, L2VPN) or a layer 3 virtual private network (layer 3 virtual private network, L3VPN).

[0037] For example, a same service flow may be a service flow from a same service type. For example, the service type includes a video service, a voice service, or a web page browsing service. The same service flow may be a service flow from the video service.

[0038] Step 102. The first network device determines, by using each of the plurality of first LSPs within a preset period, whether a first link detection packet from the second network device is received.

[0039] In this embodiment, link detection may be performed by using two methods, one is BFD, and the other is OAM. When link detection is performed through BFD, the first link detection packet is a BFD detection packet; and when link detection is performed through OAM, the first link detection packet is an OAM detection packet.

[0040] In this embodiment, the first link detection packet is periodically transmitted on each LSP between the first network device and the second network device, and the first network device may detect, within the preset period, whether the first link detection packet is received on each LSP. The preset period is not specifically limited in this embodiment, and may be set according to a detection requirement in an actual use process. For example, the period may be set to three time periods. If the first network device receives at least one first link detection packet on the LSP within the three time periods, it is determined that the first link detection packet is received on the LSP; or if the first network device does not receive at least one first link detection packet on the LSP within the three time periods, it is determined that the first link detection packet is not received. Step 103. The first network device determines an LSP for which the first link detection packet is not received and that is of the plurality of first LSPs as a first faulty LSP.

[0041] For example, in the L3VPN, there are three first LSPs: an LSP 1, an LSP 2, and an LSP 3. If it is determined in step 102 that the first link detection packet is not received on the LSP 1 and the LSP 2 within the preset period, the first network device may set the LSP 1 and the LSP 2 as first faulty LSPs.

[0042] Step 104. The first network device calculates a first unavailability of the plurality of first LSPs based on the first faulty LSP, where the first unavailability is used to indicate a degradation degree of the plurality of first LSPs for transmitting the data traffic.

[0043] In this embodiment, the degradation degree of the plurality of first LSPs for transmitting the data traffic is specifically a degradation degree of an available bandwidth of the plurality of first LSPs that is used for transmitting the data traffic. For example, in the L3VPN, three first LSPs are used for transmitting data traffic, and are respectively an LSP 1, an LSP 2, and an LSP 3. An available bandwidth of the LSP 1 is 5G, an available bandwidth of the LSP 2 is 3G, and an available bandwidth of the LSP 3 is 1G. If an actual bandwidth required for ensuring normal transmission of the data traffic is 7G, the degradation degree of the plurality of first LSPs for transmitting the data traffic is a degradation degree of an actual transmission bandwidth relative to a bandwidth of 7G when one or more of the LSP 1, LSP 2, and LSP 3 are faulty.

[0044] In this embodiment, based on different application scenarios, the first unavailability of the plurality of first LSPs is calculated by using different methods in step 104.

[0045] For example, in an L3VPN load sharing scenario, as shown in FIG. 2, step 104 may include the following steps:
Step 201. The first network device obtains a weight of each of the plurality of first LSPs.

[0046] In this embodiment, the weight of the LSP may be set based on a bandwidth of the data traffic carried by the LSP. A larger bandwidth leads to a larger weight. For example, bandwidths of three LSPs are 5G, 3G, and 1G, and a weight of an LSP having a bandwidth of 5G may be set to 5, a weight of an LSP having a bandwidth of 3G may be set to 3, and a weight of an LSP having a bandwidth of 1G is set to 1. Certainly, the foregoing is only a specific example. In an actual use process, the weight of the LSP may be alternatively set by a user based on an actual service requirement, and details are not described herein.

[0047] Step 202. The first network device determines a state value of each of the plurality of first LSPs, where the state value is used to indicate a fault state of the LSP.

[0048] It may be learned from step 103 that the plurality of first LSPs include the first faulty LSP for which the first link detection packet is not received and a first normal LSP besides the first faulty LSP. In conclusion, each of the plurality of first LSPs may have two states: faulty and normal. In this embodiment, a fault state value may be set to 1, and a normal state value may be set to 0. In other words, in step 202, a state value of the first faulty LSP may be set to 1, and a state value of the first normal LSP may be set to 0. Certainly, in an actual use process, the state value of the first faulty LSP may also be set to 0, and the state value of the first normal LSP may be set to 1. Details are not described herein. In this embodiment and subsequent embodiments, a case in which the state value of the first faulty LSP is set to 1 and the state value of the first normal LSP is set to 0 is used for description.

[0049] Step 203. The first network device calculates a weighted sum of the state value of each of the plurality of first LSPs based on the weight of each of the plurality of first LSPs, to obtain the first unavailability.

[0050] Specifically, in this embodiment, an example in which fault detection is performed through BFD is used for description. In this case, in step 203, a first unavailability G may be obtained by using the following formula (1):

where
n is a quantity of the plurality of first LSPs, and n ≥ 2; w(i) is a weight of an ith first LSP; BFD(i) is a state value of the ith first LSP detected through BFD.

[0051] For another example, in an L2VPN + L3VPN scenario, the first network device is a first aggregation site gateway (aggregation site gateway, ASG), the second network device is a cell site gateway (cell site gateway, CSG), the plurality of first LSPs include a third LSP and a fourth LSP, the third LSP is an LSP between the first ASG and the CSG, and the fourth LSP is an LSP that goes from the first ASG to the CSG via a second ASG In this case, as shown in FIG. 3, step 104 may include the following steps:
Step 301. The first network device determines a state value of the third LSP and a state value of the fourth LSP, where the state value is used to indicate a fault state of the LSP.

[0052] In this embodiment, a method for setting the state value of the third LSP and the state value of the fourth LSP is basically the same as that shown in step 202, and details are not described herein again.

[0053] Step 302. The first network device calculates a logical AND of the state value of the third LSP and the state value of the fourth LSP, to obtain the first unavailability.

[0054] Specifically, in this embodiment, an example in which fault detection is performed through BFD is used for description. In this case, in step 203, a first unavailability G may be obtained by using the following formula (2):

where
BFD(X) is the state value of the third LSP, and BFD (Y) is the state value of the fourth LSP.

[0055] Certainly, the foregoing formula (2) is merely a specific example for description. In an actual use process, when the state value of the first faulty LSP is set to 0 and the state value of the first normal LSP is set to 1, the formula (2) is deformed to a formula (2').



[0056] It should be noted that, in the L2VPN + L3 VPN scenario, a quantity of the third LSPs and a quantity of the fourth LSPs are not limited. In an actual use process, a plurality of third LSPs and/or a plurality of fourth LSPs may be included. If the plurality of third LSPs and/or the plurality of fourth LSPs exist, in this case, an unavailability of the plurality of third LSPs and/or an unavailability of the plurality of fourth LSPs should be first separately calculated according to the steps shown in FIG. 2, and then an unavailability of the third LSP and an unavailability of the fourth LSP are calculated according to the steps shown in FIG. 3.

[0057] Step 105. When the first network device determines that the first unavailability is greater than a preset threshold, the first network device triggers the plurality of first LSPs to stop transmitting the data traffic.

[0058] In this embodiment, to properly use communication resources of a network when reliable transmission of the data traffic is ensured, a threshold needs to be preset, and the threshold is used to indicate an unavailability degree of a tolerable link. The plurality of first LSPs are triggered to stop transmitting the data traffic only when the first unavailability reaches the threshold.

[0059] A specific setting method or a value of the threshold is not limited in this embodiment. In an actual use process, the threshold may be set based on a transmission requirement of the data traffic. Details are not described herein.

[0060] When the link fault detection method provided in this embodiment of the present invention is applied to the L3VPN load sharing scenario, to ensure normal transmission of the data traffic, another embodiment of the present invention further provides a fault detection method. Steps of the method are basically the same as those shown FIG. 1. A difference is as follows: As shown in FIG. 4, after the first network device triggers the plurality of first LSPs to stop transmitting the data traffic, the method further includes the following step:

[0061] Step 106. The first network device transmits the data traffic to a third network device by using a plurality of second LSPs between the first network device and the third network device.

[0062] To ensure transmission reliability of the data traffic, as shown in FIG. 5, step 106 may include the following steps:

Step 501. The first network device determines, by using each of the plurality of second LSPs within the preset period, whether a second link detection packet from the third network device is received.

Step 502. The first network device determines an LSP for which the second link detection packet is not received and that is of the plurality of second LSPs as a second faulty LSP.

Step 503. The first network device calculates a second unavailability of the plurality of second LSPs based on the second faulty LSP, where the second unavailability is used to indicate a degradation degree of the plurality of second LSPs for transmitting the data traffic.

Step 504. When determining that the second unavailability is less than the first unavailability, the first network device transmits the data traffic to the third network device by using the plurality of second LSPs between the first network device and the third network device.



[0063] Based on the technical solution provided in the foregoing embodiment, the first network device may determine the second unavailability of the plurality of second LSPs, and transmits the data traffic to the third network device by using the plurality of second LSPs only when the second unavailability is less than the first unavailability. When the plurality of first LSPs and the plurality of second LSPs are all faulty, a link with a relatively minor fault can be properly selected for transmitting the data traffic, thereby relatively improving data transmission reliability.

[0064] When the link fault detection method provided in this embodiment of the present invention is applied to the L2VPN + L3VPN scenario, to ensure normal transmission of the data traffic, still another embodiment of the present invention further provides a fault detection method. A step of the method is basically the same as that shown in FIG. 1. A difference is as follows: The first network device is a first ASG, the second network device is a CSG, the plurality of first LSPs include a third LSP and a fourth LSP, the third LSP is an LSP between the first ASG and the CSG, the fourth LSP is an LSP that goes from the first ASG to the CSG via a second ASG, and the method further includes: sending, by the first ASG, a notification packet to a radio network controller site gateway (Radio Network Controller Site Gateway, RSG) by using a fifth LSP, where the notification packet is used to trigger the RSG to stop sending the data traffic to the first ASG

[0065] Based on the technical solution provided in the foregoing embodiment, in the L2VPN + L3VPN scenario, there is a linkage relationship among the third LSP, the fourth LSP, and the fifth LSP. When the first network device determines that both the third LSP and the fourth LSP are faulty, even if the fifth LSP is not faulty, the first network device instructs the RSG to stop transmitting the data traffic by using the fifth LSP, so as to avoid a data transmission failure caused by transmitting the data traffic by the RSG by using the fifth LSP, thereby improving data transmission reliability.

[0066] Based on the link fault detection method provided in this embodiment of the present invention, in an MPLS network, the first network device can determine the first faulty LSP from the plurality of first LSPs used for the data traffic, and calculate the first unavailability of the plurality of first LSPs based on the first faulty LSP, so that a fault state of a link is accurately determined based on the first unavailability, and transmitting the data traffic by using the plurality of first LSPs is stopped, thereby improving data transmission reliability, and avoiding a high packet loss rate that is caused by a high first unavailability of the plurality of first LSPs and that is of the data traffic transmitted by using the plurality of first LSPs.

[0067] To enable a person skilled in the art to better understand the technical solution of the link fault detection method provided in this embodiment of the present invention, examples in which this embodiment of the present invention is separately applied to the L3VPN load sharing scenario and the L2VPN + L3VPN scenario are used for description.

[0068] 1. As shown in FIG. 6, in the L3VPN load sharing scenario, three provider edge (provider edge, PE) are included, and are respectively a PE 1, a PE 2, and a PE 3. A link between the PE1 and the PE2 is a primary link, and a link between the PE 1 and the PE 3 is a secondary link. In a normal case, the data traffic is communicated by using the primary link between the PE 1 and the PE 2. The primary link between the PE 1 and the PE 2 includes three first LSPs: an LSP 1, an LSP 2, and an LSP 3. The three first LSPs are used to perform load sharing on the data traffic transmitted between the PE 1 and the PE 2. The secondary link between the PE 1 and the PE 3 includes two second LSPs: an LSP 4 and an LSP 5. The two second LSPs are used to perform load sharing between the PE 1 and the PE 3.

[0069] To detect whether the primary link between the PE 1 and the PE 2 is faulty, as shown in FIG. 7A and FIG. 7B, the link fault detection method provided in this embodiment of the present invention includes the following steps.

[0070] Step 701. The PE 1 sends the data traffic to the PE 2 by using the LSP 1, the LSP 2, and the LSP 3, where the data traffic belongs to a same service flow.

[0071] Step 702. The PE 1 determines, within a preset period, whether a first link detection packet sent by the PE 2 is separately received from the LSP 1, the LSP 2, and the LSP 3.

[0072] In this embodiment, an example in which link fault detection is performed by using a BFD method is used for description. In this case, the first link fault detection packet is a first BFD detection packet. Certainly, in an actual use process, another method may be alternatively used, for example, OAM. Details of each case are not described herein.

[0073] Step 703. When the PE 1 does not receive, from the LSP 1 and the LSP 3, the first fault detection packet sent by the PE 2, the PE 1 determines the LSP 1 and the LSP 3 as first faulty LSPs.

[0074] Step 704. The PE 1 separately obtains weights of the LSP 1, the LSP 2, and the LSP 3.

[0075] In this embodiment, a bandwidth of the LSP 1 is 5G, a bandwidth of the LSP 2 is 3G, and a bandwidth of the LSP 3 is 2G In this case, the weight W(1) of the LSP 1 may be set to 5, the weight W(2) of the LSP 2 may be set to 3, and the weight W(3) of the LSP 3 may be set to 2.

[0076] Step 705. The PE 1 separately obtains state values of the LSP 1, the LSP 2, and the LSP 3.

[0077] In this embodiment, a value of a fault state is preset to 1, and a value of a normal state is preset to 0. In this case, it may be learned from step 703 that, a state value BFD(1) of the LSP 1 is 1, a state value BFD(2) of the LSP 2 is 0, and a state value BFD(3) of the LSP 3 is 1.

[0078] Step 706. The PE 1 calculates a weighted sum of the state values of the LSP 1, the LSP 2, and the LSP 3 based on the weights of the LSP 1, the LSP 2, and the LSP 3, to obtain a first unavailability.

[0079] Specifically, the PE 1 obtains the first unavailability G1 according to the following formula (3):



[0080] Step 707. When the PE 1 determines that the first unavailability is greater than a preset threshold, the PE 1 triggers the LSP 1, the LSP 2, and the LSP 3 to stop transmitting the data traffic.

[0081] In this embodiment, the threshold is preset to 5. It may be learned from step 706 that the first unavailability G1=7 is greater than the threshold 5, and the PE 1 stops transmitting the data traffic to the PE 2 by using the LSP 1, the LSP 2, and the LSP 3.

[0082] Step 708. The PE 1 determines, within the preset period, whether a second link detection packet sent by a PE 3 is separately received from the LSP 4 and the LSP 5.

[0083] In this embodiment, an example in which link fault detection is performed by using the BFD method is used for description. In this case, the second link fault detection packet is a second BFD detection packet. Certainly, in an actual use process, another method may be alternatively used, for example, OAM. Details of each case are not described herein.

[0084] Step 709. When the PE 1 does not receive, from the LSP 5, the second fault detection packet sent by the PE 3, the PE 1 determines the LSP 5 as a second faulty LSP.

[0085] Step 710. The PE 1 separately obtains weights of the LSP 4 and the LSP 5.

[0086] In this embodiment, a bandwidth of the LSP 4 is 8G, and a bandwidth of the LSP 5 is 2G In this case, a weight W(4) of the LSP 4 may be set to 5, and a weight W(5) of the LSP 5 may be set to 2.

[0087] Step 711. The PE 1 separately obtains state values of the LSP 4 and the LSP 5.

[0088] In this embodiment, a value of a fault state is preset to 1, and a value of a normal state is preset to 0. In this case, it may be learned from step 709 that, the state value BFD(4) of the LSP 4 is 0, and the state value BFD(5) of the LSP 5 is 1.

[0089] Step 712. The PE 1 calculates a weighted sum of the state values of the LSP 4 and the LSP 5 based on the weights of the LSP 4 and the LSP 5, to obtain a second unavailability.

[0090] Specifically, the PE 1 obtains the second unavailability G2 according to the following formula (4):



[0091] Step 713. When determining that the second unavailability is less than the first unavailability, the PE 1 transmits the data traffic to the PE 3 by using the secondary links LSP 4 and LSP 5 between the PE 1 and the PE 3.

[0092] It should be noted that a link switching method is not limited in the present invention. In an actual use process, different switching methods may be used based on different bearer services. For example, when a bearer service is an L3VPN service, link switching is performed by using an L3VPN fast reroute (Fast Reroute, FRR); when a bearer service is a pseudo wire (Pseudo Wire, PW) service, link switching is performed by using PW redundancy or PW automatic protection switching (Automatic Protection Switching, APS).

[0093] Based on the link fault detection method provided in this embodiment of the present invention, the PE 1 may calculate the first unavailability of the primary link according to the weight and the state value of each LSP in the primary link, and when the first unavailability is greater than the preset threshold, transmitting the data traffic by using the primary link is stopped. In this way, a prior-art problem of a serious packet loss that is caused by transmitting the data traffic by using the primary link when all the LSPs of the primary link are faulty and that is of service data transmitted in the load sharing scenario. Based on the technical solution provided in the present invention, a degradation degree of the primary link can be properly determined based on the first unavailability and the preset threshold, so that transmitting the data traffic by using the primary link is stopped in time, thereby improving data transmission reliability.

[0094] 2. As shown in FIG. 8, in the L2VPN + L3VPN scenario, one CSG, two ASGs that are an ASG 1 and an ASG 2, and two RSGs that are an RSG 1 and an RSG 2 are included. In a normal case, the service data is communicated by using a link LSP 1 between the CSG and the ASG 1 and a link LSP 2 between the ASG 1 and the RSG 1; or by using a link LSP 3 that goes from the CSG to the ASG 1 via the ASG 2 and the link LSP 2 between the ASG 1 and the RSG 1. There is a linkage relationship among the LSP 1, the LSP 2, and the LSP 3 in a data traffic transmission process.

[0095] To detect whether the three links that are the LSP 1, the LSP 2 and the LSP 3 and among which there is a linkage relationship are faulty, as shown in FIG. 9, the link fault detection method provided in this embodiment of the present invention includes the following steps.

[0096] Step 901. The ASG 1 sends the data traffic to the CSG by using the LSP 1 and the LSP 3, where the data traffic belongs to a same service flow.

[0097] Step 902. The ASG 1 determines, within a preset period, whether the first link detection packet sent by the CSG is separately received from the LSP 1 and the LSP 3.

[0098] In this embodiment, an example in which link fault detection is performed by using a BFD method is used for description. In this case, the first link fault detection packet is a first BFD detection packet. Certainly, in an actual use process, another method may be alternatively used, for example, OAM. Details of each case are not described herein.

[0099] Step 903. When the ASG 1 does not receive, from the LSP 1 and the LSP 3, the first fault detection packet sent by the CSG, the ASG 1 determines the LSP 1 and the LSP 3 as first faulty LSPs.

[0100] Step 904. The ASG 1 separately obtains state values of the LSP 1 and the LSP 3.

[0101] In this embodiment, a value of a fault state is preset to 1, and a value of a normal state is preset to 0. In this case, it may be learned from step 903 that, the state value BFD(1) of the LSP 1 is 1, and the state value BFD(3) of the LSP 3 is 1.

[0102] Step 905. The ASG 1 calculates a logical AND of the state value of the LSP 1 and the state value of the LSP 3, to obtain a first unavailability.

[0103] Specifically, the ASG 1 obtains the first unavailability G according to the following formula (5):



[0104] Step 906. When the ASG 1 determines that the first unavailability is greater than a preset threshold, the ASG 1 triggers the LSP 1 and the LSP 3 to stop transmitting the data traffic.

[0105] In this embodiment, the threshold is preset to 0. It may be learned from step 905 that the first unavailability G=1> is greater than the threshold 0, and the ASG 1 triggers the LSP 1 and the LSP 3 to stop transmitting the data traffic.

[0106] Step 907. The ASG 1 sends a notification packet to the RSG 1 by using an LSP 2, where the notification packet is used to trigger the RSG 1 to stop transmitting the data traffic to the ASG 1.

[0107] In the L2VPN + L3VPN scenario, there is a linkage relationship among the LSP 1, the LSP 2, and the LSP 3. Whether the LSP 1 and the LSP 3 are faulty at the same time can be detected by using the link fault detection method provided in this embodiment of the present invention. When the LSP 1 and the LSP 3 are faulty at the same time, the RSG 1 is instructed in time to stop transmitting the data traffic by using the LSP 2, so as to avoid a routing black hole caused by a double-point fault, thereby ensuring data transmission reliability.

[0108] As shown in FIG. 10, an embodiment of the present invention further provides a first network device 1000. The first network device 1000 may perform the corresponding steps performed by the first network device in the method in the foregoing embodiment. As shown in FIG. 10, the first network device 1000 includes a transmitter 1002, a receiver 1004, and a processor 1006.

[0109] The transmitter 1002 is configured to send data traffic to a second network device by using a plurality of first label switched paths LSPs, where the data traffic transmitted by using the plurality of first LSPs belongs to a same service flow.

[0110] The receiver 1004 is configured to receive a first link detection packet from the second network device by using each of the plurality of first LSPs.

[0111] The processor 1006 is configured to: determine, within a preset period, whether the first link detection packet is received; determine an LSP for which the first link detection packet is not received and that is of the plurality of first LSPs as a first faulty LSP; calculate a first unavailability of the plurality of first LSPs based on the first faulty LSP; and when determining that the first unavailability is greater than a preset threshold, trigger the plurality of first LSPs to stop transmitting the data traffic, where the first unavailability is used to indicate a degradation degree of the plurality of first LSPs for transmitting the data traffic.

[0112] Optionally, after the first network device 1000 triggers the plurality of first LSPs to stop transmitting the data traffic, the transmitter 1002 is further configured to transmit the data traffic to a third network device by using a plurality of second LSPs between the first network device and the third network device.

[0113] Optionally, the receiver 1004 is further configured to receive a second link detection packet from the third network device by using each of the plurality of second LSPs.

[0114] The processor 1006 is further configured to: determine, within the preset period, whether the second link detection packet is received; determine an LSP for which the second link detection packet is not received and that is of the plurality of second LSPs as a second faulty LSP; calculate a second unavailability of the plurality of second LSPs based on the second faulty LSP; and when determining that the second unavailability is less than the first unavailability, instruct the transmitter to transmit the data traffic to the third network device by using the plurality of second LSPs between the first network device and the third network device, where the second unavailability is used to indicate a degradation degree of the plurality of second LSPs for transmitting the data traffic.

[0115] Optionally, a method used by the processor 1006 to calculate the first unavailability of the plurality of first LSPs based on the first faulty LSP includes: obtaining, by the processor 1006, a weight of each of the plurality of first LSPs; determining a state value of each of the plurality of first LSPs; and calculating a weighted sum of the state value of each of the plurality of first LSPs based on the weight of each of the plurality of first LSPs to obtain the first unavailability, where the state value is used to indicate a fault state of the LSP.

[0116] Optionally, the first network device 1000 is a first ASG, the second network device is a CSG, the plurality of first LSPs include a third LSP and a fourth LSP, the third LSP is an LSP between the first ASG and the CSG, and the fourth LSP is an LSP that goes from the first ASG to the CSG via a second ASG In this case, the transmitter 1002 is further configured to send a notification packet to a radio network controller site gateway RSG by using a fifth LSP, and the notification packet is used to trigger the RSG to stop transmitting the data traffic to the first ASG

[0117] Optionally, the method used by the processor 1006 to calculate the first unavailability of the plurality of first LSPs based on the first faulty LSP includes: determining, by the processor 1006, a state value of the third LSP and a state value of the fourth LSP, and calculating a logical AND of the state value of the third LSP and the state value of the fourth LSP, to obtain the first unavailability, where the state value is used to indicate a fault state of the LSP.

[0118] The first network device shown in FIG. 10 may perform the corresponding steps performed by the first network device in the method of the foregoing embodiment. The first network device can determine the first faulty LSP from the plurality of first LSPs used for the data traffic, and calculate the first unavailability of the plurality of first LSPs based on the first faulty LSP, so that a fault state of a link is accurately determined based on the first unavailability, and transmitting the data traffic by using the plurality of first LSPs is stopped, thereby improving data transmission reliability, and avoiding a high packet loss rate that is caused by a high first unavailability of the plurality of first LSPs and that is of the data traffic transmitted by using the plurality of first LSPs.

[0119] As shown in FIG. 11, an embodiment of the present invention further provides a first network device 1100. The first network device 1100 may perform the corresponding steps performed by the first network device in the method in the foregoing embodiment.

[0120] As shown in FIG. 11, the first network device 1100 includes at least one processor 1101, a memory 1102, an interface 1103, and a bus 1104. The interface 1103 may be implemented in a wireless or wired manner. Specifically, the interface 1103 may be a network interface card. The processor 1101, the memory 1102, and the interface 1103 are connected by using the bus 1104. The memory 1102 is configured to store a computer program.

[0121] The interface 1103 may specifically include a transmitter and a receiver, and is configured to receive and send information between the first network device and a second network device and between the first network device and a third network device in the foregoing embodiment; or the interface 1103 is configured to receive and send information between the first network device and an RSG For example, the interface 1103 is configured to support step 101 and step 102 of the process in FIG. 1. The processor 1101 is configured to perform processing performed by the first network device in the foregoing embodiment. For example, the processor 1101 is configured to: determine, within a preset period, whether a first link detection packet is received; determine an LSP for which the first link detection packet is not received and that is of the plurality of first LSPs as a first faulty LSP; calculate a first unavailability of the plurality of first LSPs based on the first faulty LSP; and when determining that the first unavailability is greater than a preset threshold, trigger the plurality of first LSPs to stop transmitting the data traffic, where the first unavailability is used to indicate a degradation degree of the plurality of first LSPs for transmitting the data traffic. The processor 1101 is further configured to: determine whether the second link detection packet is received; determine an LSP for which the second link detection packet is not received and that is of the plurality of second LSPs as a second faulty LSP; calculate a second unavailability of the plurality of second LSPs based on the second faulty LSP; and when determining that the second unavailability is less than the first unavailability, instruct the transmitter to transmit the data traffic to the third network device by using the plurality of second LSPs between the first network device and the third network device, where the second unavailability is used to indicate a degradation degree of the plurality of second LSPs for transmitting the data traffic. The processor 1101 is further configured to: obtain a weight of each of the plurality of first LSPs; determine a state value of each of the plurality of first LSPs; and calculate a weighted sum of the state value of each of the plurality of first LSPs based on the weight of each of the plurality of first LSPs, to obtain the first unavailability, where the state value is used to indicate a fault state of the LSP. The processor 1101 is further configured to: determine a state value of the third LSP and a state value of the fourth LSP, and calculate a logical AND of the state value of the third LSP and the state value of the fourth LSP, to obtain the first unavailability, where the state value is used to indicate a fault state of the LSP. For example, the processor 1101 is configured to support step 103 to step 105 of the process in FIG. 1. The memory 1102 includes an operating system 11021 and an application program 11022, and is configured to store a program, code, or an instruction. When executing the program, code, or instruction, the processor or a hardware device may complete a processing process of the first network device in the foregoing method embodiment. Optionally, the memory 1102 may include a read-only memory (English: read-only memory, ROM for short) and a random access memory (English: random access memory, RAM for short). The ROM includes a basic input/output system (English: basic input/output System, BIOS for short) or an embedded system, and the RAM includes an application program and an operating system. When the first network device 1100 needs to be run, the BIOS built into the ROM or a bootloader in the embedded system is configured to boot a system to start, to boot the first network device 1100 to enter a normal running state. After entering a normal running state, the first network device 1100 runs the application program and the operating system that are in the RAM, so as to complete the processing process of the first network device in the method embodiment.

[0122] It may be understood that FIG. 11 merely shows a simplified design of the first network device. In actual application, the first network device may include any quantity of interfaces, processors, or memories.

[0123] In addition, an embodiment of this application provides a computer storage medium, configured to store a computer software instruction used by the first network device. The computer storage medium includes a program designed for performing the method embodiment.

[0124] As shown in FIG. 12, an embodiment of this application further includes a link fault detection system. The network system includes two network devices, and each of the at least two network devices is the first network device in FIG. 10 or FIG. 11.

[0125] Method or algorithm steps described in combination with the content disclosed in this application may be implemented by using hardware, or may be implemented by using a processor by executing a software instruction. The software instruction may be formed by a corresponding software module. The software module may be located in a RAM, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable hard disk, a CD-ROM, or a storage medium of any other form known in the art. For example, a storage medium is coupled to a processor, so that the processor can read information from the storage medium or write information into the storage medium. Certainly, the storage medium may be a component of the processor. The processor and the storage medium may be located in an ASIC. In addition, the ASIC may be located in user equipment. Certainly, the processor and the storage medium may exist in the user equipment as discrete components.

[0126] A person skilled in the art should be aware that in the foregoing one or more examples, functions described in this application may be implemented by using hardware, software, firmware, or any combination thereof. When the present invention is implemented by using software, the foregoing functions may be stored in a computer readable medium or transmitted as one or more instructions or codes in the computer readable medium. The computer readable medium includes a computer storage medium and a communications medium, and the communications medium includes any medium that enables a computer program to be transmitted from one place to another. The storage medium may be any available medium accessible to a general-purpose or dedicated computer.

[0127] The foregoing specific implementations further describe the objectives, technical solutions, and beneficial effects of this application in detail. It should be understood that the foregoing descriptions are merely specific implementations of this application.

[0128] The foregoing descriptions are merely specific implementations of the present invention, but are not intended to limit the protection scope of the present invention. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in the present invention shall fall within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.


Claims

1. A link fault detection method, comprising:

sending, by a first network device, data traffic to a second network device by using a plurality of first label switched paths LSPs, wherein the data traffic transmitted by using the plurality of first LSPs belongs to a same service flow;

determining, by the first network device by using each of the plurality of first LSPs within a preset period, whether a first link detection packet from the second network device is received;

determining, by the first network device, an LSP for which the first link detection packet is not received and that is of the plurality of first LSPs as a first faulty LSP;

calculating, by the first network device, a first unavailability of the plurality of first LSPs based on the first faulty LSP, wherein the first unavailability is used to indicate a degradation degree of the plurality of first LSPs for transmitting the data traffic; and

when the first network device determines that the first unavailability is greater than a preset threshold, triggering, by the first network device, the plurality of first LSPs to stop transmitting the data traffic.


 
2. The method according to claim 1, wherein after the triggering, by the first network device, the plurality of first LSPs to stop transmitting the data traffic, the method further comprises:
transmitting, by the first network device, the data traffic to a third network device by using a plurality of second LSPs between the first network device and the third network device.
 
3. The method according to claim 2, wherein the transmitting, by the first network device, the data traffic to a third network device by using a plurality of second LSPs between the first network device and the third network device comprises:

determining, by the first network device by using each of the plurality of second LSPs within the preset period, whether a second link detection packet from the third network device is received;

determining, by the first network device, an LSP for which the second link detection packet is not received and that is of the plurality of second LSPs as a second faulty LSP;

calculating, by the first network device, a second unavailability of the plurality of second LSPs based on the second faulty LSP, wherein the second unavailability is used to indicate a degradation degree of the plurality of second LSPs for transmitting the data traffic; and

when determining that the second unavailability is less than the first unavailability, transmitting, by the first network device, the data traffic to the third network device by using the plurality of second LSPs between the first network device and the third network device.


 
4. The method according to any one of claims 1 to 3, wherein the calculating, by the first network device, a first unavailability of the plurality of first LSPs based on the first faulty LSP comprises:

obtaining, by the first network device, a weight of each of the plurality of first LSPs;

determining, by the first network device, a state value of each of the plurality of first LSPs, wherein the state value is used to indicate a fault state of the LSP; and

calculating, by the first network device, a weighted sum of the state value of each of the plurality of first LSPs based on the weight of each of the plurality of first LSPs, to obtain the first unavailability.


 
5. The method according to claim 1, wherein the first network device is a first aggregation site gateway ASG, the second network device is a cell site gateway CSG, the plurality of first LSPs comprise a third LSP and a fourth LSP, the third LSP is an LSP between the first ASG and the CSG, and the fourth LSP is an LSP that goes from the first ASG to the CSG via a second ASG, and the method further comprises:
sending, by the first ASG, a notification packet to a radio network controller site gateway RSG by using a fifth LSP, wherein the notification packet is used to trigger the RSG to stop sending the data traffic to the first ASG
 
6. The method according to claim 5, wherein the calculating, by the first network device, a first unavailability of the plurality of first LSPs based on the first faulty LSP comprises:

determining, by the first network device, a state value of the third LSP and a state value of the fourth LSP, wherein the state value is used to indicate a fault state of the LSP; and

calculating, by the first network device, a logical AND of the state value of the third LSP and the state value of the fourth LSP, to obtain the first unavailability.


 
7. The method according to any one of claims 1 to 6, wherein the first link detection packet and/or the second link detection packet are bidirectional forwarding detection BFD detection packets or network management function OAM detection packets.
 
8. A first network device, comprising a transmitter, a receiver, and a processor, wherein
the transmitter is configured to send data traffic to a second network device by using a plurality of first label switched paths LSPs, wherein the data traffic transmitted by using the plurality of first LSPs belongs to a same service flow;
the receiver is configured to receive a first link detection packet from the second network device by using each of the plurality of first LSPs; and
the processor is configured to: determine, within a preset period, whether the first link detection packet is received; determine an LSP for which the first link detection packet is not received and that is of the plurality of first LSPs as a first faulty LSP; calculate a first unavailability of the plurality of first LSPs based on the first faulty LSP; and when determining that the first unavailability is greater than a preset threshold, trigger the plurality of first LSPs to stop transmitting the data traffic, wherein the first unavailability is used to indicate a degradation degree of the plurality of first LSPs for transmitting the data traffic.
 
9. The first network device according to claim 8, wherein after the processor triggers the plurality of first LSPs to stop transmitting the data traffic, the transmitter is further configured to transmit the data traffic to a third network device by using a plurality of second LSPs between the first network device and the third network device.
 
10. The first network device according to claim 9, wherein
the receiver is further configured to receive a second link detection packet from the third network device by using each of the plurality of second LSPs; and
the processor is further configured to: determine, within the preset period, whether the second link detection packet is received; determine an LSP for which the second link detection packet is not received and that is of the plurality of second LSPs as a second faulty LSP; calculate a second unavailability of the plurality of second LSPs based on the second faulty LSP; and when determining that the second unavailability is less than the first unavailability, instruct the transmitter to transmit the data traffic to the third network device by using the plurality of second LSPs between the first network device and the third network device, wherein the second unavailability is used to indicate a degradation degree of the plurality of second LSPs for transmitting the data traffic.
 
11. The first network device according to any one of claims 8 to 10, wherein that the processor calculates the first unavailability of the plurality of first LSPs based on the first faulty LSP comprises:
the processor obtains a weight of each of the plurality of first LSPs; determines a state value of each of the plurality of first LSPs; and calculates a weighted sum of the state value of each of the plurality of first LSPs based on the weight of each of the plurality of first LSPs, to obtain the first unavailability, wherein the state value is used to indicate a fault state of the LSP.
 
12. The first network device according to claim 8, wherein the first network device is a first ASG, the second network device is a CSG, the plurality of first LSPs comprise a third LSP and a fourth LSP, the third LSP is an LSP between the first ASG and the CSG, and the fourth LSP is an LSP that goes from the first ASG to the CSG via a second ASG; and
the transmitter is further configured to send a notification packet to a radio network controller site gateway RSG by using a fifth LSP, wherein the notification packet is used to trigger the RSG to stop sending the data traffic to the first ASG
 
13. The first network device according to claim 12, wherein that the processor calculates the first unavailability of the plurality of first LSPs based on the first faulty LSP comprises:
the processor determines a state value of the third LSP and a state value of the fourth LSP, and calculates a logical AND of the state value of the third LSP and the state value of the fourth LSP, to obtain the first unavailability, wherein the state value is used to indicate a fault state of the LSP.
 
14. A first network device, wherein the first network device comprises at least one processor and a memory, wherein
the memory is configured to store a computer program; and
the at least one processor executes the computer program to implement the link fault detection method according to any one of claims 1 to 7.
 
15. A link fault detection system, comprising at least two network devices, wherein each of the at least two network devices is the first network device according to any one of claims 8 to 13 or the first network device according to claim 14.
 




Drawing


































Search report










Cited references

REFERENCES CITED IN THE DESCRIPTION



This list of references cited by the applicant is for the reader's convenience only. It does not form part of the European patent document. Even though great care has been taken in compiling the references, errors or omissions cannot be excluded and the EPO disclaims all liability in this regard.

Patent documents cited in the description