CN109347740B - Message forwarding method and device - Google Patents

Message forwarding method and device Download PDF

Info

Publication number
CN109347740B
CN109347740B CN201811375140.1A CN201811375140A CN109347740B CN 109347740 B CN109347740 B CN 109347740B CN 201811375140 A CN201811375140 A CN 201811375140A CN 109347740 B CN109347740 B CN 109347740B
Authority
CN
China
Prior art keywords
ldp
message
sid
mapping
label
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
CN201811375140.1A
Other languages
Chinese (zh)
Other versions
CN109347740A (en
Inventor
肖湘光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
New 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201811375140.1A priority Critical patent/CN109347740B/en
Publication of CN109347740A publication Critical patent/CN109347740A/en
Application granted granted Critical
Publication of CN109347740B publication Critical patent/CN109347740B/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

Abstract

The disclosure provides a message forwarding method and device. In the disclosure, the LDP proxy node dynamically establishes the mapping relationship between the SID and the LDP label, and finally realizes that the service access of the two SR nodes can be realized based on the established mapping relationship between the SID and the LDP label even if the LDP node exists on the path between the two SR nodes.

Description

Message forwarding method and device
Technical Field
The present disclosure relates to network communication technologies, and in particular, to a method and an apparatus for forwarding a packet.
Background
In a networking with a mixture of a Segment Routing (SR) Protocol and a Label Distribution Protocol (LDP), if an LDP node exists on a path between two SR nodes, according to the current SR Protocol, the SR nodes between the two SR nodes are nodes which cannot interact MPLS VPN service, wherein the SR nodes are the nodes which support the SR Protocol but do not support the LDP, and the LDP nodes are the nodes which support the LDP but do not support the SR Protocol.
Disclosure of Invention
The disclosure provides a message forwarding method and a message forwarding device, so as to realize service access of two SR nodes on the premise that an LDP node exists on a path between the two SR nodes.
The technical scheme provided by the disclosure comprises:
a message forwarding method is applied to a network node supporting a Segment Routing (SR) protocol and a Label Distribution Protocol (LDP), and comprises the following steps:
dynamically establishing a mapping relation between a segment identification SID and an LDP label according to a received protocol message, wherein the SID corresponds to an IP address prefix, and the IP address prefix is the prefix of an IP address of a first SR node; the first SR node is any node supporting SR protocol;
receiving a service message to the first SR node;
if the service message is received through an SR interface enabling an SR protocol and the next hop of the service message is an LDP node, replacing the SID carried by the service message with the LDP label according to the mapping relation and forwarding the SID according to the LDP label;
and if the service message is received through an LDP interface which enables LDP and the next hop of the service message is a second SR node or a first SR node, replacing the LDP label carried by the service message with the SID according to the mapping relation and forwarding the SID according to the SID, wherein the second SR node is other nodes which support an SR protocol and are different from the first SR node.
A message forwarding device is applied to a network node supporting a Segment Routing (SR) protocol and a Label Distribution Protocol (LDP), and comprises:
the mapping module is used for dynamically establishing a mapping relation between a segment identification SID and an LDP label according to a received protocol message, wherein the SID corresponds to an IP address prefix, and the IP address prefix is the prefix of the IP address of the first SR node; the first SR node is any node supporting SR protocol;
a receiving module, configured to receive a service packet addressed to the first SR node;
a forwarding module, configured to replace, when the service packet is received through an SR interface that enables an SR protocol and a next hop of the service packet is an LDP node, the SID carried by the service packet with the LDP label according to the mapping relationship and forward the SID according to the LDP label; and when the service message is received through an LDP interface which enables LDP and the next hop of the service message is a second SR node or a first SR node, replacing the LDP label carried by the service message with the SID according to the mapping relation and forwarding the SID according to the SID, wherein the second SR node is other nodes which support an SR protocol and are different from the first SR node.
According to the technical scheme, the LDP proxy node dynamically establishes the mapping relation between the SID and the LDP label, and finally realizes that the service access of the two SR nodes can be realized based on the established mapping relation between the SID and the LDP label even if the LDP node exists on the path between the two SR nodes.
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 SR protocol and LDP hybrid networking;
FIG. 2 is a flow chart of a method provided by the present disclosure;
FIG. 3 is a schematic diagram of an embodiment of networking provided by the present disclosure;
FIG. 4 is a schematic view of the apparatus structure provided by the present disclosure;
fig. 5 is a schematic hardware structure diagram of the apparatus shown in fig. 4 provided by the present disclosure.
Detailed Description
In order to make the embodiments of the present disclosure clearer, technical terms related to the embodiments of the present disclosure are described below:
SR, adopting source path selection mechanism, encapsulating Segment Identification (SID) of the Segment to be passed by the path in the source node in advance, when the node on the path receives the message, forwarding the message according to the SID encapsulated by the message. Other nodes than the source node need not maintain path state.
The segment types of SR are two as follows:
prefix type Segment (Prefix Segment): SIDs are assigned per destination IP address prefix.
Adjacency type Segment (Adjacency Segment): different neighbors are assigned different SIDs per adjacency.
In the MPLS network, the SR based on MPLS (also referred to as MPLS segment routing) is to forward a packet using a label as an SID when the SR is used in the MPLS network. When the packet is forwarded by using the Label as the SID, the path through which the packet passes is called a Segment Routing based Label Switched path (SR LSP).
In the networking with the SR protocol and LDP mixed, if an LDP node exists on a path between two SR nodes, MPLS VPN service cannot be interacted between the two SR nodes. For example, in the hybrid networking shown in fig. 1, the nodes R1 and R6 support SR protocols but do not support LDP (R1 and R2 may be referred to as SR nodes), the nodes R2 and R5 support both SR and LDP (R2 and R5 may be referred to as border nodes), and the nodes R3 and R4 support LDP but do not support SR protocols (R3 and R4 may be referred to as LDP nodes). There are R3 and R4 which do not support SR but support LDP on the path between R1 and R6, and according to the current protocol, MPLS VPN traffic cannot be interacted between R1 and R6.
In order to realize service access of two SR nodes on the premise that an LDP node exists on a path between the two SR nodes, the present disclosure provides a flow as shown in fig. 2.
Referring to fig. 2, fig. 2 is a flow chart of a method provided by the present disclosure. The flow is applied to a network node (also called an LDP proxy node, hereinafter referred to as an LDP proxy node) supporting an SR protocol and supporting LDP. As shown in fig. 2, the process may include the following steps:
step 201, the LDP proxy node dynamically establishes a mapping relationship between the SID and the LDP label according to the received protocol message, where the SID corresponds to an IP address prefix, and the IP address prefix is a prefix of an IP address of the first SR node.
In one example, the Protocol message may be an SR Interior Gateway Protocol (IGP) message. The following describes how to establish the mapping relationship between SID and LDP label according to the received SR IGP message.
In another example, the protocol message may be a LDP Mapping (Mapping) message. The LDP mapping message here carries an IP address prefix and an LDP label. The LDP mapping message will be described below, and will not be described in detail here.
Step 202, receiving a service packet to a first SR node, replacing the SID carried by the service packet with the LDP label according to the mapping relationship and forwarding the SID according to the LDP label when the service packet is received through an SR interface that enables an SR protocol and a next hop of the service packet is an LDP node, and replacing the LDP label carried by the service packet with the SID according to the mapping relationship and forwarding the SID according to the SID when the service packet is received through an LDP interface that enables an LDP and the next hop of the service packet is a second SR node or a first SR node.
Here, the first SR node and the second SR node are two different nodes supporting the SR protocol, and the present application is only named for convenience of description and is not limited.
As can be seen from the flow shown in fig. 2, in the present disclosure, the LDP proxy node dynamically establishes a mapping relationship between a SID and an LDP label, when the LDP proxy node receives a service packet to a first SR node, if the service packet is received through an SR interface that enables an SR protocol and a next hop of the service packet is an LDP node, the SID carried by the service packet is replaced with the LDP label according to the mapping relationship and forwarded according to the LDP label, if the service packet is received through an LDP interface that enables LDP and the next hop of the service packet is a second SR node or a first SR node, the LDP label carried by the service packet is replaced with the SID according to the mapping relationship and forwarded according to the SID, and finally even if there is an LDP node on a path between two SR nodes, based on the mapping relationship between SID and LDP label dynamically established by LDP proxy node on the path between two SR nodes, the service access of the two SR nodes can also be realized.
The flow shown in fig. 2 is described below by way of example by a specific embodiment:
referring to fig. 3, fig. 3 is a networking diagram of an embodiment provided by the present disclosure. As shown in fig. 3, the networking of this embodiment mainly includes the following 6 nodes: r31 to R37. Among them, R31 and R36 support SR protocol and may be called SR node, R33 and R34 support LDP and may be called LDP node, and R32 and R35 support both SR protocol and LDP and may be called LDP proxy node. R32, R35 are used as LDP proxy nodes to enable LDP proxy functions.
Taking R36 for example accessing R31, suppose that the path for R36 to access R31 is as follows:
R36->R35->R34->R33->R32->R31。
based on the above path, an SR LSP tunnel of R36 to R31 may be established to enable R36 to access R31 through the SR LSP tunnel.
How to establish the SR LSP tunnels of R36 to R31 is described below:
the SID corresponding to the specified IP address prefix is configured on R31. Here, the specified IP address prefix refers to a prefix of the IP address of R31, and for convenience of description, the specified IP address prefix may be denoted as prefix 300. The SID corresponding to the specified IP address prefix can be denoted as SID 301.
R31 carries prefix 300 and SID301 in SR IGP message and sends them through local interfaces.
R32 is connected to R31, which receives the SR IGP message.
The R32 receives the SR IGP message through an SR protocol enabled interface (referred to as a Port2_1), and creates an SR LSP tunnel from R32 to R31. Then, R32 may send a traffic packet to R31 through the SR LSP tunnel.
R32 enables the LDP proxy function, and if it finds that an LDP-enabled interface (called a LDP interface, denoted as Port2_3) exists locally, it generates an LDP label corresponding to prefix 300 carried in the SR IGP message. Here, R32 generates only one LDP label corresponding to prefix 300 according to a preset LDP label algorithm. For ease of description, the LDP label herein will be referred to as LDP label 302.
R32 establishes a mapping relationship between SID301 and LDP label 302.
R32 copies the SR IGP message to obtain two pieces of SR IGP message corresponding to Port2_ 3. R32 sends one SR IGP message through Port2_3, and generates a LDP mapping message according to the other SR IGP message and forwards the LDP mapping message through Port2_3, where the LDP mapping message includes prefix 300 and LDP label 302. In one example, generating the LDP mapping message from the SR IGP message may include: and replacing SID301 in the SR IGP message with LDP label 302 to obtain the LDP mapping message.
R33 is connected to R32 through an LDP enabled interface (LDP interface, denoted Port3_2), which receives SR IGP messages as well as LDP mapping messages.
When the R33 receives the SR IGP message, since the SR IGP message is obtained by adding TLV or sub TLV in the existing IGP message, the R33 supports LDP and IGP, and can transparently transmit the SR IGP message.
R33 supports LDP and can also transmit LDP mapping information.
R34 is connected to R33 through an LDP enabled interface (LDP interface, denoted Port4_3), which receives SR IGP messages as well as LDP mapping messages.
When R34 receives the SR IGP message, it can pass through the SR IGP message, similar to R33 described above.
R34 supports LDP and can also transmit LDP mapping information.
R35 receives SR IGP message through LDP enabled interface (called LDP interface, denoted Port5_4), and creates SR LSP tunnel from R35 to R31. Then, R35 may send a traffic packet to R31 through the SR LSP tunnel.
R35 enables the LDP proxy function, and when receiving the SR IGP message through an LDP enabled interface (referred to as a Port5_4), searches for the LDP label 302 corresponding to the prefix 300 carried by the SR IGP message, if found, establishes the mapping relationship between the SID301 and the LDP label 302 carried by the SR IGP message, and if not found, stores the correspondence relationship between the prefix 300 and the SID301 carried by the SR IGP message.
R35 continues to forward the SR IGP message through various interfaces (including LDP interface and SR interface) other than the SR interface from which the SR IGP message was received.
R35 receives LDP mapping messages over an LDP enabled interface (called the LDP interface, denoted Port5_ 4).
R35 enables the LDP proxy function, when receiving an LDP mapping message through an LDP enabled interface (called a Port5_4), searches for SID301 corresponding to prefix 300 carried in the LDP mapping message, if found, establishes a mapping relationship between SID301 and LDP label 302 carried in the LDP mapping message, and if not found, stores a corresponding relationship between prefix 300 carried in the LDP mapping message and LDP label 302.
R35 checks whether there is another LDP interface which can enable LDP except the LDP interface which receives the LDP mapping message, if yes, the LDP mapping message is forwarded through another LDP interface which can enable LDP, if no, the forwarding of the LDP mapping message is stopped. In fig. 3, R35 has no other LDP enabled LDP interface, so far, R35 does not forward LDP mapping message any more.
It should be noted that there is no sequence between the times when the R35 receives the SR IGP message and the LDP mapping message.
The R36 receives the SR IGP message through an SR protocol enabled interface (referred to as SR interface, denoted as Port6_5), and creates an SR LSP tunnel from R36 to R31. Then, R36 may send a traffic packet to R31 through the SR LSP tunnel. How the R36 sends traffic packets to the R31 through the SR LSP tunnel is described as follows:
the R36 encapsulates the SID301 on the packet sent to R31 and sends it to R35. Here, the packet encapsulating the SID301 is denoted as a packet a 1.
R35 receives the message a1 through an SR protocol enabled interface (SR interface, denoted as Port5_ 6).
When the R35 finds that the next hop is an LDP node, i.e. R34, the LDP label 302 having a mapping relationship with the SID301 is found according to the SID301 encapsulated by the message a 1.
R35 modifies SID301 encapsulated by message a1 into LDP label 302 and forwards to R34. The message a1 at this time can be recorded as message a 2.
The R34 receives the message a2 through an LDP-enabled interface (LDP interface, denoted as Port4_5), and passes it through to R33.
The R33 receives the message a2 through an LDP-enabled interface (LDP interface, denoted as Port3_4), and passes it through to R32.
R32 receives the message a2 through an SR protocol enabled interface (SR interface, denoted as Port2_ 3).
When the R32 finds that the next hop is an SR node, i.e., R31, the SID301 having a mapping relationship with the LDP label 302 is found according to the LDP label 302 encapsulated in the message a 2.
R32 modifies LDP label 302 encapsulated by message a2 into SID301 and forwards to R31. Finally, normal service access of R36 to R31 through the SR LSP is realized.
Thus, the description of the embodiments is completed.
As can be seen from the foregoing embodiments, in the present disclosure, the mapping relationship between the SID and the LDP label dynamically established according to the received protocol message mainly depends on the protocol message.
In an example, when the protocol message is an SR IGP message, if the SR IGP message is received through an SR interface enabling an SR protocol, the dynamically establishing a mapping relationship between the SID and the LDP label according to the received protocol message in step 201 may include:
and generating an LDP label corresponding to the IP address prefix carried by the SR IGP message, and establishing a mapping relation between the SID and the LDP label.
In this example, after establishing the mapping relationship between the SID and the LDP label, the method may further include: copying two SR IGP messages corresponding to a local LDP enabled interface, sending one SR IGP message through the interface, generating an LDP mapping message according to the other SR IGP message, and forwarding the LDP mapping message through the interface, wherein the LDP mapping message comprises the IP address prefix and the LDP label.
In another example, when the protocol message is SR IGP message, if the SR IGP message is received through LDP interface enabling LDP, the dynamically establishing a mapping relationship between SID and LDP label according to the received protocol message in step 201 may include: searching an LDP label corresponding to the IP address prefix carried by the SR IGP message; if the mapping relation between the SID and the LDP label is found, the mapping relation between the SID and the LDP label is established.
In this example, if the LDP label corresponding to the IP address prefix is not found, the method further includes: storing the corresponding relation between the IP address prefix carried by the SR IGP message and the SID; and forwarding the SR IGP message through other interfaces except the SR interface receiving the SR IGP message.
In another example, when the protocol message is an LDP mapping message, if the LDP mapping message is received through an LDP interface enabling LDP, dynamically establishing a mapping relationship between the SID and the LDP label according to the received protocol message includes: searching SID corresponding to IP address prefix carried by the LDP mapping message; if the mapping relation between the SID and the LDP label is found, establishing the mapping relation between the SID and the LDP label
In this embodiment, if the SID corresponding to the IP address prefix is not found, the method further includes: storing the corresponding relation between the IP address prefix carried by the LDP mapping message and the LDP label; and checking whether other LDP interfaces which enable LDP exist locally except the LDP interface which receives the LDP mapping message, and if so, forwarding the LDP mapping message through other LDP interfaces which enable LDP.
The method provided by the present disclosure is described above, and the apparatus provided by the present disclosure is described below:
referring to fig. 4, fig. 4 is a block diagram of an apparatus provided in the present disclosure. The device is applied to the network node which supports the SR protocol and supports the LDP, and comprises the following components:
the mapping module is used for dynamically establishing a mapping relation between a segment identification SID and an LDP label according to a received protocol message, wherein the SID corresponds to an IP address prefix, and the IP address prefix is the prefix of the IP address of the first SR node; the first SR node is any node supporting SR protocol;
a receiving module, configured to receive a service packet addressed to the first SR node;
a forwarding module, configured to replace, when the service packet is received through an SR interface that enables an SR protocol and a next hop of the service packet is an LDP node, the SID carried by the service packet with the LDP label according to the mapping relationship and forward the SID according to the LDP label; and when the service message is received through an LDP interface which enables LDP and the next hop of the service message is a second SR node or a first SR node, replacing the LDP label carried by the service message with the SID according to the mapping relation and forwarding the SID according to the SID, wherein the second SR node is other nodes which support an SR protocol and are different from the first SR node.
In one example, the dynamically establishing, by the mapping module, a mapping relationship between the segment identification SID and the LDP label according to the received protocol message includes: receiving an SR interior gateway protocol IGP message through an SR interface enabling an SR protocol, wherein the SR IGP message carries the IP address prefix and the SID; generating an LDP label corresponding to the IP address prefix, and establishing a mapping relation between the SID and the LDP label;
in this example, the mapping module further copies two SR IGP messages corresponding to a locally LDP enabled interface, triggers the forwarding module to send one SR IGP message through the interface, generates a LDP mapping message according to the other SR IGP message, and triggers the forwarding module to forward the LDP mapping message through the interface, where the LDP mapping message includes the IP address prefix and the LDP label.
In one example, the dynamically establishing, by the mapping module, a mapping relationship between the segment identification SID and the LDP label according to the received protocol message includes:
receiving an SR IGP message through an LDP interface which enables LDP, wherein the SR IGP message carries the IP address prefix and the SID; searching an LDP label corresponding to the IP address prefix; if the mapping relation between the SID and the LDP label is found, establishing the mapping relation between the SID and the LDP label;
in this example, the mapping module further stores the correspondence between the IP address prefix carried by the SR IGP message and the SID when the LDP label corresponding to the IP address prefix is not found; and triggering the forwarding module to forward the SR IGP message through other interfaces except the SR interface receiving the SR IGP message.
In one example, the dynamically establishing, by the mapping module, a mapping relationship between the segment identification SID and the LDP label according to the received protocol message includes: receiving a LDP mapping message through a LDP interface enabling LDP, the LDP mapping message carrying the IP address prefix and the LDP label; searching SID corresponding to the IP address prefix; if the mapping relation between the SID and the LDP label is found, establishing the mapping relation between the SID and the LDP label;
in this example, the mapping module further stores the correspondence between the IP address prefix carried by the LDP mapping message and the LDP label when the SID corresponding to the IP address prefix is not found; and checking whether other LDP interfaces which enable LDP exist locally except the LDP interface which receives the LDP mapping message, and if so, triggering the forwarding module to forward the LDP mapping message through other LDP interfaces which enable LDP.
Thus, the description of the structure of the device shown in fig. 4 is completed.
The embodiment of the disclosure also provides a hardware structure diagram of the device shown in fig. 5. In the embodiment of the present disclosure, the hardware structure of the apparatus shown in fig. 5 may 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 message forwarding method provided by the disclosure.
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 diagram of the apparatus shown in fig. 5 is completed.
In the disclosed embodiments, 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 various elements may be implemented in the same one or more software and/or hardware implementations in practicing the disclosure.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the disclosed embodiments 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 so forth) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. 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 disclosure and should not be taken as limiting the disclosure, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (7)

1. A message forwarding method is applied to a network node supporting a Segment Routing (SR) protocol and a Label Distribution Protocol (LDP), and comprises the following steps:
receiving an SR interior gateway protocol IGP message through an SR interface enabling an SR protocol, wherein the SRIGP message carries an IP address prefix and a segment identifier SID, generating an LDP label corresponding to the IP address prefix, and establishing a mapping relation between the SID and the LDP label; the SID corresponds to an IP address prefix, and the IP address prefix is the prefix of the IP address of the first SR node; the first SR node is any node supporting SR protocol;
copying two SRIGP messages corresponding to a local LDP enabled interface, sending one SRIGP message through the LDP interface, generating an LDP mapping message according to the other SRIGP message and forwarding the LDP mapping message through the LDP interface, wherein the LDP mapping message comprises the IP address prefix and the LDP label;
receiving a service message to the first SR node;
if the service message is received through an SR interface enabling an SR protocol and the next hop of the service message is an LDP node, replacing the SID carried by the service message with the LDP label according to the mapping relation and forwarding the SID according to the LDP label;
and if the service message is received through an LDP interface which enables LDP and the next hop of the service message is a second SR node or a first SR node, replacing the LDP label carried by the service message with the SID according to the mapping relation and forwarding the SID according to the SID, wherein the second SR node is other nodes which support an SR protocol and are different from the first SR node.
2. The method of claim 1, further comprising:
receiving an SR IGP message through an LDP interface which enables LDP, wherein the SR IGP message carries the IP address prefix and the SID;
searching an LDP label corresponding to the IP address prefix;
if the mapping relation between the SID and the LDP label is found, the mapping relation between the SID and the LDP label is established.
3. The method according to claim 2, wherein if the LDP label corresponding to the IP address prefix is not found, the method further comprises:
storing the corresponding relation between the IP address prefix carried by the SRIGP message and the SID;
and forwarding the SRIGP message through other interfaces except the LDP interface receiving the SR IGP message.
4. The method of claim 1, further comprising:
receiving a LDP mapping message through a LDP interface enabling LDP, the LDP mapping message carrying the IP address prefix and the LDP label;
searching SID corresponding to the IP address prefix;
if the mapping relation between the SID and the LDP label is found, the mapping relation between the SID and the LDP label is established.
5. The method of claim 4, wherein if the SID corresponding to the IP address prefix is not found, the method further comprises:
storing the corresponding relation between the IP address prefix carried by the LDP mapping message and the LDP label;
and checking whether other LDP interfaces which enable LDP exist locally except the LDP interface which receives the LDP mapping message, and if so, forwarding the LDP mapping message through other LDP interfaces which enable LDP.
6. A message forwarding device is applied to a network node supporting a Segment Routing (SR) protocol and supporting a Label Distribution Protocol (LDP), and comprises:
the mapping module is used for receiving an SR interior gateway protocol IGP message through an SR interface enabling an SR protocol, wherein the SR IGP message carries an IP address prefix and a segment identifier SID, generating an LDP label corresponding to the IP address prefix, and establishing a mapping relation between the SID and the LDP label; the SID corresponds to an IP address prefix, and the IP address prefix is the prefix of the IP address of the first SR node; the first SR node is any node supporting SR protocol;
the mapping module is further configured to copy two SR IGP messages corresponding to a locally LDP enabled LDP interface, send one SR IGP message through the LDP interface, generate a LDP mapping message according to the other SRIGP message, and forward the LDP mapping message through the LDP interface, where the LDP mapping message includes the IP address prefix and the LDP label;
a receiving module, configured to receive a service packet addressed to the first SR node;
a forwarding module, configured to replace, when the service packet is received through an SR interface that enables an SR protocol and a next hop of the service packet is an LDP node, the SID carried by the service packet with the LDP label according to the mapping relationship and forward the SID according to the LDP label; and when the service message is received through an LDP interface which enables LDP and the next hop of the service message is a second SR node or a first SR node, replacing the LDP label carried by the service message with the SID according to the mapping relation and forwarding the SID according to the SID, wherein the second SR node is other nodes which support an SR protocol and are different from the first SR node.
7. The apparatus as claimed in claim 6, wherein the mapping module dynamically establishing a mapping relationship between the segment identification SID and the LDP label according to the received protocol message comprises:
receiving an SR IGP message through an LDP interface which enables LDP, wherein the SR IGP message carries the IP address prefix and the SID; searching an LDP label corresponding to the IP address prefix; if the mapping relation between the SID and the LDP label is found, establishing the mapping relation between the SID and the LDP label;
the mapping module further stores the corresponding relation between the IP address prefix carried by the SRIGP message and the SID when the LDP label corresponding to the IP address prefix is not found; triggering the forwarding module to forward the SRIGP message through other interfaces except the LDP interface receiving the SR IGP message; and/or the presence of a gas in the gas,
the mapping module dynamically establishing a mapping relationship between the segment identification SID and the LDP label according to the received protocol message comprises: receiving a LDP mapping message through a LDP interface enabling LDP, the LDP mapping message carrying the IP address prefix and the LDP label; searching SID corresponding to the IP address prefix; if the mapping relation between the SID and the LDP label is found, establishing the mapping relation between the SID and the LDP label;
the mapping module further stores the corresponding relation between the IP address prefix carried by the LDP mapping message and the LDP label when the SID corresponding to the IP address prefix is not found; and checking whether other LDP interfaces which enable LDP exist locally except the LDP interface which receives the LDP mapping message, and if so, triggering the forwarding module to forward the LDP mapping message through other LDP interfaces which enable LDP.
CN201811375140.1A 2018-11-19 2018-11-19 Message forwarding method and device Active CN109347740B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811375140.1A CN109347740B (en) 2018-11-19 2018-11-19 Message forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811375140.1A CN109347740B (en) 2018-11-19 2018-11-19 Message forwarding method and device

Publications (2)

Publication Number Publication Date
CN109347740A CN109347740A (en) 2019-02-15
CN109347740B true CN109347740B (en) 2022-03-01

Family

ID=65316126

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811375140.1A Active CN109347740B (en) 2018-11-19 2018-11-19 Message forwarding method and device

Country Status (1)

Country Link
CN (1) CN109347740B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113645136B (en) * 2019-03-11 2022-12-06 华为技术有限公司 Method, network node and network system for forwarding message in network
US11277334B2 (en) * 2019-07-24 2022-03-15 Juniper Networks, Inc. Using and processing per slice segment identifiers in a network employing segment routing
CN112565077A (en) * 2019-09-25 2021-03-26 北京华为数字技术有限公司 Method, device and system for determining mapping relation between routing prefix and segment identifier
CN111371686B (en) * 2020-03-19 2023-01-24 刘奇峰 Message forwarding method and device
CN112202671B (en) * 2020-09-09 2022-04-08 中盈优创资讯科技有限公司 Method and device for realizing service arrangement through proxy
CN117354219A (en) * 2022-06-29 2024-01-05 中兴通讯股份有限公司 Flow message processing method and device, storage medium and electronic device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105450437A (en) * 2014-09-19 2016-03-30 中兴通讯股份有限公司 SID allocation method and SR node
CN105871722A (en) * 2015-01-19 2016-08-17 中兴通讯股份有限公司 Tag structure and tag message forwarding method and device
CN106656781A (en) * 2015-11-02 2017-05-10 中兴通讯股份有限公司 Message transmission method, apparatus and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9049233B2 (en) * 2012-10-05 2015-06-02 Cisco Technology, Inc. MPLS segment-routing
US9537718B2 (en) * 2013-03-15 2017-01-03 Cisco Technology, Inc. Segment routing over label distribution protocol
WO2014186717A1 (en) * 2013-05-17 2014-11-20 Cisco Technology, Inc. Segment routing mapping server for ldp/sr interoperability
CN104980350B (en) * 2014-04-02 2018-02-16 华为技术有限公司 The method and LSR of Message processing
CN106487686B (en) * 2015-08-28 2021-01-22 中兴通讯股份有限公司 SR forwarding entry generation method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105450437A (en) * 2014-09-19 2016-03-30 中兴通讯股份有限公司 SID allocation method and SR node
CN105871722A (en) * 2015-01-19 2016-08-17 中兴通讯股份有限公司 Tag structure and tag message forwarding method and device
CN106656781A (en) * 2015-11-02 2017-05-10 中兴通讯股份有限公司 Message transmission method, apparatus and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MPLS网络核心交换设备――标签交换路由器;李吉良;《无线电通信技术》;20021230(第06期);全文 *

Also Published As

Publication number Publication date
CN109347740A (en) 2019-02-15

Similar Documents

Publication Publication Date Title
CN109347740B (en) Message forwarding method and device
US11082342B2 (en) System and method to facilitate content forwarding using Bit Index Explicit Replication (BIER) in an Information-Centric Networking (ICN) environment
US20210243107A1 (en) Explicit routing with network function encoding
CN111628995A (en) SID compression method, SID compression device, SID compression equipment and storage medium based on SRv6
CN108259299B (en) Forwarding table item generating method and device and machine-readable storage medium
CN110417657B (en) Method and device for processing multicast data message
CN108718278B (en) Message transmission method and device
CN108600109B (en) Message forwarding method and device
CN112019433B (en) Message forwarding method and device
CN110430076B (en) Route management method and device
CN106878072B (en) Message transmission method and device
CN112367254A (en) Cross-device link aggregation method and device and electronic device
CN116321348A (en) Communication method and device
CN107547377B (en) Multicast traffic transmission method and device
US8923303B2 (en) Method, system and installation for forwarding data transmission frames
CN113676959A (en) Service flow forwarding method, device and equipment based on 5G core network
CN116527405B (en) SRV6 message encryption transmission method and device and electronic equipment
CN111147376B (en) Route updating method, device, equipment and medium
US20240114013A1 (en) Packet processing method, client end device, server end device, and computer-readable medium
CN113542126B (en) Generalized SRv6 full-path compression method and device
EP4170989A1 (en) Message processing method and device, and computer readable storage medium
WO2021179935A1 (en) Route determination method, apparatus and network device
CN112333074B (en) Fiber channel message processing method, device, equipment and machine readable storage medium
WO2017162202A1 (en) Link state information processing
CN112311668B (en) Method, network device and system for processing BIER message

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