A hardware SBFD PING method and network device
The hardware-implemented SBFD PING method utilizes an NP chip to process packets, solving the problem of difficult link fault diagnosis caused by hardware SBFD session oscillations. It achieves fast and accurate link diagnosis and improves the operational stability of the equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2026-03-13
AI Technical Summary
In existing technologies, hardware SBFD session oscillations make it difficult to troubleshoot link faults and affect the stability of equipment operation.
The hardware-implemented SBFD PING method utilizes a network processor (NP) chip for packet processing to achieve the PING function of hardware SBFD, including packet mirroring and pass-through mechanisms, simplifying the link diagnosis process.
It improves the speed and accuracy of link fault detection, reduces session oscillation, and enhances the operational stability and troubleshooting efficiency of the equipment.
Smart Images

Figure CN116545897B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of communication technology, and more particularly to a hardware SBFD PING method and network device. Background Technology
[0002] NP: Network Processor.
[0003] BFD: Bidirectional Forwarding Detection.
[0004] SBFD: Seamless BFD simplifies the state machine of BFD, shortens the session negotiation time, and has a faster detection speed than BFD.
[0005] Hardware BFD / SBFD: NP is used to maintain the BFD / SBFD session's timed packet sending, receiving, keep-alive, and timeout detection functions, avoiding excessive CPU pressure on the software.
[0006] BFD (Browser Detection and Resolution) is a universal, standardized, media-independent, and protocol-independent fast fault detection mechanism used to detect the connectivity of forwarding paths. Typical routing protocols, such as OSPF / IS-IS / BGP, use Hello messages to detect faults, which takes seconds. BFD, however, can provide millisecond-level detection, quickly identifying communication failures and switching to backup links to ensure continuous service operation.
[0007] SBFD is an improvement on BFD, which simplifies the state machine of BFD, shortens the session negotiation time, and has a faster detection speed than BFD.
[0008] With the development of high-performance routers in large single-unit and multi-cluster configurations, the number of boards and links supported by the entire system is increasing, placing higher demands on maintainability and link diagnostic methods. During normal operation, momentary or intermittent link failures may occur, leading to probabilistic oscillations in associated hardware SBFD sessions. Since SBFD session oscillations involve session deletion, reconstruction, and negotiation, the packet transmission rate fluctuates, hindering fault location. Summary of the Invention
[0009] This disclosure provides a PING method and network device for a hardware SBFD, through which the PING function of the hardware SBFD can be implemented.
[0010] This disclosure provides a PING method for a hardware SBFD, the method comprising:
[0011] The first line card receives SBFD PING message information from the main control board, and the SBFD PING message information includes: maintenance board identifier;
[0012] Determine whether there is a target identifier that matches the maintenance board identifier;
[0013] If it exists, send the first SBFD message and mirror the first SBFD message to the CPU, and receive the second SBFD message and mirror the second SBFD message to the CPU, so that the CPU can perform PING calculation based on the first SBFD message and the second SBFD message;
[0014] If it does not exist, the second SBFD message is received and the second SBFD message is transparently transmitted to the second line card with the maintenance board identifier, so that the second line card reports the second SBFD message to the CPU.
[0015] The first line card receives SBFD PING message information from the main control board, including:
[0016] The main control board receives SBFD PING message information carrying the maintenance board identifier from the control side. The SBFD PING message information also carries a session descriptor.
[0017] The main control board requests index resources based on the session descriptor and multicasts SBFD PING messages.
[0018] The first line card receives the SBFD PING message information sent by the main control board.
[0019] The step of determining whether it has a target identifier that matches the maintenance board identifier includes:
[0020] When it determines that it has a target identifier that matches the maintenance board identifier, it sets the CPU identifier and sends it to each NP chip, so that the NP chip can send it to the CPU after receiving the second SBFD message.
[0021] Set the mirroring identifier and send it to the maintenance chip, so that when the first SBFD message is sent, the maintenance chip will mirror the first SBFD message and report it to the CPU.
[0022] The method further includes, after determining whether it possesses a target identifier that matches the maintenance board identifier:
[0023] Once it determines that it has a target identifier that matches the maintenance board identifier, it generates a forwarding table entry and sends the forwarding table entry to other line cards so that the NP chip on the other line cards receives the second SBFD message and then forwards the second SBFD message to the NP chip on the first line card.
[0024] The step of enabling the CPU to perform PING calculations based on the first SBFD message and the second SBFD message includes:
[0025] This enables the CPU to perform PING calculations based on the timestamps of the first and second SBFD messages.
[0026] This method enables PING functionality based on hardware SBFD.
[0027] This disclosure also provides a network device, which includes:
[0028] The receiving module is used for the first line card in the network device to receive SBFD PING message information from the main control board. The SBFD PING message information includes: maintenance board identifier;
[0029] The judgment module is used to determine whether it has a target identifier that matches the maintenance board identifier;
[0030] The processing module is used to send a first SBFD message if it exists, and to mirror the first SBFD message and report it to the CPU, and to receive a second SBFD message and report the second SBFD message to the CPU, so that the CPU can perform PING calculation based on the first SBFD message and the second SBFD message;
[0031] If it does not exist, the second SBFD message is received and the second SBFD message is transparently transmitted to the second line card with the maintenance board identifier, so that the second line card reports the second SBFD message to the CPU.
[0032] The first line card receives SBFD PING message information from the main control board, including:
[0033] The main control board receives SBFD PING message information carrying the maintenance board identifier from the control side. The SBFD PING message information also carries a session descriptor.
[0034] The main control board requests index resources based on the session descriptor and multicasts SBFD PING messages.
[0035] The first line card receives the SBFD PING message information sent by the main control board.
[0036] The judgment module specifically includes: when it determines that there is a target identifier that matches the maintenance board identifier, setting the CPU identifier and sending it to each NP chip, so that the NP chip can send it to the CPU after receiving the second SBFD message;
[0037] Set the mirroring identifier and send it to the maintenance chip, so that when the first SBFD message is sent, the maintenance chip will mirror the first SBFD message and report it to the CPU.
[0038] This disclosure also provides a network device, which includes: a memory, a processor, and a program stored in the memory and executable on the processor. When the program is executed by the processor, it implements the method steps in any of the above embodiments.
[0039] This disclosure also provides a computer-readable storage medium storing a program that, when executed by a processor, implements the method steps of any of the above embodiments. Attached Figure Description
[0040] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of this specification.
[0041] Figure 1 This is a schematic flowchart of a hardware SBFD PING method provided in an embodiment of the present disclosure. Detailed Implementation
[0042] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.
[0043] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0044] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0045] Currently, most SBFD implementations are software-based. This disclosure provides a PING method for hardware SBFD, such as... Figure 1 As shown, the method includes:
[0046] The S101 first line card receives SBFD PING message information from the main control board. The SBFD PING message information includes: maintenance board identifier;
[0047] S102 determines whether it has a target identifier that matches the maintenance board identifier;
[0048] If S103 exists, a first SBFD message is sent and the first SBFD message is mirrored and reported to the CPU, and a second SBFD message is received and reported to the CPU, so that the CPU can perform PING calculation based on the first SBFD message and the second SBFD message;
[0049] If it does not exist, the second SBFD message is received and the second SBFD message is transparently transmitted to the second line card with the maintenance board identifier, so that the second line card reports the second SBFD message to the CPU.
[0050] In this embodiment, the main control board sends the information required for the SBFD PING message through the control side (control console / network management software, etc.). The SBFD PING message may carry information such as local-discr, remote-discr, source-ip, destination-ip, transmit-interval, matn-slot, and count.
[0051] Among them, local-discr and remote-discr represent the local session descriptor and remote session descriptor of the SBFD message.
[0052] The source-ip and destination-ip specify the source IPv4 / IPv6 address of the SBFD message.
[0053] trasmit-interval specifies the packet transmission rate for SBFD messages.
[0054] matn-slot indicates the selected maintenance board used to maintain the sending and receiving of SBFD messages. The default selection is NP0 of the maintenance board as the maintenance chip.
[0055] The count option is optional and specifies the number of SBFD messages to send. The default value is 5.
[0056] After receiving the SBFD PING message, the main control board requests index resources, for example, by requesting index resources based on the session descriptor in the SBFD PING message, and establishes inter-board communication messages to notify each line card via multicast.
[0057] In step S101, when the first line card receives the SBFD PING message, it obtains the maintenance board identifier (matn-slot) from the SBFD PING message and determines whether it matches its own slot-number. If they match, it can be determined that it is a maintenance board; otherwise, it is determined that it is a non-maintenance board.
[0058] When the first line card determines that it is a maintenance board, the following operations can be performed:
[0059] 1. Organize the table entry information required for packet reception, set the CPU flag, and send it to all NP chips on this board.
[0060] 2. Organize the table entry information required for packet sending, set the CPU flag for stream mirroring, and only send it to the maintenance chip.
[0061] 3. Calculate the packet transmission duration based on count and transmit-interval, and start a software timer.
[0062] 4. When the software timer times out, calculate and organize key information (max / min / avg of round-trip time) and send a message to notify the main control board.
[0063] In this embodiment, the flag for sending to the CPU is set, and all NP chips on the board are mainly used to maintain the second SBFD message sent to the CPU after the NP on the board receives the second SBFD message transparently from other boards (including the second SBFD message directly received by itself).
[0064] In this embodiment, the setting stream mirroring is sent to the CPU flag only and is sent to the maintenance chip. It is mainly used to instruct the maintenance board to send the first SBFD message and send the mirrored message of the first SBFD to the CPU when sending the first SBFD message.
[0065] The CPU can then calculate the PING based on the timestamps of the first SBFD message and the second SBFD message.
[0066] In this embodiment, when the first line card determines that it is a non-maintenance board, the following operation can be performed:
[0067] The system organizes the necessary packet reception information and distributes it to all chips on the board. It can be seen that packet sending information is not configured for non-maintenance boards. In this embodiment, only the maintenance board is instructed to send the first SBFD message to obtain accurate PING results.
[0068] Specifically, the following operations are performed on the maintenance chip in the maintenance board:
[0069] Outsourcing
[0070] a. Once the necessary entries for packet sending are ready, the NP timer will periodically trigger to look up the table and send the SBFD message.
[0071] b. When the stream mirroring flag is set, a copy of the sent message is sent to the CPU.
[0072] c. The CPU parses the message and records key information (including timestamp, message content, etc.).
[0073] Package
[0074] a. Once the necessary entries for packet reception are ready, and the SBFD message is received, the packet reception entries are checked.
[0075] b. After hitting an entry in the SBFD receive table, if the maintenance chip flag is set (indicating that this NP chip is a maintenance chip), determine that the send flag is set and send it to the CPU.
[0076] c. The CPU parses the message, records key information (including timestamp, message information, etc.), calculates the round-trip time, and outputs log information.
[0077] For maintenance chips on non-maintenance boards, perform the following operations:
[0078] a. Since the SBFD messages returned from the other end may come back via any interface when checking the FIB, each line card needs to send the necessary entries for receiving packets.
[0079] b. Upon receiving the SBFD message, the packet reception table is queried. If the chip is found to be not a maintenance chip, the message is forwarded to the maintenance chip for processing based on the maintenance chip ID in the packet reception table.
[0080] After receiving the message from the first-line card, the main control board performs the following operations:
[0081] a. Parse the message and output log information.
[0082] b. Organize inter-board communication messages, multicast notifications to all line cards, and delete table entries related to packet sending and receiving.
[0083] c. Release index resources
[0084] As can be seen from the above embodiments, by specifying a maintenance board from the line card board to send SBFD messages and simultaneously upload them to the CPU, and by having the maintenance board upload the SBFD messages sent by the other end to the CPU, hardware SBFD PING processing is realized.
[0085] Based on the above method embodiments, this disclosure also provides a network device, the network device comprising:
[0086] The receiving module is used for the first line card in the network device to receive SBFD PING message information from the main control board. The SBFD PING message information includes: maintenance board identifier;
[0087] The judgment module is used to determine whether it has a target identifier that matches the maintenance board identifier;
[0088] The processing module is used to send a first SBFD message if it exists, and to mirror the first SBFD message and report it to the CPU, and to receive a second SBFD message and report the second SBFD message to the CPU, so that the CPU can perform PING calculation based on the first SBFD message and the second SBFD message;
[0089] If it does not exist, the second SBFD message is received and the second SBFD message is transparently transmitted to the second line card with the maintenance board identifier, so that the second line card reports the second SBFD message to the CPU.
[0090] The first line card receives SBFD PING message information from the main control board, including:
[0091] The main control board receives SBFD PING message information carrying the maintenance board identifier from the control side. The SBFD PING message information also carries a session descriptor.
[0092] The main control board requests index resources based on the session descriptor and multicasts SBFD PING messages.
[0093] The first line card receives the SBFD PING message information sent by the main control board.
[0094] The judgment module specifically includes: when it determines that there is a target identifier that matches the maintenance board identifier, it sets the CPU identifier and sends it to each NP chip, so that the NP chip can send it to the CPU after receiving the second SBFD message;
[0095] Set the mirroring identifier and send it to the maintenance chip, so that when the first SBFD message is sent, the maintenance chip will mirror the first SBFD message and report it to the CPU.
[0096] This disclosure also provides a network device, which includes: a memory, a processor, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps in any of the above embodiments.
[0097] This disclosure also provides a computer-readable storage medium storing a program that, when executed by a processor, implements the steps in any of the above embodiments.
[0098] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0099] Other embodiments of this specification will readily occur to those skilled in the art upon consideration of the specification and practice of the invention claimed herein. This specification is intended to cover any variations, uses, or adaptations that follow the general principles of this specification and include common knowledge or customary techniques in the art not claimed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this specification are indicated by the following claims.
[0100] It should be understood that this specification is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this specification is limited only by the appended claims.
[0101] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.
Claims
1. A method for PING of a hardware SBFD, characterized in that, The method comprises: The first line card board receives SBFD PING message information from the master board, and the SBFD PING message information comprises: maintenance board identification; It is judged whether the target identification matching the maintenance board identification exists or not; If the target identification exists, a first SBFD message is sent, the first SBFD message is mirrored and reported to the CPU, a second SBFD message is received, and the second SBFD message is reported to the CPU, so that the CPU performs PING calculation according to the first SBFD message and the second SBFD message; If the target identification does not exist, the second SBFD message is received, and the second SBFD message is transparently transmitted to the second line card board with the maintenance board identification, so that the second line card board reports the second SBFD message to the CPU.
2. The method of claim 1, wherein, The first line card board receives SBFD PING message information from the master board, and the SBFD PING message information comprises: The master board receives SBFD PING message information carrying maintenance board identification from the control side, and the SBFD PING message information also carries a session descriptor; The master board applies index resources according to the session descriptor, and multicasts and sends the SBFD PING message information; The first line card board receives the SBFD PING message information sent by the master board.
3. The method of claim 1, wherein, The judgment whether the target identification matching the maintenance board identification exists or not comprises: When it is judged that the target identification matching the maintenance board identification exists, a CPU reporting identification is set, and each NP chip is issued, so that the NP chip reports the CPU after receiving the second SBFD message; A mirroring identification is set, and a maintenance chip is issued, so that the maintenance chip mirrors and reports the first SBFD message to the CPU when the first SBFD message is sent.
4. The method of claim 1, wherein, After the judgment whether the target identification matching the maintenance board identification exists or not, the method further comprises: When it is judged that the target identification matching the maintenance board identification exists, a forwarding table item is generated, and the forwarding table item is sent to other line card boards, so that the NP chip on the other line card boards transparently transmits the second SBFD message to the NP chip on the first line card board after receiving the second SBFD message.
5. The method of claim 1, wherein, The CPU performs PING calculation according to the first SBFD message and the second SBFD message, which comprises: The CPU performs PING calculation according to the time stamp of the first SBFD message and the second SBFD message.
6. A network device, comprising: The network device comprises: A receiving module is arranged, and is used for the first line card board in the network device to receive SBFD PING message information from the master board, and the SBFD PING message information comprises: maintenance board identification; A judging module is arranged, and is used for judging whether the target identification matching the maintenance board identification exists or not; A processing module is arranged, and is used for, if the target identification exists, sending a first SBFD message, mirroring and reporting the first SBFD message to the CPU, receiving a second SBFD message, and reporting the second SBFD message to the CPU, so that the CPU performs PING calculation according to the first SBFD message and the second SBFD message. If not, a second SBFD packet is received and is transparently transmitted to a second line card board with a maintenance board identifier, so that the second line card board reports the second SBFD packet to the CPU.
7. The network device of claim 6, wherein, The first line card board receives SBFD PING packet information from the master board, including: The master board receives SBFD PING packet information carrying a maintenance board identifier from the control side, and the SBFD PING packet information also carries a session descriptor; The master board applies for an index resource according to the session descriptor and multicasts and sends the SBFD PING packet information; The first line card board receives the SBFD PING packet information sent by the master board.
8. The network device of claim 6, wherein, The judgment module specifically includes: when judging that the target identifier matching the maintenance board identifier exists, setting the upload CPU identifier and issuing each NP chip for uploading the CPU by the NP chip after receiving the second SBFD packet; The mirror identifier is set and the maintenance chip is issued for uploading the CPU by the maintenance chip after mirroring and uploading the first SBFD packet to the CPU.
9. A network device, comprising: The network device includes a memory, a processor and a program stored on the memory and executable on the processor, and the program is executed by the processor to implement the method steps of any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium has a program stored thereon, and the program is executed by the processor to implement the method steps of any one of claims 1 to 5.
Citation Information
Patent Citations
Maintenance board switching method and device and first network equipment
CN109547274A
Establishment method, equipment and system of SBFD session
CN112448877A