BFD message sending method and device

文档序号:1660359 发布日期:2019-12-27 浏览:20次 中文

阅读说明:本技术 一种bfd报文发送方法及装置 (BFD message sending method and device ) 是由 荀硕 幺双超 于 2019-07-25 设计创作,主要内容包括:本发明提供一种BFD报文发送方法及装置,所述方法包括:确定聚合接口中各成员口的归属信息;其中,成员口的归属信息用于标识成员口归属的子卡、该子卡归属的线卡以及该线卡归属的框;根据所述各成员口的归属信息选择发送BFD报文的成员口,以使连续两次发送BFD报文的成员口的归属信息不一致。应用本发明实施例可以提高聚合接口状态判断的准确性。(The invention provides a BFD message sending method and a device, wherein the method comprises the following steps: determining the attribution information of each member port in the aggregation interface; the attribution information of the member port is used for identifying a sub card to which the member port belongs, a line card to which the sub card belongs and a frame to which the line card belongs; and selecting the member port for sending the BFD message according to the attribution information of each member port, so that the attribution information of the member ports for sending the BFD message continuously twice is inconsistent. By applying the embodiment of the invention, the accuracy of judging the aggregation interface state can be improved.)

1. A Bidirectional Forwarding Detection (BFD) message sending method is characterized by comprising the following steps:

determining the attribution information of each member port in the aggregation interface; the attribution information of the member port is used for identifying a sub card to which the member port belongs, a line card to which the sub card belongs and a frame to which the line card belongs;

and selecting the member port for sending the BFD message according to the attribution information of each member port, so that the attribution information of the member ports for sending the BFD message continuously twice is inconsistent.

2. The method according to claim 1, wherein said selecting the member port for sending the BFD packet according to the attribution information of each member port comprises:

determining a target sequence for sending BFD messages through each member port according to the attribution information of each member port; wherein, the attribution information of two adjacent member ports in the target sequence is inconsistent;

and selecting the member ports for sending the BFD messages in sequence according to the sequence of each member port in the target sequence.

3. The method according to claim 2, wherein the determining a target sequence for sending BFD packets through each member port according to the attribution information of each member port comprises:

performing virtual expansion on the number of the member ports according to the attribution information of each member port, so that the number of the member ports of different frames after the virtual expansion is consistent, the number of the member ports of different line cards in the same frame is consistent, the number of the member ports of different sub cards in the same line card is consistent, and the number of the member ports of different numbers in the same sub card is consistent;

and adding each member port after virtual expansion to the target sequence in an alternate mode of frame, line card, sub card and member port numbers.

4. The method of claim 3, wherein adding virtually extended member ports to the target sequence in an alternating manner of frame, line card, daughter card, and member port numbering in sequence comprises:

if the total number of the frames to which the member ports belong in the aggregation interface is greater than 1, polling and selecting the member ports in the frames to be added to the target sequence;

for any frame, if the number of target line cards with member ports in the frame is greater than 1, when the member ports are selected from the frame for multiple times and added to the target sequence, the member ports of all the target line cards in the frame are selected in a polling mode and added to the target sequence;

for any target line card, if the number of target sub-cards with member ports in the target line card is greater than 1, when the member ports are selected from the target line card for multiple times and added to the target sequence, polling and selecting the member ports of each target sub-card of the target line card to be added to the target sequence;

for any target sub-card, if a plurality of different member ports exist on the target sub-card, when the member ports are selected from the target sub-card for a plurality of times and added to the target sequence, polling and selecting each member port of the target sub-card to be added to the target sequence.

5. The method according to any one of claims 2-4, wherein when the total number of frames to which each member port belongs in the aggregation interface is N, N consecutive member ports in the target order belong to different frames, where N > 1;

for any frame, when the total number of target line cards with member ports in the frame is M, the continuous M member ports belonging to the frame in the target sequence belong to different target line cards, and M is greater than 1;

for any target line card, when the total number of target sub-cards with member ports on the target line card is L, the continuous L member ports belonging to the target line card in the target sequence belong to different target sub-cards, and L is more than 1;

for any target sub-card, when the total number of different member ports on the target sub-card is K, the continuous K member ports belonging to the target sub-card in the target sequence are different.

6. A Bidirectional Forwarding Detection (BFD) message sending device is characterized by comprising:

the determining unit is used for determining the attribution information of each member port in the aggregation interface; the attribution information of the member port is used for identifying a sub card to which the member port belongs, a line card to which the sub card belongs and a frame to which the line card belongs;

and the sending unit is used for selecting the member port for sending the BFD message according to the attribution information of each member port so as to ensure that the attribution information of the member ports for sending the BFD message continuously twice is inconsistent.

7. The apparatus of claim 6,

the determining unit is further configured to determine a target sequence for sending a BFD packet through each member port according to the affiliation information of each member port; wherein, the attribution information of two adjacent member ports in the target sequence is inconsistent;

and the sending unit is specifically configured to select the member ports for sending the BFD packet in sequence according to the sequence of each member port in the target sequence.

8. The apparatus of claim 7, further comprising:

the copying unit is used for virtually expanding the number of the member ports according to the attribution information of each member port so as to ensure that the number of the member ports of different frames after virtual expansion is consistent, the number of the member ports of different line cards in the same frame is consistent, the number of the member ports of different sub-cards in the same line card is consistent, and the number of the member ports of different numbers in the same sub-card is consistent;

the determining unit is specifically configured to add the virtually-extended member ports to the target sequence in an alternating manner of frame, line card, sub card, and member port numbers.

9. The apparatus of claim 8,

the determining unit is specifically configured to, if the total number of frames to which each member port belongs in the aggregation interface is greater than 1, poll and select the member ports in each frame to add to the target sequence;

for any frame, if the number of target line cards with member ports in the frame is greater than 1, when the member ports are selected from the frame for multiple times and added to the target sequence, the member ports of all the target line cards in the frame are selected in a polling mode and added to the target sequence;

for any target line card, if the number of target sub-cards with member ports in the target line card is greater than 1, when the member ports are selected from the target line card for multiple times and added to the target sequence, polling and selecting the member ports of each target sub-card of the target line card to be added to the target sequence;

for any target sub-card, if a plurality of different member ports exist on the target sub-card, when the member ports are selected from the target sub-card for a plurality of times and added to the target sequence, the member ports of the target sub-card are selected in turn and added to the target sequence.

10. The apparatus according to any one of claims 6 to 9,

when the total number of the frames to which each member port belongs in the aggregation interface is N, the continuous N member ports in the target sequence belong to different frames, and N is greater than 1;

for any frame, when the total number of target line cards with member ports in the frame is M, the continuous M member ports belonging to the frame in the target sequence belong to different target line cards, and M is greater than 1;

for any target line card, when the total number of target sub-cards with member ports on the target line card is L, the continuous L member ports belonging to the target line card in the target sequence belong to different target sub-cards, and L is more than 1;

for any target sub-card, when the total number of different member ports on the target sub-card is K, the continuous K member ports belonging to the target sub-card in the target sequence are different.

Technical Field

The invention relates to the technical field of network communication, in particular to a BFD message sending method and device.

Background

With the development and progress of networks, the requirements for the reliability of network devices and the rapid convergence of failures are increasing day by day.

At present, the reliability of the equipment is improved and the rapid convergence is completed mainly by the coordination of aggregation and Bidirectional Forwarding Detection (BFD). When the BFD is matched with the aggregation interface, if the aggregation member port fails, joins or exits the aggregation port, BFD continuous packet loss is possibly caused by a time sequence matching problem or/and a BFD packet sending mode, so that the equipment misjudges the state of the aggregation port, and further, the aggregation interface protocol vibrates due to a linkage protocol.

For example, assuming that the BFD packet is sent by polling among aggregation member ports, if the BFD packet is sent sequentially through each aggregation member port according to the order of aggregation member ports 1 to N, when a plurality of consecutive aggregation member ports join or exit due to line card/sub card insertion or sub card/line card/frame failure, the BFD packet is continuously lost, if the exiting member port is 3 consecutive aggregation member ports (e.g., aggregation member ports 1 to 3), the BFD packet is continuously lost, and further, when the status of the remaining aggregation member ports is still in a working (english: UP) status (i.e., the status of an aggregation logical virtual interface (abbreviated as aggregation interface) is in an UP status), the status of the aggregation interface is erroneously determined to be in a failure (english: Down) status, which causes the protocol of the aggregation interface to oscillate.

Disclosure of Invention

In view of this, the present invention provides a BFD packet sending method and apparatus, so as to solve the problem in the prior art that when BFD is matched with an aggregation interface, an aggregation member port fails, and an aggregation port is added or withdrawn, which easily causes oscillation of an aggregation interface protocol.

In a first aspect, the present invention provides a BFD packet sending method, including:

determining the attribution information of each member port in the aggregation interface; the attribution information of the member port is used for identifying a sub card to which the member port belongs, a line card to which the sub card belongs and a frame to which the line card belongs;

and selecting the member port for sending the BFD message according to the attribution information of each member port, so that the attribution information of the member ports for sending the BFD message continuously twice is inconsistent.

With reference to the first aspect, in a first possible implementation manner, the selecting, according to the attribution information of each member port, a member port that transmits a BFD packet includes:

determining a target sequence for sending BFD messages through each member port according to the attribution information of each member port; wherein, the attribution information of two adjacent member ports in the target sequence is inconsistent;

and selecting the member ports for sending the BFD messages in sequence according to the sequence of each member port in the target sequence.

With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, the determining, according to the attribution information of each member port, a target sequence for sending a BFD packet through each member port includes:

performing virtual expansion on the number of the member ports according to the attribution information of each member port, so that the number of the member ports of different frames after the virtual expansion is consistent, the number of the member ports of different line cards in the same frame is consistent, the number of the member ports of different sub cards in the same line card is consistent, and the number of the member ports of different numbers in the same sub card is consistent;

and adding each member port after virtual expansion to the target sequence in an alternate mode of frame, line card, sub card and member port numbers.

With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner, the adding, to the target sequence, each member port after virtual expansion in a manner that numbers of frames, line cards, sub cards, and member ports are alternated in sequence includes:

if the total number of the frames to which the member ports belong in the aggregation interface is greater than 1, polling and selecting the member ports in the frames to be added to the target sequence;

for any frame, if the number of target line cards with member ports in the frame is greater than 1, when the member ports are selected from the frame for multiple times and added to the target sequence, the member ports of all the target line cards in the frame are selected in a polling mode and added to the target sequence;

for any target line card, if the number of target sub-cards with member ports in the target line card is greater than 1, when the member ports are selected from the target line card for multiple times and added to the target sequence, polling and selecting the member ports of each target sub-card of the target line card to be added to the target sequence;

for any target sub-card, if a plurality of different member ports exist on the target sub-card, when the member ports are selected from the target sub-card for a plurality of times and added to the target sequence, polling and selecting each member port of the target sub-card to be added to the target sequence.

With reference to any one implementation manner of the first possible implementation manner, the second possible implementation manner, and the third possible implementation manner of the first aspect, in a fourth possible implementation manner, when the total number of frames to which each member port belongs in the aggregation interface is N, consecutive N member ports in the target sequence belong to different frames, where N is greater than 1;

for any frame, when the total number of target line cards with member ports in the frame is M, the continuous M member ports belonging to the frame in the target sequence belong to different target line cards, and M is greater than 1;

for any target line card, when the total number of target sub-cards with member ports on the target line card is L, the continuous L member ports belonging to the target line card in the target sequence belong to different target sub-cards, and L is more than 1;

for any target sub-card, when the total number of different member ports on the target sub-card is K, the continuous K member ports belonging to the target sub-card in the target sequence are different.

In a second aspect, the present invention provides a BFD packet sending apparatus, including:

the determining unit is used for determining the attribution information of each member port in the aggregation interface; the attribution information of the member port is used for identifying a sub card to which the member port belongs, a line card to which the sub card belongs and a frame to which the line card belongs;

and the sending unit is used for selecting the member port for sending the BFD message according to the attribution information of each member port so as to ensure that the attribution information of the member ports for sending the BFD message continuously twice is inconsistent.

With reference to the second aspect, in a first possible implementation manner, the determining unit is further configured to determine, according to the attribution information of each member port, a target sequence for sending a BFD packet through each member port; wherein, the attribution information of two adjacent member ports in the target sequence is inconsistent;

and the sending unit is specifically configured to select the member ports for sending the BFD packet in sequence according to the sequence of each member port in the target sequence.

With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner, the apparatus further includes:

the copying unit is used for virtually expanding the number of the member ports according to the attribution information of each member port so as to ensure that the number of the member ports of different frames after virtual expansion is consistent, the number of the member ports of different line cards in the same frame is consistent, the number of the member ports of different sub-cards in the same line card is consistent, and the number of the member ports of different numbers in the same sub-card is consistent;

the determining unit is specifically configured to add the virtually-extended member ports to the target sequence in an alternating manner of frame, line card, sub card, and member port numbers.

With reference to the second possible implementation manner of the second aspect, in a third possible implementation manner, the determining unit is specifically configured to poll and select the member ports in each frame to be added to the target sequence if the total number of frames to which each member port belongs in the aggregation interface is greater than 1;

for any frame, if the number of target line cards with member ports in the frame is greater than 1, when the member ports are selected from the frame for multiple times and added to the target sequence, the member ports of all the target line cards in the frame are selected in a polling mode and added to the target sequence;

for any target line card, if the number of target sub-cards with member ports in the target line card is greater than 1, when the member ports are selected from the target line card for multiple times and added to the target sequence, polling and selecting the member ports of each target sub-card of the target line card to be added to the target sequence;

for any target sub-card, if a plurality of different member ports exist on the target sub-card, when the member ports are selected from the target sub-card for a plurality of times and added to the target sequence, the member ports of the target sub-card are selected in turn and added to the target sequence.

With reference to any one implementation manner of the first possible implementation manner, the second possible implementation manner, and the third possible implementation manner of the second aspect, in a fourth possible implementation manner, when the total number of frames to which each member port belongs in the aggregation interface is N, consecutive N member ports in the target sequence belong to different frames, where N > 1;

for any frame, when the total number of target line cards with member ports in the frame is M, the continuous M member ports belonging to the frame in the target sequence belong to different target line cards, and M is greater than 1;

for any target line card, when the total number of target sub-cards with member ports on the target line card is L, the continuous L member ports belonging to the target line card in the target sequence belong to different target sub-cards, and L is more than 1;

for any target sub-card, when the total number of different member ports on the target sub-card is K, the continuous K member ports belonging to the target sub-card in the target sequence are different.

In a third aspect, the present invention provides a BFD message sending apparatus, including a processor, a machine-readable storage medium and a communication bus, wherein the processor and the machine-readable storage medium complete communication with each other through the communication bus;

a machine readable storage medium for storing a computer program;

and the processor is used for realizing the BFD message sending method when executing the program stored on the machine-readable storage medium.

In a fourth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the BFD messaging method described above.

Therefore, by using the technical scheme disclosed by the invention, the attribution information of each member port in the aggregation interface is determined, and the member port for sending the BFD message is selected according to the attribution information of each member port, so that the attribution information of the member ports for sending the BFD message continuously twice is inconsistent, the influence of hardware faults of various levels such as a sub card, a line card and a frame or the influence of continuous addition or withdrawal of the member ports on the state judgment of the aggregation interface is reduced, the probability of misjudgment of the state of the aggregation interface is reduced, and the accuracy of the state judgment of the aggregation interface is improved.

Drawings

Fig. 1 is a schematic flowchart of a BFD packet sending method according to an embodiment of the present invention;

fig. 2 is a schematic diagram of membership port affiliation in a specific application scenario according to an embodiment of the present invention;

fig. 3 is a schematic structural diagram of a BFD packet sending apparatus according to an embodiment of the present invention;

fig. 4 is a schematic structural diagram of another BFD packet sending apparatus according to an embodiment of the present invention;

fig. 5 is a schematic diagram of a hardware structure of a BFD packet sending apparatus according to an embodiment of the present invention.

Detailed Description

In order to make the technical solutions in the embodiments of the present invention better understood and make the above objects, features and advantages of the embodiments of the present invention more comprehensible, the technical solutions in the embodiments of the present invention are described in further detail below with reference to the accompanying drawings.

Referring to fig. 1, a schematic flow chart of a BFD packet sending method according to an embodiment of the present invention is provided, where the BFD packet sending method may be applied to a centralized device, such as a Central Processing Unit (CPU) of a main control board of the centralized device, or may be applied to CPUs of nodes (such as each main control board and each line card board) of a distributed device, or BFD function implementing units (which may be general CPUs, or may be Field-Programmable Gate Array (FPGA) chips, or special Network chips (such as Network Processor (NP)), as shown in fig. 1, the BFD packet sending method may include the following steps:

step 101, determining attribution information of each member port in an aggregation interface; the attribution information of the member port is used for identifying a sub card to which the member port belongs, a line card to which the sub card belongs and a frame to which the line card belongs.

And 102, selecting the member port for sending the BFD message according to the attribution information of each member port so as to ensure that the attribution information of the member ports for sending the BFD message continuously twice is inconsistent.

It should be noted that, in the embodiment of the present invention, for example, a member port with inconsistent attribution information exists in a member port of an aggregation interface, that is, at least two member ports belong to different frames, or/and belong to different line cards, or/and belong to different daughter cards.

For a scenario in which the attribution information of each member port is consistent, that is, each member port of the aggregation interface belongs to the same frame (no box-type device of the line card), the same line card (no sub-card condition) or the same sub-card (sub-card condition), the BFD message sending scheme may refer to related implementation in the related art, which is not limited in the embodiment of the present invention.

In the embodiment of the present invention, for any member port, XGE X/Y/M/N may be described, where X identifies a frame to which the member port belongs, Y identifies a line card to which the member port belongs, M identifies a daughter card to which the member port belongs, and N is a member port number of the member port.

Where for fixed card ports (i.e., ports that belong to a line card and not to any daughter card), the daughter card number to which such port belongs may be determined to be a default value, such as 0.

Accordingly, the attribution information of each member in the aggregation interface can be directly determined by reading the member port configuration information of the aggregation interface.

In the embodiment of the invention, when the member port for sending the BFD message is selected from the member ports of the aggregation interface, the consistency of the attribution information of the member ports selected twice continuously is avoided, so that the influence of hardware faults of sub-cards, line cards and frames at all levels or the influence of continuous addition or withdrawal of the member ports on the state judgment of the aggregation interface can be reduced, and the probability of misjudgment of the state of the aggregation interface is reduced.

Illustratively, when member ports belonging to different frames exist in member ports of an aggregation interface, member ports which are selected for sending BFD messages continuously twice belong to different frames, so that misjudgment of the state of the aggregation interface caused by single-frame faults is avoided; when member ports which belong to different line cards exist in member ports of an aggregation interface, member ports which are selected for sending BFD messages continuously twice belong to different line cards, and the misjudgment of the state of the aggregation interface caused by the fault of a single line card is avoided; when member ports which belong to different sub-cards exist in the member ports of the aggregation interface, the member ports which send BFD messages and are selected twice continuously belong to different sub-cards, and therefore misjudgment of the state of the aggregation interface caused by single sub-card faults is avoided.

Optionally, in an embodiment of the present invention, the selecting, according to the attribution information of each member port, a member sending a BFD packet includes:

determining a target sequence for sending BFD messages through each member port according to the attribution information of each member port; wherein, the attribution information of two adjacent member ports in the target sequence is inconsistent;

and selecting the member ports for sending the BFD messages in sequence according to the sequence of each member port in the target sequence.

In this embodiment, after determining the attribution information of each member port, the order (referred to as a target order herein) in which the BFD messages are transmitted through each member port may be determined according to the attribution information of each member port.

In an example, the determining a target sequence for sending the BFD packet through each member port according to the attribution information of each member port may include:

the number of the member ports is virtually expanded according to the attribution information of each member port, so that the number of the member ports of different frames is consistent after virtual expansion, the number of the member ports of different line cards in the same frame is consistent, the number of the member ports of different sub cards in the same line card is consistent, and the number of the ports with different numbers in the same sub card is consistent;

and adding each member port after virtual expansion to the target sequence in a mode of alternating frame, line card, sub card and member port numbers.

In this example, in order to reduce the influence of hardware faults at each level of the sub-cards, the line cards, and the frames or continuous addition or exit of member ports to the aggregation interface state judgment to the maximum extent and reduce the probability of misjudgment of the aggregation interface state, the target sequence of BFD message transmission by each member port may be determined according to the principle of inter-frame transmission averaging, intra-frame line card transmission averaging, intra-frame sub-card transmission averaging, and intra-frame member port transmission averaging of each number in the sub-card.

In this example, in order to achieve inter-frame average transmission, intra-frame average transmission for line cards, intra-frame average transmission for sub-cards in the same line card, and average transmission for member ports of each number in the same sub-card, the number of member ports in the same line card may be virtually extended according to the attribution information of the member ports in the aggregation interface, so that the number of member ports in different frames after virtual extension is the same, the number of member ports in different line cards in the same frame is the same, the number of member ports in different sub-cards in the same line card is the same, and the number of member ports in different numbers in the same sub-card is the same.

For example, suppose that line card 1 includes 2 daughter cards, namely daughter card 1 and daughter card 2. Member port 1 and member port 2 exist on daughter card 1 (i.e. the number of member ports of daughter card 1 is 2), and member port 3, member port 4 and member port 5 exist on daughter card 2 (i.e. the number of member ports of daughter card 2 is 3). In order to make the number of the member ports of the daughter card 1 and the daughter card 2 in the line card 1 consistent, the number of the member ports of the daughter card 2 and the daughter card 3 is virtually expanded, so that the list of the member ports on the daughter card 1 is { member port 1, member port 2, member port 1, member port 2}, and the list of the member ports on the daughter card 2 is { member port 3, member port 4, member port 5, member port 3, member port 4, member port 5 }.

By way of example and not limitation, the daughter cards 1 and 2 may have the same number of member ports by using the least common multiple of the number of member ports included in each of the daughter cards 1 and 2.

In this example, after the number of the member ports is virtually extended in the above manner, the member ports after virtual extension may be added to the target sequence in an alternating manner of the member ports of the frame, the line card, and the daughter card.

Illustratively, the adding the virtually-extended member ports to the target sequence in the manner that the member ports of the frame, the line card, and the daughter card are alternated in sequence may include:

if the total number of the frames to which each member port belongs in the aggregation interface is greater than 1, polling and selecting the member ports in each frame to add to the target sequence;

for any frame, if the number of target line cards with member ports in the frame is greater than 1, when the member ports are selected from the frame for multiple times and added to a target sequence, the member ports of all the target line cards in the frame are selected in a polling mode and added to the target sequence;

for any target line card, if the number of target sub-cards with member ports in the target line card is greater than 1, when the member ports are selected from the target line card for multiple times and added to a target sequence, the member ports of all the target sub-cards of the target line card are selected in a polling mode and added to the target sequence;

for any target sub-card, if a plurality of different member ports exist on the target sub-card, when the member ports are selected from the target sub-card for a plurality of times and added to the target sequence, the member ports of the target sub-card are selected in turn and added to the target sequence.

For example, assuming that member ports of the aggregation interface are distributed in the daughter card 1 and the daughter card 2 of the line card 1 of the frame 1, the line card 2 of the frame 1, and the line card 3 and the line card 4 of the frame 2, when a member port for sending BFD is selected, the member ports in the frame 1 and the frame 2 are polled; when the member port is selected in the frame 1 for multiple times, the member ports on the line card 1 and the line card 2 are selected in a polling mode; when the member port is selected on the line card 1 for multiple times, the member ports on the daughter card 1 and the daughter card 2 are selected by polling.

Illustratively, when the total number of frames to which each member port belongs in the aggregation interface is N, N consecutive member ports in the target sequence belong to different frames, where N > 1;

for any frame, when the total number of target line cards with member ports in the frame is M, the continuous M member ports belonging to the frame in the target sequence belong to different target line cards, and M is greater than 1;

for any target line card, when the total number of target sub-cards with member ports on the target line card is L, the continuous L member ports belonging to the target line card in the target sequence belong to different target sub-cards, and L is more than 1;

for any target sub-card, when the total number of different member ports on the target sub-card is K, the continuous K member ports belonging to the target sub-card in the target sequence are different.

In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present invention, the technical solutions provided by the embodiments of the present invention are described below with reference to specific examples.

In this embodiment, it is assumed that the aggregation interface includes the following member ports:

XGE1/1/1/1、XGE1/1/1/2、XGE1/1/1/3、XGE1/1/2/1、XGE1/1/2/2、XGE1/2/1/1、XGE1/2/1/2、XGE2/1/1/1

the XGE1/1/1/1, the XGE1/1/1/2 and the XGE1/1/1/3 belong to the daughter card 1 of the line card 1 of the frame 1; the XGE1/1/2/1 and XGE1/1/2/2 belong to the daughter card 2 of the line card 1 of the frame 1; XGE1/2/0/1 and XGE1/2/0/2 belong to the line card 2 of the box 1 (being a fixed port on the line card 2); XGE2/3/0/1 belongs to line card 3 of box 2 (being a fixed port on line card 3), a schematic of which may be as shown in FIG. 2.

In this embodiment, in order to implement inter-frame transmission averaging, intra-frame line card transmission averaging, and intra-co-line card transmission averaging, the transmission ratio between the member ports on the intra-co-line card may be first calculated with the sub-card as the minimum unit.

As shown in fig. 2, the number of the member ports of the daughter card 1 and the daughter card of the line card 1 in the frame 1 is 3: in order to ensure that the number of BFD messages sent between the daughter cards is equal, the number of the member ports of the daughter card 1 may be virtually extended (the number of the member ports after virtual extension is 2 times that before virtual extension) according to the least common multiple (i.e. 6) of the number of the member ports of the two daughter cards, and the number of the member ports of the daughter card 2 may be virtually extended (the number of the member ports after virtual extension is 3 times that before virtual extension), and the member port list after virtual extension is as follows:

daughter card 1: { XGE1/1/1/1, XGE1/1/1/2, XGE1/1/1/3, XGE1/1/1/1, XGE1/1/1/2, XGE1/1/1/3}

Daughter card 2: { XGE1/1/2/1, XGE1/1/2/2, XGE1/1/2/1, XGE1/1/2/2, XGE1/1/2/1, XGE1/1/2/2}

Under the condition that the number of the member ports of the daughter card 1 is consistent with that of the member ports of the daughter card 2, the daughter card in the line card 1 can realize that 1: 1, so that the selection of member ports alternately between two daughter cards can obtain the member port selection sequence of the line card 1 in the box 1 as shown in table 1:

TABLE 1

Daughter card 1 XGE1/1/1/1
Daughter card 2 XGE1/1/2/1
Daughter card 1 XGE1/1/1/2
Daughter card 2 XGE1/1/2/2
Daughter card 1 XGE1/1/1/3
Daughter card 2 XGE1/1/2/1
Daughter card 1 XGE1/1/1/1
Daughter card 2 XGE1/1/2/2
Daughter card 1 XGE1/1/1/2
Daughter card 2 XGE1/1/2/1
Daughter card 1 XGE1/1/1/3
Daughter card 2 XGE1/1/2/2

Similarly, the number of the member ports of the line cards in the same frame is virtually expanded according to the above manner, and the member ports of each line card in the same frame are alternately selected, so as to obtain the member port selection sequence of each line card in the frame 1 as shown in table 2:

TABLE 2

Similarly, the number of inter-frame member ports is virtually expanded in the above manner, and the member ports in each frame are alternately selected, so as to obtain the selection sequence of the member ports in each frame as shown in table 3:

TABLE 3

Based on the member port selection sequence shown in table 3, equal-ratio alternate transmission among frames, equal-ratio alternate transmission among line cards in a frame, and equal-ratio alternate transmission among sub-cards in the same line card can be realized, so that BFD messages are ensured not to be continuously transmitted in the same sub-card, the same line card, and the same frame, and BFD continuous packet loss is not caused when continuous member ports join or quit, thereby ensuring the accuracy of the status judgment of the aggregation interface.

For example, assuming that the block 1 fails, the aggregation interface loses most of the member ports, and taking BFD detection of 10ms × 3 as an example, when the device cannot update the list in a short time, it is ensured that the ratio of normal sending and discarding of BFD messages is 1: 1, the device does not generate the situation of continuously losing 2 messages, and the accuracy of the status interpretation of the aggregation interface is ensured (the detection purpose is achieved when 3 continuous messages are lost in the common status judgment, and the detection purpose is achieved when 2 continuous messages are lost in the extreme situation).

It can be seen from the above description that, in the technical solution provided in the embodiment of the present invention, by determining the attribution information of each member port in the aggregation interface and selecting the member port for sending the BFD message according to the attribution information of each member port, the attribution information of the member ports for sending the BFD message twice continuously is inconsistent, thereby reducing the influence on the state judgment of the aggregation interface due to hardware faults at each level of the daughter card, the line card, and the frame or due to continuous addition or withdrawal of the member ports into or from the aggregation, reducing the probability of misjudgment of the state of the aggregation interface, and improving the accuracy of the state judgment of the aggregation interface.

Referring to fig. 3, a schematic structural diagram of a BFD message sending apparatus is provided for the embodiment of the present invention, where the BFD message sending apparatus may be applied to the above method embodiment, and as shown in fig. 3, the BFD message sending apparatus may include:

a determining unit 310, configured to determine attribution information of each member port in the aggregation interface; the attribution information of the member port is used for identifying a sub card to which the member port belongs, a line card to which the sub card belongs and a frame to which the line card belongs;

a sending unit 320, configured to select a member port that sends a BFD packet according to the attribution information of each member port, so that the attribution information of the member ports that send BFD packets twice consecutively is inconsistent.

In an optional embodiment, the determining unit 310 is further configured to determine, according to the attribution information of each member port, a target sequence for sending a BFD packet through each member port; wherein, the attribution information of two adjacent member ports in the target sequence is inconsistent;

the sending unit 320 is specifically configured to select the member ports for sending the BFD packet in sequence according to the sequence of each member port in the target sequence.

Referring to fig. 4 together, a schematic structural diagram of another BFD message sending apparatus according to an embodiment of the present invention is shown in fig. 4, where on the basis of the BFD message sending apparatus shown in fig. 3, the BFD message sending apparatus shown in fig. 4 further includes:

the copying unit 330 is configured to perform virtual expansion on the number of the member ports according to the attribution information of each member port, so that the number of the member ports in different frames after the virtual expansion is consistent, the number of the member ports in different line cards in the same frame is consistent, the number of the member ports in different sub cards in the same line card is consistent, and the number of the member ports in different numbers in the same sub card is consistent;

the determining unit 310 is specifically configured to add each member port after the virtual expansion to the target sequence in an alternating manner of frame, line card, daughter card, and member port numbers.

In an optional embodiment, the determining unit 310 is specifically configured to, if the total number of frames to which each member port belongs in the aggregation interface is greater than 1, poll and select the member ports in each frame to add to the target sequence;

for any frame, if the number of target line cards with member ports in the frame is greater than 1, when the member ports are selected from the frame for multiple times and added to the target sequence, the member ports of all the target line cards in the frame are selected in a polling mode and added to the target sequence;

for any target line card, if the number of target sub-cards with member ports in the target line card is greater than 1, when the member ports are selected from the target line card for multiple times and added to the target sequence, polling and selecting the member ports of each target sub-card of the target line card to be added to the target sequence;

for any target sub-card, if a plurality of different member ports exist on the target sub-card, when the member ports are selected from the target sub-card for a plurality of times and added to the target sequence, the member ports of the target sub-card are selected in turn and added to the target sequence.

In an optional embodiment, when the total number of frames to which each member port belongs in the aggregation interface is N, N consecutive member ports in the target sequence belong to different frames, where N > 1;

for any frame, when the total number of target line cards with member ports in the frame is M, the continuous M member ports belonging to the frame in the target sequence belong to different target line cards, and M is greater than 1;

for any target line card, when the total number of target sub-cards with member ports on the target line card is L, the continuous L member ports belonging to the target line card in the target sequence belong to different target sub-cards, and L is more than 1;

for any target sub-card, when the total number of different member ports on the target sub-card is K, the continuous K member ports belonging to the target sub-card in the target sequence are different.

Fig. 5 is a schematic diagram of a hardware structure of a BFD packet sending apparatus according to an embodiment of the present invention. The BFD messaging apparatus may include a processor 501, a machine-readable storage medium 502 having machine-executable instructions stored thereon. The processor 501 and the machine-readable storage medium 502 may communicate via a system bus 503. Also, processor 501 may perform the BFD messaging methods described above by reading and executing machine-executable instructions in machine-readable storage medium 502 corresponding to the BFD messaging logic.

The processor 501 referred to herein may be a general purpose processor CPU chip, FPAG logic chip device, general purpose network processor NP chip, etc., of any architecture

The machine-readable storage medium 502 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be volatile memory, non-volatile memory, or similar storage medium. In particular, the machine-readable storage medium 502 may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., a compact disk, a DVD, etc.), or similar storage medium, or a combination thereof.

Embodiments of the present invention also provide a machine-readable storage medium, such as machine-readable storage medium 502 in fig. 5, that includes machine-executable instructions that are executable by processor 501 in a BFD messaging apparatus to implement the BFD messaging method described above.

The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.

For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.

It can be seen from the above embodiments that, by determining the attribution information of each member port in the aggregation interface and selecting the member port for sending the BFD message according to the attribution information of each member port, the attribution information of the member ports for sending the BFD message continuously twice is inconsistent, thereby reducing the influence of hardware faults at each level of the daughter card, the line card, and the frame, or the influence of continuous addition or withdrawal of the member ports on the aggregation state judgment of the aggregation interface, reducing the probability of misjudgment of the aggregation state, and improving the accuracy of the aggregation state judgment.

Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.

It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:信号接收电路及其操作方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!