CN111245951B - Link failure processing method and network equipment - Google Patents

Link failure processing method and network equipment Download PDF

Info

Publication number
CN111245951B
CN111245951B CN202010065223.1A CN202010065223A CN111245951B CN 111245951 B CN111245951 B CN 111245951B CN 202010065223 A CN202010065223 A CN 202010065223A CN 111245951 B CN111245951 B CN 111245951B
Authority
CN
China
Prior art keywords
lsp
bfd
processor
identifier
ecmp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010065223.1A
Other languages
Chinese (zh)
Other versions
CN111245951A (en
Inventor
邢家茂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202010065223.1A priority Critical patent/CN111245951B/en
Publication of CN111245951A publication Critical patent/CN111245951A/en
Application granted granted Critical
Publication of CN111245951B publication Critical patent/CN111245951B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides a link failure processing method and network equipment. The application provides a link failure processing method, which is applied to network equipment, wherein the network equipment is provided with an equal cost multipath ECMP (equal cost multi path) comprising a plurality of Label Switching Paths (LSP); the network device includes: a processor and a forwarding chip; when receiving a fault notification of Bidirectional Forwarding Detection (BFD) session fault, the processor determines an LSP identifier of an LSP corresponding to the faulty BFD session; and the processor issues update information carrying the LSP identification to the forwarding chip so as to block ECMP table entries stored by the forwarding chip corresponding to the LSP identification. Through the technical scheme of the embodiment of the application, the reliability of the network equipment is ensured.

Description

Link failure processing method and network equipment
Technical Field
The present application relates to the field of data communications, and in particular, to a method for processing a link failure and a network device.
Background
With the development of network economy, enterprises put forward higher and higher requirements on the construction of own networks, which mainly show the aspects of network flexibility, economy, expansibility and the like. The multi-protocol Label Switching (MPLS) technology is a backbone network technology that is widely applied at present. MPLS network introduces a connection-oriented label switching concept on a connectionless IP network, combines a third layer routing technology and a second layer switching technology, and fully exerts the flexibility of IP routing and the indirection of second layer switching.
In an existing MPLS networking, a plurality of Label Switched Paths (LSPs) are established between network devices, and these LSPs form an Equal-Cost multi-Path (Equal-Cost multi-Path) set. At Provider Edge (PE) devices, load balancing may be performed by multiple LSPs, thereby improving reliability of MPLS networking.
In order to improve reliability of MPLS networking, Bidirectional Forwarding Detection (BFD) is run on each LSP. When detecting the LSP failure, the PE device maintains various entries in the PE device according to the failure information, so that subsequent service packets may be shared by other LSPs for forwarding. Because the processor will process the events triggered in the PE device according to the time sequence, the time consumed by the maintenance list item is difficult to guarantee, and in the process of maintaining the list item, part of the service packet will be allocated to the failed LSP for forwarding, thereby causing the reliability of the network device of the MPLS networking to decrease.
Disclosure of Invention
On one hand, the application provides a link failure processing method and network equipment, which are applied to the network equipment, wherein the network equipment is provided with an ECMP (equal cost performance protocol) containing a plurality of LSPs (label switched paths);
the network device includes: a processor and a forwarding chip; when receiving a fault notification of Bidirectional Forwarding Detection (BFD) session fault, the processor determines an LSP identifier of an LSP corresponding to the failed BFD session; and the processor issues update information carrying the LSP identification to the forwarding chip so as to block ECMP table entries stored by the forwarding chip corresponding to the LSP identification.
Optionally, a BFD detection thread and an interface driver for implementing data interaction between the processor and the forwarding chip are run on the processor;
the BFD detection thread determines the LSP identification of the LSP corresponding to the BFD session with the fault when receiving the fault notification of the BFD session fault, and sends the LSP identification to the interface driver;
and the interface driver is used for issuing an updating instruction carrying the LSP identification to the forwarding chip.
Optionally, a BFD detection thread, an ECMP maintenance thread, and an interface driver for implementing data interaction between the processor and the forwarding chip are run on the processor;
the BFD detection thread determines the LSP identification of the LSP corresponding to the BFD session with the fault when receiving the fault notification of the BFD session fault, and sends the LSP identification to the ECMP maintenance thread;
the ECMP maintenance thread updates the ECMP table maintained by the processor according to the received LSP identification and sends the updated ECMP table to the interface driver;
and the interface driver is used for issuing the updated ECMP table to the forwarding chip.
Optionally, a BFD detection thread, an LSP BFD maintenance thread, and an interface driver for implementing data interaction between the processor and the forwarding chip are run on the processor;
the BFD detection thread determines a BFD session identifier of a BFD session with the fault and an LSP identifier of an LSP corresponding to the BFD session identifier when receiving a fault notification of the BFD session fault, and sends the BFD session identifier and the LSP identifier to the LSP BFD maintenance thread;
the LSP BFD maintenance thread updates the BFD session state of the LSP maintained by the processor according to the BFD session identifier and the LSP identifier and sends the LSP identifier to the interface driver;
and the interface driver is used for issuing an updating instruction carrying the LSP identification to the forwarding chip.
Optionally, a BFD detection thread, an LSP BFD maintenance thread, an ECMP maintenance thread, and an interface driver for implementing data interaction between the processor and the forwarding chip are run on the processor;
the BFD detection thread determines a BFD session identifier of a BFD session with the fault and an LSP identifier of an LSP corresponding to the BFD session identifier when receiving a fault notification of the BFD session fault, and sends the BFD session identifier and the LSP identifier to the LSP BFD maintenance thread;
the LSP BFD maintenance thread updates the BFD session state of the LSP maintained by the processor according to the BFD session identifier and the LSP identifier and sends the LSP identifier to the ECMP maintenance thread;
the ECMP maintenance thread updates the ECMP table maintained by the processor according to the received LSP identification and sends the updated ECMP table to the interface driver;
and the interface driver is used for issuing the updated ECMP table to the forwarding chip.
Optionally, the network device further includes a link detection component;
and the link detection component sends a failure notice of the BFD session failure to the processor when the BFD session failure is detected.
Optionally, the method further includes:
the processor is specifically configured to update the software forwarding table maintained by the processor according to the determined BFD session identifier of the failed BFD and the LSP identifier of the LSP corresponding to the BFD session identifier.
In another aspect, the present application further provides a network device, including: a processor, a memory and a forwarding chip; the network equipment is provided with an ECMP containing a plurality of LSPs;
the network device includes: a processor and a forwarding chip; communicating with the forwarding chip through an interface driver in the processor;
the memory has stored therein program instructions that are invoked by the processor to perform:
when receiving a fault notification of detecting a BFD session fault, determining an LSP identifier of an LSP corresponding to the BFD session with the fault;
and issuing update information carrying the LSP identification to the forwarding chip through the interface drive so as to block ECMP table entries which correspond to the LSP identification and are stored by the forwarding chip.
Optionally, the memory stores a software forwarding table, and the processor further executes:
and updating the software forwarding table according to the determined BFD session identifier of the failed BFD and the LSP identifier of the LSP corresponding to the BFD session identifier.
Optionally, the network device further includes: a link detection section;
and the link detection component is used for sending a failure notice of the BFD session failure to the processor when the BFD session failure is detected.
As can be seen from the above technical solutions, in the embodiment of the present application, after determining that an LSP fails, the network device updates in advance the state of an ECMP entry corresponding to an LSP identifier of the failed LSP in an ECMP table stored on a forwarding chip, and when the LSP fails, the failed LSP is blocked more quickly, thereby avoiding a situation that a service packet is lost due to the fact that the service packet is allocated to the failed LSP again, and improving reliability of the network device.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required to be used in the embodiments of the present application or the technical solutions in the prior art are briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
Fig. 1 is a block diagram of an MPLS networking to which the present application relates;
FIG. 2 is a flow chart of a method of handling a link failure to which the present application relates;
FIG. 3 is a block diagram of a network device to which the present application relates;
FIG. 4 is a block diagram of a processor in a method of handling a link failure according to the present application;
FIG. 5 is a block diagram of a processor in a method for handling a link failure according to the present application;
fig. 6 is a block diagram of a processor in another link failure processing method according to the present application;
fig. 7 is a block diagram of a processor in another method for handling a link failure according to the present application.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the present application. As used in the examples and claims of this application, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of embodiments of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
In order to avoid packet loss caused by link failure and improve reliability of network equipment, the present application provides a link failure processing method, as shown in fig. 1, applied to network equipment, where the network equipment is configured with an ECMP including multiple LSPs; the network device, as shown in fig. 2, includes: a processor and a forwarding chip.
In the network shown in fig. 2, four LSPs are established between network devices, and the four LSPs are configured as ECMP, and when the network device forwards a service packet, load balancing may be performed based on the ECMP, so that the service packet is distributed to the four LSPs and forwarded to an opposite-end network device. And in order to confirm the connected state of each LSP, a BFD session is established on each LSP, and based on the BFD session, the network devices at both sides mutually transmit BFD detection messages according to a certain period. When one network device does not receive the BFD detection packet of the peer network device within the preset time, the LSP failure may be considered, for example, the network device may set to send the BFD detection packet to the peer network device according to a period of 10ms, and may set to determine the LSP failure under the condition that the BFD detection packet sent by the peer is not received within the preset time of 3 × 10 ms.
For the detection of the failure, it may be executed by a link detection component (not shown), and when it is determined that the BFD detection packet of the opposite end is not received within the preset time, a failure notification of the BFD session failure is reported to the processor. The reporting mode can be that recording is carried out when the link detection part detects the fault, the processor sends a request to the link detection part at regular time, and a fault notification is sent to the processor when the link detection part receives the request; or sending a fault notification to the processor in the form of an interrupt when the link detection unit detects a fault. The uploaded failure notification carries failure-related information, such as a session identifier of the failed BFD session.
The link detection unit mentioned herein may be a forwarding chip, or may be implemented by a separately configured Logic Device (not shown), for example, a Field Programmable Gate Array (FPGA) or a Complex Programmable Logic Device (CPLD) separately configured in the network Device for detection.
S101, when receiving a failure notice of BFD session failure, the processor determines the LSP identification of the LSP corresponding to the failed BFD session.
When the processor of the network device receives the failure notification sent by the detection component, the session identification of the failed BFD session is obtained from the failure notification. The processor searches the corresponding relation according to the determined session identifier, and acquires the LSP identifier corresponding to the session identifier from the corresponding relation, so that the network equipment can determine which LSP has a fault.
S102, the processor issues update information carrying the LSP identification to the forwarding chip to block ECMP table entries corresponding to the LSP identification and stored by the forwarding chip.
After acquiring the LSP identifier of the failed LSP, the processor needs to maintain a forwarding table maintained by the processor according to a preset flow, which is generally referred to as a software forwarding table. The software forwarding table may include a session state table of the BFD session, an LSP state table for recording states of each LSP, and an ECMP table for recording multiple LSPs, where each ECMP entry in the ECMP table records information about an LSP, such as LSP identification, state, and the like. After the processor maintains and finishes the software forwarding table, relevant information is issued to the forwarding chip for storage according to the forwarding table, the forwarding chip generally refers to a hardware forwarding table stored in the forwarding chip, and the forwarding chip forwards the service message according to the stored hardware forwarding table. Therefore, only after the processor completes the maintained software forwarding table, the service packet is issued to the forwarding chip, and in the process, the service packet is still allocated to the failed LSP, but the service packet cannot be forwarded by being allocated to the failed LSP due to the failure of the LSP, so that the packet loss of the service packet is caused, and the reliability of the network device is reduced.
In the application, after the processor receives the failure notification, the carried session identifier of the failed BFD session is confirmed. Searching according to the determined session identifier to obtain the LSP identifier of the failed LSP, and directly sending update information carrying the LSP identifier of the failed LSP to the forwarding chip, so that the forwarding chip is prompted to block a hardware forwarding table related to the failed LSP, that is, an ECMP table item related to the failed LSP in the ECMP table is updated, packet loss caused in the process of maintaining a software forwarding table by a processor is avoided, and the reliability of network equipment is improved.
In addition, it should be noted that, when the hardware forwarding table stored on the forwarding chip is updated according to the LSP identifier of the failed LSP, the software forwarding table maintained by the processor also needs to be updated, and the two forwarding tables can be performed separately. Then, the method as described above, further comprising:
and S103, the processor is specifically configured to update the software forwarding table maintained by the processor according to the determined BFD session identifier of the failed BFD and the LSP identifier of the LSP corresponding to the BFD session identifier.
When the processor receives the failure notification, on one hand, the hardware forwarding table is directly updated as shown above, and on the other hand, the session identifier carried in the failure notification is obtained according to the existing flow, so as to maintain the session state of the BFD session in the software forwarding table, the link state of the LSP and the state of the ECMP table entry in the ECMP table. In this way, the consistency of the contents of the software forwarding table maintained by the processor and the hardware forwarding table maintained on the forwarding chip is also maintained.
For a network device, as shown in fig. 3, a processor, a memory, a forwarding chip, and a bus connecting the processor and the forwarding chip may be included. An interface driver for the bus is solidified in the processor, and data interaction between the processor and the forwarding chip is realized through the interface driver. The network device may be a PE device or a Provider (P) device in an MPLS backbone network, and the ECMP of the LSP may be established between the PE device and the PE device, between the P device and the PE device, or between the P device and the P device.
The processor reads the program instructions stored in the memory to form a plurality of threads in the processor, and the threads process respective tasks in a time-sharing manner according to the scheduling of the processor. Assuming that there are 3 threads running in the processor, in principle, the processor processes in the order of thread 1, thread 2, and thread 3, that is, while processing thread 1, thread 2 and thread 3 are in a wait state. After the current task processing of the thread 1 is completed, the processor dispatches the thread 2 to process, and the processing is repeated in sequence, and each thread can open an interface for data interaction between the threads. In the prior art, because a plurality of software forwarding tables maintained by a processor are maintained by different threads, and the task currently processed by each thread needs to be considered in scheduling between each thread, when a certain thread occupies a long time, the processing of a subsequent thread will be affected.
In order to reduce the time consumed by switching between threads, the application provides a link failure processing method, which comprises the following steps:
as shown in fig. 4, the processor is formed with a BFD detection thread on the processor based on program instructions in the memory, and an interface driver for realizing data exchange with the forwarding chip on the processor. It should be noted that if the failure notification is detected by a component different from the forwarding chip, the failure notification also needs to be sent up through the interface driver.
In step S101 and step S102, when receiving a failure notification of a BFD session failure, the BFD detection thread of the processor determines an LSP identifier of an LSP corresponding to the failed BFD session, and sends the LSP identifier to the interface driver.
When the processor receives a failure notification sent by the link detection component, the BFD detection thread may obtain, according to the failure notification, a session identifier corresponding to a BFD session carried in the failure notification, and may obtain, according to a correspondence between the session identifier of the BFD session and an LSP in which the BFD session is established, an LSP identifier corresponding to the BFD session, and it may be determined that the determined LSP is a failed LSP.
After the LSP identifier is obtained, the BFD detection thread may directly send the LSP identifier to the interface driver according to the direction indicated by the dotted arrow in the figure, and issue an update instruction carrying the LSP identifier of the failed LSP to the forwarding chip by invoking the interface driver to perform data interaction with the forwarding chip. The update instruction may be an instruction implemented by a bus protocol, and is used to inform the forwarding chip which LSP needs to be blocked.
At this time, the forwarding chip may determine that the stored ECMP table needs to be updated according to the received update instruction. Obtaining the LSP identification of the fault LSP from the updating instruction, matching in an ECMP table according to the LSP identification, obtaining an ECMP table item corresponding to the LSP identification, and updating the ECMP table item to be in a BLOCK (blocking) state, or directly deleting the ECMP table item corresponding to the LSP identification in the ECMP table. Therefore, the ECMP table entry corresponding to the failed LSP does not exist in the forwarding chip, and then the forwarding chip does not select the failed LSP to forward to the opposite network device when receiving the service packet, thereby completing the decision switching of the ECMP.
After the BFD detection thread acquires the fault LSP identification, the BFD detection thread also interacts the LSP identification of the fault LSP with the session identification of the BFD session in the direction of a solid arrow, maintains the session state of the BFD session of the LSP through the LSP BFD maintenance thread, maintains the state of the LSP through the LSP state maintenance thread, and maintains an ECMP table through the ECMP maintenance thread to finish updating the software forwarding table maintained in the processor. At this time, since the ECMP table maintained on the forwarding chip is maintained in advance, the ECMP maintenance thread does not need to send the updated ECMP table to the interface driver, and even if the ECMP maintenance thread is not changed, the updated ECMP table is issued to the interface driver, which does not affect the reliability of the network device. Because the forwarding chip has already performed decision switching of the ECMP in the updating process of the software forwarding table, the service packet is forwarded according to the updated ECMP table in this period of time, and even if the service packet is updated again, only a small amount of time is occupied, and the loss of the service packet can still be reduced.
Different from the above manner, the present application also provides another method for processing a link failure, including:
as shown in fig. 5, the processor is formed with a BFD detection thread and an ECMP maintenance thread on the processor based on program instructions in the memory, and an interface driver that implements data exchange with the forwarding chip on the processor. It should be noted that if the failure notification is detected by a component different from the forwarding chip, the failure notification also needs to be sent up through the interface driver.
In step S101 and step S102, when receiving a failure notification of a BFD session failure, the BFD detection thread of the processor determines an LSP identifier of an LSP corresponding to the failed BFD session. The BFD detection thread is processed in the same manner as described above, and is not expanded here. After determining the LSP identifier, the LSP identifier is sent to the ECMP maintenance thread according to the direction of the dashed arrow in fig. 5.
And after receiving the LSP identification, the ECMP maintenance thread of the processor waits for the processor to be dispatched to the ECMP maintenance thread. When the ECMP maintenance thread is scheduled to run by the processor, the maintained ECMP table is searched according to the LSP identification, the ECMP table entry corresponding to the fault LSP is determined, the state of the ECMP table entry is updated to be BLOCK, or the ECMP table entry corresponding to the fault LSP is directly deleted.
After the ECMP table entry is updated, the ECMP maintenance thread sends the updated finished ECMP table to the interface driver, and the interface driver is called to perform data interaction with the forwarding chip, so that the interface driver issues the finished ECMP table to the forwarding chip.
And when the forwarding chip receives the updated ECMP table sent by the processor, directly updating the original ECMP table in the forwarding chip according to the updated ECMP table. Because the ECMP table entry corresponding to the failed LSP in the updated ECMP table has been identified as BLOCK state or deleted, when the forwarding chip receives the subsequent service packet, the forwarding chip can avoid allocating the service packet to the failed LSP for forwarding to the network device at the opposite end, thereby avoiding the loss of the service packet.
In addition, the maintenance process of other software forwarding tables in the processor is similar to that described above, and is not described herein again.
Different from the above manner, the present application also provides another method for processing a link failure, including:
as shown in fig. 6, the processor is formed with a BFD detection thread and an LSP BFD maintenance thread on the processor based on program instructions in the memory, and an interface driver that implements data exchange with the forwarding chip on the processor. It should be noted that if the failure notification is detected by a component different from the forwarding chip, the failure notification also needs to be sent up through the interface driver.
In step S101 and step S102, when receiving a failure notification of a BFD session failure, the BFD detection thread of the processor determines an LSP identifier of an LSP corresponding to the failed BFD session, and sends the BFD session identifier and the LSP identifier to an LSP BFD maintenance thread. Since there may be BFD sessions running for different protocols in the processor, such as PW (Pseudo Wire) BFD sessions, maintenance may be performed according to different threads in the processor. Therefore, when the failed BFD session is determined to be the LSP BFD established on the LSP, it may be determined that the LSP identifier and the session identifier of the BFD session are to be sent to an LSP BFD maintenance thread for maintenance.
And after receiving the LSP identifier and the session identifier, the LSP BFD maintenance thread of the processor waits for the processor to schedule to the LSP BFD maintenance thread. And when the processor dispatches the LSP BFD maintenance thread, updating according to the received session identifier and LSP identifier of the BFD session. And then, the LSP BFD maintenance thread sends the LSP identification of the fault LSP to an interface driver, and carries out data interaction with a forwarding chip by calling the interface driver, and issues an update instruction carrying the LSP identification of the fault LSP to the forwarding chip.
After the forwarding chip receives the update instruction, the manner of updating the ECMP table is similar to the update manner corresponding to fig. 4, and is not described herein again. In addition, the maintenance process of other software forwarding tables in the processor is similar to that described above, and is not described herein again.
Different from the above manner, the present application also provides another method for processing a link failure, including:
as shown in fig. 7, the processor is formed with a BFD detection thread, an LSP BFD maintenance thread, and an ECMP maintenance thread on the processor based on program instructions in the memory, and an interface driver that implements data exchange with the forwarding chip is formed on the processor. It should be noted that if the failure notification is detected by a component different from the forwarding chip, the failure notification also needs to be sent up through the interface driver.
The flow executed by the BFD detection thread and the LSP BFD maintenance thread is similar to that described in fig. 6, and is not described herein again.
After the LSP BFD maintenance thread maintains the session state of the BFD session corresponding to the LSP, the LSP identifier may be sent to the ECMP maintenance thread according to the direction of the dashed arrow in fig. 7. When the processor dispatches to the ECMP maintenance thread, the ECMP maintenance thread updates the ECMP table according to the LSP identification and the LSP identification in the ECMP table maintained by the processor, and updates the state of the ECMP table entry corresponding to the LSP identification to be a BLOCK state or directly deletes the ECMP table entry from the ECMP table.
And then, the ECMP maintenance thread issues the updated ECMP table to the interface driver so as to call the interface driver to issue the updated ECMP table to the forwarding chip.
And the forwarding chip updates the stored ECMP table after receiving the updated ECMP table, thereby finishing the decision switching of the ECMP on the forwarding chip. In addition, the maintenance process of other software forwarding tables in the processor is similar to that described above, and is not described herein again.
Corresponding to the foregoing method for processing a failed link, the present application further provides a network device, as shown in fig. 3 to 7, including: a processor, a memory and a forwarding chip; the network equipment is provided with an ECMP containing a plurality of LSPs;
the network device includes: a processor and a forwarding chip; the interface driver in the processor is used for communicating with the forwarding chip;
the memory has stored therein program instructions that are invoked by the processor to perform:
when receiving a fault notification of detecting a BFD session fault, determining an LSP identifier of an LSP corresponding to the faulty BFD session;
and issuing update information carrying the LSP identification to the forwarding chip through the interface drive so as to block ECMP table entries which correspond to the LSP identification and are stored by the forwarding chip.
Further, a software forwarding table is stored in the memory, and the processor further executes:
and updating the software forwarding table according to the determined BFD session identifier of the failed BFD and the LSP identifier of the LSP corresponding to the BFD session identifier.
Further, the network device further includes: a link detection unit (not shown);
and the link detection component is used for sending a failure notice of the BFD session failure to the processor when the BFD session failure is detected.
Further, the memory also stores program instructions, the processor forms a BFD detection thread, an LSP BFD maintenance thread, an LSP maintenance thread, and an ECMP maintenance thread on the processor based on the program instructions in the memory, and an interface driver for implementing data exchange with the forwarding chip is formed on the processor.
Through interaction among threads, a software forwarding table maintained in the processor is maintained, and partial threads can be skipped to update a hardware forwarding table maintained on a corresponding forwarding chip at a higher speed, so that the decision switching speed of the ECMP is improved, the packet loss of service messages is reduced, and the reliability of network equipment is improved.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more pieces of software and/or hardware in the practice of the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (9)

1. A method for processing link failure is characterized in that the method is applied to network equipment, wherein the network equipment is provided with an equal cost multi-path ECMP comprising a plurality of Label Switching Paths (LSP); the network device includes: a processor and a forwarding chip;
when receiving a fault notification of Bidirectional Forwarding Detection (BFD) session fault, the processor determines an LSP identifier of an LSP corresponding to the failed BFD session;
the processor issues update information carrying the LSP identification to the forwarding chip to block ECMP table entries stored by the forwarding chip corresponding to the LSP identification;
a BFD detection thread, an ECMP maintenance thread and an interface driver for realizing data interaction between the processor and the forwarding chip are operated on the processor;
the BFD detection thread determines the LSP identification of the LSP corresponding to the BFD session with the fault when receiving the fault notification of the BFD session fault, and sends the LSP identification to the ECMP maintenance thread;
the ECMP maintenance thread updates the ECMP table maintained by the processor according to the received LSP identification and sends the updated ECMP table to the interface driver;
and the interface driver is used for issuing the updated ECMP table to the forwarding chip.
2. The method according to claim 1, wherein a BFD detection thread and an interface driver for realizing data interaction between the processor and the forwarding chip are run on the processor;
when receiving a fault notification of a BFD session fault, the BFD detection thread determines an LSP identifier of an LSP corresponding to the faulty BFD session and sends the LSP identifier to the interface driver;
and the interface driver is used for issuing an updating instruction carrying the LSP identification to the forwarding chip.
3. The method according to claim 1, wherein a BFD detection thread, an LSP BFD maintenance thread and an interface driver for realizing data interaction between the processor and the forwarding chip run on the processor;
the BFD detection thread determines a BFD session identifier of a BFD session with the fault and an LSP identifier of an LSP corresponding to the BFD session identifier when receiving a fault notification of the BFD session fault, and sends the BFD session identifier and the LSP identifier to the LSP BFD maintenance thread;
the LSP BFD maintenance thread updates the BFD session state of the LSP maintained by the processor according to the BFD session identifier and the LSP identifier and sends the LSP identifier to the interface driver;
and the interface driver is used for issuing an updating instruction carrying the LSP identification to the forwarding chip.
4. The method according to claim 1, wherein a BFD detection thread, an LSP BFD maintenance thread, an ECMP maintenance thread and an interface driver for realizing data interaction between the processor and the forwarding chip run on the processor;
the BFD detection thread determines a BFD session identifier of a BFD session with the fault and an LSP identifier of an LSP corresponding to the BFD session identifier when receiving a fault notification of the BFD session fault, and sends the BFD session identifier and the LSP identifier to the LSP BFD maintenance thread;
the LSP BFD maintenance thread updates the BFD session state of the LSP maintained by the processor according to the BFD session identifier and the LSP identifier and sends the LSP identifier to the ECMP maintenance thread;
the ECMP maintenance thread updates the ECMP table maintained by the processor according to the received LSP identification and sends the updated ECMP table to the interface driver;
and the interface driver is used for issuing the updated ECMP table to the forwarding chip.
5. The method of claim 1, wherein the network device further comprises a link detection component;
and the link detection component sends a failure notice of the BFD session failure to the processor when the BFD session failure is detected.
6. The method according to any one of claims 1 to 5,
the processor is specifically configured to update the software forwarding table maintained by the processor according to the determined BFD session identifier of the failed BFD and the LSP identifier of the LSP corresponding to the BFD session identifier.
7. A network device, comprising: a processor, a memory and a forwarding chip; the network equipment is provided with an ECMP containing a plurality of LSPs;
the network device includes: a processor and a forwarding chip; a BFD detection thread, an ECMP maintenance thread and an interface driver for realizing data interaction between the processor and the forwarding chip are operated on the processor; communicating with the forwarding chip through an interface driver in the processor;
the memory has stored therein program instructions that are invoked by the processor to perform:
when the BFD detection thread receives a fault notification of detecting a BFD session fault, determining an LSP identifier of an LSP corresponding to the faulty BFD session, and sending the LSP identifier to the ECMP maintenance thread;
the ECMP maintenance thread updates the ECMP table maintained by the processor according to the received LSP identification and sends the updated ECMP table to the interface driver;
and issuing an updated ECMP table carrying the LSP identification to the forwarding chip through the interface drive so as to block the ECMP table entry stored by the forwarding chip corresponding to the LSP identification.
8. The network device of claim 7, wherein the memory has stored therein a software forwarding table, and wherein the processor further performs:
and updating the software forwarding table according to the determined BFD session identifier of the failed BFD and the LSP identifier of the LSP corresponding to the BFD session identifier.
9. The network device of claim 7, further comprising: a link detection section;
and the link detection component is used for sending a failure notice of the BFD session failure to the processor when the BFD session failure is detected.
CN202010065223.1A 2020-01-20 2020-01-20 Link failure processing method and network equipment Active CN111245951B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010065223.1A CN111245951B (en) 2020-01-20 2020-01-20 Link failure processing method and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010065223.1A CN111245951B (en) 2020-01-20 2020-01-20 Link failure processing method and network equipment

Publications (2)

Publication Number Publication Date
CN111245951A CN111245951A (en) 2020-06-05
CN111245951B true CN111245951B (en) 2022-07-12

Family

ID=70876495

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010065223.1A Active CN111245951B (en) 2020-01-20 2020-01-20 Link failure processing method and network equipment

Country Status (1)

Country Link
CN (1) CN111245951B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117278345B (en) * 2023-11-20 2024-02-13 新华三技术有限公司 Energy saving method and device applied to network equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917290A (en) * 2010-08-12 2010-12-15 北京星网锐捷网络技术有限公司 method, device and network equipment for processing label transmitting path fault as well as network equipment
CN102801614A (en) * 2012-07-17 2012-11-28 杭州华三通信技术有限公司 Convergence method for equivalent routing and network device
CN103916275A (en) * 2014-03-31 2014-07-09 杭州华三通信技术有限公司 BFD detection device and method
CN106453074A (en) * 2016-10-21 2017-02-22 杭州华三通信技术有限公司 Switching method and apparatus
US10237206B1 (en) * 2017-03-05 2019-03-19 Barefoot Networks, Inc. Equal cost multiple path group failover for multicast

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101917290A (en) * 2010-08-12 2010-12-15 北京星网锐捷网络技术有限公司 method, device and network equipment for processing label transmitting path fault as well as network equipment
CN102801614A (en) * 2012-07-17 2012-11-28 杭州华三通信技术有限公司 Convergence method for equivalent routing and network device
CN103916275A (en) * 2014-03-31 2014-07-09 杭州华三通信技术有限公司 BFD detection device and method
CN106453074A (en) * 2016-10-21 2017-02-22 杭州华三通信技术有限公司 Switching method and apparatus
US10237206B1 (en) * 2017-03-05 2019-03-19 Barefoot Networks, Inc. Equal cost multiple path group failover for multicast

Also Published As

Publication number Publication date
CN111245951A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
US20030128668A1 (en) Distributed implementation of control protocols in routers and switches
CN107911291B (en) VRRP router switching method, router, VRRP active-standby switch system and storage medium
CN111698158B (en) Method and device for electing master equipment and machine-readable storage medium
CN107005469B (en) Routing method, related equipment and system
EP3713160B1 (en) Packet transmission method and apparatus
EP2599270B1 (en) A network device and method of routing traffic
EP4092974A1 (en) Method and device for segment routing service processing, routing equipment, and storage medium
CN109495345B (en) BFD processing method and network equipment
CN111245951B (en) Link failure processing method and network equipment
CN113315699A (en) Multi-master multi-standby fast rerouting system and method for distinguishing priority
US8902738B2 (en) Dynamically adjusting active members in multichassis link bundle
CN113453262A (en) Bidirectional Forwarding Detection (BFD) method and device
CN110138656B (en) Service processing method and device
CN102571449B (en) The switching method and device of link
CN113992565B (en) Multicast message processing method and device
CN111698142B (en) Message forwarding method and device, electronic equipment and storage medium
CN113285995A (en) SDN-based micro-service request self-adaptive mapping distribution system and method
CN111490935B (en) Information synchronization method, forwarding unit and control unit in distributed architecture
CN111478845B (en) Protection switching method and provider network edge device
CN112600751B (en) Path calculation method, device, equipment and machine-readable storage medium
CN113286321B (en) Backup management method, device, equipment and machine readable storage medium
WO2018210433A1 (en) Methods and apparatus for path computation in a telecommunications network
CN113691446B (en) Method and device for sending message
CN118101558A (en) Heterogeneous route switching method and device
CN113794631A (en) Port redundancy processing method, device, equipment and machine-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant