CN104270367A - BFD conversation establishing method and device - Google Patents
BFD conversation establishing method and device Download PDFInfo
- Publication number
- CN104270367A CN104270367A CN201410524198.3A CN201410524198A CN104270367A CN 104270367 A CN104270367 A CN 104270367A CN 201410524198 A CN201410524198 A CN 201410524198A CN 104270367 A CN104270367 A CN 104270367A
- Authority
- CN
- China
- Prior art keywords
- session
- bfd
- related information
- router
- interface
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000005538 encapsulation Methods 0.000 claims description 17
- 238000012545 processing Methods 0.000 claims description 14
- 238000001514 detection method Methods 0.000 claims description 10
- 230000002457 bidirectional effect Effects 0.000 claims description 5
- 241000465502 Tobacco latent virus Species 0.000 description 33
- 238000010586 diagram Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000010355 oscillation Effects 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0631—Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a BFD conversation establishing method and device. The BFD conversation establishing method comprises the steps that a first device sends a routing neighbor discovering message containing conversation related information to a second device through an interface which supports the BFD conversation function and receives a routing neighbor discovering message sent by the second device through the interface, wherein a BFD conversation is established according to the conversation related information; the BFD conversation is started to be established between the first device and the second device when the routing neighbor relation is established between the first device and the second device and it is confirmed that conversation conditions are met. By the adoption of the BFD conversation establishing method and device, the stable and correct BFD conversation can be established easily.
Description
Technical Field
The present invention relates to network technologies, and in particular, to a BFD session establishment method and apparatus.
Background
With the development of the internet, more and more industries put higher requirements on the reliability of network equipment, and the network equipment needs to be quickly recovered from a fault so as to ensure the normal operation of a service; to achieve this, it is an important aspect to quickly perform fault detection to find a fault. Bidirectional Forwarding Detection (BFD) is widely used because it can quickly implement network failure Detection function. In the related technology, the BFD establishes a BFD session according to neighbor information notified by an upper layer protocol served by the BFD, for example, a router runs a certain routing protocol to perform neighbor discovery, notifies the discovered IP addresses of both parties having a neighbor relation to the BFD, establishes a BFD session between both parties of the neighbor according to the address pair and performs link failure detection, and determines that a link fails if a BFD control packet sent by an opposite end is not received within a preset detection time.
However, in actual practice, the following may occur: for the condition that the upper layer protocols served by two devices for establishing a BFD session are different, for example, one device IS an IS-IS protocol linkage BFD and the other device IS an OSPF protocol linkage BFD, when the BFD session IS established, the BFD session can be established as long as the addresses used for establishing the session by the two devices are in the same network segment no matter whether the protocols of the devices at the two ends are the same or not, but after the BFD session IS established, because one device enables the BFD function, the other device considers that a link fails and deletes the neighbor relation, thereby causing neighbor oscillation; in addition, when one of the parties having the neighbor relation has a plurality of IP addresses, for example, including a master address and a slave address, some protocols such as IS-IS protocol will allow the master address or the slave address to be used to establish a neighbor, as long as the addresses of both parties are in the same network segment; but IS-IS protocol does not specify which pair of addresses to use to establish the neighbor relation and thus cannot establish the BFD session.
Disclosure of Invention
In view of the above, the present invention provides a BFD session establishment method and apparatus, so as to correctly establish a BFD session.
Specifically, the invention is realized by the following technical scheme:
in a first aspect, a BFD session establishment method is provided, including:
the method comprises the steps that first equipment sends routing neighbor discovery messages encapsulated with session related information to second equipment through an interface supporting a BFD session function, and receives the routing neighbor discovery messages sent by the second equipment through the same interface, wherein the session related information is used as a basis for establishing a BFD session;
and when the routing neighbor relation is established with the second equipment and the session condition is determined to be met, the first equipment starts to establish the BFD session with the second equipment.
In a second aspect, a BFD session establishment apparatus is provided, comprising:
a message encapsulation unit, configured to encapsulate session-related information in a routing neighbor discovery message, where the session-related information is used as a basis for establishing a BFD session;
the message receiving and sending unit is used for sending the routing neighbor discovery message to second equipment through an interface supporting a BFD session function and receiving the routing neighbor discovery message sent by the second equipment through the same interface;
and the session processing unit is used for starting the first equipment to establish the BFD session with the second equipment when the routing neighbor relation is established with the second equipment and the session condition is determined to be met.
According to the BFD session establishing method and the BFD session establishing equipment, the session related information is encapsulated in the routing neighbor discovery message, the session condition is judged based on the information, the BFD session is established when the condition is met, and the stable and correct BFD session is favorably established.
Drawings
Fig. 1 is an application diagram of a BFD session establishment method provided by an embodiment of the present invention;
fig. 2 is a flowchart illustrating a BFD session establishment method according to an embodiment of the present invention;
fig. 3 is a first schematic diagram of packet encapsulation in the BFD session establishment method according to the embodiment of the present invention;
fig. 4 is a second message encapsulation illustration in the BFD session establishment method provided by the embodiment of the present invention;
fig. 5 is a signaling diagram of another BFD session establishment method according to an embodiment of the present invention;
fig. 6 is a third schematic diagram of packet encapsulation in the BFD session establishment method provided by the embodiment of the present invention;
fig. 7 is a fourth schematic diagram of packet encapsulation in the BFD session establishment method provided by the embodiment of the present invention;
fig. 8 is a schematic structural diagram of a BFD session setup device according to an embodiment of the present invention.
Detailed Description
Referring to fig. 1, a router a and a router B are shown in fig. 1, each of which includes two modules, one being a routing protocol module for performing neighbor discovery and the other being a session module for establishing a BFD session. The routing protocol may be linked with the BFD configuration, for example, the routing protocol modules of the two routers run the upper layer routing protocol (e.g., IS-IS, OSPF, etc.) to perform neighbor discovery, specifically, perform neighbor discovery on a certain port of the router through a certain routing protocol, for example, as shown in fig. 1, the corresponding interface of the router a IS a, the corresponding interface of the router B IS B, and the router sends a Hello message through the two interfaces to determine that the two routers are in a neighbor relationship, the routing protocol module may notify the session module, instruct the session module to establish a BFD session between the two neighbors for fault detection, so as to quickly discover a fault of a link between the two routers, where the BFD session IS used for detecting a link fault between the interface a and the interface B. The BFD session establishing method of the embodiment of the application is applied to the router A and the router B, and is applied to the neighbor discovery phase of the router A and the router B, whether the BFD session is established between the two neighbor parties is determined according to the method, and the method restricts that the two neighbor parties reestablish the BFD session when the session condition is met. The details are as follows:
example one
Fig. 2 is a flowchart illustrating a BFD session establishment method according to an embodiment of the present invention, where the method may be executed by one router, such as the router a or the router B shown in fig. 1. In this embodiment, the execution process is described by taking the router a as an example, where the first device is the router a, and the router B may be referred to as a second device. As shown in fig. 2, includes:
201. the first equipment sends the routing neighbor discovery message of the encapsulated session related information to the second equipment through an interface supporting a BFD session function, and receives the routing neighbor discovery message sent by the second equipment through the same interface, wherein the information is used as a basis for establishing a BFD session;
in this embodiment, the interface a of the router a and the interface B of the router B are interfaces enabling the same routing protocol, for example, are both IS an IS-IS protocol, and the two routers receive a routing neighbor discovery message, such as a Hello message, sent by an opposite end through the two interfaces. In the following description of the embodiments, the communication interaction between the router a and the router B is performed through the two interfaces.
In this embodiment, it is assumed that the interface a to which the router a sends the Hello packet supports the BFD session function, and even if the BFD capability is enabled, the router a encapsulates the session related information in the Hello packet sent by the router a. In this step, the router a encapsulates the session related information corresponding to the home terminal in the routing neighbor discovery message, so as to notify the router B of the session related information of the home terminal, so that the router B determines whether to establish the BFD session based on the information. For example, the information may be the IPv4 address used by interface a to establish the BFD session.
For the Hello packet sent by the router B, there may be various situations, for example, the interface B sending the Hello packet by the router B does not support the BFD session function, so that the router B does not encapsulate the session related information in the packet; or even if the interface B does not support the BFD session function, the router B encapsulates the session related information in the packet, and only encapsulates the session related information indicating that the interface B does not support the BFD session function; or, router B encapsulates session-related information indicating that interface B supports the BFD session function in the Hello message, and the session-related information may further include IPv4 address and the like used by interface B of router B to establish the BFD session.
Similarly, in this embodiment, taking the interface a of the router a as an example to support the BFD session capability, the router a encapsulates the session related information in the Hello message sent through the interface a; when the router a sends the Hello packet through the interface that does not support the BFD session capability, the router a may also perform similar processing as the router B described above, without encapsulating the session related information in the Hello packet, or encapsulating the session related information indicating that the interface does not support the BFD session function.
202. And when the routing neighbor relation is established with the second equipment and the session condition is determined to be met, the first equipment starts to establish the BFD session with the second equipment.
In this step, the router a and the router B have already established the routing neighbor relation, the router a will judge whether the session condition is met according to the received Hello packet of the router B, if yes, the router a starts to establish the BFD session with the router B.
For example, interface a of router a supports the BFD session function, and the received Hello message of router B does not encapsulate the session related information, router a determines that interface B of router B does not support the BFD session function, and router a does not establish the BFD session with router B via interface a and interface B. For another example, interface a of router a supports a BFD session function and uses an IPv4 address, received Hello message of router B also encapsulates session related information, and according to this information router a can determine that interface B of router B also supports the BFD session function, and the IPv4 address of interface B is in the same network segment as the IPv4 address of interface a, then router a determines that a BFD session can be established with router B.
Specifically, what kind of session related information is encapsulated in the Hello message, how the information is encapsulated, and how to determine whether the session condition is satisfied according to the session related information, which will be exemplified in the following embodiments.
Similarly, when determining that the router B establishes the routing neighbor relationship with the router a, the router B also determines the session condition according to the information encapsulated in the Hello message sent by the router a, determines that the session related information meets the session condition, and starts to establish the BFD session with the router a.
In the BFD session establishment method of this embodiment, session related information is encapsulated in the routing neighbor discovery message, and the determination of the session condition is performed based on the information, so that the BFD session is established only when the condition is satisfied, which is helpful for establishing a stable and correct BFD session.
Example two
Taking as an example that the session related information is encapsulated in the routing neighbor discovery packet no matter whether the interface supports the BFD session function, this embodiment lists a content of the session related information and a specific example that the information is encapsulated in the Hello packet; the information content includes a BFD enabled identification indicating whether the corresponding interface transmitting the encapsulated session related information supports BFD linkage.
Specifically, when the router a or the router B of this embodiment sends the Hello packet, the packet is encapsulated with a "BFD enable identifier," where the BFD enable identifier is used to indicate whether an interface that sends the packet encapsulated with the session related information supports a BFD session function, so that the second device knows a support condition of the interface of the second device for BFD linkage. For example, when the router a sends a Hello packet through the interface a supporting the BFD session function, the BFD enabled identifier in the packet indicates that the interface a supports the BFD session function.
For example, the router a and the router B run the IS-IS protocol to perform neighbor discovery, the router a sends a Hello packet through an interface a, and the carried BFD enabling identifier indicates that the interface a of the router a sending the Hello packet supports BFD linkage; the router B also sends a Hello message, wherein the carried BFD enabling identification shows that the interface B of the router B which sends the Hello message does not support BFD linkage. After receiving the Hello packet of the router B, the router a finds that although the router B is a neighbor of the router a, the corresponding interface B of the router B does not support BFD, and therefore the router a and the router B will not establish a BFD session through the interface a and the interface B.
The manner of determining whether the BFD session can be established in the above example is as follows: assuming that the router A IS a device which runs an IS-IS protocol and supports BFD linkage, the router A can know that the router B IS a neighbor device which also runs the IS-IS protocol by sending a Hello message, but whether the router B supports BFD linkage or not can be determined by a BFD enabling identifier in the Hello message sent by the router B, if the router A supports the BFD linkage, the router A indicates that two neighbors are the same routing protocol and interfaces of the two neighbors which send the Hello message support a BFD session function, a BFD session can be established, and if the router A does not support the BFD linkage, the router B indicates that the interfaces of the router B do not support the BFD linkage although the neighbors.
Fig. 3 shows an optional way of encapsulating a BFD enabled id in a Hello packet, where a router may add a BFD session Type Length Value (Type/Length/Value, abbreviated as TLV) to the Hello packet, and encapsulate the session related information in the TLV.
Referring to fig. 3, the structure of the TLV is shown, and the description of the fields is as follows:
type: the field indicates that the type of the TLV is a BFD session TLV so as to distinguish other defined TLVs, the length can be 1 byte, and the value is other numerical values except those specified by RFC 3359;
length: indicating the length of the TLV;
value: and a flag is contained, wherein the structure of the flag can be shown by an arrow, the upper 6 bits of the flag are used as reserved fields for subsequent expansion, and the lower two bits respectively represent BFD enabling identification.
In addition, as also shown in fig. 3, the BFD enable flag may be an identification bit set in the Hello packet corresponding to the IP address version, so as to indicate the IP protocol stack version supporting the BFD session function. For example, if the lowest bit in the flag IS set to 1, it indicates that the IS-IS protocol IS linked with IPv4BFD, that IS, the interface of this end uses IPv4 address to establish BFD session; if the second lowest bit in the flag IS set to 1, the IS-IS protocol IS linked with IPv6BFD, namely the local end adopts an IPv6 address to establish a BFD session.
For example, when IS-IS linked with IPv4, the lowest bit corresponding to IPv4 IS set (for example, set to 1), and router a and router B are neighbors of IPv4, and it IS assumed that the corresponding interface of router a supports BFD linkage, but if the lowest bit of the above TLV in the Hello packet of router B IS not set, for example, 0, it indicates that the corresponding interface of router B does not support IPv4BFD linkage, and router a and router B do not establish BFD session. If the lowest bit of the TLV in the Hello message of the router B is 0, it indicates that the corresponding interfaces of the router a and the router B both support the BFD session function, and the IP protocol stack versions supporting the BFD session function are the same and are both IPv4, indicating that the session related information conforms to the session condition, and starting to establish the BFD session after establishing the routing neighbor relationship between the router a and the router B.
For another example, when IS-IS linked with IPv6, the next lower bit corresponding to IPv6 IS set, so that router a receiving the Hello packet can clearly know the BFD enabling condition of router B, for example, if both support IPv6BFD linkage, a BFD session IS established with IPv6Link local address.
It should be noted that the encapsulation format of the session related information shown in fig. 3 is only an example, and the specific implementation is not limited to this:
for example, the router a may encapsulate TLV in the Hello message regardless of whether the interface supports BFD interworking, but the corresponding interface a has only one version of IP address, for example, only IPv4, and the flag may not need to distinguish the flag bits of IPv4 and IPv6, and may only use one flag bit. And if the interface supports BFD, setting the identification position to be 1, and if the interface does not support BFD, setting the identification position to be 0.
For another example, as shown in fig. 3, as long as the router a encapsulates the TLV, the flag includes two identification bits corresponding to IPv4 and IPv6, respectively, at this time, the interface a of the router a that sends the Hello packet may have multiple IP protocol stack versions, and the two identification bits are IP addresses for identifying which version is used. When the identification position of the IPv4 is set, the method indicates that an IPv4 address is adopted, and a BFD session is established through the address; when the identification position of the IPv6 is set, the BFD session is established by adopting the IPv6 address 6; when the identification bits of the IPv4 and the IPv6 are both set, the method indicates that the BFD session is established by simultaneously adopting the IPv4 address and the IPv6 address, namely, two BFD sessions are equivalently established. Or, if the flag bits of IPv4 and IPv6 are not set, that is, both flag bits are 0, it indicates that the interface does not support IPv4BFD linkage, nor IPv6BFD linkage.
In the method for establishing the BFD session of the present embodiment, the BFD enabling identifier is encapsulated in the routing neighbor discovery message, and each end establishes the BFD session only when both corresponding interfaces of both parties enable BFD linkage, thereby avoiding the situation that both parties with different protocols establish the BFD session, and enhancing the stability during the BFD linkage.
EXAMPLE III
Taking as an example that the session related information is encapsulated in the routing neighbor discovery packet no matter whether the interface supports the BFD session function, this embodiment also recites a content of the session related information and a specific example that the information is encapsulated in the Hello packet; this information content includes the IPv4 address used to establish the BFD session. The method can enable the router to establish the BFD session according to the encapsulated IPv4 address, and the problem that the BFD session cannot be established due to multiple addresses does not occur. This example is applicable to scenarios that enable IPv4BFD linkage, and if the address of router B is an IPv6 address, the BFD session is usually established directly using IPv6Link Local, i.e. there is only one address, so there is no need for designation.
Specifically, when the router configures BFD linkage and involves a problem of multiple addresses, one address is selected from the multiple addresses and determined as an IPv4 address for establishing a session, and the address is encapsulated in a Hello message and sent to an opposite end. For example, router a performs routing neighbor discovery and BFD session establishment with interface B of router B via interface a, assuming that interface a of router a has multiple IPv4 addresses, including a master address and a slave address. Then, one of the addresses determined as an IPv4 address for establishing the session is selected, and the address is encapsulated in a Hello message and sent to the router B.
Fig. 4 illustrates an optional way to encapsulate the IPv4 address in the Hello packet, and the router still adds a BFD session Type Length Value (Type/Length/Value, abbreviated as TLV) to the Hello packet, and encapsulates the above-mentioned session related information in the TLV.
Referring to fig. 4, the structure of the TLV is shown, and the description of the fields is as follows:
type: the field indicates that the type of the TLV is a BFD session TLV so as to distinguish other defined TLVs, the length can be 1 byte, and the value is other numerical values except those specified by RFC 3359;
length: indicating the length of the TLV; the Value IS 1 or 5, when IS-IS IS linked with IPv6BFD only, because only one address IS available, the problem of address selection does not exist, and the IPv4 address field in Value IS not required to be filled, and the length IS 1; when the IPv4 address field is linked with the IPv4BFD, the length is 5;
value: contains an IPv4 address for establishing the BFD session that is used to populate an IPv4 address used to establish the BFD session, such as a pre-specified IPv4 address or a default main address.
In this embodiment, if the session related information encapsulated by router a is IPv4 address information used by interface a of router a to establish a BFD session, and the session related information encapsulated by router B is IPv4 address information used by interface B of router B to establish a BFD session, it may be determined that the session condition is met if the IPv4 address information of the devices at both ends is in the same network segment, and router a and router B establish a BFD session through interface a and interface B, and the session is used to detect a failure of a link established through an IPv4 address between interface a and interface B.
For example, if the home terminal has the pre-specified IPv4 address information, the specified IPv4 address information is encapsulated in the routing neighbor discovery packet.
For another example, if the local end does not specify the IPv4 address information in advance, the IPv4 main address information corresponding to the local end interface is encapsulated in the routing neighbor discovery packet.
In the BFD session establishment method of this embodiment, the IPv4 address information is encapsulated in the routing neighbor discovery message, and the BFD session is established only when the addresses of the two end devices are in the same network segment, thereby implementing establishment of the BFD session in a scenario where the interface has multiple addresses.
Example four
Taking as an example that the session related information is encapsulated in the routing neighbor discovery message regardless of whether the interface supports the function of not supporting the BFD session, in this embodiment, the Hello message sent by the router includes both the BFD enable identifier and the IPv4 address used for establishing the BFD session.
Specifically, taking the IS-IS protocol as an example, the routing neighbor discovery packet IS mutually sent between the router a and the router B, and as follows, the case where B sends the neighbor discovery packet, i.e., the Hello packet, to a IS described, at this time, B IS referred to as a first device, and a IS referred to as a second device. Referring to the flow shown in FIG. 5:
501. the router B encapsulates the session related information in a routing neighbor discovery message;
the session related information is used as a basis for establishing a Bidirectional Forwarding Detection (BFD) session; the session-related information of the present embodiment includes BFD enabled identification and IPv4 address information.
502. The router B sends the routing neighbor discovery message to the router A;
503. the router A determines that the session related information in the message meets the session condition;
the conditions for the session here are: and determining that the corresponding interfaces of the router A and the router B both support the BFD session function according to the BFD enabling identification, and the IPv4 addresses of the interfaces are in the same network segment.
504. The router A starts to establish a BFD session with the router B;
router a establishes a BFD dialog with router B based on the session-related information.
The above-described session establishment procedure will be described in more detail as follows:
in step 501, the router B encapsulates the Hello packet, and encapsulates the session related information in the Hello packet. The session related information is information used as a basis for establishing a BFD session;
for example, the session information includes IPv4 address information for establishing the BFD session, e.g., the interface of router B for routing neighbor discovery with router a may have multiple IP addresses, including a master address and a slave address, such as one of the following segments 14.14.14.14/24, 12.12.12.22/24, etc., e.g., assuming that router B has two IP addresses, one of which belongs to segment 14.14.14.14/24 and the other of which belongs to segment 12.12.12.22/24. Router B selects an address from among the addresses as the address that the corresponding interface uses to establish the BFD session with router a of the opposite end. Assuming that an IP address of the 14.14.14.14/24 network segment is selected as the address to be used for establishing the session, the address is encapsulated in a Hello message. When the router B has a plurality of IPv4 addresses (including a master address and a slave address), two situations may occur, wherein in one situation, the router B already has pre-specified IPv4 address information, and the specified IPv4 address information can be encapsulated in a Hello message; alternatively, there is no IPv4 address information specified, and the primary address of the router interface may be encapsulated by default.
Meanwhile, the session information further includes a BFD enable identifier of the local terminal, where the BFD enable identifier is used to indicate whether the corresponding interface of the first device supports the BFD session function, that is, the BFD enable identifier is used to indicate whether the corresponding interface of the router B supports the BFD linkage.
The above-described encapsulation of the BFD-enabled identity and IPv4 address information is similar to the previous embodiment, except that the two are combined. Specifically, referring to fig. 6 and 7, the router B adds a BFD session Type Length Value (Type/Length/Value, abbreviated as TLV) to the Hello packet, and encapsulates the session related information in the TLV. The description of each field is as follows:
type: the field indicates that the type of the TLV is a BFD session TLV so as to distinguish other defined TLVs, the length can be 1 byte, and the value is other numerical values except those specified by RFC 3359;
length: the Value IS 1 or 5, when IS-IS IS linked with IPv6BFD only, because only one address IS available, the problem of address selection does not exist, and the IPv4 address field in Value IS not required to be filled, and the length IS 1; when the IPv4BFD is linked, the IPv4 address field is filled, and the length is 5;
value: the method comprises two parts, namely a flag and an IPv4 address for establishing a BFD session, wherein the structure of the flag IS shown in FIG. 7, the high 6 bits of the flag are used as reserved fields for subsequent extension, and the low two bits respectively represent BFD enabling identifications, for example, when IS-IS IS linked with IPv4, the lowest bit corresponding to IPv4 IS set to be 1 (for example), and when IS-IS IS linked with IPv6, the second lowest bit corresponding to IPv6 IS set, so that the opposite end router A receiving the Hello message can clearly know the BFD enabling condition of the router B, namely, the IPv4BFD linkage IS supported or the IPv6BFD linkage IS supported. The last 4 bytes of Value are used to fill in the IPv4 address used to establish the BFD session, such as the pre-specified IPv4 address or default primary address described above.
In actual implementation, before encapsulating the Hello packet, the router B may first check whether an interface used for sending the Hello packet supports BFD linkage, for example, whether the interface supports the BFD linkage of IS-IS and IPv4 or IPv6, and perform corresponding processing.
If the information IS supported, the corresponding identifier in the flag IS set, for example, if the interface configuration supports IS-IS and IPv4BFD linkage, the lowest bit of the flag IS set, and the IPv4 (pre-designated address or main address) address for establishing the BFD session IS filled in the last 4 bytes of Value; if the interface configuration supports IS-IS and IPv6BFD linkage, the second lowest position of flag and the last 4 bytes of Value are not encapsulated.
If the interface does not support IPv4 or IPv6BFD linkage, the BFD enabling identification in the flag is set to 0, which indicates that the router B supports the corresponding mode of the TLV, but the BFD linkage is not configured. Further, router B may configure by command whether or not it supports encapsulating the TLV itself.
After encapsulating the packet, the router B sends the Hello packet to the router a, and in step 503, the router a determines whether to establish a BFD session with the router B according to the session related information in the packet, specifically, determines whether the session related information meets a session condition for establishing the BFD session.
For example, router A knows that the state of its neighbor router B is IPv4up (neighbor state IPv4up means that the conditions for establishing IPv4 neighbors are met, the conditions are specified by the protocol, e.g., the addresses are on the same network segment), that is, the router B is in the IPv4 state, at this time, the router a checks the received Hello packet sent by the router B, and specifically checks the BFD session TLV in the Hello packet, if the lowest bit of the flag in the TLV is 1, i.e., supports IPv4BFD, checks whether the IPv4 address (which may be a designated address or a default main address) of the current interface of router a for establishing the BFD session is in the same network segment as the IPv4 address in Value carried in the TLV, if the router A is in the same network segment, the home terminal IPv4 address of the router A and the IPv4 address of the router B in the TLV are determined to be used as an address pair for establishing the BFD session, and the router A informs the BFD module of the router A to establish the BFD session connection with the router B by adopting the address pair. Otherwise, if the lowest bit of the flag in the TLV is 0, i.e., IPv4BFD is not supported, it is determined that the BFD session is not established.
For another example, the router a knows that the neighbor state of its neighbor router B is IPv6up, that is, the router B is in the state of IPv6, at this time, the router a checks the received Hello packet sent by the router B, and specifically checks the BFD session TLV in the Hello packet, and if the second lower bit of the flag in the TLV is 1, that is, IPv6BFD is supported, in this case, the router a may determine to establish a BFD session with the router B, specifically, directly establish a BFD session between the IPv6Link Local of the Local interface of the router a and the IPv6Link Local of the peer router B. Otherwise, if the second lowest bit of the flag in the TLV is 0, i.e., IPv6BFD is not supported, router a does not establish a BFD session with router B.
It should be noted that, in the foregoing embodiment, when the router a receives the Hello packet, it performs two-way judgment to determine whether to establish the BFD session, and not only the router B of the opposite end needs to support BFD linkage, that is, it is determined that the router B has configured the BFD session function according to the BFD enabling identifier, but also the router B has a specified address, and the addresses of the router a and the router B also need to be in the same network segment.
In the BFD session establishment of this embodiment, in the neighbor discovery phase, the router a determines that its neighbor router B supports the BFD linkage, and acquires the address of the router B for establishing the session, the router a may notify the address of its corresponding interface for establishing the BFD session and the address of the router B for establishing the BFD session to the BFD module of the router a, and the BFD module may start establishing the BFD session based on the address pair; similarly, the router B may also receive the Hello packet sent by the router a, learn that the router a supports the BFD linkage, and acquire the address of the router a used for establishing the session, the router B may notify the address of the router B of the address of the corresponding interface used for establishing the BFD session and the address of the router a used for establishing the BFD session, and the BFD module may start to establish the BFD session based on the address pair. That is, the respective BFD modules of both the router a and the router B may receive the neighbor information (i.e., the address pair of both) notified by the upper protocol (i.e., the module receiving the Hello packet), and both establish the BFD session based on the address pair.
In the BFD session establishment method of this embodiment, session related information is encapsulated in the routing neighbor discovery message, and the determination of the session condition is performed based on the information, so that the BFD session is established only when the condition is satisfied, which is helpful for establishing a stable and correct BFD session.
Certainly, in a specific implementation, the Hello packet may also encapsulate the above-mentioned BFD enabled identifier or other information content except the IPv4 address, so as to implement a corresponding specific function, which is beneficial to establishing a BFD session. The above examples are merely illustrative.
The present embodiment further provides a BFD session establishment device, which may be router a or router B in the above method embodiment, and may be referred to as a first device, see fig. 8. For example, when the first device is router a, the second device is router B; when the first device is router B, the second device is router a. As shown in fig. 8, the apparatus includes: a message encapsulation unit 81, a message transceiving unit 82 and a session processing unit 83;
a message encapsulation unit 81, configured to encapsulate session-related information in a routing neighbor discovery message, where the session-related information is used as a basis for establishing a Bidirectional Forwarding Detection (BFD) session;
a message transceiving unit 82, configured to send the routing neighbor discovery message to a second device through an interface supporting a BFD session function, and receive the routing neighbor discovery message sent by the second device through the same interface;
and the session processing unit 83 is configured to, after establishing a routing neighbor relationship with the second device and when determining that the session related information meets the session condition, start the first device to establish a BFD session with the second device.
Further, the packet encapsulation unit 81 is specifically configured to: encapsulating a BFD enabling identifier in a routing neighbor discovery message, wherein the BFD enabling identifier is used for indicating that a corresponding interface for transmitting and encapsulating the session related information supports a BFD session function;
the message transceiving unit 82, where the received routing neighbor discovery message sent by the second device is encapsulated with session related information, where the session related information includes a BFD enable identifier used to indicate whether an interface, which sends the routing neighbor discovery message, of the second device supports a BFD session function;
the session processing unit 83 is specifically configured to: and when determining that the corresponding interfaces of the first equipment and the second equipment both support the BFD session function according to the BFD enabling identification, determining that the session conditions are met.
Further, the BFD enabling identifier is also used for indicating an IP protocol stack version supporting BFD session function; the session processing unit 83 is specifically configured to: and according to the BFD enabling identification, determining that the corresponding interfaces of the first equipment and the second equipment both support the BFD session function, and determining that the session conditions are met when the IP protocol stack versions supporting the BFD session function are the same.
Further, the packet encapsulation unit 81 is specifically configured to: encapsulating IPv4 address information for establishing the BFD session in a routing neighbor discovery message; the message transceiving unit 82, where the received routing neighbor discovery message sent by the second device is encapsulated with session related information, where the session related information includes IPv4 address information used by an interface of the routing neighbor discovery message sent by the second device to establish a BFD session; the session processing unit 83 is specifically configured to: and when the address information of the second equipment for establishing the BFD session IPv4 and the address information of the first equipment for establishing the BFD session IPv4 are in the same network segment, determining that the session conditions are met.
For example, the IPv4 address information includes: pre-assigned IPv4 address information, or IPv4 main address information corresponding to the interface.
Further, the packet encapsulation unit 81 is specifically configured to: encapsulating a BFD enabling identifier and IPv4 address information for establishing the BFD session in a routing neighbor discovery message, wherein the BFD enabling identifier is used for indicating that a corresponding interface for transmitting and encapsulating the session related information supports a BFD session function;
the message transceiving unit 82, where the received routing neighbor discovery message sent by the second device is encapsulated with session related information, where the session related information includes IPv4 address information used for establishing a BFD session, where the BFD enabling identifier corresponds to an interface where the routing neighbor discovery message is sent by the second device;
the session processing unit 83 is specifically configured to: when the corresponding interfaces of the first device and the second device both support the BFD session function, and the IPv4 address information used by the second device to establish the BFD session and the IPv4 address information used by the first device to establish the BFD session are in the same network segment, determining that the session conditions are met.
Further, the packet encapsulating unit 81 is further configured to not encapsulate the session related information when sending the routing neighbor discovery packet through the interface that does not support the BFD session function; alternatively, the session-related information indicating that the interface does not support the BFD session function is encapsulated.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (14)
1. A Bidirectional Forwarding Detection (BFD) session establishment method is characterized by comprising the following steps:
the method comprises the steps that first equipment sends routing neighbor discovery messages encapsulated with session related information to second equipment through an interface supporting a BFD session function, and receives the routing neighbor discovery messages sent by the second equipment through the same interface, wherein the session related information is used as a basis for establishing a BFD session;
and when the routing neighbor relation is established with the second equipment and the session condition is determined to be met, the first equipment starts to establish the BFD session with the second equipment.
2. The method of claim 1, wherein the session-related information comprises: a BFD enabling identifier, wherein the BFD enabling identifier is used for indicating that a corresponding interface which transmits and encapsulates the session related information supports a BFD session function;
the determining that the session condition is met specifically includes: and the routing neighbor discovery message sent by the second equipment encapsulates the session related information, and determines that the corresponding interfaces of the first equipment and the second equipment both support the BFD session function according to the BFD enabling identification.
3. The method of claim 2, wherein the BFD enabled identifier is further used to indicate a version of an IP protocol stack that supports BFD session functionality;
the determining that the session condition is met specifically includes: and the routing neighbor discovery message sent by the second equipment encapsulates the session related information, and according to the BFD enabling identifier, the corresponding interfaces of the first equipment and the second equipment are determined to support the BFD session function, and the IP protocol stack versions supporting the BFD session function are the same.
4. The method of claim 1, wherein the session-related information comprises: IPv4 address information for establishing the BFD session;
the determining that the session condition is met specifically includes: and the IPv4 address information used for establishing the BFD session and the IPv4 address information used for establishing the BFD session by the first equipment are in the same network segment.
5. The method of claim 4, wherein the IPv4 address information includes: pre-assigned IPv4 address information, or IPv4 main address information corresponding to the interface.
6. The method of claim 1, wherein the session-related information comprises: BFD enabling identification and IPv4 address information for establishing the BFD session, wherein the BFD enabling identification is used for indicating that a corresponding interface for transmitting and encapsulating the session related information supports a BFD session function;
the determining that the session condition is met specifically includes: and the routing neighbor discovery message sent by the second device encapsulates session related information, corresponding interfaces of the first device and the second device both support a BFD session function, and the IPv4 address information used by the second device for establishing the BFD session and the IPv4 address information used by the first device for establishing the BFD session are in the same network segment.
7. The method of claim 1, further comprising: when sending a routing neighbor discovery message through an interface which does not support the BFD session function;
the first device does not encapsulate session related information; or,
the first device encapsulates session-related information indicating that the interface does not support a BFD session function.
8. A Bidirectional Forwarding Detection (BFD) session establishment apparatus, comprising:
a message encapsulation unit, configured to encapsulate session-related information in a routing neighbor discovery message, where the session-related information is used as a basis for establishing a BFD session;
the message receiving and sending unit is used for sending the routing neighbor discovery message to second equipment through an interface supporting a BFD session function and receiving the routing neighbor discovery message sent by the second equipment through the same interface;
and the session processing unit is used for starting the first equipment to establish the BFD session with the second equipment when the routing neighbor relation is established with the second equipment and the session condition is determined to be met.
9. The apparatus of claim 8,
the packet encapsulation unit is specifically configured to: encapsulating a BFD enabling identifier in a routing neighbor discovery message, wherein the BFD enabling identifier is used for indicating that a corresponding interface for transmitting and encapsulating the session related information supports a BFD session function;
the message receiving and sending unit is used for receiving a routing neighbor discovery message sent by the second device and encapsulating session related information, wherein the session related information comprises a BFD enabling identifier which is used for indicating whether an interface of the routing neighbor discovery message sent by the second device supports a BFD session function or not;
the session processing unit is specifically configured to: and when determining that the corresponding interfaces of the first equipment and the second equipment both support the BFD session function according to the BFD enabling identification, determining that the session conditions are met.
10. The apparatus of claim 9, wherein the BFD enabled identifier is further used to indicate a version of an IP protocol stack that supports BFD session functionality;
the session processing unit is specifically configured to: and according to the BFD enabling identification, determining that the corresponding interfaces of the first equipment and the second equipment both support the BFD session function, and determining that the session conditions are met when the IP protocol stack versions supporting the BFD session function are the same.
11. The apparatus of claim 8,
the packet encapsulation unit is specifically configured to: encapsulating IPv4 address information for establishing the BFD session in a routing neighbor discovery message;
the message transceiving unit encapsulates session related information in the received routing neighbor discovery message sent by the second device, wherein the session related information includes IPv4 address information used by an interface of the routing neighbor discovery message sent by the second device to establish a BFD session;
the session processing unit is specifically configured to: and when the IPv4 address information used by the second equipment for establishing the BFD session and the IPv4 address information used by the first equipment for establishing the BFD session are in the same network segment, determining that the session condition is met.
12. The apparatus of claim 11, wherein the IPv4 address information includes: pre-assigned IPv4 address information, or IPv4 main address information corresponding to the interface.
13. The apparatus of claim 8,
the packet encapsulation unit is specifically configured to: encapsulating a BFD enabling identifier and IPv4 address information for establishing the BFD session in a routing neighbor discovery message, wherein the BFD enabling identifier is used for indicating that a corresponding interface for transmitting and encapsulating the session related information supports a BFD session function;
the message transceiving unit encapsulates session related information in the received routing neighbor discovery message sent by the second device, where the session related information includes IPv4 address information used for establishing a BFD session, where the BFD enabling identifier corresponds to an interface where the routing neighbor discovery message is sent by the second device;
the session processing unit is specifically configured to: when the corresponding interfaces of the first device and the second device both support a BFD session function, and the IPv4 address information used by the second device to establish the BFD session and the IPv4 address information used by the first device to establish the BFD session are in the same network segment, determining that the session conditions are met.
14. The apparatus of claim 8,
the message encapsulation unit is also used for not encapsulating the session related information when sending the routing neighbor discovery message through the interface which does not support the BFD session function; alternatively, the session-related information indicating that the interface does not support the BFD session function is encapsulated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410524198.3A CN104270367B (en) | 2014-09-30 | 2014-09-30 | A kind of BFD session establishing methods and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410524198.3A CN104270367B (en) | 2014-09-30 | 2014-09-30 | A kind of BFD session establishing methods and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104270367A true CN104270367A (en) | 2015-01-07 |
CN104270367B CN104270367B (en) | 2018-01-09 |
Family
ID=52161857
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410524198.3A Active CN104270367B (en) | 2014-09-30 | 2014-09-30 | A kind of BFD session establishing methods and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104270367B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107547368A (en) * | 2017-08-04 | 2018-01-05 | 新华三技术有限公司 | BFD conversation switching methods, device and storage medium |
CN107547383A (en) * | 2017-07-26 | 2018-01-05 | 新华三技术有限公司 | Path detection method and device |
CN107979501A (en) * | 2016-10-21 | 2018-05-01 | 华为数字技术(苏州)有限公司 | A kind of method, apparatus and system of BFD session negotiations |
CN108092942A (en) * | 2016-11-21 | 2018-05-29 | 深圳市中兴微电子技术有限公司 | A kind of message processing method and device |
CN111614556A (en) * | 2019-02-26 | 2020-09-01 | 中兴通讯股份有限公司 | BIER-based bidirectional forwarding detection session creation method and related equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101447900A (en) * | 2008-12-15 | 2009-06-03 | 华为技术有限公司 | Method, system and device for building bidirectional forwarding detection |
CN101610182A (en) * | 2009-06-26 | 2009-12-23 | 杭州华三通信技术有限公司 | Multi-primary apparatus conflict detection method and stack member apparatus in piling up |
US20100049868A1 (en) * | 2008-08-19 | 2010-02-25 | Cisco Technology, Inc. | Maintaining protocol adjacency state with forwarding failure |
WO2012142771A1 (en) * | 2011-04-22 | 2012-10-26 | 华为技术有限公司 | Method and label switched router (lsr) for initiating label distribution protocol (ldp) session connection establishment |
-
2014
- 2014-09-30 CN CN201410524198.3A patent/CN104270367B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100049868A1 (en) * | 2008-08-19 | 2010-02-25 | Cisco Technology, Inc. | Maintaining protocol adjacency state with forwarding failure |
CN101447900A (en) * | 2008-12-15 | 2009-06-03 | 华为技术有限公司 | Method, system and device for building bidirectional forwarding detection |
CN101610182A (en) * | 2009-06-26 | 2009-12-23 | 杭州华三通信技术有限公司 | Multi-primary apparatus conflict detection method and stack member apparatus in piling up |
WO2012142771A1 (en) * | 2011-04-22 | 2012-10-26 | 华为技术有限公司 | Method and label switched router (lsr) for initiating label distribution protocol (ldp) session connection establishment |
Non-Patent Citations (2)
Title |
---|
C. HOPPS等: "IS-IS BFD-Enabled TLV", 《INTERNET ENGINEERING TASK FORCE (IETF) REQUEST FOR COMMENTS: 6213》 * |
D. KATZ等: "BFD for IPv4 and IPv6 (Single Hop)", 《DRAFT-KATZ-WARD-BFD-V4V6-1HOP-01.TXT》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107979501A (en) * | 2016-10-21 | 2018-05-01 | 华为数字技术(苏州)有限公司 | A kind of method, apparatus and system of BFD session negotiations |
CN108092942A (en) * | 2016-11-21 | 2018-05-29 | 深圳市中兴微电子技术有限公司 | A kind of message processing method and device |
CN107547383A (en) * | 2017-07-26 | 2018-01-05 | 新华三技术有限公司 | Path detection method and device |
CN107547383B (en) * | 2017-07-26 | 2020-04-03 | 新华三技术有限公司 | Path detection method and device |
CN107547368A (en) * | 2017-08-04 | 2018-01-05 | 新华三技术有限公司 | BFD conversation switching methods, device and storage medium |
CN107547368B (en) * | 2017-08-04 | 2020-01-07 | 新华三技术有限公司 | BFD session switching method, device and storage medium |
CN111614556A (en) * | 2019-02-26 | 2020-09-01 | 中兴通讯股份有限公司 | BIER-based bidirectional forwarding detection session creation method and related equipment |
US11991066B2 (en) | 2019-02-26 | 2024-05-21 | Zte Corporation | Method of establishing bidirectional forwarding detection session based on BIER, and BFIR, BFER, system and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN104270367B (en) | 2018-01-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110034971B (en) | Method and device for detecting service chain | |
EP3228123B1 (en) | Efficient hybrid resource and schedule management in time slotted channel hopping networks | |
CN104270367B (en) | A kind of BFD session establishing methods and equipment | |
US9781234B2 (en) | Electronic device, network relay device, and non-transitory computer readable storage medium | |
US8811190B2 (en) | Maximum transmission unit (MTU) size discovery mechanism and method for data-link layers | |
US11134009B2 (en) | Packet processing method and apparatus | |
US10582020B2 (en) | Method for multipath TCP communication between two terminals | |
EP2533478A1 (en) | Method, terminal and gateway for transmitting internet protocol version 6 packets in internet protocol version 4 network | |
US8432833B2 (en) | Auto MEP ID assignment within CFM maintenance association | |
CN110086689B (en) | Double-stack BFD detection method and system | |
US20210204202A1 (en) | Network access technology indication | |
WO2015096409A1 (en) | Method, device and system for discovering link in software-defined network | |
US9781034B2 (en) | Electronic device, network relay device, and non-transitory computer readable storage medium | |
US9191312B2 (en) | Method and system for implementing PW control bit capability negotiation | |
US20120134365A1 (en) | Method and network device for associated channel capability negotiation | |
CN105471613A (en) | Temporary channel establishing method, device and system | |
CN102457404B (en) | Detect the methods, devices and systems of communication path MTU | |
CN105337814A (en) | Network equipment connection method, equipment and system | |
CN110224916B (en) | Message processing method and device and message packaging method, device and system | |
WO2023284231A1 (en) | Message processing method and message processing system | |
CN111917650B (en) | Method, equipment and system for determining Generic Routing Encapsulation (GRE) tunnel identifier | |
CN112702263B (en) | Method and device for forwarding message | |
CN102045235A (en) | Method for realizing routing optimization and access router | |
CN106789639B (en) | Message processing method and device | |
WO2014161371A1 (en) | Method for establishing lsp and network device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No. Applicant after: Xinhua three Technology Co., Ltd. Address before: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No. Applicant before: Huasan Communication Technology Co., Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |