CN111131021B - Forwarding method and network equipment for Bidirectional Forwarding Detection (BFD) message - Google Patents

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

Info

Publication number
CN111131021B
CN111131021B CN202010050763.2A CN202010050763A CN111131021B CN 111131021 B CN111131021 B CN 111131021B CN 202010050763 A CN202010050763 A CN 202010050763A CN 111131021 B CN111131021 B CN 111131021B
Authority
CN
China
Prior art keywords
bfd
address
node
message
hop
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
CN202010050763.2A
Other languages
Chinese (zh)
Other versions
CN111131021A (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 CN202010050763.2A priority Critical patent/CN111131021B/en
Publication of CN111131021A publication Critical patent/CN111131021A/en
Application granted granted Critical
Publication of CN111131021B publication Critical patent/CN111131021B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present disclosure provides a forwarding method and a network device for Bidirectional Forwarding Detection (BFD) messages, so as to solve the problem in the prior art that the forwarding path of the BFD messages is uncontrollable in multi-hop BFD detection. A first node receives a configuration command of BFD detection, wherein the configuration command carries path information to be forwarded of a BFD message; the first node determines the IP address of the next hop of the BFD message to be generated according to the path information to be forwarded; the first node generates a BFD message, wherein the generated BFD message comprises the information of the path to be forwarded, and the destination IP address of the BFD message is the IP address of the next hop; and the first node sends the BFD message to next-hop equipment according to the destination IP address of the BFD message.

Description

Forwarding method and network equipment for Bidirectional Forwarding Detection (BFD) message
Technical Field
The present application relates to network communication technologies, and in particular, to a forwarding method and a network device for Bidirectional Forwarding Detection (BFD) packets.
Background
The Bidirectional Forwarding Detection (BFD) with multiple hops can be used to detect the link condition of any path between two devices, and these paths can span multiple hops. At present, the implementation of the multi-hop BFD is to obtain an egress interface by looking up a forwarding table FIB (Forward Information dataBase, abbreviated as FIB) for forwarding, and if there is an equivalent link, one link is randomly selected for forwarding.
As shown in fig. 1, routers 1 to 5 span multiple network devices, and links existing between routers 1 to 5 are (1) to (14), respectively. Rouer1 and Router5 can establish a multi-hop BFD session and respectively detect the reachability of opposite-end equipment. In fig. 1, assuming that link (3) and link (4) are equivalent, and link (9) and link (10) are equivalent, then finally determining the optimal path from Router1 to Router 5by looking up the FIB table selects Router1- > Router3- > Router5, and then the path forwarded by the multi-hop BFD packet sent from Router1 may be any one of (3) - > (9), (3) - > (10), (4) - > (9), (4) - > (10), and this forwarding path uncontrollable problem increases the difficulty of location and maintenance when the network fails.
Disclosure of Invention
The disclosure provides a forwarding method and network equipment for Bidirectional Forwarding Detection (BFD) messages, which aim to solve the problem that a BFD message forwarding path is uncontrollable in the prior art.
A first aspect of the present disclosure provides a forwarding method for bidirectional forwarding detection BFD packet, the method including:
the method comprises the steps that a first node receives a configuration command detected by BFD, wherein the configuration command carries path information to be forwarded of a BFD message;
the first node determines the IP address of the next hop of the BFD message to be generated according to the path information to be forwarded;
the first node generates a BFD message, wherein the generated BFD message comprises the information of the path to be forwarded, and the destination IP address of the BFD message is the IP address of the next hop;
and the head node sends the BFD message to next-hop equipment according to the destination IP address of the BFD message.
In a second aspect of the present disclosure, a forwarding method for bidirectional forwarding detection BFD packet in the method is provided, which is applied to any intermediate node of multi-hop BFD detection, and the method includes:
after receiving the BFD message, the intermediate node determines the IP address information of the next hop of the BFD message according to the path information to be forwarded carried by the BFD message;
the intermediate node modifies the destination IP address of the BFD message into the IP address of the next hop equipment;
and the intermediate node sends the modified BFD message to the next hop equipment of the intermediate node according to the destination IP address of the modified BFD message.
A third aspect of the present disclosure provides a forwarding method for bidirectional forwarding detection BFD packet based on the second aspect, where after receiving the BFD packet, the method further includes:
the intermediate node determines the IP address of an output interface of the BFD message on the intermediate node;
and the intermediate node carries the IP address of the outgoing interface in the modified BFD message and sends the modified BFD message to the next hop equipment so as to record the actual forwarding path of the BFD message in the BFD message.
A fourth aspect of the present disclosure provides a forwarding method for bidirectional forwarding detection BFD packet, where the method may be applied to a tail node, and after the tail node receives a BFD packet, an actual forwarding path recorded in the BFD packet sent by a previous-hop node is obtained; and when the IP address of the tail node specified in the configuration command of BFD detection received by the tail node is the same as the source IP address of the received BFD message, reversely recording path information according to the path direction defined by the actual forwarding path to generate reverse path information so as to facilitate the tail node to carry out BFD detection according to the reverse path.
A fifth aspect of the present disclosure is based on the first to fourth aspects, and further provides a forwarding method for bidirectional forwarding detection BFD packet, further including: the configuration command also carries routing mode information, and the routing mode information comprises a loose source routing mode or a strict source routing mode; correspondingly, the generated BFD packet also includes routing mode information.
A sixth aspect of the present disclosure provides a network device, where when the network device is a head node of BFD detection, the network device includes:
the first receiving unit is used for receiving a configuration command detected by BFD, wherein the configuration command carries path information to be forwarded of a BFD message;
the first determining unit is used for determining the IP address of the next hop of the BFD message to be generated according to the path information to be forwarded;
a first generating unit, configured to generate a BFD packet, where the generated BFD packet includes the information of the path to be forwarded, and a destination IP address of the BFD packet is an IP address of the next hop;
and the first sending unit is used for sending the BFD message to next-hop equipment according to the destination IP address of the BFD message.
A seventh aspect of the present disclosure further provides a network device, where when the network device is an intermediate node for BFD detection, the network device includes:
the second receiving unit is used for receiving the BFD message sent by the previous hop node;
a second determining unit, configured to determine, according to the to-be-forwarded path information carried in the BFD packet, IP address information of a next hop of the BFD packet;
a second generating unit, configured to modify a destination IP address of the BFD packet to an IP address of the next-hop device;
and the second sending unit is used for sending the modified BFD message to the next-hop equipment of the intermediate node according to the destination IP address of the modified BFD message.
An eighth aspect of the present disclosure is to provide, based on the seventh aspect, a network device, in the network device, where the second determining unit is further configured to determine an IP address of an outgoing interface of the BFD packet on the intermediate node, and the second generating unit is further configured to carry the IP address of the outgoing interface in the modified BFD packet, and send the modified BFD packet to the next-hop device, so as to record an actual forwarding path of the BFD packet in the BFD packet.
In a ninth aspect of the present disclosure, there is further provided a network device, where when the network device is a tail node of BFD detection, the network device includes: a third receiving unit, a third determining unit and a third recording unit;
a third receiving unit, configured to receive a BFD packet sent by a previous hop;
a third determining unit, configured to obtain an actual forwarding path recorded in a BFD packet sent by a previous-hop node;
the third determining unit is further configured to, when the IP address of the tail node specified in the configuration command for BFD detection received by the tail node is the same as the source IP address of the BFD packet, reversely record path information by the third recording unit according to a path direction defined by the actual forwarding path to generate reverse path information, so that the tail node performs BFD detection according to the reverse path.
According to the method and the network equipment provided by the disclosure, the forwarding path of the multi-hop BFD message can be set as required in a command configuration mode, so that the problem that the forwarding of the BFD message is uncontrollable under the condition of an equivalent path in the prior art can be solved.
Drawings
FIG. 1 is a diagram of application networking provided by an embodiment of the invention;
FIG. 2-1 is a flow chart of a method provided by an embodiment of the present invention;
FIG. 2-2 are flow diagrams of methods provided by another embodiment of the present invention;
FIG. 3 is a thumbnail view of an IP address provided by an embodiment of the invention;
fig. 4 is a structural diagram of a header of a BFD packet according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an optional field of an IP header according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating optional fields according to yet another embodiment of the present invention;
FIG. 7 is a thumbnail view of an IP address of another example provided by an embodiment of the present invention;
fig. 8 is a schematic diagram of an optional field of an IP packet header according to yet another embodiment of the present invention;
fig. 9-11 are block diagrams of network devices provided by the present invention.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth 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 that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
In the prior art, another problem exists at the same time, as shown in fig. 1, it is assumed that the FIB optimal path from Router1 to Router5 is Router1- > Router3- > Router5;
the standby path is Router1- > Router2- > Router4- > Router6- > Router5;
the non-optimal path is Router1- > Router3- > Router4- > Router6- > Router5 and the like.
Under the realization, the multi-hop BFD can only detect the optimal path selected by a forwarding table FIB (Forward Information dataBase, abbreviated as FIB), and can not detect a non-optimal path or a standby path according to actual needs.
In order to better understand the technical solutions of the present disclosure, some concepts related to the present disclosure are introduced here. Since BFD can detect arbitrary paths between two devices or two systems, these paths may span many hops. In the present disclosure, a device that initially generates a BFD packet is also a source device of the BFD packet, and is referred to as a head node in this embodiment; the BFD packet is forwarded to the tail node along a path formed by a series of devices, which are referred to as intermediate nodes in this embodiment; the tail node is the destination device of the path to be forwarded.
One network device includes a device IP address for tagging the network device, and the IP address of the general device is the IP address of the loopback port. The network device further includes a plurality of interfaces, each configured with a corresponding IP address, and the interface may be a logical interface or a physical interface. The present disclosure does not impose limitations on the type of interface.
The path to be forwarded comprises a device IP address of the network device passed by the BFD message or a network device interface IP address passed by the BFD message.
Different from the prior art, the BFD packet of the present disclosure may carry routing mode information, where the routing mode information includes a loose source routing mode and a strict source routing mode.
The strict source routing mode defines the IP address through which the BFD message must pass. In the IP addresses appointed in the path to be forwarded, other IP addresses cannot pass between two adjacent IP addresses, and the sequence of the passing IP addresses cannot be changed.
The loose source routing mode means that the BFD message only needs to pass through the IP address designated by the path to be forwarded, and other devices can be arranged between the IP addresses through which the BFD message passes.
Of course, the configuration command may not carry routing mode information, and the multi-hop BFD detection is defaulted to execute a strict source routing mode or a loose source routing mode by a protocol, and accordingly, the routing mode information does not need to be carried in the BFD message.
In the following embodiments of the present disclosure, a configuration command and BFD packet carrying routing mode information are described as an example.
Example one
In order to solve the problems in the prior art, the present disclosure provides a forwarding method for Bidirectional Forwarding Detection (BFD) packets, and fig. 2-1 is a flowchart provided in an embodiment of the present disclosure, where the forwarding method includes:
step 202, the first node receives a configuration command detected by the BFD, where the configuration command carries information of a path to be forwarded of the BFD packet.
And 204, the first node determines the IP address of the next hop of the BFD message to be generated according to the path information to be forwarded.
And step 206, the first node generates a BFD message, wherein the generated BFD message includes information of a path to be forwarded, and a destination IP address of the BFD message is the IP address of the next hop.
And 208, sending the BFD message to next hop equipment according to the destination IP address of the BFD message.
By the method provided by the disclosure, the forwarding path of the multi-hop BFD message can be set as required in a command configuration mode, so that the problem that the forwarding of the BFD message is uncontrollable under the condition of an equivalent path in the prior art can be solved.
Example two
For the intermediate node, the forwarding method may be executed according to the flowchart shown in fig. 2-2, and includes:
step 210, after receiving the BFD message, the intermediate node determines the IP address information of the next hop device of the BFD message according to the to-be-forwarded path information carried in the BFD message;
step 212, the intermediate node modifies the destination IP address of the BFD message into the IP address of the next hop device;
and step 214, the intermediate node sends the BFD message to next-hop equipment according to the modified destination IP address of the BFD message.
By the aid of the method, after the intermediate node receives the BFD message, the intermediate node can subsequently forward the BFD message according to the path to be forwarded carried by the received BFD message, and therefore the problem that forwarding of the BFD message is uncontrollable under the condition that an equivalent path exists in the prior art can be solved.
EXAMPLE III
In order to better illustrate the methods provided by the present disclosure, the methods shown in fig. 2-1 and 2-2 are described below by way of specific examples.
Referring to fig. 1, fig. 1 illustrates an example in which the device IP address of Router1 is 1.1.1.1, the device IP address of Router2 is 2.2.2, the device IP address of Router3 is 3.3.3.3 \8230, and the device IP address of Router6 is 6.6.6.6. The interface IP addresses corresponding to links (1) - (12) in fig. 1 are shown in table 1 below:
Figure BDA0002371090410000071
Figure BDA0002371090410000081
if the link included on the multi-hop path that the administrator wants to detect is (1) - > (5) - > (11) - > (13), the corresponding interface IP address thumbnail is shown in fig. 3. The administrator may input a configuration command on the first node Router1, or may issue the configuration command to the Router1 through the network management device, where the configuration command may carry information of a path to be forwarded of the BFD packet.
If the path to be forwarded is configured directly on Router1, the information of the path to be forwarded may include interface IP address 12.0.0.1 of Router1, interface IP address 12.0.0.2 of Router2, interface IP address 24.0.0.2 of Router4, interface IP address 46.0.0.2 of Router6, and interface IP address 56.0.0.2 of Router 5.
Due to the difference of the routing modes configured by the configuration command, the IP address of the next hop may be the IP address of the ingress interface of the next hop device, or may be the device IP address of the next hop device. For example, if the routing mode is the strict source routing mode and the IP address of the path to be forwarded in the configuration command is configured as the IP address of the ingress interface of the next-hop device, the BFD packet may be received by the corresponding ingress interface strictly according to the definition in the configuration command. If the routing mode is the loose source routing mode, the network device may determine the IP address of the next hop of the BFD packet according to the existing FIB table.
Therefore, the IP address of the network device referred to in the following embodiments of the present disclosure may be a device IP address of the network device, or may also be an interface IP address of the network device.
In an optional implementation manner, the configuration command received by the head node may be:
bfd multi-hop detect-source 12.0.0.1local-discr 1remote-discr 1SSRR local-ip-list 12.0.0.2 24.0.0.2 46.0.0.2 56.0.0.2
wherein BFD multi-hop is characterized by multi-hop BFD detection;
the back of the Detect-source is connected with a source IP address detected by multi-hop BFD;
the local-disc uniquely identifies the BFD session of one device, the value of the local-disc of Router1 corresponds to the remote-disc of Router5, and the value of the remote-disc of Router1 corresponds to the local-disc of Router5;
SSRRs, i.e., the strict and record route, represent strict source routing patterns.
And local-IP-list, namely using the IP address specified by the configuration command as a Router passed through in the forwarding path, wherein the last IP address represents the target IP address detected by BFD, and if only one IP address exists in the list, the forwarding path is not limited.
When Router1 receives the configuration command, router1 as the head node performs step 204.
In this embodiment, a configuration command received by the head node is taken as an example of the configuration command in the above example. With reference to fig. 3, the first node Router1 may determine, according to the to-be-forwarded path information carried in the configuration command, that the IP address of the output interface of the BFD packet to be generated is 12.0.0.1 of the interface IP address of Router1, and the IP address of the next hop is 12.0.0.2 of the interface IP address of Router 2.
After the outbound interface IP address and the next hop IP address are determined, step 206 may be performed.
The structure of the generated BFD packet may be as shown in fig. 4, and as shown in fig. 4, the BFD packet provided in this embodiment includes an Ethernet header (Ethernet II), an IP header (IP header), a UDP header (UDP header), and a BFD header (BFD header).
The method provided by the present disclosure can carry the information of the path to be forwarded in the IP message header. The IP message header can comprise a source IP address field, a destination IP address field and an IP optional field.
The source IP address field may be a device IP address of the network device, or may be specified as an interface IP address of the network device, specifically determined by an administrator when inputting the configuration command.
The BFD message generated by Router1 includes path information to be forwarded, which at least includes: the Source IP address Source IP =12.0.0.1 of the BFD message, (in this example, the Source IP address is the interface IP address 12.0.0.1 is taken as an example for explanation) the destination IP address Dest IP =12.0.0.2 of the BFD message, and other IP addresses IP addr1=24.0.0.2, IP addr2=46.0.0.2, and IP addr3=56.0.0.2 on the forwarding path in the following, which are carried in optional fields. Information of a part of the path to be forwarded may be carried in an IP option field (option), and the next-hop IP address determined in step 204 is written into the destination IP address field.
Generally, the IP optional field has a maximum of 40bytes, and for an IP address with an IP address type of IPv4, each IP address occupies 4bytes, and a maximum of 9 IP addresses can be stored in the IP optional field.
Fig. 5 is a schematic diagram of optional fields of an IP header, in fig. 5, each entry in the table represents 1byte, and the size of the optional field of the IP address in fig. 5 is 16bytes.
Optional fields include: a routing mode field, a length field, an indication field.
A routing mode field, which is a field used for carrying routing mode information (in the example of fig. 5, this field is Type); for example, when Type =137, a strict source routing mode is characterized, and Type =131 characterizes a loose source routing mode;
a Length field for carrying a field (Length in the example of fig. 5) that characterizes the Length of useful information; taking the optional fields shown in fig. 5 as an example, the Type field in the optional field occupies 1byte, the length occupies 1byte, the three IP addresses 24.0.0.2, 46.0.0.2, and 56.0.0.2 occupy 12bytes altogether, and the above occupy 15bytes altogether, since the protocol specifies that the number of bytes occupied by the IP packet header needs to be a multiple of 4, the last byte-occupying byte End of the option list can be used to complement the part less than the multiple of 4. For fig. 5, the last place-occupying byte is removed, and the Length of the actual useful information is 15bytes, so Length =15. The length of the useful information is determined according to the fixed length field + the IP address of the path to be forwarded after the removal of the first node and the second hop node. In the present embodiment, the fixed length field includes a type field + length field + point field.
An indication field, configured to carry a field (in the example of fig. 5, the field is Point) that directs a current node (excluding a first node) to update a destination IP address, where an initial value of Point is 4; and the point value is increased by 4 every time the destination IP address of the BFD message is updated.
How the point value varies and its effect will be explained in detail below.
(1) For the BFD packet sent by the head node Router1, where the source IP address =12.0.0.1, the destination IP address =12.0.0.2, and point =4, the other IP addresses IP addr1=24.0.0.2, IP addr2=46.0.0.2, and IP addr3=56.0.0.2 carried in the optional field on the forwarding path subsequently.
(2) When receiving the BFD packet sent by Router1, the intermediate node Router2 may determine, according to point =4 of the BFD packet, that the IP address of the next hop of the BFD packet is the gray-labeled IP address 24.0.0.2 pointed by the arrow in fig. 6.
(3) And the intermediate node Router2 modifies the destination IP address of the received BFD message into the IP address of the next hop determined in the step (2) of 24.0.0.2.
In an optional implementation manner, the intermediate node may record an actual forwarding path of the BFD packet in the BFD packet. The actual forwarding path includes the IP address of the egress interface through which the BFD packet passes and the source IP address. Specifically, the intermediate node may determine an IP address of an outgoing interface of the BFD packet on the intermediate node, carry the IP address of the outgoing interface in the BFD packet, and send the IP address to the next hop.
For example, the destination IP address of the BFD packet received by the intermediate node Router2 is 12.0.0.2, which is modified to 24.0.0.2, and further, the Router2 determines, according to the FIB table stored in the Router2, that the IP address of the output interface on the Router2 of the BFD packet with the destination IP address of 24.0.0.2 is 24.0.0.1; when point =4 is currently present, the determined outbound interface IP address 24.0.0.1 may be updated to the IP address pointed by point =4, that is, the original IP addr1=24.0.0.2 is updated to IP addr1=24.0.0.1.
After the actual forwarding path of the BFD packet is updated, the point value is increased by 4, at this time point =8, and points to IP addr2 (46), that is, points to IP address 46.0.0.2. The value of point increased each time is determined according to the number of bytes occupied by the IP address, for example, each IP address occupies 6bytes, and the value of point is increased each time by 6.
Optionally, if the BFD packet does not record the actual forwarding path, the point value may be updated after the intermediate node Router2 finishes updating the destination IP address.
In order to avoid ambiguity, in this embodiment, the BFD packet for updating the destination IP address is subsequently referred to as a modified BFD packet in (4).
(4) When Router4 receives the modified BFD message, the next hop IP address of the BFD message is determined to be 46.0.0.2 according to the point value =8 of the BFD message, and Router4 modifies the destination IP address of the BFD message to be 46.0.0.2.
The intermediate node Router4 determines that the IP address of an outlet interface of a BFD message on the Router4, the target IP address of which is 46.0.0.2, is 46.0.0.1 according to an FIB table stored in the intermediate node Router 4; when point =8 is currently present, the determined outbound interface IP address 46.0.0.1 may be updated to the IP address pointed by point =8, that is, the original IP addr2=46.0.0.2 is updated to IP addr1=46.0.0.1.
After the actual forwarding path of the BFD packet is updated, the point value is increased by 4, at this time point =12, and points to IP addr3 (56), that is, points to IP address 56.0.0.2.
(5) When the Router6 receives a BFD message sent by the Router4, the next hop IP address of the BFD message is determined to be 56.0.0.2 according to the point value =12 of the BFD message, and the Router6 modifies the destination IP address of the BFD message to be 56.0.0.2.
The intermediate node Router6 determines that the IP address of an outlet interface of a BFD message with the destination IP address of 56.0.0.2 on the Router6 is 56.0.0.1 according to an FIB table stored by the intermediate node Router 6; when point =12, the determined outbound interface IP address 56.0.0.1 may be updated to the IP address pointed by point =12, that is, the original IPaddr3=56.0.0.2 is updated to IP addr3=56.0.0.1.
After the actual forwarding path of the BFD packet is updated, the point value is increased by 4, and at this time point =16 points to the End of opportunity list.
Therefore, the information carried by the BFD packet sent by each node is shown in table 1 below:
Figure BDA0002371090410000121
TABLE 1
(6) After receiving the BFD packet sent by the previous-hop Router6, the tail node Router5 determines that point =16 is greater than length 15, and the destination IP address of the BFD packet is the local IP address, and then the detection of the BFD packet is ended.
In an optional embodiment, after receiving the BFD packet sent by the previous-hop device Router6, the tail node Router5 may obtain the actual forwarding path 12.0.0.1- > 24.0.0.0.1- >46.0.0.1- >56.0.0.1- >56.0.0.2 recorded in the BFD packet;
if the tail node specified in the configuration command of BFD detection received by the tail node Router5 is 12.0.0.1, that is, the interface IP address of Router1 is the same as the source IP address of the BFD packet sent by the previous hop Router6 received by the tail node Router5, reversely recording path information according to the path direction defined by the actual forwarding path to generate reverse path information:
56.0.0.2->56.0.0.1->46.0.0.1->24.0.0.1->12.0.0.1;
so that the tail node Router5 performs BFD detection according to the reverse path described above.
In another optional implementation, if the detect-source specified in the configuration command received by the head node is 1.1.1.1, the source IP address of the generated BFD packet is the device IP address 1.1.1.1 of the head node, further, the head node may determine the IP address 12.0.0.1 of the interface according to the determined destination IP address 12.0.0.2 of the BFD packet and the FIB table, and the head node needs to record the interface IP address 12.0.0.0.1 in the optional field, but the interface IP address is not used for guiding forwarding. Therefore, the initial default point =8 of the head node records the interface IP address in the optional field only for the convenience of the tail node generating the complete reverse path information in step (6). In this example, the specific forwarding process is similar to steps (1) to (6) in the above embodiment, and is not described again here. Correspondingly, the information carried by the BFD packet sent by each node is shown in table 2 below:
Figure BDA0002371090410000131
TABLE 2
After receiving the BFD packet sent by the previous-hop device Router6, the tail node Router5 may obtain an actual forwarding path recorded in the BFD packet:
1.1.1.1->12.0.0.1->24.0.0.1->46.0.0.1->56.0.0.1->56.0.0.2。
by the method provided by the embodiment, the forwarding path can be BFD detected strictly as required through a strict source routing mode, the forwarding path of the BFD message can be controlled, and the BFD detection can be respectively performed on the equivalent path through a configuration command even if the equivalent path exists.
In addition, the method provided by the implementation can also record the actually forwarded path in the BFD message, so that the subsequent tail node can conveniently perform reverse BFD detection.
Example four
In the third embodiment, how to perform BFD detection in the strict source routing mode is described, and in the loose source routing mode, how to perform BFD detection is described in this embodiment.
If the administrator wants to detect the path from Router1 to Router4 in fig. 1, only link (1) is detected, and no limitation is imposed on other routers and links through which the BFD packet is forwarded. A thumbnail of the interface IP address is shown in fig. 7. In this embodiment, the head node is Router1, the intermediate node is Router2, and the tail node is Router4.
If the administrator sends and receives the configuration command from Router1, the BFD packet correspondingly generated by Router1 may be as shown in fig. 8.
The information carried by the BFD packet sent by each node is shown in table 2 below:
network device Source IP address Destination IP address Point value IP addr1
Router1 12.0.0.1 12.0.0.2 4 4.4.4.4
Router2 (Link 5) 12.0.0.1 4.4.4.4 8 24.0.0.1
Router2 (Link 6) 12.0.0.1 4.4.4.4 8 24.0.1.2
When Router4 receives the message forwarded by Router2, it finds that the Point value is greater than the Length value and the destination IP address is the local address 4.4.4.4, the BFD message unidirectional detection is finished.
By the method provided by the embodiment, BFD detection can be performed on the forwarding path as required through a loose source routing mode, so that flexible change of a detection mode is achieved, and actual requirements of services are met.
EXAMPLE five
In this embodiment, a network device is further provided, where the network device is configured to execute the method executed by the head node in the foregoing embodiment. Fig. 9 is a schematic structural diagram of a network device provided in this embodiment, and as shown in fig. 9, the network device 5 includes:
a first receiving unit 501, configured to receive a configuration command for BFD detection, where the configuration command carries information of a path to be forwarded of a BFD packet;
a first determining unit 502, configured to determine, according to the to-be-forwarded path information, an IP address of a next hop of a BFD packet to be generated;
a first generating unit 503, configured to generate a BFD packet, where the generated BFD packet includes the information of the path to be forwarded, and a destination IP address of the BFD packet is an IP address of the next hop;
and a first sending unit 504, configured to send the BFD packet to a next-hop device according to a destination IP address of the BFD packet.
The configuration command also carries routing mode information, and the routing mode information comprises a loose source routing mode or a strict source routing mode;
correspondingly, the generated BFD packet also includes routing mode information.
This embodiment further provides a network device 6, where the network device 6 may be configured to execute the method performed by the intermediate node in the foregoing embodiments, and specifically, as shown in fig. 10, the network device 6 is configured to execute the method performed by the intermediate node in the foregoing embodiments
A second receiving unit 601, configured to receive a BFD packet sent by a previous-hop node;
a second determining unit 602, configured to determine, according to the to-be-forwarded path information carried in the BFD packet, IP address information of a next hop of the BFD packet;
a second generating unit 603, configured to modify a destination IP address of the BFD packet to an IP address of the next-hop device;
a second sending unit 604, configured to send the modified BFD packet to the next-hop device of the intermediate node according to the destination IP address of the modified BFD packet.
Wherein the second determining unit 604 is further configured to determine an IP address of an egress interface of the BFD packet on the intermediate node,
the second generating unit 603 is further configured to send the modified BFD packet carrying the IP address of the egress interface to the next-hop device, so as to record an actual forwarding path of the BFD packet in the BFD packet.
This embodiment further provides a network device 7, where the network device 7 may be configured to execute the method executed by the tail node in the foregoing embodiment, specifically, as shown in fig. 11, the network device 7 includes: a third receiving unit 701, a third determining unit 702, and a third recording unit 703;
a third receiving unit 701, configured to receive a BFD packet sent by a previous hop;
a third determining unit 702, configured to obtain an actual forwarding path recorded in a BFD packet sent by a previous-hop node;
the third determining unit 702 is further configured to, when the IP address of the tail node specified in the configuration command for BFD detection received by the tail node is the same as the source IP address of the BFD packet, reversely record, by the third recording unit 703, path information according to the path direction defined by the actual forwarding path to generate reverse path information, so that the tail node performs BFD detection according to the reverse path.
It should be noted that, the basic principle and the resulting technical effect of the network device provided in the embodiment of the present application are the same as those of the methods in the first to fourth embodiments, and for brief description, reference may be made to the description contents of the methods mentioned above for the parts that are not mentioned in this embodiment.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to embodiments of the present application. 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 the embodiments of the present application may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.
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 application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a readable storage medium, which includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned readable storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (9)

1. A forwarding method for Bidirectional Forwarding Detection (BFD) messages is applied to a first node of multi-hop BFD detection, and is characterized by comprising the following steps:
the method comprises the steps that a first node receives a configuration command detected by BFD, wherein the configuration command carries path information to be forwarded of a BFD message;
the first node determines the IP address of the input interface of the BFD message next-hop equipment to be generated according to the path information to be forwarded;
the first node generates a BFD message, wherein the generated BFD message comprises the information of the path to be forwarded, and the destination IP address of the BFD message is the IP address of the input interface of the next-hop equipment;
and the first node sends the BFD message to next-hop equipment according to the destination IP address of the BFD message.
2. The method of claim 1, further comprising: the configuration command also carries routing mode information, and the routing mode information comprises a loose source routing mode or a strict source routing mode;
correspondingly, the generated BFD packet also includes routing mode information.
3. A forwarding method for Bidirectional Forwarding Detection (BFD) messages is characterized in that the method is applied to any intermediate node of multi-hop BFD detection, and the method comprises the following steps:
after receiving a BFD message, an intermediate node determines IP address information of an input interface of next-hop equipment of the BFD message according to-be-forwarded path information carried by the BFD message, wherein the to-be-forwarded path information is carried in a configuration command of BFD detection received by a first node, and the BFD message generated by the first node comprises the to-be-forwarded path information;
the intermediate node modifies the destination IP address of the BFD message into the inlet interface IP address of the next-hop equipment;
and the intermediate node sends the modified BFD message to the next hop equipment of the intermediate node according to the destination IP address of the modified BFD message.
4. The method according to claim 3, wherein after the intermediate node receives the BFD packet, the method further comprises:
the intermediate node determines the IP address of an output interface of the BFD message on the intermediate node;
and the intermediate node carries the IP address of the outgoing interface in the modified BFD message and sends the modified BFD message to the next hop equipment so as to record the actual forwarding path of the BFD message in the BFD message.
5. The method of claim 4, wherein if the next hop device is a tail node, the method further comprises:
after receiving the BFD message, the tail node acquires an actual forwarding path recorded in the BFD message sent by the previous hop of node;
and when the IP address of the tail node specified in the configuration command of BFD detection received by the tail node is the same as the source IP address of the BFD message, reversely recording path information according to the path direction defined by the actual forwarding path to generate reverse path information, so that the tail node can carry out BFD detection according to the reverse path.
6. A network device, wherein when the network device is a head node of BFD detection, the network device comprises:
the first receiving unit is used for receiving a configuration command of BFD detection, wherein the configuration command carries path information to be forwarded of a BFD message;
the first determining unit is used for determining the IP address of the input interface of the BFD message next-hop equipment to be generated according to the path information to be forwarded;
a first generating unit, configured to generate a BFD packet, where the generated BFD packet includes the information of the path to be forwarded, and a destination IP address of the BFD packet is an IP address of an ingress interface of the next-hop device;
and the first sending unit is used for sending the BFD message to next-hop equipment according to the destination IP address of the BFD message.
7. A network device, wherein when the network device is an intermediate node for BFD detection, the network device comprises:
the second receiving unit is used for receiving the BFD message sent by the previous hop node;
a second determining unit, configured to determine, according to-be-forwarded path information carried in the BFD packet, IP address information of an ingress interface of a next-hop device of the BFD packet, where the to-be-forwarded path information is carried in a configuration command of BFD detection received by a first node, and a BFD packet generated by the first node includes the to-be-forwarded path information;
a second generating unit, configured to modify a destination IP address of the BFD packet to an IP address of an ingress interface of the next-hop device;
and the second sending unit is used for sending the modified BFD message to the next hop equipment of the intermediate node according to the destination IP address of the modified BFD message.
8. The network device of claim 7,
the second determining unit is further configured to determine an IP address of an egress interface of the BFD packet on the intermediate node,
the second generating unit is further configured to send the modified BFD packet carrying the IP address of the egress interface to the next-hop device, so as to record an actual forwarding path of the BFD packet in the BFD packet.
9. The network device of claim 8, wherein when the next-hop device is a tail node of BFD detection,
the tail node receives a BFD message sent by the previous hop;
the tail node acquires an actual forwarding path recorded in a BFD message sent by the previous hop of node;
and when the IP address of the tail node specified in the configuration command of BFD detection received by the tail node is the same as the source IP address of the BFD message, reversely recording path information according to the path direction defined by the actual forwarding path to generate reverse path information so as to facilitate the tail node to carry out BFD detection according to the reverse path.
CN202010050763.2A 2020-01-17 2020-01-17 Forwarding method and network equipment for Bidirectional Forwarding Detection (BFD) message Active CN111131021B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010050763.2A CN111131021B (en) 2020-01-17 2020-01-17 Forwarding method and network equipment for Bidirectional Forwarding Detection (BFD) message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010050763.2A CN111131021B (en) 2020-01-17 2020-01-17 Forwarding method and network equipment for Bidirectional Forwarding Detection (BFD) message

Publications (2)

Publication Number Publication Date
CN111131021A CN111131021A (en) 2020-05-08
CN111131021B true CN111131021B (en) 2023-04-07

Family

ID=70489521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010050763.2A Active CN111131021B (en) 2020-01-17 2020-01-17 Forwarding method and network equipment for Bidirectional Forwarding Detection (BFD) message

Country Status (1)

Country Link
CN (1) CN111131021B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111682982B (en) * 2020-06-03 2022-09-27 北京东土军悦科技有限公司 Path fault detection method, device, equipment, system and storage medium
CN114124753B (en) * 2020-08-25 2024-05-03 华为技术有限公司 Message sending method and device
CN114363735B (en) * 2020-10-13 2023-05-12 华为技术有限公司 Route configuration method, network equipment, communication system and storage medium
CN112350938B (en) * 2020-10-28 2023-01-10 北京轻网科技有限公司 Path establishing method and device
CN114726754A (en) * 2020-12-21 2022-07-08 华为技术有限公司 Message transmission method, device and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103490951A (en) * 2013-09-09 2014-01-01 神州数码网络(北京)有限公司 Bidirectional forwarding detection method in multi-hop link on basis of BFD
US8953460B1 (en) * 2012-12-31 2015-02-10 Juniper Networks, Inc. Network liveliness detection using session-external communications

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651578B (en) * 2009-09-08 2011-09-07 杭州华三通信技术有限公司 Bidirectional forwarding detection method by cross-domain forwarding and PE devices
CN101848155A (en) * 2010-05-12 2010-09-29 北京星网锐捷网络技术有限公司 Detection method of label switching path and label switching router
CN102624609A (en) * 2012-02-28 2012-08-01 华为技术有限公司 Method for transmitting reverse bidirectional forwarding detection (BFD) messages, method for notifying paths and device for notifying paths
US9509599B2 (en) * 2014-08-04 2016-11-29 Telefonaktiebolaget L M Ericsson (Publ) Self-bootstrapping BFD session over MPLS LSP
CN105847460B (en) * 2016-03-15 2018-12-28 迈普通信技术股份有限公司 A kind of method and apparatus for realizing two-way converting detection
CN107547383B (en) * 2017-07-26 2020-04-03 新华三技术有限公司 Path detection method and device
CN108768796B (en) * 2018-08-28 2020-08-14 新华三技术有限公司合肥分公司 Link fault detection method and device
CN109218199B (en) * 2018-11-21 2021-03-02 新华三技术有限公司 Message processing method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8953460B1 (en) * 2012-12-31 2015-02-10 Juniper Networks, Inc. Network liveliness detection using session-external communications
CN103490951A (en) * 2013-09-09 2014-01-01 神州数码网络(北京)有限公司 Bidirectional forwarding detection method in multi-hop link on basis of BFD

Also Published As

Publication number Publication date
CN111131021A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN111131021B (en) Forwarding method and network equipment for Bidirectional Forwarding Detection (BFD) message
US10985942B2 (en) Multicast traffic steering using tree identity in bit indexed explicit replication (BIER)
US11863433B2 (en) Scalable and programmable mechanism for targeted in-situ OAM implementation in segment routing networks
US9338079B2 (en) Method of routing multicast traffic
CN105933228B (en) Traffic engineering for bit indexed explicit replication
KR102205882B1 (en) System and method for routing traffic between distinct infiniband subnets based on fat-tree routing
US9584568B2 (en) Signal processing apparatus and signal processing method thereof for implementing a broadcast or a multicast communication
CN110401599B (en) Data packet processing method and device, storage medium and electronic device
US20140269422A1 (en) Encoding Explicit Paths As Segment Routing Segment Lists
CN106603413B (en) Method and device for transmitting flow through designated path
EP3103230A1 (en) Software defined networking (sdn) specific topology information discovery
JP7078633B2 (en) Methods and devices for maintaining the relative timing and order of data packets in a network
EP3716529A1 (en) Tunneling inter-domain stateless internet protocol multicast packets
KR20090110916A (en) Method, bridge and computer network for calculating a spanning tree based on link state advertisementlsa
EP2936751A1 (en) System, method and apparatus to resolve rpf-vector attribute conflicts
CN111147372A (en) Downlink message sending and forwarding method and device
CN109039903B (en) Route determining method, device and machine-readable storage medium
CN116939035A (en) Data processing method, device, electronic equipment and storage medium
JP4128944B2 (en) Multicast transfer route setting method, multicast transfer route calculation device, program, and recording medium
CN114079640B (en) Data processing method, user plane function and device
US10171368B1 (en) Methods and apparatus for implementing multiple loopback links
EP3104562B1 (en) Method of aggregation of flows in ict networks
US20240195729A1 (en) Communication method and apparatus
US20230068443A1 (en) Dynamic packet routing using prioritized groups
CN109005121B (en) Route calculation method and device

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