CN111131021A - 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
CN111131021A
CN111131021A CN202010050763.2A CN202010050763A CN111131021A CN 111131021 A CN111131021 A CN 111131021A CN 202010050763 A CN202010050763 A CN 202010050763A CN 111131021 A CN111131021 A CN 111131021A
Authority
CN
China
Prior art keywords
bfd
address
node
message
path
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.)
Granted
Application number
CN202010050763.2A
Other languages
Chinese (zh)
Other versions
CN111131021B (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. The existing implementation of the multi-hop BFD is to obtain an egress interface by looking up a forwarding table FIB (forwarding Information dataBase, abbreviated as FIB) to Forward, and if an equivalent link exists, a link is randomly selected to Forward.
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. The Rouer1 and the 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 problem of uncontrollable forwarding path increases the difficulty of location and maintenance in case of network failure.
Disclosure of Invention
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 a BFD message forwarding path is uncontrollable.
A first aspect of the present disclosure provides a forwarding method for bidirectional forwarding detection BFD packet, where the method includes:
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.
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 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 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 flowcharts 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 header provided in 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- > Router 5;
the backup path is Router1- > Router2- > Router4- > Router6- > Router 5;
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 (forwarding Information dataBase, abbreviated as FIB), and can not detect the non-optimal path or the standby path according to the actual requirement.
In order to better understand the technical solutions of the present disclosure, some concepts related to the present disclosure are introduced here. Since BFD may detect arbitrary paths between two devices or two systems, these paths may span many hops. In this 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 the routing mode information, and the multi-hop BFD detection is defaulted to the execution of the strict source routing mode or the loose source routing mode by the protocol, and accordingly, the routing mode information does not need to be carried in the BFD packet.
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 of the BFD detection, where the configuration command carries path information to be forwarded of the BFD packet.
And step 204, the first node determines the next-hop IP address 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 path information to be forwarded carried by 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 perform subsequent forwarding on 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, in fig. 1, an example is described in which the device IP address of Router1 is 1.1.1.1, the device IP address of Router2 is 2.2.2, and the device IP address of Router3 is 3.3.3.3.3 … …, 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 administrator wants to detect that the link included on the multi-hop path is (1) - > (5) - > (11) - > (13), the interface IP address thumbnail is shown in fig. 3 accordingly. An administrator may input a configuration command on the head node Router1, or may issue the configuration command to the Router1 through a 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 1SSRRlocal-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;
local-disc uniquely identifies the BFD session of a device, the value of local-disc of Router1 corresponds to remote-disc of Router5, the value of remote-disc of Router1 corresponds to local-disc of Router 5;
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.
After 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. Referring 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 outgoing 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 the interface IP address 12.0.0.2 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 packet generated by Router1 includes path information to be forwarded, which at least includes: the Source IP address Source IP of the BFD packet is 12.0.0.1, (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 of the BFD packet is 12.0.0.2, and the other IP addresses IP addr1 on the forwarding path carried in the optional fields are 24.0.0.2, IP addr2 is 46.0.0.2, and IP addr3 is 56.0.0.2. 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 16 bytes.
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 is 137, a strict source routing mode is characterized, and Type is 131, a loose source routing mode is characterized;
a Length field for carrying a field (Length in the example of fig. 5) that characterizes the Length of useful information; taking the optional field shown in fig. 5 as an example, a Type field in the optional field occupies 1byte, a Length occupies 1byte, 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, and since the protocol specifies that the number of bytes occupied by an IP packet header needs to be a multiple of 4, a part less than the multiple of 4 can be complemented by using an End place-occupying byte End of optional list. In fig. 5, the last place-occupying byte is removed, and the Length of the actual useful information is 15bytes, so that the Length is 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 changes and the effect thereof are explained in detail below.
(1) For the BFD packet sent by the head node Router1, where the source IP address is 12.0.0.1, the destination IP address is 12.0.0.2, and Point is 4, the other IP addresses IP addr1 carried in the optional field on the forwarding path that follow are 24.0.0.2, IP addr2 is 46.0.0.2, and IP addr3 is 56.0.0.2.
(2) The intermediate node Router2 receives the BFD packet sent by Router1, and may determine, according to point of the BFD packet being 4, 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 24.0.0.2 of the next hop determined in (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 at this time, and further, the Router2 determines, according to the FIB table stored in itself, that the IP address of the outgoing interface of the BFD packet with the destination IP address of 24.0.0.2 on the Router2 is 24.0.0.1; when the current point is 4, the determined outbound IP address 24.0.0.1 may be updated to the IP address pointed to by point 4, that is, the original IP addr1 is 24.0.0.2 is updated to IP addr1 is 24.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 is 8, which points to IP addr2(46), that is, to IP address 46.0.0.2. The value of point increase 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 increases by 6 each time.
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 receiving the modified BFD message, Router4 determines that the next hop IP address of the BFD message is 46.0.0.2 according to the point value of the BFD message being 8, and Router4 modifies the destination IP address of the BFD message to 46.0.0.2.
The intermediate node Router4 determines the IP address of the interface of the BFD message with the destination IP address 46.0.0.2 on the Router4 as 46.0.0.1 according to the FIB table stored by the intermediate node Router 4; when the current point is 8, the determined outbound IP address 46.0.0.1 may be updated to the IP address pointed to by point 8, that is, the original IP addr2 is 46.0.0.2 is updated to IP addr1 is 46.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 is 12 and points to IP addr3(56), that is, to IP address 56.0.0.2.
(5) When receiving the BFD packet sent by Router4, Router6 determines that the next hop IP address of the BFD packet is 56.0.0.2 according to point value of the BFD packet being 12, and Router6 modifies the destination IP address of the BFD packet to 56.0.0.2.
The intermediate node Router6 determines the IP address of the interface of the BFD message with the destination IP address 56.0.0.2 on the Router6 as 56.0.0.1 according to the FIB table stored by the intermediate node Router 6; when the current point is 12, the determined outbound IP address 56.0.0.1 may be updated to the IP address pointed to by point 12, that is, the original IPaddr3 is 56.0.0.2 is updated to IPaddr3 is 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 is 16, which points to 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 the tail node Router5 receives the BFD packet sent by the previous-hop Router6, it is determined that point 16 is greater than length 15, and the destination IP address of the BFD packet is the local IP address, then the detection of the BFD packet is ended.
In an optional implementation manner, 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.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 last-hop Router6 received by the tail node Router5, then the path information is reversely recorded 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 probing 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 an optional field, but the interface IP address is not used for directing forwarding. Therefore, the initial default point of the head node is 8, and the interface IP address is recorded 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 the tail node Router5 receives the BFD packet sent by the previous-hop device Router6, the actual forwarding path recorded in the BFD packet can be acquired:
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 third embodiment, how to perform BFD detection in the loose source routing mode is described.
If the administrator wants to detect the path from Router1 to Router4 in fig. 1, it only wants to detect link (1), and does not limit 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 middle node is Router2, and the tail node is Router 4.
If the administrator sends and receives configuration commands from Router1, the BFD packet 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 the Router4 receives the message forwarded by the Router2, and 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, flexible change of a detection mode is achieved, and actual requirements of services are met better.
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 path information to be forwarded, 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;
the first sending unit 504 sends the BFD packet to a next hop device according to the 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 generated 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 sake of brevity.
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 separately, 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 other 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:
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.
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 applied to any intermediate node of multi-hop BFD detection, and is characterized by comprising the following steps:
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.
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. 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 is characterized by further comprising the following steps:
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 as to facilitate the tail node to 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 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.
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 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.
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. A network device, wherein when the network device is a tail node of BFD detection, the network device comprises: 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.
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 true CN111131021A (en) 2020-05-08
CN111131021B 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)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111682982A (en) * 2020-06-03 2020-09-18 北京东土军悦科技有限公司 Path fault detection method, device, equipment, system and storage medium
CN112350938A (en) * 2020-10-28 2021-02-09 北京华夏创新科技有限公司 Path detection method and device
CN114124753A (en) * 2020-08-25 2022-03-01 华为技术有限公司 Message sending method and equipment
WO2022078051A1 (en) * 2020-10-13 2022-04-21 华为技术有限公司 Route configuration method, network device, communication system and storage medium
CN114726754A (en) * 2020-12-21 2022-07-08 华为技术有限公司 Message transmission method, device and system

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651578A (en) * 2009-09-08 2010-02-17 杭州华三通信技术有限公司 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
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
US20160036695A1 (en) * 2014-08-04 2016-02-04 Telefonaktiebolaget L M Ericsson (Publ) Self-bootstrapping BFD session over MPLS LSP
CN105847460A (en) * 2016-03-15 2016-08-10 迈普通信技术股份有限公司 Method and device for realizing BFD (Bidirectional Forwarding Detection)
CN107547383A (en) * 2017-07-26 2018-01-05 新华三技术有限公司 Path detection method and device
CN108768796A (en) * 2018-08-28 2018-11-06 新华三技术有限公司合肥分公司 Link failure detection method and device
CN109218199A (en) * 2018-11-21 2019-01-15 新华三技术有限公司 A kind of message processing method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651578A (en) * 2009-09-08 2010-02-17 杭州华三通信技术有限公司 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
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
US20160036695A1 (en) * 2014-08-04 2016-02-04 Telefonaktiebolaget L M Ericsson (Publ) Self-bootstrapping BFD session over MPLS LSP
CN105847460A (en) * 2016-03-15 2016-08-10 迈普通信技术股份有限公司 Method and device for realizing BFD (Bidirectional Forwarding Detection)
CN107547383A (en) * 2017-07-26 2018-01-05 新华三技术有限公司 Path detection method and device
CN108768796A (en) * 2018-08-28 2018-11-06 新华三技术有限公司合肥分公司 Link failure detection method and device
CN109218199A (en) * 2018-11-21 2019-01-15 新华三技术有限公司 A kind of message processing method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111682982A (en) * 2020-06-03 2020-09-18 北京东土军悦科技有限公司 Path fault detection method, device, equipment, system and storage medium
CN114124753A (en) * 2020-08-25 2022-03-01 华为技术有限公司 Message sending method and equipment
WO2022042349A1 (en) * 2020-08-25 2022-03-03 华为技术有限公司 Packet sending method and device
CN114124753B (en) * 2020-08-25 2024-05-03 华为技术有限公司 Message sending method and device
WO2022078051A1 (en) * 2020-10-13 2022-04-21 华为技术有限公司 Route configuration method, network device, communication system and storage medium
CN112350938A (en) * 2020-10-28 2021-02-09 北京华夏创新科技有限公司 Path detection method and device
CN112350938B (en) * 2020-10-28 2023-01-10 北京轻网科技有限公司 Path establishing method and device
US11949579B2 (en) 2020-10-28 2024-04-02 Appex Networks Corporation Method and device for network path probe
CN114726754A (en) * 2020-12-21 2022-07-08 华为技术有限公司 Message transmission method, device and system

Also Published As

Publication number Publication date
CN111131021B (en) 2023-04-07

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)
CN105933228B (en) Traffic engineering for bit indexed explicit replication
US9338079B2 (en) Method of routing multicast traffic
US11558288B2 (en) Scalable and programmable mechanism for targeted in-situ OAM implementation in segment routing networks
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
EP3641353B1 (en) Multicast forwarding method, and related device
CN106603413B (en) Method and device for transmitting flow through designated path
US11646960B2 (en) Controller provided protection paths
EP3780514A1 (en) Tunnel setup method, apparatus, and system
US11362954B2 (en) Tunneling inter-domain stateless internet protocol multicast packets
WO2014099316A1 (en) System, method and apparatus to resolve rpf-vector attribute conflicts
KR20090110916A (en) Method, bridge and computer network for calculating a spanning tree based on link state advertisementlsa
US20210044445A1 (en) Group-based policy multicast forwarding
WO2019169268A1 (en) Igp topology information and use for bier-te
US10644900B2 (en) Forwarding multicast data packets using bit index explicit replication (BIER) for BIER-incapable network devices
CN111147372A (en) Downlink message sending and forwarding method and device
EP3585016B1 (en) Forwarding multicast data packets using bit index explicit replication (bier) for bier-incapable network devices
US20190386837A1 (en) Forwarding multicast data packets using bit index explicit replication (bier) for bier-incapable network devices
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
CN114301839B (en) Multicast message transmission method and device
US10419232B2 (en) Control apparatus, communication system, control method and program
EP3104562B1 (en) Method of aggregation of flows in ict networks

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