A method and device for processing bidirectional forwarding detection packets

CN116866286BActive Publication Date: 2026-08-07NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NEW H3C TECH CO LTD
Filing Date
2023-07-21
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

但是,FPGA出现异常后定位比较麻烦,难以分析BFD通信故障

Benefits of technology

[0007]本申请的有益效果在于,通过框式通信设备的网板的软件资源处理维持BFD会话的BFD报文,既释放了接口板的软件资源又避免通过硬件芯片维持BFD会话导致的难以分析BFD会话。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116866286B_ABST
    Figure CN116866286B_ABST
Patent Text Reader

Abstract

The application provides a processing method and device for bidirectional forwarding detection packets. The method comprises the following steps: receiving a bidirectional forwarding detection (BFD) packet with a packet receiving system header, which is redirected by an interface board through an inter-chip channel; searching a local BFD session software table according to a source IP address and a destination IP address of the BFD packet; wherein each BFD session table entry of the local BFD session software table records a local IP address and a peer IP address of each BFD session established between a local end and each peer end; determining a BFD session table entry matched with the BFD packet; determining that the BFD packet does not modify associated BFD session parameters, and refreshing a packet receiving timer of the BFD session table entry matched with the BFD packet.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to communication technology, specifically providing a method and device for processing bidirectional forwarding detection messages. Background Technology

[0002] When a chassis device communicates with a peer device via BFD, the traditional method is for the interface board to redirect the received BFD messages from the peer to its own CPU for processing. However, the interface board's CPU needs to process a large number of protocol messages, and the large number of threads running on the interface board are affected by the process scheduling of the chassis device's operating system, which causes frequent BFD oscillations in the BFD messages redirected from the interface board to the CPU of the local board.

[0003] To avoid BFD oscillation issues when the local CPU of the interface board processes BFD messages, some chassis-based devices redirect BFD messages to an external FPGA (Field-Programmable Gate Array) chip on the interface board. Using the FPGA for BFD transmission and reception achieves higher stability and convergence performance. However, locating FPGA anomalies is difficult, making it challenging to analyze BFD communication faults. Summary of the Invention

[0004] The purpose of this application is to provide a method and device for processing bidirectional forwarding detection messages, which maintains the BFD session of a chassis communication device through the software processing resources of the network board.

[0005] To address the aforementioned objective, this application provides a method for processing bidirectional forwarding detection (BFD) packets, applied to the network board of a chassis-type communication device. The method includes: receiving a bidirectional forwarding detection (BFD) packet with a receive system header, redirected by the interface board via an inter-chip channel; searching a local BFD session software table based on the source IP address and destination IP address of the BFD packet; wherein each BFD session entry in the local BFD session software table records the local IP address and the IP address of each peer used in each established BFD session between the local end and each peer end; determining that a BFD session entry matching the found BFD packet is found; determining that the BFD packet does not modify the associated BFD session parameters; and refreshing the receive timer of the BFD session entry matching the BFD packet.

[0006] To achieve the above objectives, this application also provides a processing device for bidirectional forwarding detection packets. This device is applied to the network board of a chassis-type communication device. The device includes a network panel, an IPC chip, a processor, and a memory. The memory stores processor-executable instructions. The processor executes the processor-executable instructions in the memory to perform the following operations: receiving bidirectional forwarding detection (BFD) packets with a receive system header, redirected by the interface board through an inter-chip channel; searching the local BFD session software table based on the source IP address and destination IP address of the BFD packet; wherein each BFD session entry in the local BFD session software table records the local IP address and the IP address of each peer used in each established BFD session between the local end and each peer end; determining that a BFD session entry matching the found BFD packet is found; determining that the BFD packet does not modify the associated BFD session parameters; and refreshing the receive timer of the BFD session entry matching the BFD packet.

[0007] The beneficial effect of this application is that by using the software resources of the network board of the chassis communication device to process and maintain the BFD session BFD messages, the software resources of the interface board are freed up and the difficulty in analyzing the BFD session caused by maintaining the BFD session through the hardware chip is avoided. Attached Figure Description

[0008] Figure 1 A flowchart illustrating an embodiment of a bidirectional forwarding detection packet processing method provided in this application;

[0009] Figure 2 A schematic diagram illustrating an embodiment of the network board processing BFD session messages provided in this application;

[0010] Figure 3 A schematic diagram illustrating an embodiment of the network board processing BFD session messages provided in this application;

[0011] Figure 4 A schematic diagram illustrating an embodiment of the network board processing BFD session messages provided in this application;

[0012] Figure 5 This is a schematic diagram of an embodiment of a bidirectional forwarding detection message processing device provided in this application. Detailed Implementation

[0013] The following detailed description will be provided with reference to several examples illustrated in the accompanying figures. In this detailed description, numerous specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components, and circuits are not described in detail in the examples to avoid obscuring their meaning.

[0014] In the terminology used, the term "including" means including but not limited to; the term "containing" means including but not limited to; the terms "above," "within," and "below" include the number itself; the terms "greater than" and "less than" mean not including the number itself. The term "based on" means based on at least a portion of them.

[0015] Figure 1 The image shows a method for processing bidirectional forwarding detection packets in a frame-type communication device network board, as provided in this application. The method includes the following steps:

[0016] Step 101: Receive a bidirectional forwarding detection (BFD) message with a packet receiving system header, which is redirected by the interface board through the inter-chip channel;

[0017] Step 102: Look up the local BFD session software table based on the source IP address and destination IP address of the BFD message; wherein, each BFD session table entry in the local BFD session software table records the local IP address and the IP address of each peer used in each BFD session that has been established between the local end and each peer end.

[0018] Step 103: Determine the BFD session table entry that matches the found BFD message;

[0019] Step 104: Determine that the BFD message does not modify the associated BFD session parameters, and refresh the packet reception timer of the BFD session entry matched by the BFD message.

[0020] Figure 2 This is a schematic diagram of an embodiment of the network board processing BFD session messages provided in this application; the switching chip 212 of the interface board 21 receives the BFD message 20A1; and finds the redirection ACL entry of the chip interconnect port with the CPU 211 as the output port according to the BFD type of the BFD message 20A1.

[0021] Switching chip 212 directly redirects BFD message 20A1 to CPU 211 of network board 22 through ACL entry. That is, switching chip 212 sends BFD message 20A1 to network chip 222. Network chip 222 adds a receiving system header to BFD message 20A1. The receiving system header contains the message length of BFD message 20A1 and the receiving port. Network chip 222 sends BFD message 20A2 with receiving system header to CPU 221 of network board 22.

[0022] In this way, through the inter-chip channel, the switching chip 212 redirects the BFD message to the CPU 221 of the network board 22.

[0023] The CPU 221 of the network board 22 receives the BFD message 20A2 with the packet receiving system header; and uses the source IP address and destination IP address of the BFD message 20A2 as the peer IP address and local IP address respectively to look up the local BFD session software table.

[0024] The CPU 221 of the network board 22 determines that the BFD session entry matching BFD message 20A2 is found in the BFD session software table; however, it determines that BFD message 20A2 modifies the associated BFD session parameters; for example, BFD messages that modify the BFD session time or BFD messages that notify of BFD status changes; the CPU 221 refreshes the packet receiving timer of the BFD session entry matching BFD message 20A2; adds an IPC chip header to BFD message 20A2, and sends BFD message 20A3 with the added IPC chip header to IPC chip 202 through the IPC chip channel between IPC chip 223 and IPC chip 202 of the main control board. IPC chip 202 then sends BFD message 20A3 with the added IPC chip header to CPU 201 of the main control board 200.

[0025] Figure 2 In the embodiment shown, if the CPU 221 of the network board 22 receives a BFD message 20A2 with a packet receiving system header redirected by the interface board 21; and if no matching BFD session table entry is found in the local BFD session software table according to the source IP address and destination IP address of the BFD message 20A2, a BFD message with an added IPC chip header is sent through the IPC chip channel.

[0026] Figure 2 In this embodiment, the network board 22 sends special BFD messages that have found BFD session entries and require modification of BFD session parameters / configurations, or BFD messages that have not found BFD session entries and require the establishment of a BFD session, to the CPU 201 of the main control board 20 through the IPC channel.

[0027] When the main control board 20 receives the BFD message 20A3, it obtains the source port information based on the receiving port in the packet receiving system header (the receiving port can be the port of one of the paths in the equal-cost multipath to the peer, a member port of the link aggregation group, or a port connected to the peer); it obtains the message length of the BFD message 20A1, and then creates a BFD session or modifies the parameters / configuration of the BFD session (including deleting the BFD session) based on the content of the BFD message.

[0028] Figure 3This is a schematic diagram of an embodiment of the network board processing BFD session messages provided in this application; after the CPU 201 of the main control board 20 creates a BFD session and modifies the BFD session parameters / configuration (modifies the BFD session time, modifies the BFD session configuration, deletes the BFD session), it notifies the BFD process of the CPU 221 of the network board 22 through IPC communication, and sends the BFD information that the BFD process needs to save and the BFD messages that need to be sent to the CPU of the network board 22.

[0029] Figure 3 In the process, the CPU 201 of the main control board 20 receives the BFD message 30A1 with the IPC chip header and the packet sending system header through the IPC channel; wherein, the packet sending system header carries the output port and BFD session information of the BFD message.

[0030] CPU221 of network board 22 removes the IPC chip header of BFD message 30A1, and uses the source IP address and destination IP address of BFD message 30A2 with packet sending system header as the local IP address and the peer destination IP address, respectively, to look up the local BFD session software table.

[0031] If the CPU 221 of the network board 22 does not find a BFD session entry matching BFD packet 30A2, it generates a BFD session entry matching the source IP address and destination IP address of BFD packet 30A1, records the remote identifier and local identifier of the BFD session information of BFD packet 30A1, and sets the packet sending timer and packet receiving timer for the generated BFD session entry according to the BFD session information of BFD packet 30A1.

[0032] If the CPU 221 of the network board 22 finds a BFD session entry that matches the BFD message 30A1, then there is no need to generate a BFD session entry.

[0033] The CPU 221 of the network board 22 removes the IPC chip header from the BFD message 30A1 and sends the BFD message 30A2 with the packet sending system header to the network chip 222. When the packet sending timer of the BFD session table entry arrives, the network chip 222 sends the BFD message 30A2 with the packet sending system header to the switching chip 212 of the interface board 21 through the inter-chip channel.

[0034] When the switching chip 212 of the interface board 21 receives the BFD message 30A2, it obtains the output port through the packet sending system header of the BFD message 30A2 and sends the BFD message 30A3 with the packet sending system header stripped off.

[0035] Figure 4 This is a schematic diagram of an embodiment of the network board processing BFD session messages provided in this application.

[0036] Figure 4In the process, the switching chip 212 of interface board 21 receives BFD message 40A1; it sends BFD message 40A1 to network chip 222; network chip 222 adds a receive system header to BFD message 40A1, and the receive system header contains the message length and receiving port of BFD message 40A1; network chip 222 sends BFD message 40A2 with the receive system header to CPU 221 of network board 22, thereby completing the redirection of BFD message 40A1 to CPU 211 of network board 22. CPU 221 of network board 22 receives BFD message 40A2 with the receive system header redirected by interface board 21; it uses the source IP address and destination IP address of BFD message 40A2 as the peer IP address and local IP address respectively, and looks up the local BFD session software table.

[0037] The CPU 21 of the network board 22 finds a BFD session table entry that matches BFD message 40A2 in the BFD session software table; it determines that BFD message 40A2 is not a special BFD message that requires modification of the associated BFD session parameters / configuration, refreshes the packet receiving timer of the BFD session table entry that matches BFD message 40A2, and maintains the BFD session.

[0038] exist Figure 2 , Figure 3 , Figure 4 In the illustrated embodiment, the network board 22 maintains the IP address information, remote identifier, and local identifier of the BFD session table entry of any BFD session table entry in the local BFD session software table when the packet receiving timer of that BFD session expires. The network board 22 sends an IPC message to the main control board 20 through the IPC channel, and the packet receiving timer of that IPC message expires. The network board 22 then notifies the main control board 20 of the timed-out BFD session.

[0039] After both parties in a BFD communication establish a BFD session, in order to maintain the BFD session, they not only need to send BFD messages periodically according to the packet sending timer, but also need to refresh the packet receiving timer based on the received BFD messages from the other end, thus consuming a large amount of software resources.

[0040] This application uses BFD messages that maintain BFD sessions through network panel processing, which frees up the interface board's software resources and avoids the difficulty in analyzing BFD sessions caused by maintaining BFD sessions through hardware chips.

[0041] Figure 5This is a schematic diagram of an embodiment of a bidirectional forwarding detection (BFD) packet processing device provided in this application. The device is applied to the network board of a chassis communication device and includes a network chip, an IPC chip, a processor, and a memory. The memory stores processor-executable instructions. The processor executes the processor-executable instructions in the memory to perform the following operations: receiving a first bidirectional forwarding detection (BFD) packet with a packet receiving system header, which is redirected by the interface board through the inter-chip channel; searching the local BFD session software table based on the source IP address and destination IP address of the first BFD packet; wherein each BFD session entry in the local BFD session software table records the local IP address and the peer IP address used by each BFD session established between the local end and each peer end; determining that a BFD session entry matching the first BFD packet has been found; determining that the first BFD packet does not modify the associated BFD session parameters, and refreshing the packet receiving timer of the BFD session entry matching the first BFD packet.

[0042] The processor also performs the following operations by running processor-executable instructions in memory: receiving a second bidirectional forwarding detection (BFD) packet with a receiving system header redirected by the interface board; searching the local BFD session software table based on the source IP address and destination IP address of the second BFD packet; determining the BFD session table entry that matches the found second BFD packet; determining the BFD session parameters that the second BFD packet modifies; refreshing the receiving timer of the BFD session table entry that matches the second BFD packet; and sending the second BFD packet with the added IPC chip header to the main control board through the IPC chip channel.

[0043] The processor also performs the following operations by running processor-executable instructions in memory: receiving a third bidirectional forwarding detection (BFD) message with a packet receiving system header redirected by the interface board; searching the local BFD session software table based on the source IP address and destination IP address of the third BFD message; determining if no matching BFD session table entry is found for the third BFD message; and sending the third BFD message with an added IPC chip header to the main control board via the IPC chip channel.

[0044] The processor, by executing processor-executable instructions in memory, also performs the following operations: receiving a fourth BFD message with an IPC chip header and a packet sending system header via the IPC channel; the packet sending system header carries the output port and BFD session information of the fourth BFD message; stripping the IPC chip header from the fourth BFD message; searching the local BFD session software table based on the source IP address and destination IP address of the fourth BFD message; if no matching BFD session table entry is found, generating a matching BFD session table entry with the source IP address and destination IP address of the fourth BFD message, recording the remote identifier and local identifier of the BFD session information of the fourth BFD message, and setting the packet sending timer and packet receiving timer of the generated BFD session table entry based on the BFD session information of the fourth BFD message; when the set packet sending timer expires, stripping the IPC chip header from the fourth BFD message and sending it to the interface board via the inter-chip channel; so that the interface board sends the fourth BFD message with the packet sending system header stripped through the output port of the packet sending system header of the fourth BFD message.

[0045] The processor also performs the following operations by running processor-executable instructions in memory: when the packet receiving timer of any BFD session table entry in the local BFD session software table times out, it sends an IPC message to the main control board through the IPC channel; wherein, the IPC message carries the IP address information, remote identifier, and local identifier of the BFD session table entry whose packet receiving timer has expired.

[0046] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for processing bidirectional forwarding detection packets, characterized in that, The method is applied to the network board of a chassis-type communication device and includes the following steps: Receive the first bidirectional forwarding detection (BFD) message with a receive system header, which is redirected by the interface board through the inter-chip channel; The local BFD session software table is searched based on the source IP address and destination IP address of the first BFD message; wherein, each BFD session table entry of the local BFD session software table records the local IP address and the peer IP address used by each BFD session established between the local end and each peer end. Determine that a BFD session table entry matching the first BFD message has been found; If the first BFD message does not modify the associated BFD session parameters, refresh the packet reception timer of the BFD session entry matched by the first BFD message. Receive a second bidirectional forwarding detection (BFD) message with a receive system header, redirected by the interface board; Look up the local BFD session software table based on the source IP address and destination IP address of the second BFD message; Determine if a BFD session entry matching the second BFD message has been found; The system determines that the BFD message modifies the associated BFD session parameters, refreshes the packet receiving timer of the BFD session entry matched by the second BFD message, and sends the second BFD message with the added IPC chip header to the main control board through the IPC chip channel.

2. The method according to claim 1, characterized in that, The method further includes: Receive a third bidirectional forwarding detection (BFD) message with a receive system header, redirected by the interface board; The local BFD session software table is searched based on the source IP address and destination IP address of the third BFD message; It was determined that no BFD session entry matching the third BFD message was found; The third BFD message with the added IPC chip header is sent to the main control board via the IPC chip channel.

3. The method according to claim 1, characterized in that, The method further includes: The fourth BFD message, which includes an IPC chip header and a packet sending system header, is received via the IPC channel. The packet sending system header carries the output port and BFD session information of the fourth BFD message. Remove the IPC chip header from the fourth BFD message; The local BFD session software table is searched based on the source IP address and destination IP address of the fourth BFD message; If no matching BFD session entry is found for the fourth BFD message, a BFD session entry matching the source IP address and destination IP address of the fourth BFD message is generated. The remote identifier and local identifier of the BFD session information of the fourth BFD message are recorded, and the packet sending timer and packet receiving timer of the generated BFD session entry are set according to the BFD session information of the fourth BFD message. When the set packet sending timer arrives, the IPC chip header of the fourth BFD message is stripped off and sent to the interface board through the inter-chip channel; so that the interface board sends the fourth BFD message stripped of the packet sending system header through the output port of the fourth BFD message packet sending system header stripped off.

4. The method according to claim 1, characterized in that, The method further includes: When the packet receiving timer of any BFD session table entry in the local BFD session software table times out, an IPC message is sent to the main control board through the IPC channel; wherein, the IPC message carries the IP address information, remote identifier, and local identifier of the BFD session table entry whose packet receiving timer has expired.

5. A processing device for bidirectional forwarding detection messages, characterized in that, The device is used in the network board of a chassis-type communication device. The device includes a mesh panel, an IPC chip, a processor, and a memory. The memory stores processor-executable instructions. The processor executes the processor-executable instructions stored in the memory to perform the following operations: Receive the first bidirectional forwarding detection (BFD) message with a receive system header, which is redirected by the interface board through the inter-chip channel; The local BFD session software table is searched based on the source IP address and destination IP address of the first BFD message; wherein, each BFD session table entry of the local BFD session software table records the local IP address and the peer IP address used by each BFD session established between the local end and each peer end. Determine that a BFD session table entry matching the first BFD message has been found; If the first BFD message does not modify the associated BFD session parameters, refresh the packet reception timer of the BFD session entry matched by the first BFD message. The processor also performs the following operations by executing processor-executable instructions in the memory: Receive a second bidirectional forwarding detection (BFD) message with a receive system header, redirected by the interface board; Look up the local BFD session software table based on the source IP address and destination IP address of the second BFD message; Determine if a BFD session entry matching the second BFD message has been found; The system determines that the BFD message modifies the associated BFD session parameters, refreshes the packet receiving timer of the BFD session entry matched by the second BFD message, and sends the second BFD message with the added IPC chip header to the main control board through the IPC chip channel.

6. The device according to claim 5, characterized in that, The processor also performs the following operations by executing processor-executable instructions in the memory: Receive a third bidirectional forwarding detection (BFD) message with a receive system header, redirected by the interface board; The local BFD session software table is searched based on the source IP address and destination IP address of the third BFD message; It was determined that no BFD session entry matching the third BFD message was found; The third BFD message with the added IPC chip header is sent to the main control board via the IPC chip channel.

7. The device according to claim 5, characterized in that, The processor also performs the following operations by executing processor-executable instructions in the memory: The fourth BFD message, which includes an IPC chip header and a packet sending system header, is received via the IPC channel. The packet sending system header carries the output port and BFD session information of the fourth BFD message. Remove the IPC chip header from the fourth BFD message; The local BFD session software table is searched based on the source IP address and destination IP address of the fourth BFD message; If no matching BFD session entry is found for the fourth BFD message, a BFD session entry matching the source IP address and destination IP address of the fourth BFD message is generated. The remote identifier and local identifier of the BFD session information of the fourth BFD message are recorded, and the packet sending timer and packet receiving timer of the generated BFD session entry are set according to the BFD session information of the fourth BFD message. When the set packet sending timer arrives, the IPC chip header of the fourth BFD message is stripped off and sent to the interface board through the inter-chip channel; so that the interface board sends the fourth BFD message stripped of the packet sending system header through the output port of the fourth BFD message packet sending system header stripped off.

8. The device according to claim 5, characterized in that, The processor also performs the following operations by executing processor-executable instructions in the memory: When the packet receiving timer of any BFD session table entry in the local BFD session software table times out, an IPC message is sent to the main control board through the IPC channel; wherein, the IPC message carries the IP address information, remote identifier, and local identifier of the BFD session table entry whose packet receiving timer has expired.

Citation Information

Patent Citations

  • Method and apparatus for implementing bidirectional transmit-receive detection

    CN101378338A

  • Message processing method and device

    WO2021164236A1