CN109218199B - Message processing method and device - Google Patents

Message processing method and device Download PDF

Info

Publication number
CN109218199B
CN109218199B CN201811392770.XA CN201811392770A CN109218199B CN 109218199 B CN109218199 B CN 109218199B CN 201811392770 A CN201811392770 A CN 201811392770A CN 109218199 B CN109218199 B CN 109218199B
Authority
CN
China
Prior art keywords
label
bfd
lsp
detected
carried
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
CN201811392770.XA
Other languages
Chinese (zh)
Other versions
CN109218199A (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 CN201811392770.XA priority Critical patent/CN109218199B/en
Publication of CN109218199A publication Critical patent/CN109218199A/en
Application granted granted Critical
Publication of CN109218199B publication Critical patent/CN109218199B/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/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • 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)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides a message processing method and a message processing device, which are applied to network equipment, when receiving a BFD request message aiming at an LSP to be detected, if the BFD request message is not an egress node, modifying a label carried in the BFD request message according to a stored label forwarding table, and forwarding the modified BFD request message, otherwise, generating a BFD response message carrying the label of an ingress node carried in the BFD request message in the LSP to be detected. The label carried in the BFD response message is a label of the ingress node in the LSP to be detected, so that the network device determines the next-hop device according to the label, and the next-hop device forwards the BFD request message to the network device in the LSP to be detected, and sends the BFD response message to the next-hop device, so that the BFD response message can be returned to the ingress node through the LSP to be detected, thereby avoiding an error in the detection result of the LSP to be detected.

Description

Message processing method and device
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and an apparatus for processing a packet.
Background
MPLS (Multi-Protocol Label Switching) technology is a backbone network technology which is widely applied at present. In an MPLS network, network devices may forward packets according to labels. When forwarding a packet, network devices in an MPLS network may be generally classified into: ingress, Transit, and Egress. Links between the ingress node, the intermediate node, and the egress node may be referred to as LSPs (Label Switched paths).
The prior art can generally detect the LSP by combining a BFD (Bidirectional Forwarding Detection) technique. For example, the networking shown in fig. 1 includes: PE (Provider Edge) 1, PE2, PE3, and PE 4. The PE1 is an ingress node, the PE4 is an egress node, the PE2 and the PE3 are intermediate nodes, and an active LSP (i.e., link L1) and a backup LSP (i.e., link L2-link L3-link L4) exist between the PE1 and the PE 4.
The next-hop device of PE1 in the backup LSP is PE2, PE1 may determine, in a stored label forwarding table, that a destination address is a network address of PE4, and the next-hop device is a label (i.e., 2000) in an entry of PE2, where the label 2000 is a label of PE4 in the backup LSP. PE1 may then send a BFD request packet carrying a label (i.e., 2000) to PE2 to detect the backup LSP. After receiving the BFD request message, PE2 determines that the label corresponding to label 2000 is 3000, the next-hop device corresponding to label 2000 is PE3, and PE2 modifies the label in the BFD request message to 3000, and sends the modified BFD request message to PE3 in the stored label forwarding table. After receiving the BFD request message, PE3 determines that the label corresponding to label 3000 is 100, the next-hop device corresponding to label 3000 is PE4, and PE3 modifies the label in the BFD request message to 100, and sends the modified BFD request message to PE4 in the stored label forwarding table. After receiving the BFD request packet, PE4 may send a BFD response packet to PE1 via the optimal routing path (i.e., the primary LSP), where the label carried in the BFD response packet is the label of PE1 in the primary LSP (i.e., 200). If the link L1 fails, PE1 may not receive the BFD response packet, and PE1 may determine that the backup LSP fails.
It can be seen that, when the main LSP and the backup LSP exist in the networking, the BFD response packet and the corresponding BFD request packet may be transmitted in different LSPs, which may further cause an error in the detection result of the LSP.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for processing a packet, so that a BFD response packet and a corresponding BFD request packet are transmitted in the same LSP, and an error in a detection result of the LSP can be avoided. The specific technical scheme is as follows:
in a first aspect, to achieve the above object, an embodiment of the present application discloses a method for processing a packet, where the method is applied to a network device, and the method includes:
receiving a Bidirectional Forwarding Detection (BFD) request message aiming at a Label Switching Path (LSP) to be detected, wherein the BFD request message carries a label of an ingress node of the LSP to be detected in the LSP to be detected and a label of an egress node of the LSP to be detected in the LSP to be detected;
if the node is not the egress node, modifying the label of the ingress node in the LSP to be detected and the label of the egress node in the LSP to be detected, which are carried in the BFD request message, according to a stored label forwarding table, and forwarding the modified BFD request message, so that the egress node generates a BFD response message aiming at the LSP to be detected according to the label carried in the modified BFD request message;
and if the self is the egress node, generating a BFD response message carrying a label of the ingress node in the LSP to be detected, wherein the label of the ingress node in the BFD request message is carried in the LSP to be detected, determining next-hop equipment corresponding to the label of the ingress node in the LSP to be detected, which is carried in the BFD request message, in a stored label forwarding table, and sending the BFD response message to the determined next-hop equipment.
Optionally, the modifying, according to the stored label forwarding table, the label of the ingress node in the to-be-detected LSP and the label of the egress node in the to-be-detected LSP, which are carried in the BFD request message, and forwarding the modified BFD request message includes:
determining a label corresponding to a label of the egress node in the to-be-detected LSP carried in the BFD request message in a stored label forwarding table as a first label, determining a next-hop device corresponding to a label of the egress node in the to-be-detected LSP carried in the BFD request message in the stored label forwarding table as a first device, and determining a label corresponding to a label of the ingress node in the to-be-detected LSP carried in the BFD request message in the stored label forwarding table as a second label;
modifying the label of the egress node in the to-be-detected LSP carried in the BFD request message into the first label, and modifying the label of the ingress node in the to-be-detected LSP carried in the BFD request message into the second label;
and sending the modified BFD request message to the first equipment.
Optionally, the method further includes:
if the node is not the egress node and not the ingress node, when receiving a BFD response message, determining a label corresponding to a label of the ingress node in the LSP to be detected carried in the BFD response message in a stored label forwarding table as a third label, and determining a next-hop device corresponding to the label of the ingress node in the LSP to be detected carried in the BFD response message in the stored label forwarding table as a second device;
modifying the label of the ingress node in the LSP to be detected carried in the BFD response message into the third label;
and sending the modified BFD response message to the second equipment.
In a second aspect, to achieve the above object, an embodiment of the present application discloses a message processing method, where the method is applied to a network device, and the method includes:
generating a Bidirectional Forwarding Detection (BFD) request message carrying a label of an egress node of a Label Switching Path (LSP) to be detected in the LSP to be detected and a label of the egress node in the LSP to be detected;
and sending the BFD request message to next-hop equipment in the LSP to be detected.
In a third aspect, to achieve the above object, an embodiment of the present application discloses a packet processing apparatus, where the apparatus is applied to a network device, and the apparatus includes:
a receiving module, configured to receive a Bidirectional Forwarding Detection (BFD) request packet for a Label Switched Path (LSP) to be detected, where the BFD request packet carries a label of an ingress node of the LSP to be detected in the LSP to be detected and a label of an egress node of the LSP to be detected in the LSP to be detected;
a forwarding module, configured to modify, according to a stored label forwarding table, a label of the ingress node in the to-be-detected LSP and a label of the egress node in the to-be-detected LSP, which are carried in the BFD request packet, and forward the modified BFD request packet, so that the egress node generates a BFD response packet for the to-be-detected LSP according to the label carried in the modified BFD request packet;
and the sending module is used for generating a BFD response message carrying a label of the ingress node in the LSP to be detected, which is carried in the BFD request message, if the sending module is the egress node, determining next-hop equipment corresponding to the label of the ingress node in the LSP to be detected, which is carried in the BFD request message, in a stored label forwarding table, and sending the BFD response message to the determined next-hop equipment.
Optionally, the forwarding module is specifically configured to determine, in a stored label forwarding table, a label corresponding to a label of the egress node in the to-be-detected LSP, which is carried in the BFD request packet, as a first label, determine, in the stored label forwarding table, a next-hop device corresponding to a label of the egress node in the to-be-detected LSP, which is carried in the BFD request packet, as a first device, determine, in the stored label forwarding table, a label corresponding to a label of the ingress node in the to-be-detected LSP, which is carried in the BFD request packet, as a second label;
modifying the label of the egress node in the to-be-detected LSP carried in the BFD request message into the first label, and modifying the label of the ingress node in the to-be-detected LSP carried in the BFD request message into the second label;
and sending the modified BFD request message to the first equipment.
Optionally, the apparatus further comprises:
a processing module, configured to determine, if the processing module is not the egress node and not the ingress node, a label corresponding to a label of the ingress node in the to-be-detected LSP, which is carried in a BFD response packet, in a stored label forwarding table as a third label when the processing module receives the BFD response packet, and determine, in the stored label forwarding table, a next-hop device corresponding to a label of the ingress node in the to-be-detected LSP, which is carried in the BFD response packet, as a second device;
modifying the label of the ingress node in the LSP to be detected carried in the BFD response message into the third label;
and sending the modified BFD response message to the second equipment.
In a fourth aspect, in order to achieve the above object, an embodiment of the present application discloses a packet processing apparatus, where the apparatus is applied to a network device, and the apparatus includes:
a generating module, configured to generate a bidirectional forwarding detection BFD request packet that carries a label of an egress node of a label switching path to be detected LSP in the LSP to be detected and a label of the egress node in the LSP to be detected;
and the sending module is used for sending the BFD request message to next-hop equipment in the LSP to be detected.
On the other hand, in order to achieve the above object, an embodiment of the present application further discloses an electronic device, which includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor adapted to perform any of the method steps of the first aspect when executing a program stored in the memory.
On the other hand, in order to achieve the above object, an embodiment of the present application further discloses an electronic device, which includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of the second aspect when executing the program stored in the memory.
In another aspect, to achieve the above object, an embodiment of the present application further discloses a machine-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to: implementing any of the method steps described in the first aspect.
In another aspect, to achieve the above object, an embodiment of the present application further discloses a machine-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to: the method steps according to the second aspect are implemented.
In another aspect, to achieve the above object, an embodiment of the present application further discloses a computer program product containing instructions, which when executed on a computer, causes the computer to perform any one of the method steps described in the above first aspect.
In another aspect, to achieve the above object, an embodiment of the present application further discloses a computer program product containing instructions, which when executed on a computer, causes the computer to perform the method steps described in the second aspect.
The embodiment of the application provides a message processing method and a message processing device, which are applied to network equipment, when receiving a BFD request message aiming at a to-be-detected LSP (label switching path), if the network equipment is not an exit node of the to-be-detected LSP, modifying a label of an entry node in the to-be-detected LSP and a label of an exit node in the to-be-detected LSP, which are carried in the BFD request message, according to a stored label forwarding table, and forwarding the modified BFD request message; and if the network equipment is the output node of the LSP to be detected, generating a BFD response message carrying the label of the input node in the LSP to be detected, wherein the label is carried in the BFD request message. The label carried in the BFD response message is a label of the ingress node in the LSP to be detected, so that the network device determines the next-hop device according to the label, and the next-hop device forwards the BFD request message to the network device in the LSP to be detected, and sends the BFD response message to the next-hop device, so that the BFD response message can be returned to the ingress node through the LSP to be detected, thereby preventing the BFD response message from being returned to the ingress node through other LSPs, and further preventing the detection result of the LSP to be detected from being erroneous.
Of course, not all of the above advantages need be achieved in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a framework diagram of a networking architecture provided in the present application;
FIG. 2 is a block diagram of a networking architecture provided herein;
fig. 3 is a flowchart of a message processing method according to an embodiment of the present application;
fig. 4 is a flowchart of a message processing method according to an embodiment of the present application;
fig. 5 is a flowchart of an example of a message processing method according to an embodiment of the present application;
fig. 6 is a structural diagram of a message processing apparatus according to an embodiment of the present application;
fig. 7 is a structural diagram of a message processing apparatus according to an embodiment of the present application;
fig. 8 is a block diagram of an electronic device according to an embodiment of the present disclosure;
fig. 9 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
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 only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a message processing method, which can be applied to network equipment, and the network equipment can be PE or other equipment.
In one example, the method may be applied to each PE in fig. 2. The PE1 is used as an ingress node of the LSP to be detected (i.e., link L2-link L3-link L4), and may generate a BFD request packet carrying a label (i.e., 2000) of an egress node (i.e., PE4) of the LSP to be detected in the LSP to be detected and a label (i.e., 200) of PE1 in the LSP to be detected, and then the PE1 may send the BFD request packet to a next-hop device (i.e., PE2) in the LSP to be detected.
When PE2 receives the BFD request packet sent by PE1, PE2 determines that it is not an egress node of the LSP to be detected. PE2 may modify the label (i.e., 2000) of PE4 in the LSP to be detected, and the label (i.e., 200) of PE1 in the LSP to be detected, which are carried in the BFD request message, according to the stored label forwarding table. For example, PE2 may modify tag 2000 to 3000, modify tag 200 to 300, and send the modified BFD request message to the next-hop device (i.e., PE 3).
Similarly, PE3 may modify the label (i.e. 3000) of PE4 in the LSP to be detected, and the label (i.e. 300) of PE1 in the LSP to be detected, which are carried in the BFD request packet, according to the stored label forwarding table. For example, PE3 may modify tag 3000 to 100, modify tag 300 to 400, and send the modified BFD request message to the next-hop device (i.e., PE 4).
When PE4 receives the BFD request message, PE4 determines that it is the egress node of the LSP to be detected. PE4 may generate a BFD response packet carrying a label (i.e., 400) of PE1 in the BFD request packet in the LSP to be detected, and determine, in the stored label forwarding table, that the next-hop device corresponding to label 400 is PE3, and PE4 may send the BFD response packet carrying label 400 to PE 3.
Correspondingly, after receiving the BFD response message, PE3 may modify the label carried in the BFD response message to 300 according to the stored label forwarding table, and send the modified BFD response message to PE 2. Similarly, after receiving the BFD response message, PE2 may modify the tag carried in the BFD response message to 200 according to the stored tag forwarding table, and send the modified BFD response message to PE1, so that the BFD response message is transmitted to PE1 through link L4-link L3-link L2.
Therefore, based on the message processing method of the embodiment of the application, the BFD response message can be returned to the access node through the LSP to be detected, so that the BFD response message is prevented from being returned to the access node through other LSPs, and further, the detection result of the LSP to be detected is prevented from being wrong.
Referring to fig. 3, fig. 3 is a flowchart of a message processing method provided in this embodiment, where the method may be applied to a network device, and the network device may be other nodes (which may be referred to as non-ingress nodes) except an ingress node in an LSP to be detected, and the method may include the following steps:
s301: and receiving a BFD request message aiming at the LSP to be detected.
When the ingress node of the LSP to be detected generates a BFD request message for the LSP to be detected, it may also obtain its own label in the LSP to be detected, and add the label to the BFD request message. The BFD request message may carry a label of an ingress node of the LSP to be detected in the LSP to be detected, and a label of an egress node of the LSP to be detected in the LSP to be detected. For example, a BFD request message received by PE2 for an LSP to be detected (i.e., link L2-link L3-link L4) may carry a label of PE4 in the LSP to be detected (i.e., 2000) and a label of PE1 in the LSP to be detected (i.e., 200).
The network device may determine whether the network device is the egress node of the LSP to be detected according to the label of the egress node in the LSP to be detected carried in the BFD request message, and may further forward the BFD request message according to the label of the egress node in the LSP to be detected carried in the BFD request message.
Generally, an ingress node of an LSP to be detected may generate a label stack according to a label of an egress node in the LSP to be detected and a label of the egress node in the LSP to be detected, and add the label stack to a BFD request message. The top label of the label stack may be a label of the outgoing node in the LSP to be detected (which may be referred to as an upper label), and the bottom label of the label stack may be a label of the incoming node in the LSP to be detected (which may be referred to as a lower label). Specifically, the method for the ingress node to generate the BFD request packet will be described in detail in the following embodiments.
In the application embodiment, the network device may receive a BFD request packet sent by an upstream device in the LSP to be detected, and perform different processing according to the BFD request packet.
S302: and if the node is not the egress node, modifying the label of the ingress node in the LSP to be detected and the label of the egress node in the LSP to be detected, which are carried in the BFD request message, according to the stored label forwarding table, and forwarding the modified BFD request message, so that the egress node generates a BFD response message aiming at the LSP to be detected according to the label carried in the modified BFD request message.
The label forwarding table may be learned by the network device in advance.
In the application embodiment, when the network device receives the BFD request packet for the LSP to be detected, the network device may determine whether itself is an egress node of the LSP to be detected.
Because the BFD request message carries the upper layer label and the lower layer label, when the network device determines that the network device is not the egress node of the LSP to be detected, the network device may modify the label of the ingress node in the LSP to be detected and the label of the egress node in the LSP to be detected, which are carried in the BFD request message, according to the stored label forwarding table, and then the network device may forward the modified BFD request message. When the egress node receives the modified BFD request packet, the egress node may generate a BFD response packet for the LSP to be detected according to the label carried in the BFD request packet.
In this step, the network device may determine whether it is an egress node of the LSP to be detected according to the upper label carried in the BFD request message. In one embodiment, the network device may obtain an upper layer tag carried in the BFD request message, and determine a processing action corresponding to the upper layer tag in the stored tag forwarding table. The label forwarding table can be seen in table (1) and table (2).
Watch (1)
Go into label Processing actions Go out label Next hop equipment
X Pop-up label - S1
Watch (2)
Go into label Processing actions Go out label Next hop equipment
X Exchange label X1 S2
Table (1) may be a label forwarding table stored by the egress node, and table (2) may be a label forwarding table stored by the intermediate point.
The incoming label represents an upper layer label carried in a BFD request message received by the network equipment. When the upper layer label carried in the BFD request message received by the network device is X, the network device determines the processing action corresponding to the incoming label X as a "pop-up label" according to table (1), at this time, the network device may determine that it is the outgoing node of the LSP to be detected, and may generate a BFD response message. If the upper layer tag carried in the data packet received by the network device is X, the network device may delete the upper layer tag X carried in the data packet, and send the data packet after deleting the tag to the next hop device (i.e., S1).
When the upper layer label carried in the BFD request message received by the network device is X, the network device determines the processing action corresponding to the incoming label X as the "exchange label" according to table (2), and at this time, the network device may determine that it is not the outgoing node of the LSP to be detected, that is, the network device is the intermediate node of the LSP to be detected. The network device may modify tag X to X1 and send to the next hop device (i.e., S2).
In addition, the structure of the tag can be seen in table (3).
Watch (3)
Tag value TC S TTL
The tag value, 20bits in length, represents the value of the tag, which may be, for example, 300, 2000. TC (Traffic Class ): the length is 3 bits. S: the length of the label stack bottom identification bit is 1bit, the S bit is 1, the label is represented as a stack bottom label, and the S bit is 0, the label is represented as a non-stack bottom label. TTL (Time To Live, Time To Live value): the length is 8bits, and the method can be used for preventing network loops.
In this embodiment, when the ingress node generates the BFD request packet, the TTL of the label of the ingress node in the LSP to be detected may be set to a preset value, so that the egress node may identify the label of the ingress node in the LSP to be detected (that is, the label of which the TTL is the preset value) carried in the BFD request packet. In the prior art, the TTL of the labels in the BFD packet (including the BFD request packet and the BFD response packet) is not 0, so the ingress node may set the TTL of the label of the ingress node in the LSP to be detected to 0, so that the egress node may identify the label of which the TTL is 0, and further obtain the label of the ingress node in the LSP to be detected, which is carried in the BFD request packet.
Optionally, S302 may include the following steps:
step one, determining a label corresponding to a label of an egress node in a to-be-detected LSP carried in a BFD request message in a stored label forwarding table as a first label, determining a next-hop device corresponding to the label of the egress node in the to-be-detected LSP carried in the BFD request message in the stored label forwarding table as a first device, and determining a label corresponding to the label of an ingress node in the to-be-detected LSP carried in the BFD request message in the stored label forwarding table as a second label.
In the application embodiment, the network device may query in a stored tag forwarding table, and determine a tag (i.e., a first tag) corresponding to an upper-layer tag carried in the BFD request message, and a next-hop device (i.e., a first device) corresponding to the upper-layer tag carried in the BFD request message. The network device may also query the stored label forwarding table to determine a label (i.e., a second label) corresponding to the lower-layer label carried in the BFD request message.
For example, if the current network device is PE2 in fig. 2, the upper label carried in the BFD request message received by PE2 is 2000, and the lower label is 200. The label forwarding table stored in PE2 may be referred to in table (4).
Watch (4)
Go into label Processing actions Go out label Next hop equipment
2000 Exchange label 3000 PE3
300 Exchange label 200 PE1
Where "exchange label" indicates that PE2 needs to modify the label carried in the BFD request message. If the label carried in the BFD request message received by PE2 is the in-label in table (4), PE2 may modify the label into a corresponding out-label; if the label carried in the BFD request message received by PE2 is the outgoing label in table (4), PE2 may modify the label into a corresponding incoming label.
According to table (4), since the upper label carried in the BFD request message received by PE2 is 2000, PE2 may determine that the label (i.e., 3000) corresponding to label 2000 is the first label; the next hop device (i.e., PE3) to which label 2000 corresponds is determined to be the first device.
According to table (4), since the lower label carried in the BFD request message received by PE2 is 200, PE2 may determine that the label (i.e., 300) corresponding to label 200 is the second label.
And step two, modifying the label of the exit node in the LSP to be detected carried in the BFD request message into a first label, and modifying the label of the entry node in the LSP to be detected carried in the BFD request message into a second label.
In the application embodiment, if the network device is an intermediate node, the network device may modify an upper layer tag carried in the BFD request message into a first tag, and modify a lower layer tag carried in the BFD request message into a second tag. In this step, when the network device modifies the lower layer label, the TTL of the lower layer label may be set to 0.
For the example in step one, PE2 may modify the upper label carried in the received BFD request message to 3000 and modify the lower label carried in the BFD request message to 300.
And step three, sending the modified BFD request message to the first equipment.
In the application embodiment, after the network device finishes modifying the upper layer label and the lower layer label carried in the BFD request message, the modified BFD request message may be sent to the first device, so that the BFD request message is transmitted to the egress node through the LSP to be detected.
For the above example, after modifying the upper layer tag carried in the BFD request message to 3000 and the lower layer tag carried in the BFD request message to 300, PE2 may send the modified BFD request message to PE 3.
S303: and if the node is the egress node, generating a BFD response message carrying a label of the ingress node in the LSP to be detected, wherein the label of the ingress node in the BFD request message is carried in the LSP to be detected, determining next-hop equipment corresponding to the label of the ingress node in the LSP to be detected, which is carried in the BFD request message, in a stored label forwarding table, and sending the BFD response message to the determined next-hop equipment.
In the application embodiment, when the network device determines that the network device is the egress node of the LSP to be detected, the network device may obtain the lower label carried in the BFD request message, and generate a BFD response message carrying the lower label.
Then, the network device may query in the stored label forwarding table, determine the next-hop device corresponding to the lower-layer label, and send the generated BFD response packet to the next-hop device.
The label carried in the BFD response message is a label of the ingress node in the LSP to be detected, so that the network device determines, according to the label, a next-hop device, which is a device that forwards the BFD request message to the network device in the LSP to be detected, and sends the BFD response message to the next-hop device, so that the BFD response message can be returned to the ingress node through the LSP to be detected, thereby preventing a detection result of the LSP to be detected from being erroneous.
In this step, the network device may analyze the BFD request packet, obtain a label with TTL of 0 (i.e., a label of the ingress node in the LSP to be detected), and generate a BFD response packet according to the label.
For example, if the current network device is PE4 in fig. 2, the upper label carried in the BFD request message received by PE4 is 100, and the lower label is 400. PE4 may generate a BFD response message carrying label 400. The label forwarding table stored in PE4 may be referred to in table (5).
Watch (5)
Dest Go out label Next hop equipment
1.1.1.1 400 PE3
1.1.1.1 200 PE1
In table (5), Dest indicates the destination address of the BFD response packet, i.e., the network address of PE 1. The out-label indicates the label added by PE4 in the BFD response message (i.e. the label of PE1 in the LSP to be detected).
According to table (5), PE4 may determine that the destination address is 1.1.1.1, and the next hop device carrying the BFD response packet of tag 400 is PE3, and PE4 may send the BFD response packet carrying tag 400 to PE 3.
Optionally, the network device may further forward the BFD response packet according to the stored tag forwarding table. The method may further comprise the steps of:
step one, if the node is not an egress node and is not an ingress node, when receiving a BFD response message, determining a label corresponding to a label of the ingress node in the LSP to be detected, which is carried in the BFD response message, in a stored label forwarding table as a third label, and determining next-hop equipment, which corresponds to a label of the ingress node in the LSP to be detected, which is carried in the BFD response message, in the stored label forwarding table as second equipment.
In the application embodiment, if the network device is not an egress node and is not an ingress node, that is, the network device is an intermediate node, when the network device receives the BFD response packet, the network device may query in a label forwarding table, determine a label (that is, a third label) corresponding to a label of the ingress node in the LSP to be detected, which is carried in the BFD response packet, and determine a next-hop device (that is, a second device) corresponding to a label of the ingress node in the LSP to be detected, which is carried in the BFD response packet.
Illustratively, similar to table (4), if the current network device is PE3 in fig. 2, the label forwarding table stored in PE3 may be referred to as table (6).
Watch (6)
Go into label Processing actions Go out label Next hop equipment
3000 Exchange label 100 PE4
400 Exchange label 300 PE2
The label of the ingress node in the LSP to be detected, which is carried in the BFD response message received by PE3, is 400, according to table (6), PE3 may determine that the label corresponding to label 400 is 300 (i.e., the third label), and the next-hop device corresponding to label 400 is PE2 (i.e., the second device).
And step two, modifying the label of the ingress node in the LSP to be detected carried in the BFD response message into a third label.
In the application embodiment, after determining the third label, the network device may modify, to the third label, the label of the ingress node in the LSP to be detected, where the label is carried in the BFD response message.
For the above example, PE3 may modify the label 400 carried in the BFD response message to 300.
And step three, sending the modified BFD response message to the second equipment.
In the application embodiment, after the network device modifies the label of the ingress node in the LSP to be detected, which is carried in the BFD response packet, the network device may send the modified BFD response packet to the second device.
For the above example, PE3 may send a BFD response message carrying label 300 to PE 2.
Similarly, according to table (4), PE2 may modify the label of the ingress node in the BFD response message in the LSP to be detected to 200, and send the modified BFD response message to PE 1.
As can be seen, based on the message processing method of the embodiment, the BFD response message can be returned to the ingress node through the LSP to be detected, so that an error in the detection result of the LSP to be detected can be avoided.
Referring to fig. 4, fig. 4 is a flowchart of a message processing method provided in this embodiment, where the method may be applied to a network device, and the network device may be an ingress node of an LSP to be detected, and the method may include the following steps:
s401: and generating a BFD request message carrying the label of the outgoing node of the LSP to be detected in the LSP to be detected and the label of the outgoing node in the LSP to be detected.
In the application embodiment, if the network device is an ingress node of the to-be-detected LSP, the network device may generate a BFD request packet carrying a label of an egress node of the to-be-detected LSP in the to-be-detected LSP and a label of the egress node of the to-be-detected LSP in the to-be-detected LSP.
In this step, the network device may determine a next-hop device of the BFD request packet for the LSP to be detected, and then the network device may query in the stored label forwarding table to obtain a label corresponding to the determined next-hop device and the destination address of the BFD request packet (i.e., a label of the egress node of the LSP to be detected in the LSP to be detected, that is, an upper-layer label). In addition, the network device may also determine a label (i.e., a lower label) of itself in the LSP to be detected, and then the network device may generate a BFD request packet carrying the upper label and the lower label.
In addition, when the network device generates the BFD request packet, the TTL of the label of the network device in the LSP to be detected may be set to a preset value, so that the egress node may identify the label of the ingress node in the LSP to be detected (i.e., the label whose TTL is the preset value) carried in the BFD request packet. In the prior art, the TTL of the labels in the BFD packet (including the BFD request packet and the BFD response packet) is not 0, so that the network device may set the TTL of the label of the ingress node in the LSP to be detected to 0, so that the egress node may identify the label with TTL of 0, and further obtain the label of the ingress node in the LSP to be detected, which is carried in the BFD request packet.
Illustratively, if the current network device is PE1 in fig. 2, similar to table (5), the label forwarding table stored in PE1, see table (7).
Watch (7)
Dest Go out label Next hop equipment
4.4.4.4 2000 PE2
4.4.4.4 100 PE4
Where Dest denotes the destination address of the BFD request packet, i.e. the network address of PE 4. The out-label indicates a label added by PE1 in the BFD request message (i.e. a label of PE4 in the LSP to be detected), that is, an upper-layer label in the BFD request message.
Since the next-hop device in the LSP to be detected (i.e., link L2-link L3-link L4) is PE2, according to table (7), PE1 determines that the destination address is 4.4.4.4, and the upper label in the BFD request message whose next-hop device is PE2 is 2000, PE1 may determine that its label (i.e., lower label) in the LSP to be detected is 200, and then PE1 may generate a BFD request message carrying label 2000 and label 200, and may set the TTL of label 200 to 0.
S402: and sending the BFD request message to next-hop equipment in the LSP to be detected.
In the application embodiment, after generating the BFD request packet carrying the upper layer label and the lower layer label, the network device may send the BFD request packet to the next-hop device in the LSP to be detected.
Illustratively, after generating the BFD request packet carrying tag 2000 and tag 200, PE1 may send the BFD request packet to PE2 to detect link L2-link L3-link L4.
Correspondingly, if the next hop device that receives the BFD request message is not an egress node, the next hop device may modify the label (including the upper layer label and the lower layer label) carried in the BFD request message according to the stored label forwarding table, and forward the modified BFD request message, which may specifically refer to the detailed description in step S302.
If the next hop device that receives the BFD request message is an egress node, the next hop device may generate a BFD response message carrying a lower layer label carried in the BFD request message, determine, in a stored label forwarding table, the next hop device corresponding to the lower layer label, and send the BFD response message to the determined next hop device, which may specifically refer to the detailed description in step S303.
In summary, based on the message processing method of the embodiment of the present application, the label carried in the BFD response message generated by the egress node of the LSP to be detected is the label of the ingress node in the LSP to be detected, so that the egress node determines, according to the label, a next-hop device, as a device for forwarding the BFD request message to the egress node in the LSP to be detected, and the egress node sends the BFD response message to the next-hop device, so that the BFD response message can return to the ingress node through the LSP to be detected, thereby avoiding an error in the detection result of the LSP to be detected.
Referring to fig. 5, fig. 5 is a flowchart of an example of a message processing method provided in the embodiment of the present application, where the embodiment explains, as an example, that the method is applied to a network device, and the method may include the following steps:
s501: and receiving a BFD request message aiming at the LSP to be detected.
The BFD request message carries a label of an ingress node of the LSP to be detected in the LSP to be detected and a label of an egress node of the LSP to be detected in the LSP to be detected.
S502: and judging whether the self is the exit node of the LSP to be detected, if not, executing S503-S505, and if so, executing S506-S508.
S503: determining a label corresponding to a label of an egress node in a to-be-detected LSP carried in a BFD request message in a stored label forwarding table as a first label, determining a next-hop device corresponding to the label of the egress node in the to-be-detected LSP carried in the BFD request message in the stored label forwarding table as a first device, and determining a label corresponding to the label of an ingress node in the to-be-detected LSP carried in the BFD request message in the stored label forwarding table as a second label.
S504: and modifying the label of the exit node in the LSP to be detected carried in the BFD request message into a first label, and modifying the label of the entry node in the LSP to be detected carried in the BFD request message into a second label.
S505: and sending the modified BFD request message to the first equipment.
S506: and generating a BFD response message carrying the label of the ingress node in the LSP to be detected, wherein the label is carried in the BFD request message.
S507: and determining next-hop equipment corresponding to the label of the ingress node in the LSP to be detected, which is carried in the BFD request message, in the stored label forwarding table.
S508: and sending the generated BFD response message to the determined next hop equipment.
Therefore, according to the message processing method of the embodiment of the application, the label carried in the BFD response message generated by the egress node of the LSP to be detected is the label of the ingress node in the LSP to be detected, so that the egress node determines the next-hop device according to the label, and transmits the BFD request message to the egress node in the LSP to be detected, and the egress node transmits the BFD response message to the next-hop device, so that the BFD response message can return to the ingress node through the LSP to be detected, and errors in the detection result of the LSP to be detected are avoided.
Corresponding to the embodiment of the method in fig. 3, referring to fig. 6, fig. 6 is a structural diagram of a message processing apparatus provided in the embodiment of the present application, where the apparatus is applied to a network device, and the apparatus includes:
a receiving module 601, configured to receive a Bidirectional Forwarding Detection (BFD) request packet for a to-be-detected Label Switched Path (LSP), where the BFD request packet carries a label of an ingress node of the to-be-detected LSP in the to-be-detected LSP and a label of an egress node of the to-be-detected LSP in the to-be-detected LSP;
a forwarding module 602, configured to modify, according to a stored label forwarding table, a label of the ingress node in the to-be-detected LSP and a label of the egress node in the to-be-detected LSP, which are carried in the BFD request packet, and forward the modified BFD request packet, so that the egress node generates a BFD response packet for the to-be-detected LSP according to the label carried in the modified BFD request packet, if the egress node is not the egress node;
a sending module 603, configured to generate, if the sending module is the egress node, a BFD response packet carrying a label of the ingress node in the to-be-detected LSP, where the label is carried in the BFD request packet, determine, in a stored label forwarding table, a next-hop device corresponding to the label of the ingress node in the to-be-detected LSP, where the label of the ingress node in the BFD request packet is carried in the to-be-detected LSP, and send the BFD response packet to the determined next-hop device.
Optionally, the forwarding module 602 is specifically configured to determine, in a stored label forwarding table, a label corresponding to a label of the egress node in the to-be-detected LSP, which is carried in the BFD request message, as a first label, determine, in the stored label forwarding table, a next-hop device corresponding to a label of the egress node in the to-be-detected LSP, which is carried in the BFD request message, as a first device, determine, in the stored label forwarding table, a label corresponding to a label of the ingress node in the to-be-detected LSP, which is carried in the BFD request message, as a second label;
modifying the label of the egress node in the to-be-detected LSP carried in the BFD request message into the first label, and modifying the label of the ingress node in the to-be-detected LSP carried in the BFD request message into the second label;
and sending the modified BFD request message to the first equipment.
Optionally, the apparatus further comprises:
a processing module, configured to determine, if the processing module is not the egress node and not the ingress node, a label corresponding to a label of the ingress node in the to-be-detected LSP, which is carried in a BFD response packet, in a stored label forwarding table as a third label when the processing module receives the BFD response packet, and determine, in the stored label forwarding table, a next-hop device corresponding to a label of the ingress node in the to-be-detected LSP, which is carried in the BFD response packet, as a second device;
modifying the label of the ingress node in the LSP to be detected carried in the BFD response message into the third label;
and sending the modified BFD response message to the second equipment.
Corresponding to the embodiment of the method in fig. 4, referring to fig. 7, fig. 7 is a structural diagram of a message processing apparatus provided in the embodiment of the present application, where the apparatus is applied to a network device, and the apparatus includes:
a generating module 701, configured to generate a bidirectional forwarding detection BFD request packet that carries a label of an egress node of a to-be-detected label switched path LSP in the to-be-detected LSP and a label of the egress node in the to-be-detected LSP;
a sending module 702, configured to send the BFD request packet to a next-hop device in the LSP to be detected.
Based on the message processing device provided by the application, the label carried in the BFD response message generated by the egress node of the LSP to be detected is the label of the ingress node in the LSP to be detected, so that the egress node forwards the BFD request message to the egress node in the LSP to be detected according to the next-hop device determined by the label, and the egress node sends the BFD response message to the next-hop device, so that the BFD response message can return to the ingress node through the LSP to be detected, and errors in the detection result of the LSP to be detected are avoided.
The embodiment of the present application further provides an electronic device, as shown in fig. 8, which includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804, where the processor 801, the communication interface 802, and the memory 803 complete mutual communication through the communication bus 804,
a memory 803 for storing a computer program;
the processor 801 is configured to execute the program stored in the memory 803 to make the electronic device execute the steps of the message processing method, where the method includes:
receiving a Bidirectional Forwarding Detection (BFD) request message aiming at a Label Switching Path (LSP) to be detected, wherein the BFD request message carries a label of an ingress node of the LSP to be detected in the LSP to be detected and a label of an egress node of the LSP to be detected in the LSP to be detected;
if the node is not the egress node, modifying the label of the ingress node in the LSP to be detected and the label of the egress node in the LSP to be detected, which are carried in the BFD request message, according to a stored label forwarding table, and forwarding the modified BFD request message, so that the egress node generates a BFD response message aiming at the LSP to be detected according to the label carried in the modified BFD request message;
and if the self is the egress node, generating a BFD response message carrying a label of the ingress node in the LSP to be detected, wherein the label of the ingress node in the BFD request message is carried in the LSP to be detected, determining next-hop equipment corresponding to the label of the ingress node in the LSP to be detected, which is carried in the BFD request message, in a stored label forwarding table, and sending the BFD response message to the determined next-hop equipment.
Optionally, the modifying, according to the stored label forwarding table, the label of the ingress node in the to-be-detected LSP and the label of the egress node in the to-be-detected LSP, which are carried in the BFD request message, and forwarding the modified BFD request message includes:
determining a label corresponding to a label of the egress node in the to-be-detected LSP carried in the BFD request message in a stored label forwarding table as a first label, determining a next-hop device corresponding to a label of the egress node in the to-be-detected LSP carried in the BFD request message in the stored label forwarding table as a first device, and determining a label corresponding to a label of the ingress node in the to-be-detected LSP carried in the BFD request message in the stored label forwarding table as a second label;
modifying the label of the egress node in the to-be-detected LSP carried in the BFD request message into the first label, and modifying the label of the ingress node in the to-be-detected LSP carried in the BFD request message into the second label;
and sending the modified BFD request message to the first equipment.
Optionally, the method further includes:
if the node is not the egress node and not the ingress node, when receiving a BFD response message, determining a label corresponding to a label of the ingress node in the LSP to be detected carried in the BFD response message in a stored label forwarding table as a third label, and determining a next-hop device corresponding to the label of the ingress node in the LSP to be detected carried in the BFD response message in the stored label forwarding table as a second device;
modifying the label of the ingress node in the LSP to be detected carried in the BFD response message into the third label;
and sending the modified BFD response message to the second equipment.
The embodiment of the present application further provides an electronic device, as shown in fig. 9, which includes a processor 901, a communication interface 902, a memory 903, and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete mutual communication through the communication bus 904,
a memory 903 for storing computer programs;
the processor 901 is configured to, when executing the program stored in the memory 903, enable the electronic device to execute the steps of the message processing method, where the method may include:
generating a Bidirectional Forwarding Detection (BFD) request message carrying a label of an egress node of a Label Switching Path (LSP) to be detected in the LSP to be detected and a label of the egress node in the LSP to be detected;
and sending the BFD request message to next-hop equipment in the LSP to be detected.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements any of the above steps of the message processing method applied to the non-ingress node.
In another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements any of the steps of the message processing method applied to the ingress node.
In another embodiment provided by the present application, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute any of the message processing methods applied to the non-ingress node in the above embodiments.
In another embodiment provided by the present application, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute any of the message processing methods applied to an ingress node in the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the computer-readable storage medium, and the computer program product embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (12)

1. A message processing method is applied to network equipment, and is characterized in that the method comprises the following steps:
receiving a Bidirectional Forwarding Detection (BFD) request message aiming at a Label Switching Path (LSP) to be detected, wherein the BFD request message carries a label of an ingress node of the LSP to be detected in the LSP to be detected and a label of an egress node of the LSP to be detected in the LSP to be detected;
if the node is not the egress node, modifying the label of the ingress node in the LSP to be detected and the label of the egress node in the LSP to be detected, which are carried in the BFD request message, according to a stored label forwarding table, and forwarding the modified BFD request message, so that the egress node generates a BFD response message aiming at the LSP to be detected according to the label carried in the modified BFD request message;
and if the self is the egress node, generating a BFD response message carrying a label of the ingress node in the LSP to be detected, wherein the label of the ingress node in the BFD request message is carried in the LSP to be detected, determining next-hop equipment corresponding to the label of the ingress node in the LSP to be detected, which is carried in the BFD request message, in a stored label forwarding table, and sending the BFD response message to the determined next-hop equipment.
2. The method according to claim 1, wherein said modifying, according to the stored label forwarding table, the label of the ingress node in the to-be-detected LSP and the label of the egress node in the to-be-detected LSP, which are carried in the BFD request packet, and forwarding the modified BFD request packet, comprises:
determining a label corresponding to a label of the egress node in the to-be-detected LSP carried in the BFD request message in a stored label forwarding table as a first label, determining a next-hop device corresponding to a label of the egress node in the to-be-detected LSP carried in the BFD request message in the stored label forwarding table as a first device, and determining a label corresponding to a label of the ingress node in the to-be-detected LSP carried in the BFD request message in the stored label forwarding table as a second label;
modifying the label of the egress node in the to-be-detected LSP carried in the BFD request message into the first label, and modifying the label of the ingress node in the to-be-detected LSP carried in the BFD request message into the second label;
and sending the modified BFD request message to the first equipment.
3. The method of claim 1, further comprising:
if the node is not the egress node and not the ingress node, when receiving a BFD response message, determining a label corresponding to a label of the ingress node in the LSP to be detected carried in the BFD response message in a stored label forwarding table as a third label, and determining a next-hop device corresponding to the label of the ingress node in the LSP to be detected carried in the BFD response message in the stored label forwarding table as a second device;
modifying the label of the ingress node in the LSP to be detected carried in the BFD response message into the third label;
and sending the modified BFD response message to the second equipment.
4. A message processing method is applied to network equipment, and is characterized in that the method comprises the following steps:
generating a Bidirectional Forwarding Detection (BFD) request message carrying a label of an egress node of a Label Switching Path (LSP) to be detected in the LSP to be detected and a label of the egress node in the LSP to be detected;
sending the BFD request message to a next-hop device in the LSP to be detected, so that when the next-hop device receiving the BFD request message is not an egress node, modifying a label of an ingress node of the LSP to be detected in the BFD request message in the LSP to be detected and a label of the egress node in the LSP to be detected according to a stored label forwarding table, and forwarding the modified BFD request message, so that the egress node generates a BFD response message for the LSP to be detected according to the label carried in the modified BFD request message, and when the egress node is the egress node, generates a BFD response message carrying the label of the ingress node in the LSP to be detected in the BFD request message, and determines the next-hop device corresponding to the label of the ingress node in the LSP to be detected in the BFD request message in the stored label forwarding table, and sending the BFD response message to the determined next hop equipment.
5. A message processing apparatus, wherein the apparatus is applied to a network device, and the apparatus comprises:
a receiving module, configured to receive a Bidirectional Forwarding Detection (BFD) request packet for a Label Switched Path (LSP) to be detected, where the BFD request packet carries a label of an ingress node of the LSP to be detected in the LSP to be detected and a label of an egress node of the LSP to be detected in the LSP to be detected;
a forwarding module, configured to modify, according to a stored label forwarding table, a label of the ingress node in the to-be-detected LSP and a label of the egress node in the to-be-detected LSP, which are carried in the BFD request packet, and forward the modified BFD request packet, so that the egress node generates a BFD response packet for the to-be-detected LSP according to the label carried in the modified BFD request packet;
and the sending module is used for generating a BFD response message carrying a label of the ingress node in the LSP to be detected, which is carried in the BFD request message, if the sending module is the egress node, determining next-hop equipment corresponding to the label of the ingress node in the LSP to be detected, which is carried in the BFD request message, in a stored label forwarding table, and sending the BFD response message to the determined next-hop equipment.
6. The apparatus according to claim 5, wherein the forwarding module is specifically configured to determine, in a stored label forwarding table, a label corresponding to a label of the egress node in the to-be-detected LSP, which is carried in the BFD request packet, as a first label, determine, in the stored label forwarding table, a next-hop device corresponding to a label of the egress node in the to-be-detected LSP, which is carried in the BFD request packet, as a first device, determine, in the stored label forwarding table, a label corresponding to a label of the ingress node in the to-be-detected LSP, which is carried in the BFD request packet, as a second label;
modifying the label of the egress node in the to-be-detected LSP carried in the BFD request message into the first label, and modifying the label of the ingress node in the to-be-detected LSP carried in the BFD request message into the second label;
and sending the modified BFD request message to the first equipment.
7. The apparatus of claim 5, further comprising:
a processing module, configured to determine, if the processing module is not the egress node and not the ingress node, a label corresponding to a label of the ingress node in the to-be-detected LSP, which is carried in a BFD response packet, in a stored label forwarding table as a third label when the processing module receives the BFD response packet, and determine, in the stored label forwarding table, a next-hop device corresponding to a label of the ingress node in the to-be-detected LSP, which is carried in the BFD response packet, as a second device;
modifying the label of the ingress node in the LSP to be detected carried in the BFD response message into the third label;
and sending the modified BFD response message to the second equipment.
8. A message processing apparatus, wherein the apparatus is applied to a network device, and the apparatus comprises:
a generating module, configured to generate a bidirectional forwarding detection BFD request packet that carries a label of an egress node of a label switching path to be detected LSP in the LSP to be detected and a label of the egress node in the LSP to be detected;
a sending module, configured to send the BFD request packet to a next-hop device in the to-be-detected LSP, so that when the next-hop device that receives the BFD request packet is not an egress node, the next-hop device modifies, according to a stored label forwarding table, a label of an ingress node of the to-be-detected LSP in the BFD request packet and a label of the egress node in the to-be-detected LSP, which are carried in the BFD request packet, and forwards the modified BFD request packet, so that the egress node generates, according to the label carried in the modified BFD request packet, a BFD response packet for the to-be-detected LSP, and when the egress node is an egress node, generates a BFD response packet carrying the label of the ingress node in the to-be-detected LSP in the BFD request packet, and determines, in the stored label forwarding table, a next-hop device corresponding to the label of the ingress node in the to-be-detected LSP, which is carried in the BFD request packet, and sending the BFD response message to the determined next hop equipment.
9. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor, when executing the program stored in the memory, implementing the method steps of any of claims 1-3.
10. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor, when executing the program stored in the memory, performs the method steps of claim 4.
11. A machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to: carrying out the method steps of any one of claims 1 to 3.
12. A machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to: implementing the method steps of claim 4.
CN201811392770.XA 2018-11-21 2018-11-21 Message processing method and device Active CN109218199B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811392770.XA CN109218199B (en) 2018-11-21 2018-11-21 Message processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811392770.XA CN109218199B (en) 2018-11-21 2018-11-21 Message processing method and device

Publications (2)

Publication Number Publication Date
CN109218199A CN109218199A (en) 2019-01-15
CN109218199B true CN109218199B (en) 2021-03-02

Family

ID=64994012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811392770.XA Active CN109218199B (en) 2018-11-21 2018-11-21 Message processing method and device

Country Status (1)

Country Link
CN (1) CN109218199B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111131021B (en) * 2020-01-17 2023-04-07 新华三信息安全技术有限公司 Forwarding method and network equipment for Bidirectional Forwarding Detection (BFD) message

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102340438A (en) * 2010-07-19 2012-02-01 中兴通讯股份有限公司 Method and system for bidirectionally transmitting message in MPLS (Multi-Protocol Label Switching) network
CN102624609A (en) * 2012-02-28 2012-08-01 华为技术有限公司 Method for transmitting reverse bidirectional forwarding detection (BFD) messages, method for notifying paths and device for notifying paths
CN103685024A (en) * 2013-12-26 2014-03-26 华为技术有限公司 Node protecting method and device
CN105191230A (en) * 2013-06-18 2015-12-23 华为技术有限公司 Next hop ingress protection of label switched paths
CN105490932A (en) * 2014-09-19 2016-04-13 中兴通讯股份有限公司 Two-way forwarding detection method, device and system
CN107005481A (en) * 2014-06-30 2017-08-01 瑞典爱立信有限公司 The control of return path is detected for two-way converting
CN106998273A (en) * 2016-01-26 2017-08-01 中兴通讯股份有限公司 Link failure detection method and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100417080C (en) * 2005-02-01 2008-09-03 华为技术有限公司 Method for detecting network chain fault and positioning said fault
CN100454853C (en) * 2006-10-25 2009-01-21 华为技术有限公司 Method for service channel detection and system for providing the same
CN102055619A (en) * 2009-11-02 2011-05-11 中兴通讯股份有限公司 Method and system for realize fault detection in bidirectional path segment
CN101848155A (en) * 2010-05-12 2010-09-29 北京星网锐捷网络技术有限公司 Detection method of label switching path and label switching router
CN102957573B (en) * 2011-08-24 2017-05-17 中兴通讯股份有限公司 Path detection realizing method and node
US9083636B2 (en) * 2012-02-13 2015-07-14 Cisco Technology, Inc. System and method for multipoint label distribution protocol node protection using a targeted session in a network environment
US8902780B1 (en) * 2012-09-26 2014-12-02 Juniper Networks, Inc. Forwarding detection for point-to-multipoint label switched paths
CN104488237B (en) * 2013-03-15 2017-08-04 华为技术有限公司 A kind of method of Message processing, message equipment and system
CN108768788A (en) * 2018-06-26 2018-11-06 新华三技术有限公司合肥分公司 Path failure detection method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102340438A (en) * 2010-07-19 2012-02-01 中兴通讯股份有限公司 Method and system for bidirectionally transmitting message in MPLS (Multi-Protocol Label Switching) network
CN102624609A (en) * 2012-02-28 2012-08-01 华为技术有限公司 Method for transmitting reverse bidirectional forwarding detection (BFD) messages, method for notifying paths and device for notifying paths
CN105191230A (en) * 2013-06-18 2015-12-23 华为技术有限公司 Next hop ingress protection of label switched paths
CN103685024A (en) * 2013-12-26 2014-03-26 华为技术有限公司 Node protecting method and device
CN107005481A (en) * 2014-06-30 2017-08-01 瑞典爱立信有限公司 The control of return path is detected for two-way converting
CN105490932A (en) * 2014-09-19 2016-04-13 中兴通讯股份有限公司 Two-way forwarding detection method, device and system
CN106998273A (en) * 2016-01-26 2017-08-01 中兴通讯股份有限公司 Link failure detection method and device

Also Published As

Publication number Publication date
CN109218199A (en) 2019-01-15

Similar Documents

Publication Publication Date Title
Shand et al. IP fast reroute framework
US9282031B2 (en) Network system and routing method
US9112788B2 (en) Bicasting using non-congruent paths in a loop-free routing topology having routing arcs
JP2022523184A (en) Methods and systems for determining packet forwarding routes, as well as network nodes
CN109889441B (en) Data forwarding method and device
JP6443864B2 (en) Method, apparatus and system for implementing packet loss detection
CN109951371B (en) Data forwarding method and device
CN109474495B (en) Tunnel detection method and device
CN113595897B (en) Path detection method and device
CA3104756C (en) Loop avoidance communications method, device, and system
CN114978978A (en) Computing resource scheduling method and device, electronic equipment and medium
CN109525501B (en) Method and device for adjusting forwarding path
CN109150761B (en) Tunnel switching method and device
Papán et al. The survey of current IPFRR mechanisms
CN109067657B (en) Message processing method and device
WO2016123904A1 (en) Routing convergence method, device and virtual private network system
CN109120449B (en) Method and device for detecting link failure
CN109218199B (en) Message processing method and device
WO2019119269A1 (en) Network fault detection method and control center device
US20140056176A1 (en) Redistributing routes in backbone edge bridge multi-chassis link aggregation group topologies between two routing protocols
CN109831378B (en) Message timeout response method and device
WO2016078240A1 (en) Method and device for detecting routing ring formation
CN109218182B (en) Method and device for synchronizing routing information
CN113904972B (en) Path detection method and device, controller and PE (polyethylene) equipment
CN113472667B (en) Message forwarding method, device, node equipment and storage medium

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