CN106921569B - Next hop selection method and device of BFD multi-hop session under multi-exit - Google Patents

Next hop selection method and device of BFD multi-hop session under multi-exit Download PDF

Info

Publication number
CN106921569B
CN106921569B CN201511006152.3A CN201511006152A CN106921569B CN 106921569 B CN106921569 B CN 106921569B CN 201511006152 A CN201511006152 A CN 201511006152A CN 106921569 B CN106921569 B CN 106921569B
Authority
CN
China
Prior art keywords
bfd
session
hop
characteristic
next hop
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201511006152.3A
Other languages
Chinese (zh)
Other versions
CN106921569A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201511006152.3A priority Critical patent/CN106921569B/en
Publication of CN106921569A publication Critical patent/CN106921569A/en
Application granted granted Critical
Publication of CN106921569B publication Critical patent/CN106921569B/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/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing

Landscapes

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

Abstract

The application discloses a next hop selection method and a device of BFD multi-hop conversation under multiple exits, wherein the method comprises the following steps: in the process of establishing a BFD multi-hop session between first equipment and second equipment, a BFD function module in the first equipment allocates a BFD session identifier for the BFD multi-hop session, the BFD function module marks that the BFD multi-hop session is linked with a first characteristic of the first equipment, a processing module of the first equipment configures the first characteristic and the BFD multi-hop session identified by the BFD session identifier when the first characteristic of the first equipment is enabled or after the first characteristic of the first equipment is enabled, the BFD function module acquires next-hop information from an external interface function provided by the first characteristic according to the first characteristic linked with the BFD multi-hop session, and the BFD function module sends a BFD control message by using the acquired next-hop information to detect connectivity of a link to which the acquired next-hop information points.

Description

Next hop selection method and device of BFD multi-hop session under multi-exit
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a next hop selection method and a next hop selection device for BFD multi-hop session under multiple exits.
Background
In network communication, in order to efficiently select the fastest and best forwarding path, the demand for quickly detecting communication failures between adjacent systems is increasing, and the demand is becoming more and more important.
Bidirectional Forwarding Detection (BFD), which is a network protocol for detecting communication failure between two Bidirectional routing devices, is described in detail in RFC 5880. For the sake of simplicity, the term "bidirectional routing device" will be referred to hereinafter as "routing device".
BFD may be associated with a variety of other features, also referred to as establishing BFD linkage, such as static routing, Dynamic Host Configuration Protocol (hereinafter DHCP). Other characteristics that establish an association with BFD are referred to as linkage characteristics.
After BFD linkage is established, when BFD session communication failure or communication failure recovery is detected, the corresponding linkage characteristic is informed, the linkage characteristic executes preset and corresponding processing according to the current BFD session state, and the BFD session state comprises Down and Up. The principle of the linkage of BFD and static route is that after a BFD conversation Down is detected, a preset static route corresponding to the BFD conversation is invalid; and after the BFD session state Up is detected, the preset static route corresponding to the BFD session takes effect. The linkage of BFD and DHCP is realized based on the linkage of static routing and BFD: binding one end of the BFD session with a DHCP client (client); the DHCP client side obtains a gateway address from a DHCP server (server), generates a default static route, the next hop of the default static route is the obtained gateway address, and binds the default static route with the other end of the BFD session. The state of BFD conversation from the DHCP client to the gateway is detected by BFD to determine the effectiveness of the static route generated by the DHCP client, thereby achieving the function of linkage of DHCP and BFD.
A multi-egress scenario refers to a scenario where multiple paths exist between two routing devices. In a multi-egress scenario, for example, an enterprise network multi-egress scenario in which BFD and DHCP are linked, other backup links may be deployed in addition to using DHCP as a main link, and the backup link also uses default static route drainage. A BFD multi-hop session refers to a session in which at least one three-tier routing device may exist between two routing devices that are endpoints of the BFD session.
When determining the next hop sent by the message in the BFD multi-hop session, the BFD function module in the routing equipment in the BFD multi-hop session selects the next hop after performing route search according to a routing table in the routing equipment.
When the route is searched, the BFD functional module in the routing equipment searches the static route which has higher priority and points to the main link according to the preset priority of the static route which points to different links. The main link refers to a link between the DHCP client and the gateway bound with the BFD multi-hop session.
And based on the detection of the BFD multi-hop session state, detecting the connectivity of a main link between the DHCP client and the gateway. And when the BFD multi-hop session state bound with the main link is Down, the BFD functional module in the routing equipment informs the routing management module that the default static route generated by the DHCP client side is changed into an invalid route.
When the BFD functional module sends BFD messages subsequently, the routing table in the routing equipment is inquired again, because the static route pointing to the main link is changed into an invalid route, the static route pointing to the backup link becomes a valid route, and the BFD functional module tries to send the BFD messages through the static route pointing to the backup link. If the backup link is in the connected state, the BFD multi-hop session is in the Up state again. And the BFD function module informs the route management module that the default static route generated by the DHCP client becomes the effective route, however, the main link has a fault at the moment, and the BFD multi-hop session is Down again. The repeated operation causes the BFD multi-hop conversation to be repeatedly switched between the main link and the standby link, the BFD multi-hop conversation is continuously oscillated, and the link detection result is inaccurate.
Disclosure of Invention
The embodiment of the application provides a next hop selection method and device for a BFD multi-hop session under multiple exits, which can realize that the BFD multi-hop session dynamically acquires next hop information in real time from the characteristics of equipment linked with the BFD multi-hop session under a multi-exit scene, thereby detecting the communication connectivity of a link where a specified exit is located and ensuring the accuracy of link detection.
A first aspect of an embodiment of the present application provides a method for selecting a next hop of a BFD multi-hop session under multiple outlets, including:
in the process of establishing a Bidirectional Forwarding Detection (BFD) multi-hop session between first equipment and second equipment, a BFD function module in the first equipment allocates a BFD session identifier for the BFD multi-hop session, and marks the linkage of the BFD multi-hop session and a first characteristic of the first equipment;
configuring, by a processing module of the first device, a first characteristic of the first device to be interlocked with a BFD multi-hop session identified by the BFD session identifier when or after the first characteristic of the first device is enabled;
the BFD functional module acquires next hop information from an external interface function provided by the first characteristic according to the first characteristic linked with a BFD multi-hop session;
and the BFD functional module sends a BFD control message by using the obtained next hop information so as to detect the connectivity of a link pointed by the obtained next hop information.
Further, still include:
and the BFD functional module receives the next hop information sent by the first characteristic, and sends a BFD control message by using the next hop information sent by the first characteristic so as to detect the connectivity of a link pointed by the next hop information sent by the first characteristic.
Optionally, the first characteristic is a DHCP client function.
Further, the obtaining next hop information from the external interface function provided by the first characteristic includes:
and the BFD functional module calls an interface provided by a DHCP client terminal functional module of the first equipment to acquire next hop information.
Further, the BFD function module calls an interface provided by the DHCP client function module of the first device to obtain next hop information, including:
the BFD function module calls an interface provided by a DHCP client function module of the first equipment to inquire whether a DHCP client of the first equipment acquires a gateway address from a DHCP server or not;
if the DHCP client side obtains the gateway address from a DHCP server, the BFD function module receives a notification message sent by the DHCP client side of the first equipment, wherein the notification message carries the gateway address currently used by the first equipment and takes the gateway address currently used by the first equipment as next hop information;
if the DHCP client side does not acquire the gateway address from the DHCP server, the BFD function module delays the establishment of the BFD multi-hop session and waits for receiving the notification message.
A second aspect of the present application provides a next hop selection device for a BFD multi-hop session under multiple outlets, including:
the BFD function module is used for allocating a BFD session identifier to the BFD multi-hop session in the process of establishing a Bidirectional Forwarding Detection (BFD) multi-hop session between first equipment and second equipment, and marking the BFD multi-hop session to be linked with the first characteristic of the first equipment;
a processing module configured to configure a first characteristic of the first device to be interlocked with a BFD multi-hop session identified by the BFD session identifier when or after the first characteristic of the first device is enabled;
the BFD functional module is further configured to:
acquiring next hop information from an external interface function provided by the first characteristic according to the first characteristic linked with the BFD multi-hop session;
and sending a BFD control message by using the obtained next hop information so as to detect the connectivity of a link pointed by the obtained next hop information.
Further, the BFD function module includes:
a receiving unit, configured to receive next hop information sent by the first characteristic;
and a sending unit, configured to send a BFD control packet using the next hop information sent by the first characteristic, so as to detect connectivity of a link to which the next hop information sent by the first characteristic points.
Optionally, the first characteristic is a DHCP client function.
Further, the BFD function module further includes:
and the acquisition unit is used for calling an interface provided by a DHCP client side function module of the first equipment to acquire next hop information.
Further, the device also comprises a session establishing module;
the obtaining unit is specifically configured to: calling an interface provided by a DHCP client function module of the first equipment, and inquiring whether a DHCP client of the first equipment acquires a gateway address from a DHCP server;
the receiving unit is specifically configured to: when the DHCP client side obtains a gateway address from a DHCP server, receiving a notification message sent by the DHCP client side of the first equipment, wherein the notification message carries the gateway address currently used by the first equipment;
the obtaining unit is further configured to use a gateway address currently used by the first device as next hop information;
the session establishing module is used for delaying the establishment of the BFD multi-hop session when the DHCP client side does not acquire a gateway address from a DHCP server; instructing the receiving unit to wait for reception of the notification message.
A third aspect of the present application provides a next hop selection device for a BFD multi-hop session under multiple exits, including:
the system comprises a processor, an interface circuit, a memory and a bus, wherein the processor, the interface circuit and the memory are connected through the bus and complete mutual communication, a group of program codes are stored in the memory, and the processor calls the program codes stored in the memory and executes the following operations:
in the process of establishing a Bidirectional Forwarding Detection (BFD) multi-hop session between first equipment and second equipment, allocating a BFD session identifier for the BFD multi-hop session, and marking the linkage of the BFD multi-hop session and a first characteristic of the first equipment by a BFD function module;
configuring a first characteristic of the first device to be interlocked with a BFD multi-hop session identified by the BFD session identifier while or after the first characteristic of the first device is enabled;
acquiring next hop information from an external interface function provided by the first characteristic according to the first characteristic linked with the BFD multi-hop session;
and sending a BFD control message by using the obtained next hop information so as to detect the connectivity of a link pointed by the obtained next hop information.
Further, the processor is further configured to receive next hop information sent by the first characteristic, and send a BFD control packet using the next hop information sent by the first characteristic, so as to detect connectivity of a link to which the next hop information sent by the first characteristic points.
Optionally, the first characteristic is a DHCP client function, and the processor is specifically configured to call an interface provided by a DHCP client function module of the first device to obtain next hop information.
Further, the processor is specifically configured to call an interface provided by a DHCP client function module of the first device, query whether a DHCP client of the first device has obtained a gateway address from a DHCP server, receive a notification message sent by the DHCP client of the first device if the DHCP client has obtained the gateway address from the DHCP server, where the notification message carries a gateway address currently used by the first device, and use the gateway address currently used by the first device as next hop information;
and if the DHCP client side does not acquire the gateway address from the DHCP server, delaying the establishment of the BFD multi-hop session and waiting for receiving the notification message.
In the method and apparatus for selecting a next hop of a BFD multi-hop session under multiple outlets provided by the embodiments of the present application, in a process of establishing a BFD multi-hop session between a first device and a second device, a BFD function module in the first device allocates a BFD session identifier to the BFD multi-hop session in advance and marks a first characteristic of a first device linked with the BFD multi-hop session, a processing module of the first device configures the first characteristic and the BFD multi-hop session identified by the BFD session identifier when or after the first characteristic is enabled, thereby completing a bidirectional configuration of a binding relationship between the BFD multi-hop session and the first characteristic, and when selecting a next hop of the BFD multi-hop session, the BFD function module obtains next hop information from an external interface function provided by the first characteristic according to the first characteristic linked with the BFD multi-hop session, and finally the BFD function module sends a BFD control packet using the obtained next hop information to detect a link to which the next hop information is directed The connectivity of (c). Therefore, the BFD multi-hop session can be dynamically and real-timely acquired from the linkage characteristic thereof, so that the communication connectivity of the link where the designated outlet is located is detected, the condition that the BFD functional module acquires the next-hop information from the routing table is avoided, the routing management module changes the routing state in the routing table according to the BFD multi-hop session, the BFD multi-hop session is repeatedly switched between the main link and the standby link and continuously vibrates due to the mutual dependence of the BFD functional module and the routing table, and the accuracy of link detection is ensured. Meanwhile, the service can be switched between the main link and the standby link, so that the service can be ensured not to be interrupted.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to the drawings without inventive exercise.
Fig. 1 is a schematic view of an application scenario according to an embodiment of the present application;
fig. 2 is a flowchart of a first embodiment of a next hop selection method for a BFD multi-hop session under multiple exits according to the present application;
fig. 3 is a flowchart of a second method for selecting a next hop of a BFD multi-hop session according to the present application;
FIG. 4 is a diagram illustrating a BFD usage scenario for a multiple outlet of the present application;
fig. 5 is a flowchart of a third embodiment of a next hop selection method for a BFD multi-hop session under multiple exits according to the present application;
fig. 6 is a schematic structural diagram of a first embodiment of a next hop selection device of a BFD multi-hop session in the present application under multiple exits;
fig. 7 is a schematic structural diagram of a second embodiment of a next hop selection device of a BFD multi-hop session in the multi-egress of the present application;
fig. 8 is a schematic structural diagram of a third embodiment of a next hop selection device of a BFD multi-hop session in the present application under multiple exits;
fig. 9 is a schematic structural diagram of a fourth embodiment of a next hop selection device of a BFD multi-hop session in the multi-egress application;
fig. 10 is a schematic structural diagram of a fifth embodiment of a next hop selection device for a BFD multi-hop session in the multi-egress application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the embodiments in the present application.
The embodiment of the application provides a method and a device for selecting a next hop of a BFD multi-hop session under multiple exits, because the prior art pre-configures priorities of static routes pointing to different links in a routing table, the next hop of the BFD multi-hop session is selected after route searching according to the pre-configured priorities of the static routes pointing to a main link and a backup link. In a multi-exit scenario, when a main link fails, a static route pointing to the main link is changed into an invalid route, and according to a next-hop selection method of a BFD multi-hop session in the existing multi-exit scenario, the BFD multi-hop session is repeatedly switched between a main link and a standby link, and is continuously oscillated, so that a link detection result is inaccurate. According to the next hop selection method and device for the BFD multi-hop session under the multi-exit, in the establishment process of the BFD multi-hop session, bidirectional configuration of the binding relationship between the BFD multi-hop session and the characteristic linked with the BFD multi-hop session is completed in advance, so that the BFD multi-hop session can dynamically and real-timely acquire the next hop information from the characteristic linked with the BFD multi-hop session, the communication connectivity of a link where the designated exit is located is detected, the BFD function module is prevented from acquiring the next hop information from a routing table, the routing management module changes the state of a route in a routing table according to the BFD multi-hop session, the BFD multi-hop session is repeatedly switched between a main link and a standby link due to mutual dependence of the BFD function module and the routing table, the BFD multi-hop session is continuously oscillated, and the accuracy of link detection is ensured. Meanwhile, the service can be switched between the main link and the standby link, so that the service can be ensured not to be interrupted. The following describes a next hop selection method and apparatus for a BFD multi-hop session under multiple egress according to embodiments of the present application in detail with reference to the accompanying drawings.
The method and the device for selecting the next hop of the BFD multi-hop session under the multi-exit are used for establishing the BFD multi-hop session between two routing devices to detect a communication fault between the two routing devices under the condition that a plurality of paths exist between the two routing devices, the established BFD multi-hop session selects the next hop by acquiring the next hop information from the characteristics of the devices linked with the established BFD multi-hop session, and the devices, the first devices and the second devices which appear in the following description are all routers (which can also be switches or other forwarding devices) supporting the functions of configuring static routes and linking with BFD.
Fig. 1 is a schematic view of an application scenario of an embodiment of the present application, and as shown in fig. 1, there are two paths between a router a and a router B, an access manner of a main link is, for example, DHCP, an access manner of a backup link is 3G, or in other manners, a BFD multi-hop session is established between the router a and the router B to detect a communication failure between the router a and the router B. After the BFD multi-hop session is established, whether the next hop of the BFD multi-hop session is a main link or a backup link may be selected, and the method for selecting the next hop of the BFD multi-hop session provided in the embodiments of the present application may be used in a device at any of two ends of a link, which is described in detail below with reference to the accompanying drawings.
Fig. 2 is a flowchart of a first method for selecting a next hop of a BFD multi-hop session in the multi-egress of the present application, as shown in fig. 2, the method of this embodiment may include:
s101, in the process of establishing the BFD multi-hop session between the first device and the second device, the BFD function module in the first device allocates a BFD session identifier for the BFD multi-hop session, and the BFD function module marks linkage of the BFD multi-hop session and a first characteristic of the first device.
In this embodiment, the first device is the router a in fig. 1, and the second device is the router B in fig. 1.
S102, configuring the first characteristic of the first device to be linked with the BFD multi-hop session identified by the BFD session identifier when or after the first characteristic of the first device is enabled by a processing module of the first device.
In particular, the processing module, the BFD function module, and the subsequent DHCP client and the like in the present application are relatively independent logic modules, and may be implemented by software codes. And after the first equipment is powered on, enabling the characteristics specified in the configuration file according to the configuration file of the first equipment. The user may modify the contents of the configuration file through a command line or interface function.
Upon or after enabling the first characteristic of the first device, specifying the BFD session identifier by commanding the first characteristic to indicate that the first characteristic is interlocked with a BFD multi-hop session identified by the BFD session identifier.
That is, the binding relationship between the BFD multi-hop session and the first feature is configured bidirectionally in the BFD function module and the first feature enabled through the above steps S101 and S102.
And S103, the BFD functional module acquires next hop information from an external interface function provided by the first characteristic according to the characteristic of linkage with the BFD multi-hop session, namely the first characteristic.
Specifically, the BFD function module calls an external interface function provided by the feature to obtain next hop information. The external interface function is a logical interface function for communication between different functional modules.
And if the BFD functional module confirms that the BFD multi-hop conversation is not linked with any characteristic according to the mark of the S101, the BFD functional module acquires next-hop information by searching a routing table of the first equipment.
And S104, the BFD functional module sends a BFD control message by using the next hop information acquired from the external interface function with the first characteristic so as to detect the connectivity of a link pointed by the next hop information.
Further, if the next hop of the first characteristic changes, the first characteristic actively notifies the BFD function module of the next hop information. At this time, the method of this embodiment may further include:
and the BFD functional module receives next hop information sent by the first characteristic when the next hop of the first characteristic changes, and sends a BFD control message by using the next hop information sent by the first characteristic so as to detect the connectivity of a link pointed by the next hop information sent by the first characteristic.
In the method for selecting a next hop of a BFD multi-hop session under multiple outlets provided in this embodiment, in a process of establishing a BFD multi-hop session between a first device and a second device, a BFD function module in the first device allocates a BFD session identifier to the BFD multi-hop session in advance and marks a first characteristic of the first device in linkage with the BFD multi-hop session, a processing module of the first device configures the first characteristic in linkage with the BFD multi-hop session identified by the BFD session identifier when or after the first characteristic is enabled, so that bidirectional configuration of a binding relationship between the BFD multi-hop session and the first characteristic is completed, when selecting the next hop of the BFD multi-hop session, the BFD function module obtains next hop information from an external interface function provided by the first characteristic according to the first characteristic in linkage with the BFD multi-hop session, and finally, the BFD function module sends a BFD control packet using the obtained next hop information, thereby detecting connectivity of a link to which the next hop information points. Therefore, the BFD multi-hop session can be dynamically and real-timely acquired from the linkage characteristic thereof, so that the communication connectivity of the link where the designated outlet is located is detected, the condition that the BFD functional module acquires the next-hop information from the routing table is avoided, the routing management module changes the routing state in the routing table according to the BFD multi-hop session, the BFD multi-hop session is repeatedly switched between the main link and the standby link and continuously vibrates due to the mutual dependence of the BFD functional module and the routing table, and the accuracy of link detection is ensured. Meanwhile, the service can be switched between the main link and the standby link, so that the service can be ensured not to be interrupted.
Fig. 3 is a flowchart of a second embodiment of a method for selecting a next hop of a BFD multi-hop session under multiple exits according to the present application, where this embodiment takes a first characteristic as a DHCP client function, as shown in fig. 3, the method of this embodiment may include:
s201, in the process of establishing the BFD multi-hop session between the first device and the second device, the BFD function module in the first device allocates a BFD session identifier for the BFD multi-hop session, and the BFD function module marks the DHCP linkage of the BFD multi-hop session and the first device.
S202, when the DHCP client function of the first device is started or after the DHCP client function of the first device is started, the processing module of the first device designates the BFD session identifier through a command line, and indicates that the DHCP is linked with the BFD multi-hop session identified by the BFD session identifier.
Specifically, the correspondence between the DHCP client and the BFD session identifier linked with the DHCP client may be stored in the DHCP client function module of the first device. The first device has a plurality of physical interfaces, each of which can be configured to correspond to one DHCP client, that is, different physical interfaces establish a one-to-one correspondence with different DHCP clients. The BFD session identifier is specified by a command line or automatically assigned when configuring a BFD multi-hop session.
And S203, the BFD functional module acquires next hop information from an external interface function provided by the DHCP according to the DHCP linked with the BFD multi-hop conversation.
Specifically, after the BFD multi-hop session configuration is completed, the next-hop information is obtained by calling an interface provided by a DHCP client function module of the first device. In addition, when the DHCP client side function module of the first device finds that the next hop information is changed, the interface of the BFD function module is called to notify the BFD function module of the changed next hop information.
The BFD function module obtains next hop information by calling an interface provided by the DHCP client function module of the first device, and may specifically include:
s2031, the BFD function module calls an interface provided by the DHCP client function module of the first device, and inquires whether the DHCP client of the first device acquires the gateway address from the DHCP server.
S2032, if the DHCP client side has acquired the gateway address from the DHCP server, the BFD function module receives a notification message sent by the DHCP client side of the first device, the notification message carries the gateway address currently used by the first device, and the gateway address currently used by the first device is used as next hop information.
S2033, if the DHCP client end does not obtain the gateway address from the DHCP server, the BFD function module delays to establish the BFD multi-hop conversation and waits for receiving the notification message.
And S204, the BFD function module uses the gateway address currently used by the first equipment to send a BFD control message to detect the connectivity of a link pointed by the gateway address currently used by the first equipment.
In the method for selecting a next hop of a BFD multi-hop session under multiple outlets provided by this embodiment, in the process of establishing a BFD multi-hop session between a first device and a second device, a BFD function module in the first device allocates a BFD session identifier to the BFD multi-hop session, and marks the linkage between the BFD multi-hop session and the DHCP of the first device, and a processing module of the first device designates the BFD session identifier to indicate the linkage between the DHCP and the BFD multi-hop session identified by the BFD session identifier by a command line when the DHCP of the first device is enabled or after the DHCP of the first device is enabled, so that bidirectional configuration of a binding relationship between the BFD multi-hop session and the DHCP is completed, and then the BFD function module invokes an interface provided by a DHCP client function module of the first device to obtain next hop information according to the DHCP linked with the BFD multi-hop session. And finally, the BFD functional module uses the obtained next hop information to send a BFD control message so as to detect the connectivity of a link pointed by the obtained next hop information. Therefore, the BFD multi-hop session can be realized to dynamically and real-timely acquire the next hop information from the DHCP client of the first equipment linked with the BFD multi-hop session, so that the connectivity of the link where the specified outlet is located can be detected. The situation that the BFD functional module acquires next hop information from the routing table is avoided, and the routing management module changes the state of the routing in the routing table according to the BFD multi-hop session at the same time, so that the BFD multi-hop session is repeatedly switched between the main link and the standby link and continuously vibrates due to the mutual dependence of the BFD functional module and the routing table, and the accuracy of link detection is ensured. Meanwhile, the service can be switched between the main link and the standby link, so that the service can be ensured not to be interrupted.
The following describes the technical solution of the embodiment of the method shown in fig. 3 in detail by using a specific embodiment.
Fig. 4 is a schematic diagram of a BFD usage scenario of a multi-outlet of the present application, and as shown in fig. 4, router a is an outlet gateway of a building under which all companies access the Internet (Internet) through router a. USG _ a is an egress gateway of a company under the building. In order to ensure that the network is continuous and uninterrupted, the company adopts double uplink networking, the access mode of a main link is DHCP, USG _ A is used as a DHCP client to obtain an IP address from a DHCP server to access the Internet, and the access mode of a backup link is 3G, namely the USG _ A uses WCDMA 3G to dial up on demand to access the Internet. To detect connectivity of the link between USG _ a and router a, a BFD multi-hop session needs to be established between USG _ a and router a. The following describes in detail a detailed procedure of the next hop selection method of the BFD multi-hop session provided in the present application with reference to fig. 5.
Fig. 5 is a flowchart of a third embodiment of a next hop selection method for a BFD multi-hop session under multiple exits according to the present application, and as shown in fig. 5, the method of this embodiment includes:
s301, in the process of establishing a multi-hop BFD multi-hop session on USG _ A and router A, the BFD function module of USG _ A allocates a BFD session identifier for the multi-hop session, and marks the linkage between the BFD multi-hop session between USG _ A and router A and DHCP.
Specifically, since the DHCP client cannot sense the reachability of the link where the DHCP client is located, when the link fails, the USG _ a cannot switch the traffic to the backup link, and thus the DHCP needs to be configured on the USG _ a to be linked with the BFD. Where the configuration of BFD on USG _ a requires that the session be tagged with DHCP via an assigned BFD session identifier.
S302, the processing module of USG _ A designates the allocated BFD session identifier through a command line when the DHCP client function is enabled or after the DHCP client function is enabled, and indicates that the DHCP client is linked with the BFD multi-hop session.
Specifically, the corresponding relation between the DHCP client and the BFD session identifier linked with the DHCP client is stored in the DHCP function module.
And S303, calling an interface provided by a DHCP client side function module of the USG _ A by the BFD function module, and inquiring whether the USG _ A acquires a gateway address from a DHCP server.
S304, if the DHCP client function module acquires the gateway address from the DHCP server, the BFD function module receives a notification message sent by the DHCP client function module of the USG _ A, the notification message carries the gateway address acquired by the DHCP client function module of the USG _ A from the DHCP server, the gateway address is also the gateway address currently used by the USG _ A, and the gateway address currently used by the USG _ A is used as next hop information.
If the DHCP client function module has not obtained the gateway address from the DHCP server, S305 is performed.
S305, the BFD function module delays to establish the BFD multi-hop session and waits for receiving a notification message sent by the DHCP client function module after the DHCP client function module acquires the gateway address from the DHCP server.
Therefore, the BFD multi-hop session uses the gateway address acquired by the USG _ A as the next hop to detect the connectivity of the link, the BFD multi-hop session linked with the DHCP detects the accessibility of the link where the USG _ A is located, the BFD detection message always selects the main link, the backup link is not selected, the problem that the BFD multi-hop session is repeatedly switched between the main link and the backup link and is continuously oscillated is avoided, and meanwhile, the next hop information can be dynamically and timely determined according to the gateway address notified by the USG _ A.
Fig. 6 is a schematic structural diagram of a first embodiment of a next hop selection apparatus of a BFD multi-hop session under multiple egress interfaces according to the present application, where the apparatus may be integrated in a routing device, and the routing device may be a router, a switch, or other forwarding devices. As shown in fig. 6, the apparatus includes: a BFD function module 11 and a processing module 12, wherein:
the BFD function module 11 is configured to, in a process of establishing a bidirectional forwarding detection, BFD, multi-hop session between a first device and a second device, allocate a BFD session identifier to the BFD, and mark that the BFD, multi-hop session is linked with a first characteristic of the first device by the BFD function module. The processing module 12 is configured to configure the first characteristic to be interlocked with the BFD multi-hop session identified by the BFD session identifier when or after the first characteristic of the first device is enabled. The BFD function module 11 is further configured to: and acquiring next hop information from an external interface function provided by the first characteristic according to the first characteristic linked with the BFD multi-hop session. And sending a BFD control message by using the obtained next hop information so as to detect the connectivity of a link pointed by the obtained next hop information.
The next hop selection device of a BFD multi-hop session under multiple outlets provided in this embodiment completes, first, a bidirectional configuration of a binding relationship between a BFD multi-hop session and a first characteristic, when selecting a next hop of the BFD multi-hop session, a BFD function module obtains, according to the first characteristic linked with the BFD multi-hop session, next hop information from an external interface function provided by the first characteristic, and finally, the BFD function module sends a BFD control packet using the obtained next hop information, thereby detecting connectivity of a link to which the next hop information points. Therefore, the BFD multi-hop session can be dynamically and real-timely acquired from the linkage characteristic thereof, so that the communication connectivity of the link where the designated outlet is located is detected, the condition that the BFD functional module acquires the next-hop information from the routing table is avoided, the routing management module changes the routing state in the routing table according to the BFD multi-hop session, the BFD multi-hop session is repeatedly switched between the main link and the standby link and continuously vibrates due to the mutual dependence of the BFD functional module and the routing table, and the accuracy of link detection is ensured. Meanwhile, the service can be switched between the main link and the standby link, so that the service can be ensured not to be interrupted.
Fig. 7 is a schematic structural diagram of a second embodiment of a next hop selection device of a BFD multi-hop session under multiple exits in the present application, as shown in fig. 7, based on fig. 6, a BFD function module 11 includes: a receiving unit 111 and a transmitting unit 112, wherein,
a receiving unit 111, configured to receive next hop information sent by the first characteristic.
A sending unit 112, configured to send a BFD control packet using the next hop information sent by the first characteristic, so as to detect connectivity of a link to which the next hop information sent by the first characteristic points.
Fig. 8 is a schematic structural diagram of a third embodiment of a next hop selection device for a BFD multi-hop session in the multiple outlets of the present application, as shown in fig. 8, in this embodiment, a first characteristic is a DHCP client function, and the BFD function module 11 further includes: an obtaining unit 113, where the obtaining unit 113 is configured to invoke an interface provided by a DHCP client function module of the first device to obtain next hop information.
Fig. 9 is a schematic structural diagram of a fourth embodiment of a next hop selection device of a BFD multi-hop session in the multiple outlets of the present application, as shown in fig. 9, on the basis of fig. 8, further including a session establishing module 13, specifically, the obtaining unit 113 is specifically configured to: and calling an interface provided by a DHCP client function module of the first equipment, and inquiring whether a DHCP client of the first equipment acquires a gateway address from a DHCP server. The receiving unit 111 is specifically configured to: and when the DHCP client side obtains the gateway address from a DHCP server, receiving a notification message sent by the DHCP client side of the first equipment, wherein the notification message carries the gateway address currently used by the first equipment. The obtaining unit 113 is further configured to use a gateway address currently used by the first device as next hop information. The session establishing module 13 is configured to delay establishing the BFD multi-hop session and instruct the receiving unit 111 to wait for receiving the notification message when the DHCP client does not obtain the gateway address from the DHCP server.
In particular, the processing module, the BFD function module, the session establishment module, and the like in the above embodiments are relatively independent logic modules, and may be implemented by software codes. And after a next hop selection device of the BFD multi-hop session is powered on, starting the characteristics specified in the configuration file according to the configuration file of the device. The user may modify the contents of the configuration file through a command line or interface function.
The above-mentioned apparatus is used for executing the foregoing method embodiments, and the implementation principle and technical effect are similar, which are not described herein again.
Fig. 10 is a schematic structural diagram of a fifth embodiment of a next hop selection apparatus for a BFD multi-hop session under multiple exits according to the present application, as shown in fig. 10, the apparatus includes: a processor 21, an interface circuit 22, a memory 23 and a bus 24, wherein the processor 21, the interface circuit 22 and the memory 23 are connected by the bus 24 and communicate with each other, a set of program codes is stored in the memory 23, and the processor 21 calls the program codes stored in the memory 23 to execute the following operations:
in the process of establishing a Bidirectional Forwarding Detection (BFD) multi-hop session between first equipment and second equipment, allocating a BFD session identifier for the BFD multi-hop session, and marking the linkage of the BFD multi-hop session and a first characteristic of the first equipment by a BFD function module;
configuring a first characteristic of the first device to be interlocked with a BFD multi-hop session identified by the BFD session identifier while or after the first characteristic of the first device is enabled;
acquiring next hop information from an external interface function provided by the first characteristic according to the first characteristic linked with the BFD multi-hop session;
and sending a BFD control message by using the obtained next hop information so as to detect the connectivity of a link pointed by the obtained next hop information.
Further, the processor 21 is further configured to receive next hop information sent by the first characteristic, and send a BFD control packet using the next hop information sent by the first characteristic, so as to detect connectivity of a link to which the next hop information sent by the first characteristic is directed.
Optionally, the first characteristic is a DHCP client function, and the processor 21 is specifically configured to call an interface provided by a DHCP client function module of the first device to obtain next hop information.
Specifically, the processor 21 calls an interface provided by a DHCP client function module of the first device, queries whether a DHCP client of the first device has obtained a gateway address from a DHCP server, and receives a notification message sent by the DHCP client of the first device if the DHCP client has obtained the gateway address from the DHCP server, where the notification message carries the gateway address currently used by the first device and takes the gateway address currently used by the first device as next hop information;
and if the DHCP client side does not acquire the gateway address from the DHCP server, delaying the establishment of the BFD multi-hop session and waiting for receiving the notification message.
The next-hop selection device of the BFD multi-hop session under multiple outlets provided in the above-mentioned device embodiment may be integrated in a routing device, and is applied to the scenario shown in fig. 2 or fig. 3 in the first embodiment of the method, to implement other additional functions that can be implemented by the next-hop selection device of the BFD multi-hop session under multiple outlets of the first device and the interaction process with other network element devices, please refer to the description of the first device in the method embodiment, and details are not described here.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
As will be appreciated by one of ordinary skill in the art, various aspects of the present application, or possible implementations of various aspects, may be embodied as a system, method, or computer program product. Accordingly, aspects of the present application, or possible implementations of aspects, may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a "circuit," module "or" system. Furthermore, aspects of the present application, or possible implementations of aspects, may take the form of a computer program product referring to computer readable program code stored in a computer readable medium.
The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing, such as Random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, and portable read-only memory (CD-ROM).
A processor in the computer reads the computer-readable program code stored in the computer-readable medium, so that the processor can perform the functional actions specified in each step, or a combination of steps, in the flowcharts; and means for generating a block diagram that implements the functional operation specified in each block or a combination of blocks.
The computer readable program code may execute entirely on the user's local computer, partly on the user's local computer, as a stand-alone software package, partly on the user's local computer and partly on a remote computer or entirely on the remote computer or server. It should also be noted that, in some alternative implementations, the functions noted in the flowchart or block diagram block may occur out of the order noted in the figures. For example, two steps or 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 be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A next hop selection method of BFD multi-hop session under multi-exit is characterized by comprising the following steps:
in the process of establishing a Bidirectional Forwarding Detection (BFD) multi-hop session between first equipment and second equipment, a BFD function module in the first equipment allocates a BFD session identifier for the BFD multi-hop session, and marks the linkage of the BFD multi-hop session and a first characteristic of the first equipment;
configuring, by a processing module of the first device, a first characteristic of the first device to be interlocked with a BFD multi-hop session identified by the BFD session identifier when or after the first characteristic of the first device is enabled;
the BFD functional module acquires next hop information from an external interface function provided by the first characteristic according to the first characteristic linked with a BFD multi-hop session;
and the BFD functional module sends a BFD control message by using the obtained next hop information so as to detect the connectivity of a link pointed by the obtained next hop information.
2. The method of claim 1, further comprising:
and the BFD functional module receives the next hop information sent by the first characteristic, and sends a BFD control message by using the next hop information sent by the first characteristic so as to detect the connectivity of a link pointed by the next hop information sent by the first characteristic.
3. The method of claim 1, wherein the first characteristic is a Dynamic Host Configuration Protocol (DHCP) client function.
4. The method of claim 3, wherein obtaining next hop information from an external interface function provided by the first feature comprises:
and the BFD functional module calls an interface provided by a DHCP client terminal functional module of the first equipment to acquire next hop information.
5. The method according to claim 4, wherein the BFD function module calls an interface provided by a DHCP client function module of the first device to obtain next hop information, and the method comprises:
the BFD function module calls an interface provided by a DHCP client function module of the first equipment to inquire whether a DHCP client of the first equipment acquires a gateway address from a DHCP server or not;
if the DHCP client side obtains the gateway address from a DHCP server, the BFD function module receives a notification message sent by the DHCP client side of the first equipment, wherein the notification message carries the gateway address currently used by the first equipment and takes the gateway address currently used by the first equipment as next hop information;
if the DHCP client side does not acquire the gateway address from the DHCP server, the BFD function module delays the establishment of the BFD multi-hop session and waits for receiving the notification message.
6. A next hop selection apparatus for a BFD multi-hop session under multiple egress, comprising:
the BFD function module is used for allocating a BFD session identifier to the BFD multi-hop session in the process of establishing a Bidirectional Forwarding Detection (BFD) multi-hop session between first equipment and second equipment, and marking the BFD multi-hop session to be linked with the first characteristic of the first equipment;
a processing module configured to configure a first characteristic of the first device to be interlocked with a BFD multi-hop session identified by the BFD session identifier when or after the first characteristic of the first device is enabled;
the BFD functional module is further configured to:
acquiring next hop information from an external interface function provided by the first characteristic according to the first characteristic linked with the BFD multi-hop session;
and sending a BFD control message by using the obtained next hop information so as to detect the connectivity of a link pointed by the obtained next hop information.
7. The apparatus of claim 6, wherein the BFD function module comprises:
a receiving unit, configured to receive next hop information sent by the first characteristic;
and a sending unit, configured to send a BFD control packet using the next hop information sent by the first characteristic, so as to detect connectivity of a link to which the next hop information sent by the first characteristic points.
8. The apparatus of claim 7, wherein the first characteristic is a Dynamic Host Configuration Protocol (DHCP) client function.
9. The apparatus of claim 8, wherein the BFD function module further comprises:
and the acquisition unit is used for calling an interface provided by a DHCP client side function module of the first equipment to acquire next hop information.
10. The apparatus of claim 9, wherein the apparatus further comprises a session establishment module;
the obtaining unit is specifically configured to: calling an interface provided by a DHCP client function module of the first equipment, and inquiring whether a DHCP client of the first equipment acquires a gateway address from a DHCP server;
the receiving unit is specifically configured to: when the DHCP client side obtains a gateway address from a DHCP server, receiving a notification message sent by the DHCP client side of the first equipment, wherein the notification message carries the gateway address currently used by the first equipment;
the obtaining unit is further configured to use a gateway address currently used by the first device as next hop information;
the session establishing module is used for delaying the establishment of the BFD multi-hop session when the DHCP client side does not acquire a gateway address from a DHCP server; instructing the receiving unit to wait for reception of the notification message.
CN201511006152.3A 2015-12-28 2015-12-28 Next hop selection method and device of BFD multi-hop session under multi-exit Active CN106921569B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511006152.3A CN106921569B (en) 2015-12-28 2015-12-28 Next hop selection method and device of BFD multi-hop session under multi-exit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511006152.3A CN106921569B (en) 2015-12-28 2015-12-28 Next hop selection method and device of BFD multi-hop session under multi-exit

Publications (2)

Publication Number Publication Date
CN106921569A CN106921569A (en) 2017-07-04
CN106921569B true CN106921569B (en) 2020-04-28

Family

ID=59456032

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511006152.3A Active CN106921569B (en) 2015-12-28 2015-12-28 Next hop selection method and device of BFD multi-hop session under multi-exit

Country Status (1)

Country Link
CN (1) CN106921569B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101170459A (en) * 2007-11-28 2008-04-30 中兴通讯股份有限公司 Failure detection and link recovery method based on bidirectional forward link
CN101217420A (en) * 2007-12-27 2008-07-09 华为技术有限公司 A linkage processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8139479B1 (en) * 2009-03-25 2012-03-20 Juniper Networks, Inc. Health probing detection and enhancement for traffic engineering label switched paths

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101170459A (en) * 2007-11-28 2008-04-30 中兴通讯股份有限公司 Failure detection and link recovery method based on bidirectional forward link
CN101217420A (en) * 2007-12-27 2008-07-09 华为技术有限公司 A linkage processing method and device

Also Published As

Publication number Publication date
CN106921569A (en) 2017-07-04

Similar Documents

Publication Publication Date Title
EP3361682B1 (en) Bit indexed explicit replication (bier) information transmission method and reception method, and related device
CN106605387B (en) Node, system and method for WAN control failover agents for vHGWs
CN102598599B (en) RSVP-TE graceful restart under fast re-route conditions
CN102480753B (en) Link state detection method and device
JP6388955B2 (en) Graceful restart processing method of OpenFlow switch and OpenFlow controller
EP2093963A1 (en) A method, system and path computation element for obtaining path information
EP3131239B1 (en) Method and apparatus for path establishment
CN104253759A (en) Method, device and system for forwarding messages
CN106878072B (en) Message transmission method and device
EP3217608B1 (en) Switchback delay methods and devices
CN110493129B (en) Updating method of backup label path, message forwarding method and device
CN112448877A (en) SBFD session establishment method, device and system
KR20150033681A (en) Method and system to enable re-routing for home networks upon connectivity failure
CN105704029A (en) Pseudo wire establishing method, pseudo wire establishing system and equipment
CN103986638A (en) Method and device for binding multiple public network links for ADVPN tunnel
US20150312139A1 (en) Method and Device for Bidirectional Forwarding Detection under Condition of Parameter Update
KR20160114676A (en) Wireless network data processing device and wireless network system
JP2013172273A (en) Handover processing system and gateway router
CN104270367A (en) BFD conversation establishing method and device
CN106921569B (en) Next hop selection method and device of BFD multi-hop session under multi-exit
CN112838982A (en) Method, equipment and system for switching message transmission path
US10547542B2 (en) LSP establishment method and network device
CN102710804A (en) Method for improving reliability of 6RD (IPv6 rapid deployment) network, home gateway and DHCP (dynamic host configuration protocol) server
KR101624621B1 (en) Method and apparatus for deciding dynamic label switched path in multi protocol label switching network
CN115865792A (en) Method and device for processing routing information

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