CN109167700B - Detection method and device for Segment Routing (SR) tunnel - Google Patents

Detection method and device for Segment Routing (SR) tunnel Download PDF

Info

Publication number
CN109167700B
CN109167700B CN201810956303.9A CN201810956303A CN109167700B CN 109167700 B CN109167700 B CN 109167700B CN 201810956303 A CN201810956303 A CN 201810956303A CN 109167700 B CN109167700 B CN 109167700B
Authority
CN
China
Prior art keywords
tunnel
bfd
label
echo message
table item
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
CN201810956303.9A
Other languages
Chinese (zh)
Other versions
CN109167700A (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201810956303.9A priority Critical patent/CN109167700B/en
Publication of CN109167700A publication Critical patent/CN109167700A/en
Application granted granted Critical
Publication of CN109167700B publication Critical patent/CN109167700B/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
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • 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

Abstract

The embodiment of the application provides a method and a device for detecting a Segment Routing (SR) tunnel. In the application, the network device serves as an SR tunnel entry node, and when sending a BFD echo message for detecting the SR tunnel through the SR tunnel, the network device, in addition to carrying the SR tunnel to the BFD echo message, carries a BFD tunnel tag, which is created by an opposite-end device serving as an SR tunnel exit node and bound to the SR tunnel via a BFD tunnel of the same link, to the BFD echo message, so that the opposite-end device controls the BFD echo message to return along the original link according to the BFD tunnel tag after receiving the BFD echo message. When the method and the device are applied to the main SR tunnel, the main SR tunnel exit node can be controlled to return the received BFD echo message for detecting the main SR tunnel to the main SR tunnel entrance node along the original link, misjudgment of the main SR tunnel fault is prevented, and further data flow forwarding interruption is prevented.

Description

Detection method and device for Segment Routing (SR) tunnel
Technical Field
The present application relates to network communication technologies, and in particular, to a method and an apparatus for detecting a Segment Routing (SR) tunnel.
Background
In an SR network, a master SR tunnel and a backup SR tunnel are often deployed between two different network devices to improve the reliability of the SR network. Fig. 1 shows a main SR tunnel deployed between PE101 and PE104, where the main SR tunnel is: PE101- > PE102- > PE 104; the prepared SR tunnel is: PE101- > PE103- > PE 104. When the main SR tunnel is normal, PE101 forwards the data stream to PE104 through the main SR tunnel, and when the main SR tunnel is abnormal, the data stream originally forwarded by the main SR tunnel is switched to the standby SR tunnel for forwarding through switching of the main SR tunnel and the standby SR tunnel, thereby improving the reliability of the SR network.
The response (echo) Bidirectional Forwarding Detection (BFD) is used for carrying out fault Detection on the SR main tunnel, and specifically comprises the following steps: a main SR tunnel entry node (e.g., PE101 shown in fig. 1) sends a BFD echo message to a main SR tunnel exit node (e.g., PE104 shown in fig. 1), the main SR tunnel exit node returns the BFD echo message to the main SR tunnel entry node after receiving the BFD echo message, if the main SR tunnel entry node does not receive the BFD echo message returned by the main SR tunnel exit node within a set time, the main SR tunnel entry node considers that a main SR tunnel between the main SR tunnel entry node and the main SR tunnel exit node has a failure, and switches a data stream originally forwarded by the main SR tunnel to a standby SR tunnel for forwarding.
For a main SR tunnel entry node, when sending a BFD echo message, the BFD echo message encapsulates a label stack of the main SR tunnel, and when reaching a main SR tunnel exit node, the BFD echo message does not carry any label. Taking fig. 1 as an example, when sending a BFD echo packet, PE101 encapsulates a label stack (only including label 17) of the main SR tunnel on the BFD echo packet, where label 17 is a label corresponding to a path from PE102 to PE 104. When the PE102 receives the BFDecho message, the corresponding entry label mapping (ILM: Incoming Label Map) entry is found according to the label 17 encapsulated by the BFD echo message, the label 17 encapsulated by the BFD echo message is popped up (or deleted), and the BFD echo message is forwarded through an exit interface in the ILM entry. When PE104 receives the BFD echo message, the BFD echo message no longer carries any label at this time.
Therefore, when the main SR tunnel exit node returns a BFD echo message to the main SR tunnel entry node, the standby SR tunnel may be selected for forwarding, so that if the standby SR tunnel fails, the main SR tunnel entry node does not receive the BFD echo message returned by the main SR tunnel exit node within a set time, the main SR tunnel failure may be misjudged, and a data stream forwarded by the main SR tunnel is misswitched to the standby SR tunnel for forwarding, so that the data stream forwarding is interrupted.
Disclosure of Invention
The application provides a detection method and a detection device of a Segment Routing (SR) tunnel, so that an SR tunnel exit node returns a received BFD echo message for detecting the SR tunnel to an SR tunnel entry node along an original link.
The technical scheme provided by the application comprises the following steps:
in a first aspect, the present application provides a method for detecting a segment routing SR tunnel, where the method is applied to a network device, and includes:
after a first SR tunnel between the device and a first opposite terminal device is established, acquiring a first BFD tunnel label bound with the first BFD tunnel established by the first opposite terminal device, wherein a link through which the first BFD tunnel passes is the same as a link through which the first SR tunnel passes;
and carrying the SR tunnel label stack of the first SR tunnel and the first BFD tunnel label in a Bidirectional Forwarding Detection (BFD) response echo message according to a specified sequence, and forwarding the BFD response echo message through the first SR tunnel, wherein the specified sequence is used for ensuring that the BFD echo message sent by the equipment also carries the first BFD tunnel label when reaching the first peer-to-peer equipment.
In a second aspect, the present application provides a method for detecting a segment routing SR tunnel, where the method is applied to a network device, and includes:
after an SR tunnel from an opposite terminal device to the device is established, a BFD tunnel is established, and a link through which the BFD tunnel passes is the same as a link through which the SR tunnel passes;
receiving a Bidirectional Forwarding Detection (BFD) response echo message sent by the opposite terminal equipment through the SR tunnel;
and controlling the BFD echo message to be forwarded to the opposite terminal equipment through the BFD tunnel according to a BFD tunnel label carried by the BFD echo message, wherein the BFD tunnel label is bound with the BFD.
In a third aspect, the present application provides a detection apparatus for a segment routing SR tunnel, where the apparatus is applied to a network device, and the apparatus includes:
a BFD tunnel tag obtaining unit, configured to obtain, after a first SR tunnel is established from a device to a first peer device, a first BFD tunnel tag bound to the first BFD tunnel created by the first peer device, where a link through which the first BFD tunnel passes is the same as a link through which the first SR tunnel passes;
and the BFD detection unit is used for carrying the SR tunnel label stack of the first SR tunnel and the first BFD tunnel label in a bidirectional forwarding detection BFD response echo message according to a specified sequence, and forwarding the BFD response echo message through the first SR tunnel, wherein the specified sequence is used for ensuring that the BFD echo message sent by the equipment also carries the first BFD tunnel label when reaching the first peer-to-peer equipment.
In a fourth aspect, the present application provides a detection apparatus for a segment routing SR tunnel, where the apparatus is applied to a network device, and the apparatus includes:
a BFD tunnel creating unit, configured to create a BFD tunnel after an SR tunnel from an opposite device to the device is established, where a link through which the BFD tunnel passes is the same as a link through which the SR tunnel passes;
and the BFD detection response unit is used for receiving a bidirectional forwarding detection BFD response echo message sent by the opposite terminal equipment through the SR tunnel, controlling the BFD echo message to be forwarded to the opposite terminal equipment through the BFD tunnel according to a BFD tunnel label carried by the BFD echo message, and binding the BFD tunnel label with the BFD.
According to the technical scheme, when the network equipment sends the BFD echo message for detecting the SR tunnel through the SR tunnel, the SR tunnel is carried to the BFD echo message, and the BFD tunnel label which is created by the opposite terminal equipment and is bound with the SR tunnel through the BFD tunnel with the same link is carried to the BFD echo message, so that the opposite terminal equipment controls the BFD echo message to return along the original link according to the BFD tunnel label after receiving the BFD echo message. When the method and the device are applied to the main SR tunnel, the main SR tunnel exit node can be controlled to return the received BFD echo message for detecting the SR tunnel to the main SR tunnel entrance node along the original link, the fault of the main SR tunnel is prevented from being judged by mistake, and further the forwarding interruption of the data stream is prevented.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a schematic diagram of a master SR tunnel;
FIG. 2 is a flow chart of a method provided by an embodiment of the present application;
fig. 3 is a schematic diagram of a BFD tunnel provided in an embodiment of the present application;
fig. 4 is a schematic diagram of a format of a BFD echo packet provided in the embodiment of the present application;
FIG. 5 is a flow chart of another method provided by an embodiment of the present application;
FIG. 6 is a diagram of an embodiment application networking provided by an embodiment of the present application;
fig. 7 is a schematic diagram of a format of a BFD echo packet in the embodiment provided in the present application;
FIG. 8 is a block diagram of an apparatus according to an embodiment of the present disclosure;
FIG. 9 is a block diagram of another apparatus according to an embodiment of the present disclosure;
fig. 10 is a hardware configuration diagram of an apparatus according to an embodiment of the present application.
Detailed Description
In order to ensure that the SR tunnel egress node returns the received BFD echo packet for detecting the SR tunnel to the SR tunnel ingress node along the original link, the embodiment of the present application provides the method shown in fig. 2.
Referring to fig. 2, fig. 2 is a flowchart of a method provided by an embodiment of the present application. The flow is applied to a network device. As an embodiment, the network device may be a Provider Edge (PE), which may be used as an SR tunneling out node or an SR tunneling in node. Fig. 2 illustrates a network device as an SR tunnel entry node:
as shown in fig. 2, the process may include the following steps:
step 201, after a first SR tunnel from the device to a first peer device is established, obtaining a first BFD tunnel label bound to the first BFD tunnel created by the first peer device, where a link through which the first BFD tunnel passes is the same as a link through which the first SR tunnel passes.
The first peer device is generally referred to as any peer device of the present device, and is named for convenience of description only and is not intended to be limiting. The first SR tunnel, the first BFD tunnel, and the first BFD tunnel tag are also named for convenience of description, and are not intended to be limiting.
Taking fig. 1 as an example, if the first SR tunnel is the main SR tunnel from PE101 to PE104 shown in fig. 1, the first peer device is PE 104. As shown in fig. 1, the link via which the primary SR tunnel passes includes: link 100a1 (the link between PE101 and PE 102), link 100a2 (the link between PE102 and PE 104). Based on this, in the embodiment of the present application, the first BFD tunnel created by PE104 (as the first peer device) should also include link 100a1 (link between PE101 and PE 102), link 100a2 (link between PE102 and PE104), and fig. 3 shows the first BFD tunnel based on fig. 1.
As an embodiment, in this embodiment of the present application, the obtaining, in step 101, a first BFD tunnel label bound to a first BFD tunnel created by a first peer device may include: and receiving the first BFD tunnel label sent by the network controller. And acquiring a first BFD tunnel label bound with the first BFD tunnel created by the first peer device by receiving the first BFD tunnel label issued by the network controller.
As another embodiment, in this embodiment of the present application, the obtaining, in step 101, a first BFD tunnel label bound to a first BFD tunnel created by a first peer device may include: receiving the first BFD tunnel label input from the outside. And acquiring a first BFD tunnel label bound with the first BFD tunnel created by the first peer device by receiving the first BFD tunnel label input by the external command line.
Step 202, the SR tunnel label stack of the first SR tunnel and the first BFD tunnel label are carried in a BFD echo message according to a designated sequence, and forwarded through the first SR tunnel.
Here, the SR tunnel label stack is composed of labels of adjacent links on an SR tunnel in sequence, such as the main SR tunnel shown in fig. 1, and the SR tunnel label stack of the main SR tunnel may include [16, 17 ]. Or, as an embodiment, the SR tunnel label stack is composed of labels of adjacent links except for a first adjacent link on the SR tunnel in sequence, such as the main SR tunnel shown in fig. 1, where 16 is the label of the first adjacent link on the SR tunnel, and the SR tunnel label stack of the main SR tunnel may include [17 ].
In this embodiment of the present application, the specified sequence is used to ensure that the BFD echo packet sent by the present device also carries the first BFD tunnel tag when reaching the first peer device, so that the first peer device returns the received BFD echo packet through the first BFD tunnel according to the first BFD tunnel tag. As an example, the order of designation herein refers to: the first BFD tunnel label is closer to the sequence of the message header of the BFD echo message than the SR tunnel label stack. Fig. 4 shows the format of the BFD echo message.
Through the appointed sequence, only one unique label is carried when the BFD echo message sent by the equipment finally reaches the first opposite end equipment, and the unique label is a first BFD tunnel label. Thus, when a first peer device receives a BFD echo message through a first SR tunnel, an ILM (bidirectional Forwarding module) Entry corresponding to a first BFD tunnel Label is searched according to the first BFD tunnel Label carried by the BFD echo message, a Next Hop Label Forwarding (NHLFE) Entry (NHLFE: Next Hop Label Forwarding Entry) is searched according to a BFD tunnel identifier (tunnel identifier of the first BFD tunnel) in the ILM Entry (bound with the first BFD tunnel), the first BFD tunnel Label carried by the BFdecho message is deleted (also called popped up), an appointed Label stack in the NHLFE Entry is carried into the BFD echo message and is sent through an outgoing interface in the NHLFE Entry, the Label stack is appointed to be the Label stack of the first BFD tunnel, and the outgoing interface is an interface through which the first peer device accesses the first BFD tunnel. Finally, the first peer device returns the BFD echo message through the first BFD tunnel, and because the link of the first BFD tunnel is the same as that of the first SR tunnel, the first peer device (SR tunnel exit node) returns the BFD echo message to the SR tunnel entry node according to the original link which is the same as that of the link from the SR tunnel entry node to the SR tunnel exit node through the BFD echo message.
Thus, the flow shown in fig. 2 is completed.
As can be seen from the flow shown in fig. 2, in this embodiment of the application, when the network device sends the BFD echo packet for detecting the SR tunnel through the SR tunnel, in addition to carrying the SR tunnel to the BFD echo packet, the network device may also carry, to the BFD echo packet, a BFD tunnel tag that is created by the peer device and is bound to the SR tunnel via the BFD tunnel of the same link, so that the peer device controls the BFD echo packet to return along the original link according to the BFD tunnel tag after receiving the BFD echo packet. When the method and the device are applied to the main SR tunnel, the main SR tunnel exit node can be controlled to return the received BFdecho message for detecting the SR tunnel to the main SR tunnel entry node along the original link, so that the fault of the main SR tunnel is prevented from being judged by mistake, and further the forwarding interruption of the data stream is prevented.
The above description takes the network device as an SR tunnel entry node as an example, and the following description takes the network device as an SR tunnel exit node as an example:
referring to fig. 5, fig. 5 is a flow chart of another method provided by the embodiments of the present application. As shown in fig. 5, the process may include the following steps:
step 501, after a second SR tunnel from the second peer device to the present device is established, a second BFD tunnel is created.
Here, the second peer device may be the first peer device described above, or may be different from the first peer device described above, which is also named for convenience of description.
In the embodiment of the present application, the link through which the second BFD tunnel passes is the same as the link through which the second SR tunnel passes.
As an example, step 501 may further comprise: and informing the network controller of the second BFD tunnel label bound by the second BFD tunnel, so that the network controller informs the second opposite end equipment of the second BFD tunnel label.
As another example, step 501 may further include: and informing the administrator of the second BFD tunnel label bound by the second BFD tunnel, so that the administrator configures the second BFD tunnel label to the second opposite end equipment through a command line.
Step 502, receiving a BFD echo message sent by the second peer device through the second SR tunnel, and controlling the BFD echo message to be forwarded to the peer device through the BFD tunnel according to a second BFD tunnel tag carried by the BFD echo message.
As an embodiment, in step 502, controlling, according to a BFD tunnel tag carried by a BFD echo packet, that the BFD echo packet is forwarded to the peer device through the BFD tunnel may include steps a1 to a step a 3:
step a1, searching the corresponding ILM table item according to the BFD tunnel label carried by the BFD echo message.
Step a2, searching the NHLFE table entry bound with the BFD tunnel according to the tunnel identifier of the BFD tunnel in the ILM table entry.
Step a3, deleting the BFD tunnel label carried by the BFD echo message, and sending the BFD echo message deleted with the BFD tunnel label through an outgoing interface in the NHLFE table entry, where the sent BFD echo message carries a specified label stack in the NHLFE table entry, the specified label stack is the label stack of the BFD tunnel, and the outgoing interface is an interface for accessing the device to the BFD tunnel.
As described above, the link through which the second BFD tunnel passes is the same as the link through which the second SR tunnel passes, and finally, the device returns the BFD echo packet to the second peer device along the link through which the second peer device sends the BFD echo packet through the flow shown in fig. 5. When the method and the device are applied to the main SR tunnel, the received BFDecho message for detecting the SR tunnel can be returned to the main SR tunnel access node along the original link by adopting the method and the device, so that the fault of the main SR tunnel is prevented from being judged by mistake, and further, the forwarding interruption of the data stream is prevented.
The flow shown in fig. 5 is completed.
The method provided by the embodiment of the present application is described below with reference to a specific embodiment:
referring to fig. 6, fig. 6 is a diagram of an embodiment application networking provided by the embodiment of the present application. In fig. 6, the primary SR tunnel is established between PE601 and PE604, where the primary SR tunnel is: PE601- > PE602- > PE 604; the prepared SR tunnel is: PE601- > PE603- > PE 604. The embodiment of the present application takes a main SR tunnel as an example for description:
in this embodiment, a label corresponding to a path from the PE601 to the PE602 on the main SR tunnel is 61, and a label corresponding to a path from the PE602 to the PE604 is 62.
In this embodiment of the present application, after the PE604 learns that the main SR tunnel from the PE601 to the PE604 is established, a BFD tunnel is created. The link between the BFD tunnel and the main SR tunnel is the same, specifically: link b1 (the link between PE601 and PE 602), link b2 (the link between PE601 and PE 604). In this embodiment, the label corresponding to the path from PE604 to PE602 on the BFD tunnel is 71, and the label corresponding to the path from PE602 to PE601 is 72.
In the embodiment of the present application, PE604 binds a corresponding BFD tunnel label 100 for the BFD tunnel.
PE604 notifies the network controller of the BFD tunnel label 100 to be notified by the network controller to PE 601.
In this embodiment of the present application, the PE604 generates an ILM entry corresponding to the BFD tunnel tag 100, where the ILM entry includes: BFD tunnel tag 100, tunnel identification of BFD tunnel 10.
In the embodiment of the present application, the PE604 generates an NHLFE entry bound to a BFD tunnel. The NHLFE entry includes: and (4) outputting an interface and a label stack of the BFD tunnel. Here, the egress interface refers to an interface on the PE604 that accesses the BFD tunnel. In one example, the label stack of the BFD tunnel is: only label 72 is included.
The following describes how the primary SR tunnel is detected:
as shown in fig. 6, when PE601 detects the main SR tunnel through echo BFD, PE601 carries the label stack (including only label 62) of the main SR tunnel and BFD tunnel label 100 into the BFD echo message for detecting the main SR tunnel, as specifically shown in fig. 7. For convenience of description, the BFD echo message may be denoted as message 700_1 at this time.
The PE601 sends a message 700_1 through an interface of the local access main SR tunnel.
PE602 receives message 700_1, locally finds a corresponding ILM entry according to tag 62 carried in message 700_1, and deletes tag 62 carried in message 700_1 (or pops up tag 62 carried in message 700_ 1). For convenience of description, the message 700_1 at this time is denoted as a message 700_ 2.
The PE602 forwards the message 700_2 according to the found next hop information in the ILM entry.
The PE604 receives the message 700_2, and finds the corresponding ILM entry locally according to the BFD tunnel tag 100 carried in the message 700_ 2. At this time, the next hop information in the ILM entry is the tunnel identifier 10 of the BFD tunnel.
The PE604 finds the corresponding NHLFE entry according to the tunnel identifier 10 of the BFD tunnel, and deletes the BFD tunnel tag 100 carried in the message 700_2 (or pops up the BFD tunnel tag 100 carried in the message 700_ 2). For convenience of description, the message 700_2 at this time is denoted as a message 700_ 3.
PE604 carries the label stack (including only label 72) in the NHLFE entry to message 700_3, and sends message 700_3 through the egress interface (BFD tunnel interface) in the NHLFE entry.
PE602 receives message 700_3, locally finds a corresponding ILM entry according to tag 72 carried in message 700_3, and deletes tag 72 carried in message 700_3 (or pops up tag 62 carried in message 700_ 1). For convenience of description, the message 700_3 at this time is denoted as a message 700_ 4.
The PE602 forwards the message 700_4 according to the found next hop information in the ILM entry.
The PE601 receives the message 700_4, checks whether the time for receiving the message 700_4 is within the set time after sending the message 700_1, if so, determines that the main SR tunnel is normal, otherwise, determines that the main SR tunnel is abnormal.
It should be noted that, in the embodiment of the present application, detection of the standby SR tunnel is similar to detection of the main SR tunnel, and details are not described again.
Thus, the description of the embodiments of the present application is completed.
It can be seen from the foregoing embodiments that, in the embodiment of the present application, the main SR tunnel egress node PE604 creates a BFD tunnel through the same link as the main SR tunnel, and thus when receiving a BFD echo packet sent by the main SR tunnel ingress node PE601, the main SR tunnel egress node PE604 can ensure that a link from the main SR tunnel ingress node PE601 to the main SR tunnel egress node PE604 returns through a primary path according to the BFD echo packet, thereby preventing misjudgment of a failure of the main SR tunnel and further preventing interruption of forwarding of a data stream.
The method provided by the embodiment of the application is described above. The following describes the apparatus provided in the embodiments of the present application:
referring to fig. 8, fig. 8 is a structural diagram of an apparatus according to an embodiment of the present disclosure. The device is applied to network equipment and comprises:
a BFD tunnel tag obtaining unit, configured to obtain, after a first SR tunnel is established from a device to a first peer device, a first BFD tunnel tag bound to the first BFD tunnel created by the first peer device, where a link through which the first BFD tunnel passes is the same as a link through which the first SR tunnel passes;
and the BFD detection unit is used for carrying the SR tunnel label stack of the first SR tunnel and the first BFD tunnel label in a bidirectional forwarding detection BFD response echo message according to a specified sequence, and forwarding the BFD response echo message through the first SR tunnel, wherein the specified sequence is used for ensuring that the BFD echo message sent by the equipment also carries the first BFD tunnel label when reaching the first peer-to-peer equipment.
As an embodiment, the acquiring, by the BFD tunnel tag acquiring unit, the first BFD tunnel tag bound to the first BFD tunnel created by the first peer device may include:
receiving the first BFD tunnel label issued by the network controller; alternatively, the first and second electrodes may be,
receiving the first BFD tunnel label input from the outside.
As an example, the specified order refers to:
and the first BFD tunnel label is close to the message header of the BFD echo message, and the SR tunnel label stack is close to the sequence of the first BFD tunnel label.
As an embodiment, as shown in fig. 8, the apparatus further includes:
a BFD tunnel creating unit, configured to create a second BFD tunnel after a second SR tunnel from a second peer device to the local device is established, where a link through which the second BFD tunnel passes is the same as a link through which the second SR tunnel passes, and the second peer device is the same as or different from the first peer device;
the BFD detection response unit is used for searching a corresponding incoming label mapping ILM table item according to a second BFD tunnel label carried by a BFD echo message when the BFD echo message sent by the second opposite terminal equipment is received through a second SR tunnel; and the number of the first and second groups,
searching a next hop label forwarding NHLFE table item bound with the second BFD tunnel according to the tunnel identifier of the second BFD tunnel in the ILM table item; and the number of the first and second groups,
and deleting a second BFD tunnel label carried by a BFD echo message, sending the BFD echo message with the second BFD tunnel label deleted through an outgoing interface in the NHLFE table item, wherein the sent BFD echo message carries a specified label stack in the NHLFE table item, the outgoing interface is an interface which is accessed to the BFD tunnel on the second opposite terminal equipment, and the specified label stack is the label stack of the BFD tunnel.
Thus, the apparatus configuration diagram shown in fig. 8 is completed.
Referring to fig. 9, fig. 9 is a structural diagram of another apparatus provided in the embodiment of the present application. The device is applied to network equipment and comprises:
a BFD tunnel creating unit, configured to create a BFD tunnel after an SR tunnel from an opposite device to the device is established, where a link through which the BFD tunnel passes is the same as a link through which the SR tunnel passes;
and the BFD detection response unit is used for controlling the BFD echo message to be forwarded to the opposite terminal equipment through the BFD tunnel according to a BFD tunnel label carried by the BFD echo message when the BFD response echo message is received by the SR tunnel, and the BFD tunnel label is bound with the BFD.
As an embodiment, the controlling, by the BFD detection response unit according to a BFD tunnel tag carried by a BFD echo packet, that the BFD echo packet is forwarded to the peer device through the BFD tunnel by the BFD detection response unit includes:
searching a corresponding label-entering mapping ILM table item according to a BFD tunnel label carried by the BFD echo message; and the number of the first and second groups,
searching a next hop label forwarding NHLFE table item bound with the BFD tunnel according to the tunnel identifier of the BFD tunnel in the ILM table item; and the number of the first and second groups,
and deleting the BFD tunnel label carried by the BFD echo message, sending the BFD echo message with the BFD tunnel label deleted through an outgoing interface in the NHLFE table entry, wherein the sent BFD echo message carries a specified label stack in the NHLFE table entry, the specified label stack is the label stack of the BFD tunnel, and the outgoing interface is an interface for accessing the equipment into the BFD tunnel.
Thus, the apparatus configuration diagram shown in fig. 9 is completed.
The embodiment of the present application further provides a hardware structure diagram of the apparatus shown in fig. 8 and 9. In the embodiment of the present application, the hardware structures of the apparatuses shown in fig. 8 and 9 are similar, and both include: a machine-readable storage medium and a processor, wherein:
a machine-readable storage medium: the instruction code is stored. The instruction codes are used for realizing the SR tunnel detection disclosed by the application
A processor: communicate with the machine-readable storage medium to read and execute the instruction code stored in the machine-readable storage medium.
Thus, the hardware configuration of the apparatus shown in fig. 10 is completed.
In embodiments of the present application, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The apparatuses, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or implemented by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A detection method for a Segment Routing (SR) tunnel is applied to a network device, and comprises the following steps:
after a first SR tunnel between the device and a first opposite terminal device is established, acquiring a first BFD tunnel label bound with the first BFD tunnel established by the first opposite terminal device, wherein a link through which the first BFD tunnel passes is the same as a link through which the first SR tunnel passes;
and carrying the SR tunnel label stack of the first SR tunnel and the first BFD tunnel label in a Bidirectional Forwarding Detection (BFD) response echo message according to a specified sequence, and forwarding the BFD response echo message through the first SR tunnel, wherein the specified sequence is used for ensuring that the BFD echo message sent by the equipment also carries the first BFD tunnel label when reaching the first peer-to-peer equipment.
2. The method of claim 1, wherein obtaining the first BFD tunnel label bound to the first BFD tunnel created by the first peer device comprises:
receiving the first BFD tunnel label issued by the network controller; alternatively, the first and second electrodes may be,
receiving the first BFD tunnel label input from the outside.
3. The method of claim 1, wherein the specified order is:
and the first BFD tunnel label is close to the message header of the BFD echo message, and the SR tunnel label stack is close to the sequence of the first BFD tunnel label.
4. The method of claim 1, further comprising:
after a second SR tunnel from a second opposite terminal device to the device is established, a second BFD tunnel is established, a link through which the second BFD tunnel passes is the same as a link through which the second SR tunnel passes, and the second opposite terminal device is the same as or different from the first opposite terminal device;
when a BFD echo message sent by the second opposite terminal equipment is received through a second SR tunnel, searching a corresponding label-in mapping ILM table item according to a second BFD tunnel label carried by the BFD echo message;
searching a next hop label forwarding NHLFE table item bound with the second BFD tunnel according to the tunnel identifier of the second BFD tunnel in the ILM table item;
and deleting a second BFD tunnel label carried by a BFD echo message, and sending the label through an outgoing interface in the NHLFE table item, wherein the sent BFD echo message carries a specified label stack in the NHLFE table item, the outgoing interface is an interface which is accessed to the second BFD tunnel on the second peer device, and the specified label stack is the label stack of the second BFD tunnel.
5. A detection method for a Segment Routing (SR) tunnel is applied to a network device, and comprises the following steps:
after an SR tunnel from an opposite terminal device to the device is established, a BFD tunnel is established, and a link through which the BFD tunnel passes is the same as a link through which the SR tunnel passes;
receiving a Bidirectional Forwarding Detection (BFD) response echo message sent by the opposite terminal equipment through the SR tunnel;
and controlling the BFD echo message to be forwarded to the opposite terminal equipment through the BFD tunnel according to a BFD tunnel label carried by the BFD echo message, wherein the BFD tunnel label is bound with the BFD tunnel.
6. The method according to claim 5, wherein the controlling, according to a BFD tunnel label carried by a BFD echo packet, the BFD echo packet to be forwarded to the peer device through the BFD tunnel comprises:
searching a corresponding label-in mapping ILM table item according to a BFD tunnel label carried by the BFD echo message;
searching a next hop label forwarding NHLFE table item bound with the BFD tunnel according to the tunnel identifier of the BFD tunnel in the ILM table item;
and deleting the BFD tunnel label carried by the BFD echo message, and sending the BFD tunnel label through an outgoing interface in the NHLFE table item, wherein the sent BFD echo message carries a specified label stack in the NHLFE table item, the specified label stack is the label stack of the BFD tunnel, and the outgoing interface is an interface for accessing the equipment into the BFD tunnel.
7. The detection device for the segment routing SR tunnel is applied to a network device, and comprises:
a BFD tunnel tag obtaining unit, configured to obtain, after a first SR tunnel is established from a device to a first peer device, a first BFD tunnel tag bound to the first BFD tunnel created by the first peer device, where a link through which the first BFD tunnel passes is the same as a link through which the first SR tunnel passes;
and the BFD detection unit is used for carrying the SR tunnel label stack of the first SR tunnel and the first BFD tunnel label in a bidirectional forwarding detection BFD response echo message according to a specified sequence, and forwarding the BFD response echo message through the first SR tunnel, wherein the specified sequence is used for ensuring that the BFD echo message sent by the equipment also carries the first BFD tunnel label when reaching the first peer-to-peer equipment.
8. The apparatus of claim 7, further comprising:
a BFD tunnel creating unit, configured to create a second BFD tunnel after a second SR tunnel from a second peer device to the local device is established, where a link through which the second BFD tunnel passes is the same as a link through which the second SR tunnel passes, and the second peer device is the same as or different from the first peer device;
the BFD detection response unit is used for searching a corresponding incoming label mapping ILM table item according to a second BFD tunnel label carried by a BFD echo message when the BFD echo message sent by the second opposite terminal equipment is received through a second SR tunnel; and the number of the first and second groups,
searching a next hop label forwarding NHLFE table item bound with the second BFD tunnel according to the tunnel identifier of the second BFD tunnel in the ILM table item; and the number of the first and second groups,
and deleting a second BFD tunnel label carried by a BFD echo message, and sending the label through an outgoing interface in the NHLFE table item, wherein the sent BFD echo message carries a specified label stack in the NHLFE table item, the outgoing interface is an interface which is accessed to the second BFD tunnel on the second peer device, and the specified label stack is the label stack of the second BFD tunnel.
9. The detection device for the segment routing SR tunnel is applied to a network device, and comprises:
a BFD tunnel creating unit, configured to create a BFD tunnel after an SR tunnel from an opposite device to the device is established, where a link through which the BFD tunnel passes is the same as a link through which the SR tunnel passes;
and the BFD detection response unit is used for receiving a bidirectional forwarding detection BFD response echo message sent by the opposite terminal equipment through the SR tunnel, controlling the BFD echo message to be forwarded to the opposite terminal equipment through the BFD tunnel according to a BFD tunnel label carried by the BFD echo message, and binding the BFD tunnel label with the BFD tunnel.
10. The apparatus according to claim 9, wherein the BFD detection response unit controls the BFD echo packet to forward to the peer device through the BFD tunnel according to a BFD tunnel tag carried by the BFD echo packet includes:
searching a corresponding label-entering mapping ILM table item according to a BFD tunnel label carried by the BFD echo message; and the number of the first and second groups,
searching a next hop label forwarding NHLFE table item bound with the BFD tunnel according to the tunnel identifier of the BFD tunnel in the ILM table item; and the number of the first and second groups,
and deleting the BFD tunnel label carried by the BFD echo message, and sending the BFD tunnel label through an outgoing interface in the NHLFE table item, wherein the sent BFD echo message carries a specified label stack in the NHLFE table item, the specified label stack is the label stack of the BFD tunnel, and the outgoing interface is an interface for accessing the equipment into the BFD tunnel.
CN201810956303.9A 2018-08-21 2018-08-21 Detection method and device for Segment Routing (SR) tunnel Active CN109167700B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810956303.9A CN109167700B (en) 2018-08-21 2018-08-21 Detection method and device for Segment Routing (SR) tunnel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810956303.9A CN109167700B (en) 2018-08-21 2018-08-21 Detection method and device for Segment Routing (SR) tunnel

Publications (2)

Publication Number Publication Date
CN109167700A CN109167700A (en) 2019-01-08
CN109167700B true CN109167700B (en) 2020-06-09

Family

ID=64896338

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810956303.9A Active CN109167700B (en) 2018-08-21 2018-08-21 Detection method and device for Segment Routing (SR) tunnel

Country Status (1)

Country Link
CN (1) CN109167700B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112929261B (en) * 2019-12-05 2024-03-12 中兴通讯股份有限公司 Fiber breakage prevention method and device for segmented routing tunnel, entry node and storage medium
CN111917643B (en) * 2020-07-17 2023-01-13 中盈优创资讯科技有限公司 Seamless bidirectional forwarding detection method and device for segmented routing tunnel
CN112291147A (en) * 2020-10-15 2021-01-29 北京直真科技股份有限公司 Dynamic intelligent SR tunnel application method for 5G service
CN113472653B (en) * 2021-05-25 2022-11-18 新华三信息安全技术有限公司 Method and device for detecting path consistency

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160380886A1 (en) * 2015-06-25 2016-12-29 Ciena Corporation Distributed data center architecture
CN107547371A (en) * 2017-09-28 2018-01-05 新华三技术有限公司 A kind of message forwarding method and device

Also Published As

Publication number Publication date
CN109167700A (en) 2019-01-08

Similar Documents

Publication Publication Date Title
CN109167700B (en) Detection method and device for Segment Routing (SR) tunnel
CN112995029B (en) Transmission path fault processing method, device and system
US8369211B2 (en) Network distribution prevention when virtual chassis system undergoes splits and merges
CN102549988B (en) Router and the method performed by router
WO2018054397A1 (en) Service function chain detection path method and device
CN110061914B (en) Message forwarding method and device
CN109495320B (en) Data message transmission method and device
CN111431800B (en) Method, device and equipment for establishing path and machine-readable storage medium
CN107864091B (en) Link failure processing method and device
CN109474495B (en) Tunnel detection method and device
CN111801911B (en) Traffic function chain congestion tracking
US20130114593A1 (en) Reliable Transportation a Stream of Packets Using Packet Replication
CN106559280A (en) Bidirectional forwarding detection (BFD) method and device
CN113328916B (en) BFD detection mode switching method, device and equipment
CN109873766B (en) Message transmission method and device
CN110708275B (en) Protocol message processing method and device
CN110149276A (en) Multicast forward method and device
US20090201806A1 (en) Routing failover with accurate multicast delivery
CN113489640A (en) Message forwarding method, device and gateway system
CN109246005B (en) Message forwarding method and device
CN111629386B (en) Communication method, system and equipment
CN109347746B (en) MAC address learning method and device
CN112351050A (en) Method, device, communication equipment and storage medium for mirroring data stream
CN104348737A (en) Multicast message transmission method and switches
CN109787894A (en) A kind of route control method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant