CN113472648B - Bidirectional Forwarding Detection (BFD) method and device and network equipment - Google Patents

Bidirectional Forwarding Detection (BFD) method and device and network equipment Download PDF

Info

Publication number
CN113472648B
CN113472648B CN202110676341.0A CN202110676341A CN113472648B CN 113472648 B CN113472648 B CN 113472648B CN 202110676341 A CN202110676341 A CN 202110676341A CN 113472648 B CN113472648 B CN 113472648B
Authority
CN
China
Prior art keywords
port
bfd
aggregation table
interface board
ports
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
CN202110676341.0A
Other languages
Chinese (zh)
Other versions
CN113472648A (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 CN202110676341.0A priority Critical patent/CN113472648B/en
Publication of CN113472648A publication Critical patent/CN113472648A/en
Application granted granted Critical
Publication of CN113472648B publication Critical patent/CN113472648B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity

Abstract

The specification provides a bidirectional forwarding detection method and device, and network equipment, wherein the method comprises the following steps: in the sending period of the BFD messages, according to the serial numbers of the interface boards, one port is selected for forwarding the BFD messages in the port aggregation table in sequence for each interface board, so that each interface board can be ensured to send the BFD messages in the sending period of one BFD message, and even if one interface board fails, the BFD messages sent by other interface boards can reach the opposite terminal equipment in one sending period of the BFD, so that the opposite terminal equipment can not misreport the down event of the BFD session.

Description

Bidirectional Forwarding Detection (BFD) method and device and network equipment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a bidirectional forwarding detection method and apparatus, and a network device.
Background
BFD (Bidirectional Forwarding Detection ) is a universal, standardized, media-independent and protocol-independent fast failure detection mechanism for detecting the connectivity status of links in an IP network, ensuring that communication failures can be detected quickly between devices so as to take timely measures and ensure continuous operation of services. The failure detection mechanism of the upper layer protocol is in the second level, so that the detection performance requirement can not be met far, and BFD can provide millisecond-level performance detection.
LAG (Link Aggregation Group ), also known as Trunk Group, is a technical means to "bundle" multiple physical ports into one logical port, conforming to the IEEE 802.3ad Link Aggregation protocol specification. The Ethernet link aggregation achieves the purpose of increasing the bandwidth of the link by binding a plurality of Ethernet physical links together to form an Ethernet logical link, and simultaneously the links bound together can effectively improve the reliability of the link through mutual dynamic backup.
In the case of cross board aggregation for link aggregation, if the member port on one board is abnormal, but the member ports of other boards are normal, the problem of reporting the down event of the aggregated link by BFD detection errors may occur.
Disclosure of Invention
In order to overcome the problems in the related art, the present specification provides a bidirectional forwarding detection method and apparatus, and a network device.
According to a first aspect of embodiments of the present disclosure, there is provided a bidirectional forwarding detection method applied to a network device, the network device including a plurality of interface boards, ports of one or more of the plurality of interface boards being configured to join a port aggregation group, the method including:
acquiring a port aggregation table, wherein the port aggregation table comprises member port numbers in a port aggregation group;
and in the sending period of the BFD message, selecting one port for each interface board in the port aggregation table according to the serial number sequence of the interface boards, and sending the BFD message to opposite terminal equipment, wherein the opposite terminal equipment sends the BFD message for the opposite terminal equipment which establishes an aggregation link with the network equipment.
Optionally, the method further comprises: and in the sending period of the BFD messages, selecting one port for each interface board when the sending interval of each BFD message arrives in the port aggregation table according to the serial number sequence of the interface boards and the serial number sequence of the ports, and sending the BFD messages to opposite terminal equipment.
Optionally, in a transmission period of the BFD packet, according to a serial number order of the interface boards, in the port aggregation table, one port is selected for each interface board in turn, and the BFD packet is transmitted to the peer device, including:
grouping member port numbers in the port aggregation table according to the interface board;
searching a member port in each group in sequence according to the serial number sequence of the interface board to record, returning to the first searched group to search, searching the member port to record according to the principle that the member port selected last time is not repeated until the member ports in the port aggregation table are recorded at least once, so as to generate a new port aggregation table;
and transmitting the BFD messages from the member ports according to the sequence of the member ports recorded by the new port aggregation table every time the transmission interval of the BFD messages is reached.
Optionally, if the network device further includes a plurality of daughter cards, generating the new port aggregation table includes:
grouping member port numbers in the port aggregation table according to the sub card;
searching a member port in each group according to the serial number sequence of the port in each sub-card for recording, returning to the first searched group for searching, searching the member port for recording according to the principle that the member port selected last time is not repeated until the member ports in the port aggregation table are recorded at least once, so as to generate a new port aggregation table.
According to a second aspect of embodiments of the present specification, there is provided a bidirectional forwarding detection apparatus applied to a network device, the network device including a plurality of interface boards, ports of one or more of the plurality of interface boards being configured to join a port aggregation group, the apparatus comprising:
the device comprises an acquisition module, a port aggregation module and a port aggregation module, wherein the acquisition module is used for acquiring a port aggregation table, and the port aggregation table comprises member port numbers in a port aggregation group;
and the selecting module is used for selecting one port for each interface board in the port aggregation table in sequence according to the serial number sequence of the interface boards in the sending period of the BFD message and sending the BFD message to opposite terminal equipment, wherein the opposite terminal equipment sends the BFD message for the opposite terminal equipment which establishes an aggregation link with the network equipment.
Optionally, the selecting module is further configured to: and in the sending period of the BFD messages, selecting one port for each interface board when the sending interval of each BFD message arrives in the port aggregation table according to the serial number sequence of the interface boards and the serial number sequence of the ports, and sending the BFD messages to opposite terminal equipment.
Optionally, the selecting module is specifically configured to:
grouping member port numbers in the port aggregation table according to the interface board;
searching a member port in each group in sequence according to the serial number sequence of the interface board to record, returning to the first searched group to search, searching the member port to record according to the principle that the member port selected last time is not repeated until the member ports in the port aggregation table are recorded at least once, so as to generate a new port aggregation table; and transmitting the BFD messages from the member ports according to the sequence of the member ports recorded by the new port aggregation table every time the transmission interval of the BFD messages is reached.
Optionally, if the network device further includes a plurality of daughter cards, the selecting module is specifically configured to, when generating the new port aggregation table:
grouping member port numbers in the port aggregation table according to the sub card;
searching a member port in each group according to the serial number sequence of the port in each sub-card for recording, returning to the first searched group for searching, searching the member port for recording according to the principle that the member port selected last time is not repeated until the member ports in the port aggregation table are recorded at least once, so as to generate a new port aggregation table.
According to a third aspect of embodiments of the present specification, there is provided a network device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method provided in any one of the above first aspects when executing the program.
The technical scheme provided by the embodiment of the specification can comprise the following beneficial effects: in the sending period of the BFD messages, according to the serial numbers of the interface boards, one port is selected for forwarding the BFD messages in the port aggregation table in sequence for each interface board, so that each interface board can be ensured to send the BFD messages in the sending period of one BFD message, and even if one interface board fails, the BFD messages sent by other interface boards can reach the opposite terminal equipment in one sending period of the BFD, so that the opposite terminal equipment can not misreport the down event of the BFD session.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and together with the description, serve to explain the principles of the specification.
FIG. 1 is a schematic diagram of link aggregation provided by an implementation of the present description;
fig. 2 is a schematic structural diagram of a network device according to an embodiment of the present disclosure;
fig. 3 is a flow chart of a bidirectional forwarding detection method according to an embodiment of the present disclosure;
fig. 4 is a flow chart of a bidirectional forwarding detection method according to another embodiment of the present disclosure;
fig. 5 is a flowchart of a bidirectional forwarding detection method according to another embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a bidirectional forwarding detection device according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present description as detailed in the accompanying claims.
Fig. 1 shows a schematic diagram of an aggregate link provided in an embodiment of the present disclosure, as shown in fig. 1, where a network device a includes a plurality of interface boards, and fig. 1 is illustrated by taking device a including three interface boards as an example, where ports G1/0/1, G1/0/2 on the interface board 1 and ports G2/0/1 on the interface board 2, ports G3/0/1, G3/0/2, G3/0/3 on the interface board 3 and ports G4/0/1, G4/0/2, G5/0/1, G6/0/2, and G6/0/3 on the interface board 3 form an aggregate link with ports G4/0/1, G4/0/2, G5/0/1, and G6/0/3 of the network device B. Wherein the implementation of the aggregated link is formed by bundling a plurality of ports together, wherein in the present embodiment, the plurality of bundled ports are referred to as a port aggregation group, and the plurality of bundled ports are referred to as member ports. Wherein each port aggregation group has its corresponding identification.
Whether or not the network device B includes a plurality of interface boards is not limited in this embodiment.
Fig. 2 shows a specific structural schematic diagram of a network device a, which, as shown in fig. 2, comprises a processor 101 and a memory 102 and a plurality of interface boards (1, 2, 3). The memory 102 is configured to store program instructions, and the processor 101 is configured to invoke the stored program instructions in the memory, and when the processor 101 executes the program instructions stored in the memory 102, the BFD detection method provided in the following embodiments of the present invention is executed. In addition, numerous specific details are set forth in the following detailed description in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements, and circuits well known to those skilled in the art have not been described in detail in order not to obscure the present disclosure.
In the related art, when a BFD packet is sent, the processor selects the output ports on the interface board through the stored aggregation port table, for example, the order of sending the BFD packet is generally that all the member ports on the interface board 1 are sent to BFD packets, then the BFD packet is sent through the member ports on the interface board 2, then the BFD packet is sent through the member ports on the interface board 3, and when all the member ports on the interface board 3 send BFD packets, the interface board 1 sends BFD packets again, so the order of sending BFD packets is as follows: g1/0/1- > G1/0/2- > G2/0/1- > G3/0/2- > G3/0/3- > G1/0/1.
Assuming that network device a and network device B configure a transmission interval of 30ms, the detection multiple is 3, that is, the detection period is 30ms×3, when network device B does not receive the BFD packet sent by network device a within 90ms, it is considered that a link between network device a and network device B has a fault. If the interface board 3 restarts or the output port of the interface board 3 is abnormal and cannot forward the message according to the sending sequence of the BFD message, when the BFD message polls and sends a packet, and the physical port of the interface board 3 is selected, the corresponding thread monitors an aggregation change event (the aggregation change event is caused by deleting the port in the port aggregation group or by the failure of the port itself or closing the shutdown) to the software platform outline reported to the CPU for more than 500ms, during which, if the BFD sends a packet to the port on the interface board 3, a packet sending failure occurs, so that the network device B cannot receive the BFD message sent by the network device a within 90ms, and the BFD session of the network device B can report the DOWN event of the BFD session; in fact, the physical ports on the interface board 1 and the interface board 2 are normal in the aggregation group, and the BFD report down event belongs to false alarm in the case that the data stream message forwarding is normal.
Example 1
In the method, in a transmission period of a BFD message, according to a serial number order of interface boards, in a port aggregation table, one port is selected for forwarding the BFD message for each interface board in turn, so that each interface board can be guaranteed to transmit the BFD message in a transmission period of the BFD message, and even if one of the interface boards fails, the BFD messages transmitted by other interface boards can reach an opposite-end device in a transmission period of the BFD, so that the opposite-end device cannot misreport a down event of the BFD session.
Fig. 3 is a flow chart of a bidirectional forwarding detection BFD method provided in the present specification, and this embodiment is illustrated by taking an aggregation link and a network device a shown in fig. 1 and fig. 2 as an example, and as shown in fig. 1-3, the method includes:
step 301, obtaining a port aggregation table, where the port aggregation table includes member port numbers in a port aggregation group.
The port aggregation table includes member port numbers in the port aggregation group, and as shown in fig. 2, the identifiers of the member ports included in the port aggregation table are as follows:
G1/0/1、G1/0/2、G2/0/1、G3/0/1、G3/0/2、G3/0/3。
taking G2/0/1 as an example in the identification of the member port, wherein the position of 2 is the number of the interface board or is also called a slot number; the number of the sub card at the position 0, also called as the sub card slot number; the position of 1 is the port number.
In general, the network device may or may not include a daughter card. The daughter card is typically a board card that interfaces with the interface board. A daughter card number bit of 0 indicates that the network device has no daughter card.
The present embodiment is described by taking the example that the network device has no daughter card.
In step 303, in the sending period of the BFD packet, according to the serial numbers of the interface boards, one port is selected for each interface board in the port aggregation table in turn, and the BFD packet is sent to the peer device, where the peer device sends the BFD packet for the peer device that establishes an aggregation link with the network device.
Continuing with the above embodiment, in the first 90ms BFD transmission period, a BFD packet is sent to the peer device in the order of the number of the interface boards (from small to large or from large to small), for example, by selecting a port G1/0/1 on the interface board 1, then selecting a port G2/0/1 on the interface board 2, then selecting a port G3/0/1 on the interface board 3.
When the transmission period of the second BFD message arrives, one port is selected for each interface board in turn in the port aggregation table according to the serial number sequence of the interface boards, and when the port is selected for the current interface board, if all member ports on the interface board transmit BFD messages within the transmission period of the preset BFD messages, but other interface boards also have member ports which do not transmit BFD messages, the BFD messages can be repeatedly selected for the member ports on the interface board;
and if the BFD message is not transmitted by the member port on the interface board in the transmission period of the preset BFD messages, selecting the member port which does not transmit the BFD message to transmit the BFD message.
In one example, when the transmission period of the second BFD packet arrives (where each BFD packet is transmitted at intervals of 3 BFD transmission intervals, i.e., BFD packets are transmitted every 30 ms), the interface board 1 selects the member port G1/0/2 that has not transmitted the BFD packet during the transmission period of the first 30ms to transmit the BFD packet when the transmission interval of the first 30ms arrives, and further, when the transmission interval of the second 30ms BFD packet arrives, since there is only one member port G2/0/1 on the interface board 2 and there is a member port on the other interface board (interface board 3) that has not transmitted the BFD packet during the transmission period of the 3 BFD packets, the member port G2/0/1 is selected to transmit the BFD packet again, and when the transmission interval of the third 30ms BFD packet arrives, the interface board 3 selects the member port G3/0/2 to transmit the BFD packet.
When the transmission period of the third BFD message arrives, G1/0/1, G2/0/1 and G3/0/3 are sequentially selected for three interface boards for each transmission interval in the transmission period of the third BFD message to transmit the BFD message.
In addition, it should be noted that, for each port aggregation group, the number of transmission periods of the preset BFD packets may be determined according to the number of the most member ports existing on the interface board, for example, on the network device a, for one aggregation group, there are 2 member ports on the interface board 1, 1 member port on the interface board 2, and 3 member ports on the interface board 3. In the following embodiments, it can be seen by way of example why the transmission period of the "preset" BFD messages may be determined by the number of the most member ports present on the interface board.
In addition, it should be understood that, in the method provided in this embodiment, only the member port on each interface board is guaranteed to transmit the BFD message in the transmission period of each BFD message, so that when a member port on a certain interface board fails, the problem of misreporting the BFD session down event caused by the polling mode in the related art can be avoided.
Example two
On the basis of the foregoing embodiment, a BFD detection method is also provided in this embodiment, and fig. 4 is a schematic flow chart of the BFD detection method provided in this embodiment, as shown in fig. 4, where the method includes:
step 401, obtaining a port aggregation table, where the port aggregation table includes member port numbers in a port aggregation group.
Step 303 in the first embodiment described above may be implemented by steps 4021 to 4023 in the present embodiment.
Step 4021, grouping member port numbers in the port aggregation table according to the interface board where the member port numbers are located;
in this embodiment, the member port numbers in the port aggregation table may be first grouped according to the interface board where they are located. In one example, if the identity of the member port included in the port aggregation table is: g1/0/1, G1/0/2, G2/0/1, G3/0/2, G3/0/3.
The member port numbers may be grouped by interface board as:
Group1:G1/0/1、G1/0/2;
Group2:G2/0/1;
Group3:G3/0/1、G3/0/2、G3/0/3。
step 4022, searching a member port in each group in turn according to the serial number sequence of the interface board to record, returning to the first searched group to search, searching the member port according to the principle that the member port selected last time is not repeated, and recording until the member ports in the port aggregation table are recorded at least once, so as to generate a new port aggregation table.
And searching one member port in each group in sequence according to the sequence of the interface board numbers (the sequence from small to large or the sequence from large to small).
First record from small to large according to the serial number order of the interface board: g1/0/1, G2/0/1, G3/0/1;
and then returning to the group corresponding to the interface board 1 to search, wherein the member port different from the last selected G1/0/1 is G1/0/2, only one member port of G2/0/1 is recorded in the group corresponding to the interface board 2, and the member port different from the last G3/0/1 is selected as G3/0/2 in the group corresponding to the interface board 3 (of course, in another implementation, G3/0/3 can be selected to record, and in the embodiment, the sequence of arriving from small according to the sequence of port numbers is recorded).
And returning to the grouping corresponding to the interface board 1 for searching during the third polling of the port aggregation table, selecting G1/0/1 which is different from G1/0/2 recorded last time for recording, and then polling the grouping corresponding to the interface board 2 and the interface board 3.
The final new port aggregation table is:
G1/0/1、G2/0/1、G3/0/1、G1/0/2、G2/0/1、G3/0/2、G1/0/1、G2/0/1、 G3/0/3。
in step 4023, each time the transmission interval of the BFD packet arrives, the BFD packet is transmitted from the member ports according to the order of the member ports recorded in the new port aggregation table.
It can be seen that in the method provided in this embodiment, since there are the most member ports on the interface board 3: 3 member ports and thus requires at least 3 polls to record all member ports on the interface board 3 once. I.e. the number of transmission cycles of the preset BFD messages, may be determined according to the number of the most member ports present on the interface board.
According to the newly generated port aggregation table, it can be seen that, in a transmission period of a BFD packet, all interface boards involved in the port aggregation group may transmit the BFD packet, for example, when all ports of the interface board 3 fail, although the BFD packet transmitted via G3/0/1 cannot be received by the peer device, when a transmission interval of a next BFD packet arrives, the BFD packet is transmitted via a member port G1/0/2 of the interface board 1, so that a false message BFD session down event caused by that the peer device cannot receive the BFD packet in more than one BFD transmission period (for example, 90 ms) does not occur.
In addition, the embodiment also provides a way to generate a new port aggregation table:
for each group, searching and recording according to the serial number sequence of the member port each time; if all the member ports in the group corresponding to the current interface board have been recorded but the member ports in other groups are not recorded, returning to the first group, and searching and recording again according to the serial numbers of the member ports, so that each member port in the port aggregation group uniformly transmits BFD messages.
Example III
On the basis of the foregoing embodiment, a BFD detection method is also provided in this embodiment, and fig. 5 is a schematic flow chart of the BFD detection method provided in this embodiment, as shown in fig. 5, where the method includes:
step 501, obtaining a port aggregation table, wherein the port aggregation table comprises member port numbers in a port aggregation group;
in step 503, in the transmission period of the BFD packet, according to the serial numbers of the interface boards and the serial numbers of the ports, when the port is in the port aggregation table and the transmission interval of each BFD packet arrives, a port is selected for each interface board, and the BFD packet is transmitted to the peer device.
In the foregoing embodiment, when a specific member port is selected for each interface board to transmit a BFD message in a transmission period of one BFD message, in principle, a member port that has not transmitted a BFD message in a transmission period of a preset BFD message may be preferentially selected.
In the method provided in this embodiment, the selection is preferably performed in the order of the number of the member ports from large to small or from small to small.
For example, for the interface board 3, the smallest port number, i.e., G3/0/1, may be selected in the first BFD packet transmission cycle, the next smallest port number G3/0/2 may be selected in the second BFD packet transmission cycle, and the largest port number G3/0/3 may be selected in the third BFD packet transmission cycle.
On the basis of the above embodiment, if the interface board is further connected with a daughter card, the generation of the new port aggregation table may be implemented in the following manner:
grouping member port numbers in the port aggregation table according to the sub card;
searching a member port in each group according to the serial number sequence of the port in each sub-card for recording, returning to the first searched group for searching, searching the member port for recording according to the principle that the member port selected last time is not repeated until the member ports in the port aggregation table are recorded at least once, so as to generate a new port aggregation table.
In one example, if there are also other daughter cards connected to the interface board, such as daughter card 11 on interface board 1, the member port is located on the daughter card. For example, if the original port aggregation table is:
G1/1/1、G1/2/2、G2/0/1、G3/1/1、G3/2/1、G3/2/2;
then the grouping can be by daughter card and can be as follows
Group11:G1/1/1;
Group12:G1/2/2;
Group13:G2/0/1;
Group14:G3/1/1;
Group15:G3/2/1、G3/2/2。
The subsequent polling method is similar to the above embodiment, and the detailed description of this embodiment is omitted.
In this way, it can be ensured that the BFD messages can be transmitted through the member ports on different daughter cards in the transmission period of each BFD message.
Example IV
The embodiment also provides a bidirectional forwarding detection BFD apparatus, where the apparatus may be applied to a network device, where the network device includes a plurality of interface boards, and one or more ports corresponding to the plurality of interface boards are configured to join a port aggregation group, and fig. 6 shows a schematic structural diagram of the apparatus, and as shown in fig. 6, the apparatus includes:
the device comprises an acquisition module, a port aggregation module and a port aggregation module, wherein the acquisition module is used for acquiring a port aggregation table, and the port aggregation table comprises member port numbers in a port aggregation group;
and the selecting module is used for selecting one port for each interface board in the port aggregation table in sequence according to the serial number sequence of the interface boards in the sending period of the BFD message and sending the BFD message to opposite terminal equipment, wherein the opposite terminal equipment sends the BFD message for the opposite terminal equipment which establishes an aggregation link with the network equipment.
The acquiring module and the selecting module may be executed in a thread or a process, or may be executed in an FPGA (Field Programmable Gate Array ) connected to the processor, where the FPGA may be used as a proxy for the processor to implement some functions of the processor, and further implement any of the methods provided in the first to third embodiments of the present disclosure.
Optionally, the selecting module is further configured to: and in the sending period of the BFD messages, selecting one port for each interface board when the sending interval of each BFD message arrives in the port aggregation table according to the serial number sequence of the interface boards and the serial number sequence of the ports, and sending the BFD messages to opposite terminal equipment.
Optionally, the selecting module is specifically configured to:
grouping member port numbers in the port aggregation table according to the interface board;
searching a member port in each group in sequence according to the serial number sequence of the interface board to record, returning to the first searched group to search, searching the member port to record according to the principle that the member port selected last time is not repeated until the member ports in the port aggregation table are recorded at least once, so as to generate a new port aggregation table; and transmitting the BFD messages from the member ports according to the sequence of the member ports recorded by the new port aggregation table every time the transmission interval of the BFD messages is reached.
Optionally, if the network device further includes a plurality of daughter cards, the selecting module is specifically configured to, when generating the new port aggregation table:
grouping member port numbers in the port aggregation table according to the sub card;
searching a member port in each group according to the serial number sequence of the port in each sub-card for recording, returning to the first searched group for searching, searching the member port for recording according to the principle that the member port selected last time is not repeated until the member ports in the port aggregation table are recorded at least once, so as to generate a new port aggregation table.
The device provided in this embodiment may select, in the port aggregation table, one port for forwarding the BFD packet according to the serial numbers of the interface boards in the sending period of the BFD packet, so as to ensure that each interface board can send the BFD packet in the sending period of the BFD packet, even if one of the interface boards fails, the BFD packet sent by the other interface boards may reach the peer device in one sending period of the BFD packet, so that the peer device may not misreport a down event of the BFD session.
In addition, numerous specific details are set forth in the following detailed description in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements, and circuits well known to those skilled in the art have not been described in detail in order not to obscure the present disclosure.
In the embodiments provided in the present disclosure, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, of the flowcharts and block diagrams in the figures that illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in various embodiments of the present disclosure may be integrated together to form a single portion, or each module may exist alone, or two or more modules may be integrated to form a single portion.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in essence or a part contributing to the prior art or a part of the technical solution, or in the form of a software product stored in a readable storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present disclosure. And the aforementioned readable storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.

Claims (7)

1. A bidirectional forwarding detection, BFD, method, applied to a network device, the network device including a plurality of interface boards, ports of one or more of the plurality of interface boards configured to join a port aggregation group, the method comprising:
acquiring a port aggregation table, wherein the port aggregation table comprises member port numbers in a port aggregation group;
grouping member port numbers in the port aggregation table according to the interface board where the member port numbers are located, and dividing the port numbers corresponding to the same interface board into the same group;
searching a member port in each group in sequence according to the serial number sequence of the interface board to record, returning to the first searched group to search, searching the member port to record according to the principle that the member port selected last time is not repeated until the member ports in the port aggregation table are recorded at least once, so as to generate a new port aggregation table;
and when the transmission interval of the BFD message is reached each time, the BFD message is transmitted from the member ports according to the order of the member ports recorded by the new port aggregation table, wherein the opposite terminal equipment transmits the BFD message for the opposite terminal equipment establishing an aggregation link with the network equipment.
2. The method according to claim 1, wherein the method further comprises: and in the sending period of the BFD messages, selecting one port for each interface board when the sending interval of each BFD message arrives in the port aggregation table according to the serial number sequence of the interface boards and the serial number sequence of the ports, and sending the BFD messages to opposite terminal equipment.
3. The method of any of claims 1-2, wherein generating a new port aggregation table if the network device further comprises a plurality of daughter cards comprises:
grouping member port numbers in the port aggregation table according to the sub card;
searching a member port in each group according to the serial number sequence of the port in each sub-card for recording, returning to the first searched group for searching, searching the member port for recording according to the principle that the member port selected last time is not repeated until the member ports in the port aggregation table are recorded at least once, so as to generate a new port aggregation table.
4. A bidirectional forwarding detection, BFD, apparatus, applied to a network device, the network device including a plurality of interface boards, ports of one or more of the plurality of interface boards configured to join a port aggregation group, the apparatus comprising:
the device comprises an acquisition module, a port aggregation module and a port aggregation module, wherein the acquisition module is used for acquiring a port aggregation table, and the port aggregation table comprises member port numbers in a port aggregation group;
the selecting module is used for selecting one port for each interface board in the port aggregation table in sequence according to the serial number sequence of the interface board in the sending period of the BFD message and sending the BFD message to opposite terminal equipment, wherein the opposite terminal equipment sends the BFD message for the opposite terminal equipment which establishes an aggregation link with the network equipment;
the selecting module is specifically configured to:
grouping member port numbers in the port aggregation table according to the interface board;
searching a member port in each group in sequence according to the serial number sequence of the interface board to record, returning to the first searched group to search, searching the member port to record according to the principle that the member port selected last time is not repeated until the member ports in the port aggregation table are recorded at least once, so as to generate a new port aggregation table; and transmitting the BFD messages from the member ports according to the sequence of the member ports recorded by the new port aggregation table every time the transmission interval of the BFD messages is reached.
5. The apparatus of claim 4, wherein the selection module is further configured to: and in the sending period of the BFD messages, selecting one port for each interface board when the sending interval of each BFD message arrives in the port aggregation table according to the serial number sequence of the interface boards and the serial number sequence of the ports, and sending the BFD messages to opposite terminal equipment.
6. The apparatus according to any one of claims 4-5, wherein if the network device further includes a plurality of daughter cards, the selecting module is specifically configured to, when generating the new port aggregation table:
grouping member port numbers in the port aggregation table according to the sub card;
searching a member port in each group according to the serial number sequence of the port in each sub-card for recording, returning to the first searched group for searching, searching the member port for recording according to the principle that the member port selected last time is not repeated until the member ports in the port aggregation table are recorded at least once, so as to generate a new port aggregation table.
7. A network device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1-3 when the program is executed by the processor.
CN202110676341.0A 2021-06-18 2021-06-18 Bidirectional Forwarding Detection (BFD) method and device and network equipment Active CN113472648B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110676341.0A CN113472648B (en) 2021-06-18 2021-06-18 Bidirectional Forwarding Detection (BFD) method and device and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110676341.0A CN113472648B (en) 2021-06-18 2021-06-18 Bidirectional Forwarding Detection (BFD) method and device and network equipment

Publications (2)

Publication Number Publication Date
CN113472648A CN113472648A (en) 2021-10-01
CN113472648B true CN113472648B (en) 2023-10-24

Family

ID=77870322

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110676341.0A Active CN113472648B (en) 2021-06-18 2021-06-18 Bidirectional Forwarding Detection (BFD) method and device and network equipment

Country Status (1)

Country Link
CN (1) CN113472648B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7274694B1 (en) * 2003-01-09 2007-09-25 Cisco Technology, Inc. Defining link aggregation across a stack
CN101335770A (en) * 2008-08-06 2008-12-31 杭州华三通信技术有限公司 Method and apparatus for network port address conversion
CN101860491A (en) * 2010-06-23 2010-10-13 迈普通信技术股份有限公司 Aggregation type link bidirectional forwarding detection method and device thereof
CN101989953A (en) * 2010-11-09 2011-03-23 中兴通讯股份有限公司 Method and equipment for sending bidirectional forwarding detection message
WO2016091029A1 (en) * 2014-12-08 2016-06-16 中兴通讯股份有限公司 Method and apparatus for forwarding traffic of stacking system
CN108134744A (en) * 2017-12-06 2018-06-08 新华三技术有限公司 Load sharing method and veneer in a kind of IRF stackings
CN109379297A (en) * 2018-11-26 2019-02-22 锐捷网络股份有限公司 A kind of method and apparatus for realizing flow load balance
CN109495383A (en) * 2018-12-13 2019-03-19 迈普通信技术股份有限公司 A kind of data processing method, device, communication system and the network equipment
CN109547274A (en) * 2019-01-28 2019-03-29 新华三技术有限公司 A kind of enclosure board switching method, device and first network equipment
CN109787860A (en) * 2019-01-15 2019-05-21 新华三技术有限公司 Two-way conversion link detection method and device
CN110620739A (en) * 2019-07-25 2019-12-27 新华三技术有限公司成都分公司 BFD message sending method and device
CN111654406A (en) * 2020-02-29 2020-09-11 新华三信息安全技术有限公司 Bidirectional forwarding detection method and device
CN112737880A (en) * 2020-12-25 2021-04-30 北京华三通信技术有限公司 Forwarding method and network equipment for Bidirectional Forwarding Detection (BFD) message

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9929897B2 (en) * 2016-04-05 2018-03-27 Juniper Networks, Inc. Performing a protocol, such as micro bidirectional forwarding detection, on member links of an aggregated link that uses an address of the aggregated link

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7274694B1 (en) * 2003-01-09 2007-09-25 Cisco Technology, Inc. Defining link aggregation across a stack
CN101335770A (en) * 2008-08-06 2008-12-31 杭州华三通信技术有限公司 Method and apparatus for network port address conversion
CN101860491A (en) * 2010-06-23 2010-10-13 迈普通信技术股份有限公司 Aggregation type link bidirectional forwarding detection method and device thereof
CN101989953A (en) * 2010-11-09 2011-03-23 中兴通讯股份有限公司 Method and equipment for sending bidirectional forwarding detection message
WO2016091029A1 (en) * 2014-12-08 2016-06-16 中兴通讯股份有限公司 Method and apparatus for forwarding traffic of stacking system
CN108134744A (en) * 2017-12-06 2018-06-08 新华三技术有限公司 Load sharing method and veneer in a kind of IRF stackings
CN109379297A (en) * 2018-11-26 2019-02-22 锐捷网络股份有限公司 A kind of method and apparatus for realizing flow load balance
CN109495383A (en) * 2018-12-13 2019-03-19 迈普通信技术股份有限公司 A kind of data processing method, device, communication system and the network equipment
CN109787860A (en) * 2019-01-15 2019-05-21 新华三技术有限公司 Two-way conversion link detection method and device
CN109547274A (en) * 2019-01-28 2019-03-29 新华三技术有限公司 A kind of enclosure board switching method, device and first network equipment
CN110620739A (en) * 2019-07-25 2019-12-27 新华三技术有限公司成都分公司 BFD message sending method and device
CN111654406A (en) * 2020-02-29 2020-09-11 新华三信息安全技术有限公司 Bidirectional forwarding detection method and device
CN112737880A (en) * 2020-12-25 2021-04-30 北京华三通信技术有限公司 Forwarding method and network equipment for Bidirectional Forwarding Detection (BFD) message

Also Published As

Publication number Publication date
CN113472648A (en) 2021-10-01

Similar Documents

Publication Publication Date Title
US10142203B2 (en) Ethernet fault management systems and methods
CN101132320B (en) Method for detecting interface trouble and network node equipment
EP1754071B1 (en) System and method for detecting link failures
CN102823205B (en) Aggregating data traffic from access domains
US8341231B2 (en) Systems and methods for processing heartbeat messages
CN101953139B (en) DHCP in response to Internet connectedness initializes
CN108632099B (en) Fault detection method and device for link aggregation
CN107819649B (en) Private protocol testing method of satellite communication network based on mass terminals
WO2017219984A1 (en) Link state detection method and system
WO2015143810A1 (en) Node fault detection method and apparatus
CN104518936B (en) Link dynamic aggregation method and apparatus
CN103078791A (en) Method, device and system for processing operation, administration and maintenance (OAM) message
Miller et al. Fault identification in networks by passive testing
CN108400911B (en) Device and method for realizing Micro-BFD protocol
CN112994839A (en) Flexible Ethernet overhead multiframe receiving method, device, equipment and medium
WO2022057514A1 (en) Link fault detection method and apparatus and computer-readable storage medium
WO2008131677A1 (en) Fault verification for an unpaired unidirectional switched-path
CN113472648B (en) Bidirectional Forwarding Detection (BFD) method and device and network equipment
CN101808043A (en) Method and device for detecting service message forwarding state of TRUNK members
CN102857436B (en) Flow transmission method and flow transmission equipment based on IRF (intelligent resilient framework) network
Yarochkin et al. Towards adaptive covert communication system
CN103179036A (en) Method for achieving Linktrace of multi-protocol label switching-transmission parameter (MPLS-TP) operation, administration and maintenance (OAM) on basis of field programmable gata array (FPGA)
CN101729349B (en) RRPP-based detection method and device for connectivity of main ring access
CN114697202B (en) Detection method and device
CN112769653B (en) Network detection and switching method, system and medium based on network port binding

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