WO2015149598A1 - 报文处理的方法及标签交换路由器 - Google Patents

报文处理的方法及标签交换路由器 Download PDF

Info

Publication number
WO2015149598A1
WO2015149598A1 PCT/CN2015/073370 CN2015073370W WO2015149598A1 WO 2015149598 A1 WO2015149598 A1 WO 2015149598A1 CN 2015073370 W CN2015073370 W CN 2015073370W WO 2015149598 A1 WO2015149598 A1 WO 2015149598A1
Authority
WO
WIPO (PCT)
Prior art keywords
lsr
label
stack
mpls
packet
Prior art date
Application number
PCT/CN2015/073370
Other languages
English (en)
French (fr)
Inventor
郑莲淑
陈国义
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015149598A1 publication Critical patent/WO2015149598A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling

Definitions

  • the present invention relates to communication technologies, and in particular, to a packet processing method and a router.
  • the control plane adopts the link state-based internal gateway protocol (English name is the Interior Gateway Protocol, English abbreviation is IGP), such as: intermediate system to intermediate system (English as the Intermediate System to Intermediate System, abbreviated as IS-IS) protocol, open shortest path first (English full name Open Shortest Path First, English abbreviated as OSPF) protocol to distribute label switching routers (English name is Label Switching)
  • the router which is abbreviated as LSR, has a multi-protocol label switching (English name is Multi Protocol Label Switching, abbreviated as MPLS).
  • the data plane forwards MPLS packets based on the labels distributed by the control plane, compared to the existing MPLS technology system. It simplifies the operation and maintenance management of the MPLS network.
  • the existing label advertisement protocol is not required in the SR network, such as the label distribution protocol (English name is Label Distribution Protocol, English abbreviated as LDP) or the traffic engineering based resource reservation protocol. (English full name Resource Reservation Proto col-Traffic Engineering (abbreviated as RSVP-TE) or Border Gateway Protocol (English name is Border Gateway Protocol, abbreviated as BGP).
  • the label switching path (English name is Label Switched Path, hereinafter referred to as LSP) tunnel entry (English name is Ingress)
  • LSR enters the LSP tunnel Internet protocol (English full name is Internet Protocol, English abbreviation
  • the IP packet is inserted into the MPLS label stack to generate MPLS packets.
  • the MPLS label stack includes a segment of one or more LSRs (the English name is segment), and the segment of the LSR may be a node segment of the LSR (the English name is The node segment) may also be a neighbor segment of the LSR (the English name is an adjacency segment).
  • the MPLS packet is forwarded to the LSR of the egress LSR through the LSP tunnel, and the MPLS label stack is ejected. For IP packets.
  • the egress LSR cannot know the LSR that the IP packet passes through when forwarding the IP packet in the MPLS network, which is disadvantageous for the network administrator to maintain and manage the network.
  • the embodiment of the present invention provides a packet processing method and a label switching router, so as to solve the problem that the existing Egress LSR cannot learn the LSR that the IP packet passes through when forwarding in the MPLS network.
  • the first aspect provides a packet processing method, where the method is applicable to an MPLS network of an SR, and the method includes:
  • the ingress LSR of the LSP tunnel receives the IGP-based advertisement packet sent by the egress LSR of the LSP tunnel, and the advertisement packet is used to notify the ingress LSR that the egress LSR has the capability of identifying the label history stack.
  • the IP packet that enters the LSP tunnel is inserted into the MPLS label stack to generate an MPLS packet.
  • the MPLS label stack includes multiple segments and label history identifiers from the top of the stack to the bottom of the stack. And the label history stack, the plurality of segments are used to identify the LSR that the MPLS packet needs to pass through when the LSP tunnel is forwarded, and the label history identifier is used to identify that the label history is included in the MPLS packet.
  • a stack the label history stack including the plurality of segments
  • the label history stack further includes: a node segment of the Ingress LSR.
  • the label history stack further includes: the Egress LSR a private network label, where the private network label is used to identify a virtual private network to which the target device belongs (English name is virtual private network, abbreviated as VPN), and the target device is a destination device that receives the IP packet. .
  • a second aspect provides a packet processing method, where the method is applicable to an MPLS network of an SR, and the method includes:
  • the ingress LSR of the LSP tunnel receives the IGP-based advertisement packet sent by the egress LSR of the LSP tunnel, and the advertisement packet is used to notify the ingress LSR that the egress LSR has the capability of identifying the label history stack.
  • the IP packet that enters the LSP tunnel is inserted into the MPLS label stack to generate an MPLS packet.
  • the MPLS label stack includes the node segment and the label of the Egress LSR from the top of the stack to the bottom of the stack. a history identifier and a label history stack, wherein the label history identifier is used to identify that the MPLS packet includes the label history stack, and the label history stack includes a node segment of the Egress LSR and a node segment of the Ingress LSR.
  • the node segment of the egress LSR and the node segment of the ingress LSR are used to identify an LSR that the MPLS packet needs to pass in sequence when the LSP tunnel is forwarded;
  • a third aspect provides a packet processing method, where the method is applicable to an MPLS network of an SR, and the method includes:
  • the egress LSR of the LSP tunnel generates an IGP-based advertisement packet, and the advertisement packet is used to notify the ingress LSR that the egress LSR has the capability of identifying the label history stack.
  • the Transit LSR is an LSR connected to the egress LSR on the LSP tunnel
  • the MPLS label stack of the MPLS packet includes: a label history identifier and a label history stack, the label history identifier is used to identify that the MPLS packet includes the label history stack, the label history stack includes a plurality of segments, and the plurality of segments are used to identify the MPLS packet in the The LSR that needs to pass in sequence when forwarding the LSP tunnel;
  • the advertisement packet is an OSPF router information opaque link state advertisement (English name is Router Information Opaque LSA), and the OSPF Router Information Opaque LSA includes a segment history type.
  • the length value (English name is Segment History Capability TLV)
  • the Egress LSR is identified by the Segment History Capability TLV to have the ability to identify the tag history stack.
  • the advertisement packet is a packet that includes an intermediate system to an intermediate system routing capability type length value (English name is an IS-IS Router Capability TLV),
  • the sub-type length value (Sub-TLV) included in the IS-IS Router Capability TLV identifies the Egress LSR's ability to identify the tag history stack.
  • the label history stack further includes: a node segment of the Ingress LSR.
  • a fourth aspect provides a label switching router LSR, where the LSR is applicable to an MPLS network of an SR, where the LSR is an Ingress LSR of an LSP tunnel, and the LSR includes:
  • a receiving unit configured to receive an IGP-based advertisement packet sent by an egress LSR of the LSP tunnel, where the advertisement packet is used to notify the ingress LSR that the egress LSR has the capability of identifying a label history stack;
  • a generating unit configured to insert an IP packet that enters the LSP tunnel into an MPLS label stack to generate an MPLS packet after the receiving unit receives the advertisement packet, where the MPLS label stack is from the top of the stack to the bottom of the stack
  • the method includes: a plurality of segments, a label history identifier, and a label history stack, where the plurality of segments are used to identify an LSR that the MPLS packet needs to pass in sequence when the LSP tunnel is forwarded, where the label history identifier is used to identify the
  • the MPLS packet includes the label history stack, and the label history stack includes the plurality of segments;
  • a sending unit configured to send the MPLS packet generated by the generating unit to the Egress LSR along the LSP tunnel.
  • the label history stack further includes: The node segment of the Ingress LSR.
  • the label history stack further includes: a private network label sent by the egress LSR The private network label is used to identify a VPN to which the target device belongs, and the target device is a destination device that receives the IP packet.
  • a label switching router LSR is provided, where the LSR is applied to an MPLS network of an SR, and the LSR is an Ingress LSR of an LSP tunnel, and the LSR includes:
  • a receiving unit configured to receive an IGP-based advertisement packet sent by an egress LSR of the LSP tunnel, where the advertisement packet is used to notify the ingress LSR that the egress LSR has the capability of identifying a label history stack;
  • a generating unit configured to insert an IP packet that enters the LSP tunnel into an MPLS label stack to generate an MPLS packet after the receiving unit receives the advertisement packet, where the MPLS label stack is from the top of the stack to the bottom of the stack And including: a node segment of the egress LSR, a label history identifier, and a label history stack, where the label history identifier is used to identify that the label history stack is included in the MPLS packet, and the label history stack includes a node segment of the Egress LSR. And a node segment of the Ingress LSR; a node segment of the Egress LSR and a node segment of the Ingress LSR are used to identify an LSR that the MPLS packet needs to pass in sequence when the LSP tunnel is forwarded;
  • a sending unit configured to send the MPLS packet generated by the generating unit to the Egress LSR along the LSP tunnel.
  • a label switching router LSR is provided, where the LSR is applicable to an MPLS network of an SR, and the LSR is an egress LSR of an LSP tunnel, and the LSR includes:
  • a generating unit configured to generate an IGP-based advertisement packet, where the advertisement packet is used to notify the ingress LSR that the egress LSR has the capability of identifying a label history stack;
  • a sending unit configured to send the advertisement packet generated by the generating unit to an Ingress LSR of the LSP tunnel
  • a receiving unit configured to receive an MPLS packet sent by the transit LSR, where the Transit LSR is an LSR connected to the egress LSR on the LSP tunnel, and an MPLS label of the MPLS packet
  • the label stack includes: a label history identifier and a label history stack, where the label history identifier is used to identify the label history stack in the MPLS packet, the label history stack includes a plurality of segments, and the plurality of segments are used to Identifying an LSR that the MPLS packet needs to pass in sequence when the LSP tunnel is forwarded;
  • An obtaining unit configured to obtain the label history stack from the MPLS label stack of the MPLS packet received by the receiving unit.
  • the advertised message is an OSPF Router Information Opaque LSA
  • the OSPF Router Information Opaque LSA includes a Segment History Capability TLV
  • the segment is learned by using the Segment History Capability TLV identifier.
  • the Egress LSR has the ability to identify the tag history stack.
  • the advertisement packet is a packet that includes an IS-IS Router Capability TLV, and the E-report included in the IS-IS Router Capability TLV is used to identify the Egress.
  • the LSR has the ability to identify the tag history stack.
  • the ingress LSR determines, according to the advertisement packet, that the egress LSR has the capability of identifying the tag history stack, and the MPLS label stack including the label history stack is pushed into the IP packet sent to the egress LSR, and the MPLS label stack is generated. MPLS packet.
  • the egress LSR obtains the label history stack from the MPLS label stack according to the label history identifier carried in the MPLS label stack in the received MPLS packet. Since the label history stack does not disappear during the MPLS packet forwarding process, the egress LSR can learn the LSR that the IP packet passes through when forwarding the IP packet in the MPLS network of the SR according to the label history stack, which is beneficial to the network.
  • the administrator maintains and manages the network.
  • FIG. 1 is a flowchart of a method for processing a message according to an embodiment of the present invention.
  • Figure 2 is a schematic diagram of a format of the Segment History Capability TLV.
  • FIG. 3 is a flowchart of a method for processing a message according to an embodiment of the present invention.
  • FIG. 4 is a flowchart of a method for processing a message according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of an implementation manner of a packet processing method according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of an implementation manner of a packet processing method according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of an implementation manner of a method for processing a packet according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of an LSR according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of an LSR according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of an LSR according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of an LSR according to an embodiment of the present invention.
  • FIG. 1 is a description of a packet processing method provided by an embodiment of the present invention from the perspective of an Ingress LSR.
  • a method for processing a packet according to an embodiment of the present invention is applicable to an MPLS network of an SR, and the method includes:
  • the ingress LSR of the LSP tunnel receives the IGP-based advertisement packet sent by the egress LSR of the LSP tunnel, and the advertisement packet is used to notify the ingress LSR that the egress LSR has the capability of identifying the label history stack.
  • the advertised message is an OSPF Router Information Opaque LSA
  • the OSPF Router Information Opaque LSA includes a Segment History Capability TLV
  • the egress LSR is identified by the Segment History Capability TLV.
  • the ability of the stack For the OSPF Router Information Opaque LSA format, refer to RFC4970 released by the Internet Engineering Task Force (English called Internet Engineering Task Force, IETF).
  • the flooding range of the advertisement packet may be determined by the type of the LSA (the English name is type).
  • the flooding range of the advertisement packet may be a link range (the English name is link-scoped).
  • the scope of the region English name is area-scoped
  • the scope of the autonomous system English name is AS-scoped.
  • FIG. 2 is a schematic diagram of a format of the Segment History Capability TLV.
  • the Value field of the Segment History Capability TLV identifies that the Egress LSR has the capability of identifying a tag history stack.
  • the Type field is used to identify that the TLV including the Type is used to identify that the Egress LSR has the capability of identifying a tag history stack, and the value of the Type is allocated by the Internet Assigned Numbers Authority (IANA).
  • IANA Internet Assigned Numbers Authority
  • a value field configured to carry data identifying the egress LSR with the ability to identify the tag history stack, for example, when the value of the Value field is 1, indicating that the Egress LSR has the capability of identifying the tag history stack, when the value is When the value of the field is 0, it indicates that the Egress LSR does not have the ability to identify the label history stack.
  • the egress LSR has the capability of identifying a tag history stack, and the Egress LSR can determine, according to the tag history identifier included in the MPLS label stack, that the MPLS label carries a label history stack to utilize the MPLS label stack.
  • the label history stack determines the LSR that the IP packet passes through when forwarding the IP packet in the MPLS network of the SR, and then uses the label history stack to perform network maintenance and management. For example, the label history stack is used to determine that the IP packet is forwarded.
  • the LSR determines the forwarding path of the IP packet, thereby measuring the performance of packet loss on the forwarding path of the IP packet, Conducive to network administrators to maintain and manage the network.
  • the tag history stack is a set of segments of the LSR that the IP packet passes through when forwarding the IP packet in the MPLS network of the SR.
  • the set of the segment of the LSR that is passed when the IP packet is forwarded in the MPLS network of the SR is The ingress LSR is inserted into the IP packet and indicates a label stack forwarded by the IP packet.
  • the label history stack may be a segment table history stack in the SR network (English name is Segment List History Stack, abbreviated as SHS), and the label history identifier may be a segment table history stack identifier in the SR network. (English name is Segment List History Stack Indicator, abbreviated as SHSI), but the label history stack and the label history identifier are not limited to the above forms.
  • the plurality of segments are a node segment of an Egress LSR and a node segment of a Transit LSR on the LSP tunnel, or the plurality of segments are a node segment of an Egress LSR and multiple Transit LSRs on the LSP tunnel.
  • a node segment, or the plurality of segments is a node segment of the Egress LSR and an adjacency segment of the plurality of Transit LSRs on the LSP tunnel, or the plurality of segments is a node segment of the Ingress LSR and all Transits on the LSP tunnel
  • the LSR on the LSP tunnel is assigned a node segment, and the node segment uniquely identifies the LSR in the MPLS network of the SR.
  • Each LSR on the LSP tunnel may have one or more adjacency segments on the LSR that uniquely identify a link between the LSRs adjacent to the LSR.
  • the specific content of the multiple segments is not limited to the above four types. Any node segment and/or adjacency segment that can be used to determine the LSR passing through when the MPLS packet is forwarded belongs to multiple segments mentioned in the present invention.
  • the sequence of the segments in the plurality of segments may be It is determined according to the sequence of the LSRs that are passed when the MPLS packet is forwarded.
  • the tag history identifier may be an MPLS reserved tag (English name is Reserved Label) determined by the IANA.
  • the label history identifier may also be used to identify a starting position of the label history stack, so that the Egress LSR can identify the label history stack.
  • the Ingress LSR may, after receiving the advertisement packet, set the S flag of the bottom label of the label history stack in the MPLS label stack, so that the bottom label of the label history stack becomes The bottom of the stack of the MPLS label stack.
  • the Ingress LSR inserts the label history stack in the MPLS label stack, and the Egress LSR learns the LSR that the MPLS packet is forwarded according to the label history stack, and then learns to enter the LSP. Forwarding path of the IP packet of the tunnel.
  • the ingress LSR may send the MPLS packet to the Transit LSR of the LSP tunnel, and forward the MPLS packet to the Egress LSR through the Transit LSR.
  • the method for processing the packet further includes: the Ingress LSR inserting a node segment of the Ingress LSR into the label history stack.
  • the ingress LSR may insert a node segment of the Ingress LSR into the label history identifier and be adjacent to the label history identifier, so that the Egress LSR is based on the Ingress LSR in the label history stack.
  • the location of the node segment is used to know the sequence of the LSRs that are passed through when the MPLS packets are forwarded.
  • the method for processing the packet further includes: inserting, by the ingress LSR, a private network label from the egress LSR into the label history stack of the MPLS packet, where the private network label is used to indicate a target The VPN to which the device belongs, and the target device is the destination device that receives the IP packet.
  • the destination device that receives the IP packet is a device identified by a destination IP address of the IP packet.
  • the ingress LSR inserts the private network label into the label history stack, and the ingress LSR inserts the private network label into the top of the stack of the MPLS label stack to the label history identifier.
  • a location adjacent to the tag history identifier, at this time, the MPLS label stack is from the stack
  • the bottom to the bottom of the stack includes: a plurality of segments, the private network label, the label history identifier, and the label history stack, and the label history stack, and the label history stack includes the plurality of segments.
  • the MPLS label stack includes: a plurality of segments, the private network label, the label history identifier, and the label from the bottom of the stack to the bottom of the stack.
  • the history stack, the label history stack includes the plurality of segments and the private network label from the top of the stack to the bottom of the stack.
  • the Ingress LSR can be extended by the Multi-Protocol Extensions (hereinafter referred to as Multi-Protocol Extensions for BGP, abbreviated as MP-BGP in English).
  • the private network label may be a label allocated by the egress LSR to a route of the target device, and the next hop of the route to the target device is a loopback address of the egress LSR.
  • the egress LSR may obtain the route to the target device from a user edge device (in English, referred to as customer edge, abbreviated as CE) connected to the target device.
  • CE customer edge
  • the ingress LSR determines, according to the advertisement packet, that the egress LSR has the capability of identifying the label history stack, and the MPLS label stack including the label history stack is pushed into the IP packet sent to the egress LSR. . Because the label history stack does not disappear during the MPLS packet forwarding process, the egress LSR determines the LSR that the MPLS packet passes through according to the label history stack, and then learns the IP packet that enters the LSP tunnel. Forward path.
  • FIG. 3 is a description of a packet processing method provided by an embodiment of the present invention from the perspective of an Ingress LSR.
  • a method for processing a packet according to an embodiment of the present invention is applicable to an MPLS network of an SR, and the method includes:
  • the ingress LSR of the LSP tunnel receives the IGP-based advertisement packet sent by the egress LSR of the LSP tunnel, and the advertisement packet is used to notify the ingress LSR that the egress LSR has the capability of identifying the label history stack.
  • the method provided in the embodiment of FIG. 3 includes the same S10 as the method provided in the embodiment corresponding to FIG. 1, and details are not described herein again.
  • the ingress LSR After receiving the advertisement packet, the ingress LSR inserts an IP packet that enters the LSP tunnel into an MPLS label stack to generate an MPLS packet, where the MPLS label stack is from the top of the stack to the bottom of the stack.
  • the node segment of the Egress LSR includes a node segment, a tag history identifier, and a tag history stack.
  • the tag history identifier is used to identify that the MPLS packet includes the tag history stack, and the tag history stack includes a node segment of the Egress LSR.
  • the node segment of the Ingress LSR; the node segment of the Egress LSR and the node segment of the Ingress LSR are used to identify an LSR that the MPLS packet needs to pass in sequence when the LSP tunnel is forwarded.
  • the label history stack may be an SHS in an SR network
  • the label history identifier may be an SHSI in an SR network, but the label history stack and the label history identifier are not limited to the above forms.
  • the tag history identifier may be an MPLS Reserved Label determined by the IANA.
  • the label history identifier may also be used to identify a starting position of the label history stack, so that the Egress LSR can identify the label history stack.
  • the Ingress LSR may, after receiving the advertisement packet, set the S flag of the bottom label of the label history stack in the MPLS label stack, so that the bottom label of the label history stack becomes The bottom of the stack of the MPLS label stack.
  • the ingress LSR sends the MPLS packet to the Egress LSR along the LSP tunnel.
  • the method provided in the embodiment of FIG. 3 includes the same S12 as the method provided in the embodiment corresponding to FIG. 1, and details are not described herein again.
  • the method for processing the packet further includes: inserting, by the ingress LSR, a private network label from the egress LSR into the label history stack of the MPLS packet, where the private network label is used to indicate a target The VPN to which the device belongs, and the target device is the destination device that receives the IP packet.
  • the destination device that receives the IP packet is a device identified by a destination IP address of the IP packet.
  • the ingress LSR inserts the private network label into the label history stack, and the ingress LSR inserts the private network label into the top of the stack of the MPLS label stack to the label history identifier. a location adjacent to the tag history identifier.
  • the MPLS label stack includes: a node segment of the Egress LSR, the private network label, the label history identifier, and the label from the bottom of the stack to the bottom of the stack. a history stack, the label history stack including the node of the Egress LSR Segment and the node segment of the Ingress LSR.
  • the label history stack After the ingress LSR inserts the private network label into the label history stack, the label history stack includes a node segment of the Egress LSR, a node segment of the Ingress LSR, and the private network from the top of the stack to the bottom of the stack. label.
  • the ingress LSR can receive the private network label from the egress LSR and the route to the target device by using the MP-BGP.
  • the private network label may be a label allocated by the egress LSR to a route of the target device, and the next hop of the route to the target device is a loopback address of the egress LSR.
  • the Egress LSR may obtain the route to the target device from the CE connected to the target device.
  • the ingress LSR inserts the label history stack in the MPLS label stack, and the Egress LSR is configured to learn the MPLS according to the node segment of the Ingress LSR in the label history stack.
  • the packet is forwarded through the ingress LSR, and the forwarding path of the IP packet entering the LSP tunnel is obtained.
  • FIG. 4 is a description of a packet processing method provided by an embodiment of the present invention from the perspective of an egress LSR.
  • a method for processing a packet according to an embodiment of the present invention is applicable to an SR network, and the method includes:
  • the egress LSR of the LSP tunnel generates an IGP-based advertisement packet, where the advertisement packet is used to notify the ingress LSR that the egress LSR has the capability of identifying the label history stack.
  • the advertised message is an OSPF Router Information Opaque LSA
  • the OSPF Router Information Opaque LSA includes a Segment History Capability TLV
  • the segment history Capability TLV is used to identify that the Egress LSR has the capability of identifying a tag history stack.
  • the advertisement packet may be a packet including an IS-IS Router Capability TLV, and the Sub-TLV included in the IS-IS Router Capability TLV is used to identify that the Egress LSR has the capability of identifying a label history stack.
  • the type of the IS-IS Router Capability TLV is 242
  • the Sub-TLV of the IS-IS Router Capability TLV may be a Segment History Capability TLV, and the Egress LSR is identified by using a Segment History Capability TLV as a sub-TLV. Has the ability to identify the label history stack.
  • FIG. 2 is a schematic diagram of a format of the Segment History Capability TLV.
  • the Value field of the Segment History Capability TLV identifies that the Egress LSR has the capability of identifying a tag history stack.
  • the egress LSR has the capability of identifying a tag history stack, and the Egress LSR can determine, according to the tag history identifier included in the MPLS label stack, that the MPLS label carries a label history stack to utilize the MPLS label stack.
  • the label history stack determines the LSR that the IP packet passes through when forwarding the IP packet in the MPLS network of the SR, and then uses the label history stack to perform network maintenance and management. For example, the label history stack is used to determine that the IP packet is forwarded.
  • the LSR further determines the forwarding path of the IP packet, thereby measuring the performance of packet loss on the forwarding path of the IP packet, which is beneficial to the network administrator to maintain and manage the network.
  • the Egress LSR sends the advertisement packet to an Ingress LSR of the LSP tunnel.
  • the flooding range of the advertisement packet may be determined by the type of the LSA.
  • the flooding range of the advertisement packet may be link-scoped, area-scoped, or AS-scoped.
  • the Egress LSR receives the MPLS packet sent by the Transit LSR, where the Transit LSR is an LSR that is connected to the egress LSR on the LSP tunnel, and the MPLS label stack of the MPLS packet includes: a label history identifier and a label history. a stack, the label history identifier is used to identify that the MPLS packet includes the label history stack, the label history stack includes a plurality of segments, and the plurality of segments are used to identify the MPLS packet in the LSP tunnel The LSR that needs to pass in order when forwarding.
  • the Egress LSR obtains the label history stack from the MPLS label stack of the MPLS packet.
  • the egress LSR may strip the MPLS label stack from the MPLS packet according to the label history identifier to obtain the IP packet.
  • the MPLS label stack includes the label history stack, and the Egress LSR may obtain the label history stack from the MPLS label stack.
  • the method for processing the packet further includes: the Egress LSR is The route of the target device is configured to allocate a private network label, and send the private network label and the route to the target device to the ingress LSR, where the target device is a destination device that receives the IP packet, and the private network label
  • the Egress LSR is a label allocated to the route to the target device, where the private network label is used to indicate the VPN to which the target device belongs, and the next hop of the route to the target device is the Egress LSR. Loopback address.
  • the Egress LSR may obtain the route to the target device from the CE connected by the target device.
  • the destination device that receives the IP packet is a device identified by a destination IP address of the IP packet.
  • the method for processing the packet further includes: the egress LSR processing the IP packet.
  • the processing of the IP packet by the egress LSR specifically includes:
  • the egress LSR forwards the IP packet to the target device according to the private network label stripped from the MPLS packet.
  • the egress LSR advertises to the ingress LSR that the egress LSR has the capability of identifying a label history stack, so that the ingress LSR inserts the label history stack in the generated MPLS label stack.
  • the egress LSR learns the LSR that is passed when the MPLS packet is forwarded according to the content of the label history stack, and the learned history stack does not disappear during the forwarding of the MPLS packet. Forwarding path of the IP packet of the LSP tunnel.
  • the ingress LSR, Transit LSR 1, Transit LSR 2, Transit LSR 3, and Egress LSR are located in the MPLS network of the SR.
  • An LSP tunnel exists between the egress LSRs, and the LSP tunnel passes through the Transit LSR 1, the Transit LSR 2, and the Transit LSR 3.
  • the Transit LSR 3, the Transit LSR 2, the Transit LSR 1, the Ingress LSR, and the Egress LSR can learn that the node segment of the Egress LSR is 65, and the node segment of the Transit LSR 2 is also known. 66, the node segment belongs to a global label.
  • the egress LSR floods the advertisement packet to the SR network, so that the ingress LSR learns that the egress LSR has the capability of identifying a label history stack.
  • the tag history identifier may be an MPLS Reserved Label determined by the IANA, for example, 10 belonging to the MPLS Reserved Label may be used as the The label history identifier.
  • the ingress LSR can learn the LSR that the LSP tunnel passes through, and after receiving the IP packet that enters the LSP tunnel, determine that the egress LSR has the capability of identifying the label history stack, and then the IP packet.
  • the MPLS label stack is inserted to generate a first MPLS packet.
  • the ingress LSR sends the first MPLS packet to the Transit LSR 1.
  • the MPLS label stack in the first MPLS packet includes: 66, 65, 10, 66, 65 from the top of the stack to the bottom of the stack, wherein 10 to the bottom of the stack are label history stacks. .
  • the Transit LSR 1 After receiving the first MPLS packet, the Transit LSR 1 determines that the next hop is the Transit LSR 2, and performs label switching (English name is swap) operation of the node segment of the Transit LSR 2.
  • the Transit LSR 1 sends the first MPLS packet to the Transit LSR 2.
  • the Transit LSR 2 determines that the next hop is the Transit LSR 3, and performs a label pop-up (English name is pop) operation of the node segment of the Transit LSR 2 to obtain a second MPLS packet.
  • the MPLS label stack in the second MPLS packet includes: 65, 10, 66, 65 from the top of the stack to the bottom of the stack.
  • the Transit LSR 2 sends the second MPLS packet to the Transit LSR 3.
  • the Transit LSR 3 determines that the next hop is the egress LSR, and pops the top 65 of the second MPLS packet to generate a third MPLS packet.
  • the Transit LSR 3 sends the third MPLS packet to the Egress LSR.
  • the MPLS label stack in the third MPLS packet includes: 10, 66, and 65 from the top of the stack to the bottom of the stack.
  • the egress LSR strips the label history stack from the third MPLS packet according to 10, and obtains the IP packet.
  • the egress LSR determines the forwarding path of the MPLS packet according to the stripped label history stack, and further learns that the IP packet passes through the Transit LSR 2.
  • the ingress LSR, the Transit LSR 1, the Transit LSR 2, and the Egress LSR are located in the MPLS network of the SR, and the Ingress LSR is to the Egress LSR.
  • the ingress LSR can learn the adjacency segment of all Transit LSRs on the LSP tunnel and the node segment of the Egress LSR.
  • the adjacency segment of the Transit LSR 1 is 9001, 9001 for identifying the link between the Transit LSR1 and the Transit LSR 2.
  • the node segment of the Egress LSR is 65.
  • Transit LSR 1, Transit LSR 2 and Egress LSR can learn about the chain identified by 9001 in the SR MPLS network.
  • the path, Transit LSR 1, Transit LSR 2, and Egress LSR can learn 65 the LSR identified in the SR's MPLS network.
  • the egress LSR floods the advertisement packet to the SR network, so that the ingress LSR learns that the egress LSR has the capability of identifying a label history stack.
  • the tag history identifier may be an MPLS Reserved Label determined by the IANA. For example, 10 belonging to the MPLS Reserved Label may be used as the label history identifier.
  • the ingress LSR can learn the LSR that the LSP tunnel passes through, and after receiving the IP packet that enters the LSP tunnel, determine that the egress LSR has the capability of identifying the label history stack, and then the IP packet.
  • the MPLS label stack is inserted to generate a first MPLS packet.
  • the MPLS label stack in the first MPLS packet includes: 9001, 65, 10, 9001, and 65 from the top of the stack to the bottom of the stack.
  • the ingress LSR sends the first MPLS packet to the Transit LSR 1.
  • the Transit LSR 1 pops up the 9001 in the MPLS label stack of the first MPLS packet, obtains the second MPLS packet, and sends the second MPLS packet to the Transit LSR 2 along the link identified by 9001.
  • the MPLS label stack of the second MPLS packet includes: 65, 10, 9001, 65 from the top of the stack to the bottom of the stack.
  • the Transit LSR 2 pops out 65 of the MPLS label stack of the second MPLS packet to obtain a third MPLS packet.
  • the Transit LSR 2 sends the third MPLS packet to the Egress LSR.
  • the MPLS label stack of the third MPLS packet includes: 10, 9001, and 65 from the top of the stack to the bottom of the stack.
  • the egress LSR obtains the IP packet according to the stripping of the label history stack from the third MPLS packet according to 10.
  • the Egress LSR can determine the LSR of the MPLS packet according to the 9001 in the label history stack, and further learn the forwarding path of the IP packet.
  • the LSP tunnel is formed between the ingress LSR and the egress LSR.
  • the ingress LSR and the egress LSR are located in the MPLS network of the SR. Both the ingress LSR and the egress LSR can learn the node segment of the Egress LSR and the node segment of the Ingress LSR. For example, the node segment of the Egress LSR is 65, and the node segment of the Ingress LSR is 66.
  • the egress LSR floods the advertisement packet to the SR network, so that the ingress LSR learns that the egress LSR has the capability of identifying a label history stack.
  • the tag history identifier may be an MPLS Reserved Label determined by the IANA, for example, belonging to the MPLS Reserved Label 10 can be used as the tag history identifier.
  • the ingress LSR can learn the LSR that the LSP tunnel passes through, and after receiving the IP packet that enters the LSP tunnel, determine that the egress LSR has the capability of identifying the label history stack, and then the IP packet.
  • the MPLS label stack is inserted to generate a first MPLS packet. As shown in FIG. 7, the MPLS label stack in the first MPLS packet includes: 65, 10, 66, 65 from the top of the stack to the bottom of the stack.
  • the ingress LSR sends the MPLS packet to the Egress LSR.
  • the MPLS label stack of the MPLS packet received by the egress LSR includes: 10, 66, and 65 from the top of the stack to the bottom of the stack.
  • the Egress LSR obtains the IP packet according to the detachment of the label history stack from the MPLS packet according to 10.
  • the Egress LSR can determine that the MPLS packet passes the Ingress LSR according to 66 in the label history stack.
  • FIG. 8 is an LSR according to an embodiment of the present invention.
  • the LSR is applicable to an MPLS network of an SR, where the LSR is an Ingress LSR of an LSP tunnel, and the LSR includes: a receiving unit 101, a generating unit 102, and a sending Unit 103.
  • the receiving unit 101 is configured to receive an advertisement message of the IGP sent by the egress LSR of the LSP tunnel, where the advertisement message is used to notify the ingress LSR that the egress LSR has the capability of identifying the label history stack.
  • the advertised message is an OSPF Router Information Opaque LSA
  • the OSPF Router Information Opaque LSA includes a Segment History Capability TLV
  • the segment history Capability TLV is used to identify that the Egress LSR has the capability of identifying a tag history stack.
  • the advertisement packet may be a packet including an IS-IS Router Capability TLV, and the Sub-TLV included in the IS-IS Router Capability TLV is used to identify that the Egress LSR has the capability of identifying a label history stack.
  • the type of the IS-IS Router Capability TLV is 242
  • the Sub-TLV of the IS-IS Router Capability TLV may be a Segment History Capability TLV, and the Egress LSR is identified by using a Segment History Capability TLV as a sub-TLV. Has the ability to identify the label history stack.
  • FIG. 2 is a schematic diagram of a format of the Segment History Capability TLV.
  • the Egress LSR has the capability of identifying the tag history stack by using the Value field of the Segment History Capability TLV.
  • the egress LSR has the capability of identifying a tag history stack, and the Egress LSR can determine, according to the tag history identifier included in the MPLS label stack, that the MPLS label carries a label history stack to utilize the MPLS label stack.
  • the label history stack determines the LSR that the IP packet passes through when forwarding the IP packet in the MPLS network of the SR, and then uses the label history stack to perform network maintenance and management. For example, the label history stack is used to determine that the IP packet is forwarded.
  • the LSR further determines the forwarding path of the IP packet, thereby measuring the performance of packet loss on the forwarding path of the IP packet, which is beneficial to the network administrator to maintain and manage the network.
  • the generating unit 102 is configured to insert an IP packet that enters the LSP tunnel into an MPLS label stack according to the advertisement packet received by the receiving unit 101, to generate an MPLS packet.
  • the MPLS label stack from the top of the stack to the bottom of the stack includes: a plurality of segments, a label history identifier, and a label history stack, where the plurality of segments are used to identify that the MPLS packet needs to pass through the LSP tunnel in sequence.
  • the LSR, the tag history identifier is used to identify that the MPLS packet includes the tag history stack, and the tag history stack includes the plurality of segments.
  • the tag history stack is a set of segments of the LSR that the IP packet passes through when forwarding the IP packet in the MPLS network of the SR.
  • the set of the segment of the LSR that is passed when the IP packet is forwarded in the MPLS network of the SR is The ingress LSR is inserted into the IP packet and indicates a label stack forwarded by the IP packet.
  • the label history stack may be an SHS in an SR network
  • the label history identifier may be an SHSI in an SR network
  • the label history stack and the label history identifier are not limited to the above forms.
  • the label history identifier may also be used to identify a starting position of the label history stack, so that the Egress LSR can identify the label history stack.
  • the sending unit 103 is configured to send the MPLS packet generated by the generating unit 102 to the Egress LSR along the LSP tunnel.
  • the label history stack further includes: a node segment of the Ingress LSR.
  • the generating unit 102 is specifically configured to insert the node segment of the Ingress LSR into the Label history stack.
  • the label history stack further includes: a private network label sent by the egress LSR, the private network label is used to identify a VPN to which the target device belongs, and the target device is a destination for receiving the IP packet. device.
  • the destination device that receives the IP packet is a device identified by a destination IP address of the IP packet.
  • the receiving unit 101 is specifically configured to receive a private network label sent by the Egress LSR and a route to the target device, where a next hop of the route to the target device is a loopback of the Egress LSR. address.
  • the generating unit 102 is specifically configured to determine, according to the route to the target device that is received by the receiving unit 101, that the IP packet enters the LSP tunnel.
  • the generating unit 102 is specifically configured to insert the private network label received by the receiving unit 101 into the MPLS label stack, for example, the generating unit 102 inserts the private network label into a stack of the MPLS label stack. a location that is adjacent to the label history identifier and adjacent to the label history identifier.
  • the MPLS label stack includes: a plurality of segments, the private network label, and the label history from the bottom of the stack to the bottom of the stack. And the label history stack, the label history stack including the plurality of segments.
  • the LSR provided by the embodiment corresponding to FIG. 8 can implement all the functions of the Ingress LSR provided by the embodiment corresponding to FIG.
  • the ingress LSR determines, according to the advertisement packet, that the egress LSR has the capability of identifying the label history stack, and the MPLS label stack including the label history stack is pushed into the IP packet sent to the egress LSR. . Because the label history stack does not disappear during the MPLS packet forwarding process, the egress LSR determines the LSR that the MPLS packet passes through according to the label history stack, and then learns the IP packet that enters the LSP tunnel. Forward path.
  • the LSR includes: a receiving unit, a generating unit, and a sending unit.
  • the functions of the corresponding units in the LSR provided by the embodiment corresponding to the embodiment in FIG. 8 are the same, and are not described in detail herein.
  • the receiving unit is configured to receive an internal gateway protocol IGP-based advertisement packet sent by the egress LSR of the LSP tunnel, where the advertisement packet is used to notify the ingress LSR that the egress LSR has an identification label.
  • IGP-based advertisement packet sent by the egress LSR of the LSP tunnel
  • the generating unit is configured to: after the receiving unit receives the advertisement packet, insert an Internet Protocol IP packet that enters the LSP tunnel into an MPLS label stack to generate an MPLS packet, where the MPLS label stack is from the top of the stack.
  • the bottom of the stack includes: a node segment of the Egress LSR, a label history identifier, and a label history stack.
  • the label history identifier is used to identify that the label history stack is included in the MPLS packet, and the label history stack includes the Egress LSR.
  • the node segment and the node segment of the Ingress LSR; the node segment of the Egress LSR and the node segment of the Ingress LSR are used to identify the LSR that the MPLS packet needs to pass in sequence when the LSP tunnel is forwarded.
  • the sending unit is configured to send the MPLS packet generated by the generating unit to the Egress LSR along the LSP tunnel.
  • the LSR provided by this embodiment can implement all the functions of the LSR provided by the embodiment corresponding to FIG. 3.
  • the ingress LSR inserts the label history stack in the MPLS label stack, and the Egress LSR is configured to learn the MPLS according to the node segment of the Ingress LSR in the label history stack.
  • the packet is forwarded through the ingress LSR, and the forwarding path of the IP packet entering the LSP tunnel is obtained.
  • FIG. 9 is an LSR according to an embodiment of the present invention.
  • the LSR is applicable to an MPLS network of an SR.
  • the LSR is an egress LSR of an LSP, and the LSR includes: a generating unit 201, a sending unit 202, and a receiving. Unit 203 and acquisition unit 204.
  • the generating unit 201 is configured to generate an IGP-based advertisement packet, where the advertisement packet is used to notify the ingress LSR that the Egress LSR has an identification label history stack capability.
  • the advertised message is an OSPF Router Information Opaque LSA
  • the OSPF Router Information Opaque LSA includes a Segment History Capability TLV
  • the segment history Capability TLV is used to identify that the Egress LSR has the capability of identifying a tag history stack.
  • the advertisement packet may be a packet including an IS-IS Router Capability TLV
  • the Sub-TLV included in the IS-IS Router Capability TLV is used to identify that the Egress LSR has the capability of identifying a label history stack.
  • the type of the IS-IS Router Capability TLV is 242
  • the Sub-TLV of the IS-IS Router Capability TLV may be a Segment History Capability.
  • the TLV identifies the Egress LSR with the ability to identify the tag history stack by using the Segment History Capability TLV as a sub-TLV.
  • FIG. 2 is a schematic diagram of a format of the Segment History Capability TLV.
  • the Value field of the Segment History Capability TLV identifies that the Egress LSR has the capability of identifying a tag history stack.
  • the sending unit 202 is configured to send the advertisement packet generated by the generating unit 201 to the Ingress LSR of the LSP tunnel.
  • the flooding range of the advertisement packet may be determined by the type of the LSA.
  • the flooding range of the advertisement packet may be link-scoped, area-scoped, or AS-scoped.
  • the receiving unit 203 is configured to receive an MPLS packet sent by the Transit LSR, where the Transit LSR is an LSR that is connected to the egress LSR, and the MPLS label stack of the MPLS packet includes: a label history identifier and a label history stack.
  • the tag history identifier is used to identify that the MPLS packet includes the tag history stack, and the tag history stack includes multiple segments, where the multiple segments are used to identify that the MPLS packet is forwarded in the LSP tunnel.
  • the LSR that needs to pass in sequence.
  • the label history stack may be an SHS in an SR network
  • the label history identifier may be an SHSI in an SR network, but the label history stack and the label history identifier are not limited to the above forms.
  • the obtaining unit 204 is configured to obtain the label history stack from the MPLS label stack of the MPLS packet received by the receiving unit 203.
  • the obtaining unit 204 may strip the MPLS label stack from the MPLS packet according to the label history identifier to obtain the IP packet.
  • the MPLS label stack includes the label history stack, and the Egress LSR may obtain the label history stack from the MPLS label stack.
  • the LSR further includes an allocating unit, where the allocating unit is configured to allocate a private network label to a route to the target device, where the target device is a destination device that receives the IP packet, and the private network label
  • the Egress LSR is a label allocated to the route to the target device, where the private network label is used to indicate the VPN to which the target device belongs, and the next hop of the route to the target device is the Egress LSR. Loopback address.
  • the destination device that receives the IP packet is a destination IP address of the IP packet The device identified by the address.
  • the sending unit 202 is further configured to send the private network label and the route to the target device to the ingress LSR.
  • the LSR further includes a processing unit to process the IP packet.
  • the processing unit is specifically configured to: process the IP packet as follows:
  • the IP packet is forwarded to the target device according to the private network label stripped from the MPLS packet.
  • the LSR provided by the embodiment corresponding to FIG. 9 can implement all the functions of the Egress LSR provided by the embodiment corresponding to FIG. 4 .
  • the egress LSR advertises to the ingress LSR that the egress LSR has the capability of identifying a label history stack, so that the ingress LSR inserts the label history stack in the generated MPLS label stack. And the label history stack does not disappear in the forwarding process of the MPLS packet, and the Egress LSR learns the LSR that is passed when the MPLS packet is forwarded according to the content of the label history stack. Indicates the forwarding path of IP packets.
  • the Transit LSR on the LSP tunnel can read the label history stack in the MPLS label stack from the received MPLS packet when the capability of the tag stack is identified.
  • the Transit LSR can learn the LSR that the MPLS packet is forwarded according to the label history stack.
  • the MPLS packet sent by the Transit LSR to the next hop of the LSP tunnel still includes the label history stack, and the LSR having the capability of identifying the label history stack on the LSP tunnel may be based on the label included in the MPLS packet.
  • the history stack knows the LSR that the MPLS packet is forwarded.
  • Each of the plurality of segments included in the MPLS label stack mentioned in any one of the foregoing embodiments of the present invention is used to indicate an LSR that the MPLS packet needs to pass when forwarding the LSP tunnel, and multiple segments are in the MPLS label.
  • the order of the stack from the top of the stack to the top of the stack is used to indicate the sequence of the LSRs that the MPLS packets need to pass during the LSP tunnel forwarding.
  • Figure 10 shows a label switching router.
  • the label switching router includes a receiving circuit 301, a transmitting circuit 302, a memory 303, and a processor 304.
  • the receiving circuit 301, the transmitting circuit 302, the memory 303, and the processor 304 are connected by a communication bus 305.
  • the label switching router of this embodiment may be the Ingress LSR provided by the embodiment corresponding to FIG. 1 or FIG. 8. Label switching router of this embodiment The method provided by the embodiment corresponding to FIG. 1 can be performed.
  • the memory 303 is configured to store a computer instruction, a label history identifier, and a plurality of segments, where the label history identifier is used to identify that the MPLS packet includes the label history stack, and the plurality of segments are used to identify MPLS packet forwarding.
  • the LSR passed by.
  • the processor 304 reads the plurality of segments and the tag history identifier from the memory 303, and reads the computer instructions from the memory 303, and performs the following operations:
  • the receiving circuit 301 receives the IGP-based advertisement packet sent by the egress LSR of the LSP tunnel, where the advertisement packet is used to notify the ingress LSR that the egress LSR has the capability of identifying the label history stack.
  • the IP packet that enters the LSP tunnel is inserted into the MPLS label stack to generate an MPLS packet.
  • the MPLS label stack includes multiple segments and label history identifiers from the top of the stack to the bottom of the stack. And a label history stack, the label history stack including the plurality of segments;
  • the MPLS packet is sent to the Egress LSR along the LSP tunnel by the sending circuit 302.
  • Figure 11 shows a label switching router.
  • the label switching router includes a receiving circuit 401, a transmitting circuit 402, a memory 403, and a processor 404.
  • the receiving circuit 401, the transmitting circuit 402, the memory 403, and the processor 404 are connected by a communication bus 405.
  • the label switching router of this embodiment may be the Ingress LSR provided by the embodiment corresponding to FIG. 4 or FIG. 9.
  • the label switching router of this embodiment is capable of performing the method provided by the embodiment corresponding to FIG.
  • the memory 403 is used to store computer instructions.
  • the processor 404 reads the computer instructions from the memory 403 and performs the following operations:
  • the advertisement packet being used to notify the ingress LSR that the Egress LSR has the capability of identifying a label history stack;
  • an MPLS packet sent by the connected Transit LSR where the Transit LSR is an LSR between the ingress LSR and the egress LSR on the LSP tunnel, and an MPLS label of the MPLS packet
  • the stack includes: a label history identifier and a label history stack, the label The history identifier is used to identify that the MPLS packet includes the label history stack, and the label history stack includes a plurality of segments, where the plurality of segments are used to identify an LSR that is passed when the MPLS packet is forwarded;
  • the processor 404 also stores the tag history stack to the memory 403.
  • the above general purpose processor may be a microprocessor or the processor or any conventional processor.
  • the steps of the method disclosed in the embodiment of the present invention may be directly implemented as a hardware processor, or may be performed by a combination of hardware and software modules in the processor.
  • the code implementing the above functions may be stored in a computer readable medium.
  • Computer readable media includes computer storage media.
  • a storage medium may be any available media that can be accessed by a computer.
  • the computer readable medium may be a random access memory (English full name is random access memory, abbreviated as RAM), read-only memory (English full name is read only memory, abbreviated as ROM), electricity Erasable programmable read-only memory (English full name electrically programmable programmable read-only memory, English abbreviation for EEPROM), read-only optical disc (English full name compact disc-read only memory, English abbreviation for CD-ROM) or other optical disc storage
  • RAM random access memory
  • read-only memory English full name is read only memory, abbreviated as ROM
  • electricity Erasable programmable read-only memory English full name electrically programmable programmable read-only memory, English abbreviation for EEPROM
  • read-only optical disc English full name compact disc-read only memory, English abbreviation for CD-ROM
  • CD-ROM compact disc-read only memory
  • CD-ROM compact disc-read only memory
  • the computer readable medium may be a compact disc (English full name compact disc, abbreviated as CD), a laser disc, a disc, a digital video disc (English full name digital video disc, abbreviated as DVD), a floppy disk or a Blu-ray disc.

Landscapes

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

Abstract

本发明公开了一种报文处理的方法及标签交换路由器,以解决现有的Egress LSR无法获知IP报文在MPLS网络中转发时所经过的LSR的问题。方法适用于SR的MPLS网络,方法包括:LSP隧道的Ingress LSR接收LSP隧道的Egress LSR发送的基于IGP的通告报文,通告报文用以向Ingress LSR通告Egress LSR具有识别标签历史栈的能力;在接收到通告报文后,对进入LSP隧道的IP报文插入MPLS标签栈,生成MPLS报文,MPLS标签栈自栈顶至栈底包括:多个段segment、标签历史标识和标签历史栈,多个segment用以标识MPLS报文在LSP隧道上转发时需依次经过的LSR,标签历史标识用以标识MPLS报文中包括标签历史栈,标签历史栈包括多个segment;沿着LSP隧道,发送MPLS报文至Egress LSR。

Description

报文处理的方法及标签交换路由器
本申请要求于2014年4月2日提交中国专利局、申请号为CN201410132156.5、发明名称为“报文处理的方法及标签交换路由器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信技术,尤其涉及一种报文处理的方法及路由器。
背景技术
在段路由(英文全称为Segment Routing,英文缩写为SR)技术中,控制平面采用基于链路状态的内部网关协议(英文全称为Interior Gateway Protocol,英文缩写为IGP),如:中间系统到中间系统(英文全称为Intermediate System to Intermediate System,英文缩写为IS-IS)协议、开放最短路径优先(英文全称为Open Shortest Path First,英文缩写为OSPF)协议,来分发标签交换路由器(英文全称为Label Switching Router,英文缩写为LSR)的多协议标签交换(英文全称为Multi Protocol Label Switching,英文缩写为MPLS)标签,数据平面基于该控制平面分发的标签进行MPLS报文转发,相对于现有MPLS技术体系,简化了MPLS网络的运维管理,在SR网络中不需要现有的标签通告协议,如:标签分发协议(英文全称为Label Distribution Protocol,英文缩写为LDP)或基于流量工程的资源预留协议(英文全称为Resource Reservation Protocol-Traffic Engineering,英文缩写为RSVP-TE)或边界网关协议(英文全称为Border Gateway Protocol,英文缩写为BGP)。
在SR的MPLS网络中,标签交换路径(英文全称为Label Switched Path,英文缩写为LSP)隧道的入口(英文名称为Ingress)LSR对进入LSP隧道的互联网协议(英文全称为Internet Protocol,英文缩写为IP)报文插入MPLS标签栈,生成MPLS报文。所述MPLS标签栈包括一个或多个LSR的段(英文名称为segment),所述LSR的段可以为所述LSR的节点段(英文名称为 node segment),也可以为所述LSR的邻居段(英文名称为adjacency segment)。所述MPLS报文经所述LSP隧道转发至LSP隧道的出口(英文名称为Egress)LSR的过程中,所述MPLS标签栈会被弹出,使得所述Egress LSR通过所述LSP隧道获取的报文为IP报文。
现有的SR的MPLS网络中,Egress LSR无法获知所述IP报文在MPLS网络中转发时所经过的LSR,不利于网络管理员对网络进行维护和管理。
发明内容
有鉴于此,本发明实施例提供一种报文处理的方法及标签交换路由器,以解决现有的Egress LSR无法获知所述IP报文在MPLS网络中转发时所经过的LSR的问题。
本发明实施例提供的技术方案如下。
第一方面,提供了一种报文处理方法,所述方法适用于SR的MPLS网络,所述方法包括:
LSP隧道的Ingress LSR接收LSP隧道的Egress LSR发送的基于IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈的能力;
在接收到所述通告报文后,对进入所述LSP隧道的IP报文插入MPLS标签栈,生成MPLS报文,所述MPLS标签栈自栈顶至栈底包括:多个segment、标签历史标识和标签历史栈,所述多个segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR,所述标签历史标识用以标识所述MPLS报文中包括所述标签历史栈,所述标签历史栈包括所述多个segment;
沿着所述LSP隧道,发送所述MPLS报文至所述Egress LSR。
在上述第一方面的第一种可能的实现方式中,所述标签历史栈还包括:所述Ingress LSR的node segment。
结合上述第一方面或第一方面的第一种可能的实现方式,还提供了第一方面的第二种可能实现的方式,所述标签历史栈还包括:所述Egress LSR发 送的私网标签,所述私网标签用以标识目标设备所属的虚拟专用网(英文全称为virtual private network,英文缩写为VPN),所述目标设备为接收所述IP报文的目的地设备。
第二方面,提供了一种报文处理的方法,所述方法适用于SR的MPLS网络,所述方法包括:
LSP隧道的Ingress LSR接收LSP隧道的Egress LSR发送的基于IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈的能力;
在接收到所述通告报文后,对进入所述LSP隧道的IP报文插入MPLS标签栈,生成MPLS报文,所述MPLS标签栈自栈顶至栈底包括:Egress LSR的node segment、标签历史标识和标签历史栈,所述标签历史标识用以标识所述MPLS报文中包括所述标签历史栈,所述标签历史栈包括所述Egress LSR的node segment和所述Ingress LSR的node segment,所述Egress LSR的node segment和所述Ingress LSR的node segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR;
沿着所述LSP隧道,发送所述MPLS报文至所述Egress LSR。
第三方面,提供了一种报文处理的方法,所述方法适用于SR的MPLS网络,所述方法包括:
LSP隧道的Egress LSR生成基于IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈能力;
发送所述通告报文至所述LSP隧道的Ingress LSR;
接收中间标签交换路由器(英文名称Transit LSR)发送的MPLS报文,所述Transit LSR为所述LSP隧道上连接所述Egress LSR的LSR,所述MPLS报文的MPLS标签栈包括:标签历史标识和标签历史栈,所述标签历史标识用以标识所述MPLS报文中包括所述标签历史栈,所述标签历史栈包括多个segment,所述多个segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR;
从所述MPLS报文的所述MPLS标签栈中获取所述标签历史栈。
在上述第三方面的第一种可能的实现方式中,所述通告报文为OSPF路由器信息不透明链路状态通告(英文名称为Router Information Opaque LSA),所述OSPF Router Information Opaque LSA包括段历史类型长度值(英文名称为Segment History Capability TLV),利用所述Segment History Capability TLV标识所述Egress LSR具有识别标签历史栈的能力。
在上述第三方面的第二种可能的实现方式中,所述通告报文为包括中间系统到中间系统路由能力类型长度值(英文名称为IS-IS Router Capability TLV)的报文,利用所述IS-IS Router Capability TLV包括的子类型长度值(英文名称为Sub-TLV)标识所述Egress LSR具有识别标签历史栈的能力。
结合上述第三方面或第三方面的任意一种可能的实现方式,还提供了第三方面的第三种可能的实现方式,所述标签历史栈还包括:所述Ingress LSR的node segment。
第四方面,提供了一种标签交换路由器LSR,所述LSR适用于SR的MPLS网络,所述LSR为LSP隧道的Ingress LSR,所述LSR包括:
接收单元,用于接收所述LSP隧道的Egress LSR发送的基于IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈的能力;
生成单元,用于在所述接收单元接收到所述通告报文后,对进入所述LSP隧道的IP报文插入MPLS标签栈,生成MPLS报文,所述MPLS标签栈自栈顶至栈底包括:多个segment、标签历史标识和标签历史栈,所述多个segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR,所述标签历史标识用以标识所述MPLS报文中包括所述标签历史栈,所述标签历史栈包括所述多个segment;
发送单元,用于沿着所述LSP隧道,发送所述生成单元生成的所述MPLS报文至所述Egress LSR。
在上述第四方面的第一种可能的实现方式中,所述标签历史栈还包括: 所述Ingress LSR的node segment。
结合上述第四方面或第四方面的第一种可能的实现方式,还提供了第四方面的第二种可能的实现方式,所述标签历史栈还包括:所述Egress LSR发送的私网标签,所述私网标签用以标识目标设备所属的VPN,所述目标设备为接收所述IP报文的目的地设备。
第五方面,提供了一种标签交换路由器LSR,所述LSR适用于SR的MPLS网络,所述LSR为LSP隧道的Ingress LSR,所述LSR包括:
接收单元,用于接收所述LSP隧道的Egress LSR发送的基于IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈的能力;
生成单元,用于在所述接收单元接收到所述通告报文后,对进入所述LSP隧道的IP报文插入MPLS标签栈,生成MPLS报文,所述MPLS标签栈自栈顶至栈底包括:Egress LSR的node segment、标签历史标识和标签历史栈,所述标签历史标识用以标识所述MPLS报文中包括所述标签历史栈,所述标签历史栈包括所述Egress LSR的node segment和所述Ingress LSR的node segment;所述Egress LSR的node segment和所述Ingress LSR的node segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR;
发送单元,用于沿着所述LSP隧道,发送所述生成单元生成的所述MPLS报文至所述Egress LSR。
第六方面,提供了一种标签交换路由器LSR,所述LSR适用于SR的MPLS网络,所述LSR为LSP隧道的Egress LSR,所述LSR包括:
生成单元,用于生成基于IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈能力;
发送单元,用于发送所述生成单元生成的所述通告报文至所述LSP隧道的Ingress LSR;
接收单元,用于接收Transit LSR发送的MPLS报文,所述Transit LSR为所述LSP隧道上连接所述Egress LSR的LSR,所述MPLS报文的MPLS标 签栈包括:标签历史标识和标签历史栈,所述标签历史标识用以标识所述MPLS报文中包括所述标签历史栈,所述标签历史栈包括多个segment,所述多个segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR;
获取单元,用于从所述接收单元接收的所述MPLS报文的所述MPLS标签栈中获取所述标签历史栈。
在上述第六方面的第一种可能的实现方式中,所述通告报文为OSPF Router Information Opaque LSA,所述OSPF Router Information Opaque LSA包括Segment History Capability TLV,利用所述Segment History Capability TLV标识所述Egress LSR具有识别标签历史栈的能力。
在上述第六方面的第二种可能的实现方式中,所述通告报文为包括IS-IS Router Capability TLV的报文,利用所述IS-IS Router Capability TLV包括的Sub-TLV标识所述Egress LSR具有识别标签历史栈的能力。
通过上述方案,所述Ingress LSR根据通告报文确定所述Egress LSR具有识别标签历史栈的能力,则在发送至所述Egress LSR的IP报文中压入包含标签历史栈的MPLS标签栈,生成MPLS报文。所述Egress LSR根据接收到的所述MPLS报文中MPLS标签栈携带的标签历史标识,从所述MPLS标签栈中获取所述标签历史栈。由于所述标签历史栈在MPLS报文转发过程中不会消失,所述Egress LSR可以根据所述标签历史栈获知所述IP报文在SR的MPLS网络中转发时所经过的LSR,有利于网络管理员对网络进行维护和管理。
附图说明
为了更清楚地说明本发明的技术方案,下面将对实施方式中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以如这些附图获得其他的附图。
图1为本发明实施例提供的一种报文处理的方法流程图。
图2为Segment History Capability TLV的一种格式示意图。
图3为本发明实施例提供的一种报文处理的方法流程图。
图4为本发明实施例提供的一种报文处理的方法流程图。
图5为本发明实施例提供的报文处理的方法的一种实现方式示意图。
图6为本发明实施例提供的报文处理的方法的一种实现方式示意图。
图7为本发明实施例提供的报文处理的方法的一种实现方式示意图。
图8为本发明实施例提供的一种LSR的结构示意图。
图9为本发明实施例提供的一种LSR的结构示意图。
图10为本发明实施例提供的一种LSR的结构示意图。
图11为本发明实施例提供的一种LSR的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
图1对应的实施例是从Ingress LSR的角度对本发明实施例提供的报文处理方法进行说明。如图1所示,本发明实施例提供的一种报文处理的方法,所述方法适用于SR的MPLS网络,所述方法包括:
S10,LSP隧道的Ingress LSR接收LSP隧道的Egress LSR发送的基于IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈的能力。
举例来说,所述通告报文为OSPF Router Information Opaque LSA,所述OSPF Router Information Opaque LSA包括Segment History Capability TLV,利用所述Segment History Capability TLV标识所述Egress LSR具有识别标签历史 栈的能力。所述OSPF Router Information Opaque LSA格式请参见互联网工程任务组(英文全称为Internet Engineering Task Force,英文缩写为IETF)发布的RFC4970。
举例来说,所述通告报文泛洪范围可由LSA的类型(英文名称为type)来确定,例如:所述通告报文的泛洪范围可以是链路范围(英文名称为link-scoped)、区域范围(英文名称为area-scoped)或自治系统范围(英文名称为AS-scoped)。
举例来说,所述通告报文还可为包括IS-IS Router Capability TLV的报文,利用所述IS-IS Router Capability TLV包括的Sub-TLV标识所述Egress LSR具有识别标签历史栈的能力。具体地,所述IS-IS Router Capability TLV的type为242,所述IS-IS Router Capability TLV的Sub-TLV可以为Segment History Capability TLV,利用作为sub-TLV的Segment History Capability TLV标识所述Egress LSR具有识别标签历史栈的能力。
参见图2,图2为所述Segment History Capability TLV的一种格式示意图,通过所述Segment History Capability TLV的Value字段标识所述Egress LSR具有识别标签历史栈的能力。其中,Type字段,用于标识包括所述Type的TLV是用以标识所述Egress LSR具有识别标签历史栈能力,所述Type的值由互联网数字分配机构(The Internet Assigned Numbers Authority,IANA)分配。Value字段,用于携带标识所述Egress LSR具有识别标签历史栈能力的数据,例如:当所述Value字段取值为1时,表明所述Egress LSR具有识别标签历史栈的能力,当所述Value字段取值为0时,表明所述Egress LSR不具有识别标签历史栈的能力。
举例来说,所述Egress LSR具有识别标签历史栈的能力为所述Egress LSR能够根据MPLS标签栈包括的标签历史标识确定所述MPLS标签携带了标签历史栈,以利用所述MPLS标签栈中的标签历史栈确定IP报文在SR的MPLS网络中转发时经过的LSR,进而利用所述标签历史栈进行网络的维护和管理,例如:利用所述标签历史栈确定所述IP报文转发时经过的LSR,进而确定所述IP报文的转发路径,由此,可对所述IP报文的转发路径上的丢包等性能进行测量,有 利于网络管理员对网络进行维护和管理。
S11,所述Ingress LSR在接收到所述通告报文后,对进入所述LSP隧道的IP报文插入MPLS标签栈,生成MPLS报文,所述MPLS标签栈自栈顶至栈底包括:多个segment、标签历史标识和所述标签历史栈,所述多个segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR,所述标签历史标识用以标识所述MPLS报文中包括所述标签历史栈,所述标签历史栈包括所述多个segment。
举例来说,所述标签历史栈是IP报文在SR的MPLS网络中转发时经过的LSR的segment的集合,所述IP报文在SR的MPLS网络中转发时经过的LSR的segment的集合为所述Ingress LSR插入所述IP报文中并指示所述IP报文转发的标签栈。
举例来说,所述标签历史栈可以为SR网络中的段表历史栈(英文全称为Segment List History Stack,英文缩写为SHS),所述标签历史标识可以为SR网络中的段表历史栈标识(英文全称为Segment List History Stack Indicator,英文缩写为SHSI),但所述标签历史栈和所述标签历史标识并不局限于上述形式。
举例来说,所述多个segment为Egress LSR的node segment和所述LSP隧道上一个Transit LSR的node segment,或者所述多个segment为Egress LSR的node segment和所述LSP隧道上多个Transit LSR的node segment,或者所述多个segment为Egress LSR的node segment和所述LSP隧道上多个Transit LSR的adjacency segment,或者所述多个segment为Ingress LSR的node segment和所述LSP隧道上所有Transit LSR的adjacency segment。其中,LSP隧道上的LSR被分配有一个node segment,所述node segment在SR的MPLS网络中唯一地标识所述LSR。LSP隧道上的每个LSR可以拥有一个或多个adjacency segment,所述adjacency segment在所述LSR上唯一地标识与所述LSR相邻的LSR之间的一条链路。所述多个segment的具体内容并不局限于上述四种,凡是可用以确定所述MPLS报文转发时经过的LSR的node segment和/或adjacency segment,均属于本发明提及的多个segment。其中,所述多个segment中segment的先后顺序可 根据所述MPLS报文转发时所经过的LSR的先后顺序来确定。
举例来说,所述标签历史标识可以是由IANA确定的一个MPLS保留标签(英文名称为Reserved Label)。在所述MPLS标签栈中,所述标签历史标识还可以用以标识所述标签历史栈的起始位置,便于所述Egress LSR识别所述标签历史栈。
举例来说,所述所述Ingress LSR可在接收到所述通告报文后,将MPLS标签栈中所述标签历史栈的底层标签的S标志位置位,使得所述标签历史栈的底层标签成为所述MPLS标签栈的栈底。
所述Ingress LSR在所述MPLS标签栈中插入所述标签历史栈,有助于所述Egress LSR根据所述标签历史栈,获知所述MPLS报文转发时经过的LSR,进而获知进入所述LSP隧道的所述IP报文的转发路径。
S12,所述Ingress LSR沿着所述LSP隧道,发送所述MPLS报文至所述Egress LSR。
举例来说,所述Ingress LSR可将所述MPLS报文发送至所述LSP隧道的Transit LSR,通过所述Transit LSR转发所述MPLS报文至所述Egress LSR。
可选地,上所述报文处理的方法还包括:所述Ingress LSR将所述Ingress LSR的node segment插入所述标签历史栈。举例来说,所述Ingress LSR可将所述Ingress LSR的node segment插入所述标签历史标识之后且与所述标签历史标识相邻,使得所述Egress LSR根据所述标签历史栈中所述Ingress LSR的node segment的位置,获知所述MPLS报文转发时经过的LSR的先后顺序。
可选地,所述报文处理的方法还包括:所述Ingress LSR将来自所述Egress LSR的私网标签插入所述MPLS报文的所述标签历史栈,所述私网标签用以指示目标设备所属的VPN,所述目标设备为接收所述IP报文的目的地设备。其中,所述接收所述IP报文的目的地设备为所述IP报文的目的IP地址所标识的设备。
举例来说,所述Ingress LSR将所述私网标签插入所述标签历史栈之前,所述Ingress LSR可将所述私网标签插入所述MPLS标签栈的栈顶至所述标签历史标识间且与所述标签历史标识相邻的位置,此时,所述MPLS标签栈从栈 底至栈底包括:多个segment、所述私网标签、所述标签历史标识和所述标签历史栈,所述标签历史栈包括所述多个segment。所述Ingress LSR将所述私网标签插入所述标签历史栈后,所述MPLS标签栈从栈底至栈底包括:多个segment、所述私网标签、所述标签历史标识和所述标签历史栈,所述标签历史栈从栈顶至栈底包括所述多个segment和所述私网标签。
举例来说,所述Ingress LSR可通过边界网关协议(英文全称为Border Gateway Protocol,英文缩写为BGP)多协议扩展(英文全称为Multiprotocol Extensions for BGP,英文缩写为MP-BGP),接收来自所述Egress LSR的私网标签和所述到目标设备的路由。所述私网标签可以是所述Egress LSR为到目标设备的路由分配的标签,所述到目标设备的路由的下一跳是所述Egress LSR的环回地址。所述Egress LSR可从所述目标设备连接的用户边缘设备(英文全称为customer edge,英文缩写为CE)获取所述到目标设备的路由。
在上述技术方案中,所述Ingress LSR根据通告报文确定所述Egress LSR具有识别标签历史栈的能力,则在发送到Egress LSR的IP报文中压入包含所述标签历史栈的MPLS标签栈。由于所述标签历史栈在MPLS报文转发过程中不会消失,有助于所述Egress LSR根据所述标签历史栈确定MPLS报文转发时经过的LSR,进而获知进入LSP隧道的IP报文的转发路径。
图3对应的实施例是从Ingress LSR的角度对本发明实施例提供的报文处理方法进行说明。如图3所示,本发明实施例提供的一种报文处理的方法,所述方法适用于SR的MPLS网络,所述方法包括:
S20,LSP隧道的Ingress LSR接收LSP隧道的Egress LSR发送的基于IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈的能力。
图3对应的实施例提供的方法包括的S20与图1对应的实施例提供的方法包括的S10相同,在此不再赘述。
S21,所述Ingress LSR在接收到所述通告报文后,对进入所述LSP隧道的IP报文插入MPLS标签栈,生成MPLS报文,所述MPLS标签栈自栈顶至栈底包 括:Egress LSR的node segment、标签历史标识和标签历史栈,所述标签历史标识用以标识所述MPLS报文中包括所述标签历史栈,所述标签历史栈包括所述Egress LSR的node segment和所述Ingress LSR的node segment;所述Egress LSR的node segment和所述Ingress LSR的node segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR。
举例来说,所述标签历史栈可以为SR网络中的SHS,所述标签历史标识可以为SR网络中的SHSI,但所述标签历史栈和所述标签历史标识并不局限于上述形式。
举例来说,所述标签历史标识可以是由IANA确定的一个MPLS Reserved Label。在所述MPLS标签栈中,所述标签历史标识还可以用以标识所述标签历史栈的起始位置,便于所述Egress LSR识别所述标签历史栈。
举例来说,所述所述Ingress LSR可在接收到所述通告报文后,将MPLS标签栈中所述标签历史栈的底层标签的S标志位置位,使得所述标签历史栈的底层标签成为所述MPLS标签栈的栈底。
S22,所述Ingress LSR沿着所述LSP隧道,发送所述MPLS报文至所述Egress LSR。
图3对应的实施例提供的方法包括的S22与图1对应的实施例提供的方法包括的S12相同,在此不再赘述。
可选地,所述报文处理的方法还包括:所述Ingress LSR将来自所述Egress LSR的私网标签插入所述MPLS报文的所述标签历史栈,所述私网标签用以指示目标设备所属的VPN,所述目标设备为接收所述IP报文的目的地设备。其中,所述接收所述IP报文的目的地设备为所述IP报文的目的IP地址所标识的设备。
举例来说,所述Ingress LSR将所述私网标签插入所述标签历史栈之前,所述Ingress LSR可将所述私网标签插入所述MPLS标签栈的栈顶至所述标签历史标识间且与所述标签历史标识相邻的位置,此时,所述MPLS标签栈从栈底至栈底包括:所述Egress LSR的node segment、所述私网标签、所述标签历史标识和所述标签历史栈,所述标签历史栈包括所述Egress LSR的node  segment和所述Ingress LSR的node segment。所述Ingress LSR将所述私网标签插入所述标签历史栈后,所述标签历史栈从栈顶至栈底包括所述Egress LSR的node segment、所述Ingress LSR的node segment和所述私网标签。
举例来说,所述Ingress LSR可通过MP-BGP,接收来自所述Egress LSR的私网标签和所述到目标设备的路由。所述私网标签可以是所述Egress LSR为到目标设备的路由分配的标签,所述到目标设备的路由的下一跳是所述Egress LSR的环回地址。所述Egress LSR可从所述目标设备连接的CE获取所述到目标设备的路由。
在上述技术方案中,所述Ingress LSR在所述MPLS标签栈中插入所述标签历史栈,有助于所述Egress LSR根据所述标签历史栈中所述Ingress LSR的node segment,获知所述MPLS报文转发时经过所述Ingress LSR,进而获知进入所述LSP隧道的所述IP报文的转发路径。
图4对应的实施例是从Egress LSR的角度对本发明实施例提供的报文处理方法进行说明。如图4所示,本发明实施例提供的一种报文处理的方法,所述方法适用于SR网络,所述方法包括:
S30,LSP隧道的Egress LSR生成基于IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈的能力。
举例来说,所述通告报文为OSPF Router Information Opaque LSA,所述OSPF Router Information Opaque LSA包括Segment History Capability TLV,利用所述Segment History Capability TLV标识所述Egress LSR具有识别标签历史栈的能力。
举例来说,所述通告报文还可为包括IS-IS Router Capability TLV的报文,利用所述IS-IS Router Capability TLV包括的Sub-TLV标识所述Egress LSR具有识别标签历史栈的能力。具体地,所述IS-IS Router Capability TLV的type为242,所述IS-IS Router Capability TLV的Sub-TLV可以为Segment History Capability TLV,利用作为sub-TLV的Segment History Capability TLV标识所述Egress LSR具有识别标签历史栈的能力。
参见图2,图2为所述Segment History Capability TLV的一种格式示意图,通过所述Segment History Capability TLV的Value字段标识所述Egress LSR具有识别标签历史栈的能力。
举例来说,所述Egress LSR具有识别标签历史栈的能力为所述Egress LSR能够根据MPLS标签栈包括的标签历史标识确定所述MPLS标签携带了标签历史栈,以利用所述MPLS标签栈中的标签历史栈确定IP报文在SR的MPLS网络中转发时经过的LSR,进而利用所述标签历史栈进行网络的维护和管理,例如:利用所述标签历史栈确定所述IP报文转发时经过的LSR,进而确定所述IP报文的转发路径,由此,可对所述IP报文的转发路径上的丢包等性能进行测量,有利于网络管理员对网络进行维护和管理。
S31,所述Egress LSR发送所述通告报文至所述LSP隧道的Ingress LSR。
举例来说,所述通告报文泛洪范围可由LSA的type来确定,例如:所述通告报文的泛洪范围可以是link-scoped、area-scoped或AS-scoped。
S32,所述Egress LSR接收Transit LSR发送的MPLS报文,所述Transit LSR为所述LSP隧道上连接所述Egress LSR的LSR,所述MPLS报文的MPLS标签栈包括:标签历史标识和标签历史栈,所述标签历史标识用以标识所述MPLS报文包括所述标签历史栈,所述标签历史栈包括多个segment,所述多个segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR。
举例来说,所述MPLS报文经所述Transit LSR转发后,所述MPLS标签栈的栈顶至所述标签历史标识间的多个segment在所述MPLS报文转发过程中被弹出,所述标签历史栈中包括的多个segment被保留下来。
S33,所述Egress LSR从所述MPLS报文的所述MPLS标签栈中获取所述标签历史栈。
举例来说,所述Egress LSR可根据所述标签历史标识,从所述MPLS报文中剥离所述MPLS标签栈,获得所述IP报文。所述MPLS标签栈包括所述标签历史栈,所述Egress LSR可从所述MPLS标签栈中获取所述标签历史栈。
可选地,S32之前,所述报文处理的方法还包括:所述Egress LSR为到目 标设备的路由分配私网标签,发送所述私网标签和所述到目标设备的路由至所述Ingress LSR,所述目标设备为接收所述IP报文的目的地设备,所述私网标签是所述Egress LSR为所述到目标设备的路由分配的标签,所述私网标签用以指示所述目标设备所属的VPN,所述到目标设备的路由的下一跳是所述Egress LSR的环回地址。举例来说,所述Egress LSR可从所述目标设备连接的CE获取所述到目标设备的路由。所述接收所述IP报文的目的地设备为所述IP报文的目的IP地址所标识的设备。
可选地,S33之后,所述报文处理的方法还包括:所述Egress LSR对所述IP报文进行处理。
举例来说,所述Egress LSR对所述第IP报文进行处理具体包括:
当所述MPLS报文还包括所述私网标签,所述Egress LSR根据从所述MPLS报文中剥离的所述私网标签,转发所述IP报文至所述目标设备。
在上述技术方案中,所述Egress LSR向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈的能力,使得所述Ingress LSR在生成的MPLS标签栈中插入所述标签历史栈。由于所述标签历史栈在所述MPLS报文的转发过程中不会消失,有助于所述Egress LSR根据所述标签历史栈的内容获知所述MPLS报文转发时经过的LSR,进而获知进入LSP隧道的所述IP报文的转发路径。
为更加清楚描述上述报文处理过程,现举例描述,如图5所示,Ingress LSR、Transit LSR 1、Transit LSR 2、Transit LSR 3和Egress LSR位于SR的MPLS网络中,所述Ingress LSR到所述Egress LSR之间存在一条LSP隧道,所述LSP隧道经过所述Transit LSR 1、所述Transit LSR 2和所述Transit LSR 3。所述Transit LSR 3、所述Transit LSR 2、所述Transit LSR 1、所述Ingress LSR和所述Egress LSR可获知所述Egress LSR的node segment为65,还可获知所述Transit LSR 2的node segment为66,所述node segment属于全局性标签。所述Egress LSR向所述SR网络洪泛所述通告报文,用于使得所述Ingress LSR获知所述Egress LSR具有识别标签历史栈的能力。所述标签历史标识可以是由IANA确定的一个MPLS Reserved Label,例如:属于所述MPLS Reserved Label的10可作为所 述标签历史标识。
所述Ingress LSR可获知所述LSP隧道经过的LSR,在接收到进入所述LSP隧道的所述IP报文时,确定所述Egress LSR具有识别标签历史栈的能力后,对所述IP报文插入所述MPLS标签栈生成第一MPLS报文。所述Ingress LSR发送所述第一MPLS报文至所述Transit LSR 1。如图5所示,所述第一MPLS报文中的MPLS标签栈自栈顶到栈底包括:66、65、10、66、65,其中,10至栈底的多个segment为标签历史栈。所述Transit LSR 1接收到所述第一MPLS报文后,确定下一跳是所述Transit LSR 2,进行所述Transit LSR 2的node segment的标签交换(英文名称为swap)操作。所述Transit LSR 1发送所述第一MPLS报文至所述Transit LSR 2。所述Transit LSR 2确定下一跳为所述Transit LSR 3,进行所述Transit LSR 2的node segment的标签弹出(英文名称为pop)操作,获得第二MPLS报文。所述第二MPLS报文中的MPLS标签栈自栈顶到栈底包括:65、10、66、65。所述Transit LSR 2发送所述第二MPLS报文至所述Transit LSR 3。所述Transit LSR 3确定下一跳为所述Egress LSR,弹出所述第二MPLS报文中栈顶的65,生成第三MPLS报文。所述Transit LSR 3发送所述第三MPLS报文至所述Egress LSR。所述第三MPLS报文中的MPLS标签栈自栈顶到栈底包括:10、66、65。所述Egress LSR根据10,从所述第三MPLS报文中剥离所述标签历史栈,获得所述IP报文。所述Egress LSR根据所述剥离的标签历史栈,确定所述MPLS报文的转发路径,进而获知所述IP报文经过所述Transit LSR 2。
为更加清楚描述上述报文处理过程,现举例描述,如图6所示,Ingress LSR、Transit LSR 1、Transit LSR 2和Egress LSR位于SR的MPLS网络中,所述Ingress LSR到所述Egress LSR之间存在一条LSP隧道,所述LSP隧道经过所述Transit LSR 1和所述Transit LSR 2。所述Ingress LSR可获知所述LSP隧道上所有Transit LSR的adjacency segment和所述Egress LSR的node segment。例如:所述Transit LSR 1的adjacency segment为9001,9001用以标识所述Transit LSR1和所述Transit LSR 2之间的链路。所述Egress LSR的node segment是65。Transit LSR 1、Transit LSR 2和Egress LSR可获知9001在SR的MPLS网络中所标识的链 路,Transit LSR 1、Transit LSR 2和Egress LSR可获知65在SR的MPLS网络中所标识的LSR。所述Egress LSR向所述SR网络洪泛所述通告报文,用于使得所述Ingress LSR获知所述Egress LSR具有识别标签历史栈的能力。所述标签历史标识可以是由IANA确定的一个MPLS Reserved Label,例如:属于所述MPLS Reserved Label的10可作为所述标签历史标识。
所述Ingress LSR可获知所述LSP隧道经过的LSR,在接收到进入所述LSP隧道的所述IP报文时,确定所述Egress LSR具有识别标签历史栈的能力后,对所述IP报文插入所述MPLS标签栈生成第一MPLS报文。如图6所示,所述第一MPLS报文中的MPLS标签栈自栈顶到栈底包括:9001、65、10、9001、65。所述Ingress LSR发送所述第一MPLS报文至所述Transit LSR 1。所述Transit LSR 1弹出所述第一MPLS报文的MPLS标签栈中的9001,获得第二MPLS报文,沿9001标识的链路,发送所述第二MPLS报文至所述Transit LSR 2。所述第二MPLS报文的MPLS标签栈自栈顶至栈底包括:65、10、9001、65。所述Transit LSR 2弹出所述第二MPLS报文的MPLS标签栈中的65,获得第三MPLS报文。所述Transit LSR 2发送所述第三MPLS报文至所述Egress LSR。所述第三MPLS报文的MPLS标签栈自栈顶至栈底包括:10、9001、65。所述Egress LSR根据根据10,从所述第三MPLS报文中剥离所述标签历史栈,获得所述IP报文。所述Egress LSR能够根据所述标签历史栈中的9001确定MPLS报文经过的LSR,进而获知IP报文的转发路径。
为更加清楚描述上述报文处理过程,现举例描述,如图7所示,Ingress LSR、和Egress LSR位于SR的MPLS网络中,所述Ingress LSR到所述Egress LSR之间存在一条LSP隧道。所述Ingress LSR和所述Egress LSR均可获知所述Egress LSR的node segment和所述Ingress LSR的node segment。例如:所述Egress LSR的node segment是65,所述Ingress LSR的node segment是66。所述Egress LSR向所述SR网络洪泛所述通告报文,用于使得所述Ingress LSR获知所述Egress LSR具有识别标签历史栈的能力。所述标签历史标识可以是由IANA确定的一个MPLS Reserved Label,例如:属于所述MPLS Reserved Label 的10可作为所述标签历史标识。
所述Ingress LSR可获知所述LSP隧道经过的LSR,在接收到进入所述LSP隧道的所述IP报文时,确定所述Egress LSR具有识别标签历史栈的能力后,对所述IP报文插入所述MPLS标签栈生成第一MPLS报文。如图7所示,所述第一MPLS报文中的MPLS标签栈自栈顶到栈底包括:65、10、66、65。所述Ingress LSR发送所述MPLS报文至所述Egress LSR。所述Egress LSR接收到的所述MPLS报文的MPLS标签栈自栈顶至栈底包括:10、66、65。所述Egress LSR根据根据10,从所述MPLS报文中剥离所述标签历史栈,获得所述IP报文。所述Egress LSR能够根据所述标签历史栈中的66确定MPLS报文经过所述Ingress LSR。
参见图8,图8为本发明实施例提供的一种LSR,该LSR适用于SR的MPLS网络,所述LSR为LSP隧道的Ingress LSR,所述LSR包括:接收单元101、生成单元102和发送单元103。
接收单元101用于接收所述LSP隧道的Egress LSR发送的IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈的能力。
举例来说,所述通告报文为OSPF Router Information Opaque LSA,所述OSPF Router Information Opaque LSA包括Segment History Capability TLV,利用所述Segment History Capability TLV标识所述Egress LSR具有识别标签历史栈的能力。
举例来说,所述通告报文还可为包括IS-IS Router Capability TLV的报文,利用所述IS-IS Router Capability TLV包括的Sub-TLV标识所述Egress LSR具有识别标签历史栈的能力。具体地,所述IS-IS Router Capability TLV的type为242,所述IS-IS Router Capability TLV的Sub-TLV可以为Segment History Capability TLV,利用作为sub-TLV的Segment History Capability TLV标识所述Egress LSR具有识别标签历史栈的能力。
参见图2,图2为所述Segment History Capability TLV的一种格式示意图, 通过所述Segment History Capability TLV的Value字段标识所述Egress LSR具有识别标签历史栈的能力。
举例来说,所述Egress LSR具有识别标签历史栈的能力为所述Egress LSR能够根据MPLS标签栈包括的标签历史标识确定所述MPLS标签携带了标签历史栈,以利用所述MPLS标签栈中的标签历史栈确定IP报文在SR的MPLS网络中转发时经过的LSR,进而利用所述标签历史栈进行网络的维护和管理,例如:利用所述标签历史栈确定所述IP报文转发时经过的LSR,进而确定所述IP报文的转发路径,由此,可对所述IP报文的转发路径上的丢包等性能进行测量,有利于网络管理员对网络进行维护和管理。
生成单元102用于根据所述接收单元101接收的所述通告报文,对进入所述LSP隧道的IP报文插入MPLS标签栈,生成MPLS报文。其中,所述MPLS标签栈自栈顶至栈底包括:多个segment、标签历史标识和标签历史栈,所述多个segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR,所述标签历史标识用以标识所述MPLS报文包括所述标签历史栈,所述标签历史栈包括所述多个segment。
举例来说,所述标签历史栈是IP报文在SR的MPLS网络中转发时经过的LSR的segment的集合,所述IP报文在SR的MPLS网络中转发时经过的LSR的segment的集合为所述Ingress LSR插入所述IP报文中并指示所述IP报文转发的标签栈。
举例来说,所述标签历史栈可以为SR网络中的SHS,所述标签历史标识可以为SR网络中的SHSI,但所述标签历史栈和所述标签历史标识并不局限于上述形式。在所述MPLS标签栈中,所述标签历史标识还可以用以标识所述标签历史栈的起始位置,便于所述Egress LSR识别所述标签历史栈。
发送单元103用于沿着所述LSP隧道,发送所述生成单元102生成的所述MPLS报文至所述Egress LSR。
可选地,所述标签历史栈还包括:所述Ingress LSR的node segment。举例来说,所述生成单元102具体用于将所述Ingress LSR的node segment插入所述 标签历史栈。
可选地,所述标签历史栈还包括:所述Egress LSR发送的私网标签,所述私网标签用以标识目标设备所属的VPN,所述目标设备为接收所述IP报文的目的地设备。所述接收所述IP报文的目的地设备为所述IP报文的目的IP地址所标识的设备。
举例来说,所述接收单元101具体用于接收所述Egress LSR发送的私网标签和到所述目标设备的路由,到所述目标设备的路由的下一跳为所述Egress LSR的环回地址。所述生成单元102具体用于根据所述接收单元101接收的到所述目标设备的路由,确定所述IP报文进入所述LSP隧道。所述生成单元102具体用于将所述接收单元101接收的所述私网标签插入所述MPLS标签栈中,例如:所述生成单元102将所述私网标签插入所述MPLS标签栈的栈顶至所述标签历史标识间且与所述标签历史标识相邻的位置,此时,所述MPLS标签栈从栈底至栈底包括:多个segment、所述私网标签、所述标签历史标识和所述标签历史栈,所述标签历史栈包括所述多个segment。
图8对应的实施例提供的LSR能够实现图1对应的实施例提供的Ingress LSR的所有功能。
在上述技术方案中,所述Ingress LSR根据通告报文确定所述Egress LSR具有识别标签历史栈的能力,则在发送到Egress LSR的IP报文中压入包含所述标签历史栈的MPLS标签栈。由于所述标签历史栈在MPLS报文转发过程中不会消失,有助于所述Egress LSR根据所述标签历史栈确定MPLS报文转发时经过的LSR,进而获知进入LSP隧道的IP报文的转发路径。
在本发明提供的另一个作为Ingress LSR的LSR的实施例中,所述LSR包括:接收单元、生成单元和发送单元。其中,所述接收单元和所述发送单元与图8对应的实施例提供的LSR中相应单元的功能相同,在此不再详细说明。
所述接收单元用于接收所述LSP隧道的出口标签交换路由器Egress LSR发送的基于内部网关协议IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈的能力。
所述生成单元用于在所述接收单元接收到所述通告报文后,对进入所述LSP隧道的互联网协议IP报文插入MPLS标签栈,生成MPLS报文,所述MPLS标签栈自栈顶至栈底包括:Egress LSR的node segment、标签历史标识和标签历史栈,所述标签历史标识用以标识所述MPLS报文中包括所述标签历史栈,所述标签历史栈包括所述Egress LSR的node segment和所述Ingress LSR的node segment;所述Egress LSR的node segment和所述Ingress LSR的node segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR。
所述发送单元用于沿着所述LSP隧道,发送所述生成单元生成的所述MPLS报文至所述Egress LSR。
该实施例提供的LSR能够实现图3对应的实施例提供的LSR的所有功能。
在上述技术方案中,所述Ingress LSR在所述MPLS标签栈中插入所述标签历史栈,有助于所述Egress LSR根据所述标签历史栈中所述Ingress LSR的node segment,获知所述MPLS报文转发时经过所述Ingress LSR,进而获知进入所述LSP隧道的所述IP报文的转发路径。
参见图9,图9为本发明实施例提供的一种LSR,该LSR适用于SR的MPLS网络,所述LSR为LSP隧道的Egress LSR,所述LSR包括:生成单元201、发送单元202、接收单元203和获取单元204。
生成单元201用于生成基于IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈能力。
举例来说,所述通告报文为OSPF Router Information Opaque LSA,所述OSPF Router Information Opaque LSA包括Segment History Capability TLV,利用所述Segment History Capability TLV标识所述Egress LSR具有识别标签历史栈的能力。
举例来说,所述通告报文还可为包括IS-IS Router Capability TLV的报文,利用所述IS-IS Router Capability TLV包括的Sub-TLV标识所述Egress LSR具有识别标签历史栈的能力。具体地,所述IS-IS Router Capability TLV的type为242,所述IS-IS Router Capability TLV的Sub-TLV可以为Segment History Capability  TLV,利用作为sub-TLV的Segment History Capability TLV标识所述Egress LSR具有识别标签历史栈的能力。
参见图2,图2为所述Segment History Capability TLV的一种格式示意图,通过所述Segment History Capability TLV的Value字段标识所述Egress LSR具有识别标签历史栈的能力。
发送单元202用于发送所述生成单元201生成的所述通告报文至所述LSP隧道的Ingress LSR。
举例来说,所述通告报文泛洪范围可由LSA的type来确定,例如:所述通告报文的泛洪范围可以是link-scoped、area-scoped或AS-scoped。
接收单元203用于接收Transit LSR发送的MPLS报文,所述Transit LSR为所述LSP隧道上连接所述Egress LSR的LSR,所述MPLS报文的MPLS标签栈包括:标签历史标识和标签历史栈,所述标签历史标识用以标识所述MPLS报文包括所述标签历史栈,所述标签历史栈包括多个segment,所述多个segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR。
举例来说,所述标签历史栈可以为SR网络中的SHS,所述标签历史标识可以为SR网络中的SHSI,但所述标签历史栈和所述标签历史标识并不局限于上述形式。
获取单元204用于从所述接收单元203接收的所述MPLS报文的所述MPLS标签栈中获取所述标签历史栈。
举例来说,获取单元204可根据所述标签历史标识,从所述MPLS报文中剥离所述MPLS标签栈,获得所述IP报文。所述MPLS标签栈包括所述标签历史栈,所述Egress LSR可从所述MPLS标签栈中获取所述标签历史栈。
可选地,所述LSR还包括分配单元,所述分配单元用于为到目标设备的路由分配私网标签,所述目标设备为接收所述IP报文的目的地设备,所述私网标签是所述Egress LSR为所述到目标设备的路由分配的标签,所述私网标签用以指示所述目标设备所属的VPN,所述到目标设备的路由的下一跳是所述Egress LSR的环回地址。所述接收所述IP报文的目的地设备为所述IP报文的目的IP地 址所标识的设备。所述发送单元202还具体用于发送所述私网标签和所述到目标设备的路由至所述Ingress LSR。
可选地,所述LSR还包括用以处理所述IP报文的处理单元。举例来说,所述处理单元具体用于对所述IP报文进行如下处理:
当所述MPLS报文还包括所述私网标签,根据从所述MPLS报文中剥离的所述私网标签,转发所述IP报文至所述目标设备。
图9对应的实施例提供的LSR能够实现图4对应的实施例提供的Egress LSR的所有功能。
在上述技术方案中,所述Egress LSR向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈的能力,使得所述Ingress LSR在生成的MPLS标签栈中插入所述标签历史栈。由于所述标签历史栈在所述MPLS报文的转发过程中不会消失,有助于所述Egress LSR根据所述标签历史栈的内容获知所述MPLS报文转发时经过的LSR,进而获知所述IP报文的转发路径。
本发明的上述实施例中,LSP隧道上的Transit LSR在具有识别标签历史栈的能力时,可从接收到的MPLS报文中读取所述MPLS标签栈中的所述标签历史栈,使得所述Transit LSR可根据所述标签历史栈获知所述MPLS报文转发时经过的LSR。所述Transit LSR发送至LSP隧道的下一跳的MPLS报文中仍包括所述标签历史栈,LSP隧道上具有识别标签历史栈的能力的LSR均可根据所述MPLS报文包括的所述标签历史栈,获知所述MPLS报文转发时经过的LSR。
本发明的上述任意一个实施例中提及的MPLS标签栈包括的多个segment中每个segment用以指示所述MPLS报文在所述LSP隧道转发时需经过的LSR,多个segment在MPLS标签栈的栈顶至栈顶的方向上的排序用以指示所述MPLS报文在所述LSP隧道转发时需经过的LSR的先后顺序。
图10示出了一种标签交换路由器。所述标签交换路由器包括接收电路301、发送电路302、存储器303和处理器304。接收电路301、发送电路302、存储器303和处理器304通过通信总线305连接。该实施例的标签交换路由器可以为图1或图8对应的实施例提供的Ingress LSR。该实施例的标签交换路由器 能够执行图1对应的实施例提供的方法。
所述存储器303用于存储计算机指令、标签历史标识和多个segment,所述标签历史标识用以标识所述MPLS报文包括所述标签历史栈,所述多个segment用以标识MPLS报文转发时经过的LSR。
所述处理器304从所述存储器303读取所述多个segment和所述标签历史标识,并从所述存储器303读取所述计算机指令,执行如下操作:
通过接收电路301接收LSP隧道的Egress LSR发送的基于IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈的能力;
在接收到所述通告报文后,对进入所述LSP隧道的IP报文插入MPLS标签栈,生成MPLS报文,所述MPLS标签栈自栈顶至栈底包括:多个segment、标签历史标识和标签历史栈,所述标签历史栈包括所述多个segment;
通过所述发送电路302,沿着所述LSP隧道,发送所述MPLS报文至所述Egress LSR。
图11示出了一种标签交换路由器。所述标签交换路由器包括接收电路401、发送电路402、存储器403和处理器404。接收电路401、发送电路402、存储器403和处理器404通过通信总线405连接。该实施例的标签交换路由器可以为图4或图9对应的实施例提供的Ingress LSR。该实施例的标签交换路由器能够执行图4对应的实施例提供的方法。
所述存储器403用于存储计算机指令。
所述处理器404从所述存储器403读取所述计算机指令,执行如下操作:
生成基于IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈能力;
通过所述发送电路402,发送所述通告报文至所述LSP隧道的Ingress LSR;
通过所述接收电路401,接收所连接的Transit LSR发送的MPLS报文,所述Transit LSR为所述LSP隧道上所述Ingress LSR和所述Egress LSR间的LSR,所述MPLS报文的MPLS标签栈包括:标签历史标识和标签历史栈,所述标签 历史标识用以标识所述MPLS报文包括所述标签历史栈,所述标签历史栈包括多个segment,所述多个segment用以标识MPLS报文转发时经过的LSR;
从所述MPLS报文的所述MPLS标签栈中获取所述标签历史栈。
所述处理器404还将所述标签历史栈存储至所述存储器403。
上述通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器。结合本发明实施例所公开的方法的步骤,可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。当使用软件实现时,可以将实现上述功能的代码存储在计算机可读介质中。计算机可读介质包括计算机存储介质。存储介质可以是计算机能够存取的任何可用介质。以此为例但不限于:计算机可读介质可以是随机存取存储器(英文全称为random access memory,英文缩写为RAM)、只读存储器(英文全称为read only memory,英文缩写为ROM)、电可擦可编程只读存储器(英文全称为electrically erasable programmable read-only memory,英文缩写为EEPROM)、只读光盘(英文全称为compact disc-read only memory,英文缩写为CD-ROM)或其他光盘存储、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质。计算机可读介质可以是压缩光碟(英文全称为compact disc,英文缩写为CD)、激光碟、光碟、数字视频光碟(英文全称为digital video disc,英文缩写为DVD)、软盘或者蓝光光碟。
本发明上述实施例中提到“第一”只是用来做名字标识,并不代表顺序上的第一。该规则同样适用于“第二”、“第三”和“第四”。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质可以是下述介质中的至少一种:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的 说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (15)

  1. 一种报文处理方法,其特征在于,所述方法适用于段路由SR的多协议标签交换MPLS网络,所述方法包括:
    标签交换路径LSP隧道的入口标签交换路由器Ingress LSR接收LSP隧道的出口标签交换路由器Egress LSR发送的基于内部网关协议IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈的能力;
    在接收到所述通告报文后,对进入所述LSP隧道的互联网协议IP报文插入MPLS标签栈,生成MPLS报文,所述MPLS标签栈自栈顶至栈底包括:多个段segment、标签历史标识和标签历史栈,所述多个segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR,所述标签历史标识用以标识所述MPLS报文中包括所述标签历史栈,所述标签历史栈包括所述多个segment;
    沿着所述LSP隧道,发送所述MPLS报文至所述Egress LSR。
  2. 如权利要求1所述的方法,其特征在于,所述标签历史栈还包括:所述Ingress LSR的节点段node segment。
  3. 如权利要求1或2所述的方法,其特征在于,所述标签历史栈还包括:所述Egress LSR发送的私网标签,所述私网标签用以标识目标设备所属的虚拟专用网VPN,所述目标设备为接收所述IP报文的目的地设备。
  4. 一种报文处理的方法,其特征在于,所述方法适用于段路由SR的多协议标签交换MPLS网络,所述方法包括:
    标签交换路径LSP隧道的入口标签交换路由器Ingress LSR接收LSP隧道的出口标签交换路由器Egress LSR发送的基于内部网关协议IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈的能力;
    在接收到所述通告报文后,对进入所述LSP隧道的互联网协议IP报文插 入MPLS标签栈,生成MPLS报文,所述MPLS标签栈自栈顶至栈底包括:Egress LSR的节点段node segment、标签历史标识和标签历史栈,所述标签历史标识用以标识所述MPLS报文中包括所述标签历史栈,所述标签历史栈包括所述Egress LSR的node segment和所述Ingress LSR的node segment,所述Egress LSR的node segment和所述Ingress LSR的node segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR;
    沿着所述LSP隧道,发送所述MPLS报文至所述Egress LSR。
  5. 一种报文处理的方法,其特征在于,所述方法适用于段路由SR的多协议标签交换MPLS网络,所述方法包括:
    标签交换路径LSP隧道的出口标签交换路由器Egress LSR生成基于内部网关协议IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈能力;
    发送所述通告报文至所述LSP隧道的入口标签交换路由器Ingress LSR;
    接收中间标签交换路由器Transit LSR发送的MPLS报文,所述Transit LSR为所述LSP隧道上连接所述Egress LSR的LSR,所述MPLS报文的MPLS标签栈包括:标签历史标识和标签历史栈,所述标签历史标识用以标识所述MPLS报文中包括所述标签历史栈,所述标签历史栈包括多个段segment,所述多个segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR;
    从所述MPLS报文的所述MPLS标签栈中获取所述标签历史栈。
  6. 如权利要求5所述的方法,其特征在于,所述通告报文为开放最短路径优先路由器信息不透明链路状态通告OSPF Router Information Opaque LSA,所述OSPF Router Information Opaque LSA包括段历史类型长度值Segment History Capability TLV,利用所述Segment History Capability TLV标识所述Egress LSR具有识别标签历史栈的能力。
  7. 如权利要求5所述的方法,其特征在于,所述通告报文为包括中间系统到中间系统路由能力类型长度值IS-IS Router Capability TLV的报文,利用 所述IS-IS Router Capability TLV包括的子类型长度值Sub-TLV标识所述Egress LSR具有识别标签历史栈的能力。
  8. 如权利要求5至7任意一项所述的方法,其特征在于,所述标签历史栈还包括:所述Ingress LSR的节点段node segment。
  9. 一种标签交换路由器LSR,其特征在于,所述LSR适用于段路由SR的多协议标签交换MPLS网络,所述LSR为标签交换路径LSP隧道的入口标签交换路由器Ingress LSR,所述LSR包括:
    接收单元,用于接收所述LSP隧道的出口标签交换路由器Egress LSR发送的基于内部网关协议IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈的能力;
    生成单元,用于在所述接收单元接收到所述通告报文后,对进入所述LSP隧道的互联网协议IP报文插入MPLS标签栈,生成MPLS报文,所述MPLS标签栈自栈顶至栈底包括:多个段segment、标签历史标识和标签历史栈,所述多个segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR,所述标签历史标识用以标识所述MPLS报文中包括所述标签历史栈,所述标签历史栈包括所述多个segment;
    发送单元,用于沿着所述LSP隧道,发送所述生成单元生成的所述MPLS报文至所述Egress LSR。
  10. 如权利要求9所述的LSR,其特征在于,所述标签历史栈还包括:所述Ingress LSR的节点段node segment。
  11. 如权利要求9或10所述的LSR,其特征在于,所述标签历史栈还包括:所述Egress LSR发送的私网标签,所述私网标签用以标识目标设备所属的虚拟专用网VPN,所述目标设备为接收所述IP报文的目的地设备。
  12. 一种标签交换路由器LSR,其特征在于,所述LSR适用于段路由SR的多协议标签交换MPLS网络,所述LSR为标签交换路径LSP隧道的入口标签交换路由器Ingress LSR,所述LSR包括:
    接收单元,用于接收所述LSP隧道的出口标签交换路由器Egress LSR发 送的基于内部网关协议IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈的能力;
    生成单元,用于在所述接收单元接收到所述通告报文后,对进入所述LSP隧道的互联网协议IP报文插入MPLS标签栈,生成MPLS报文,所述MPLS标签栈自栈顶至栈底包括:Egress LSR的节点段node segment、标签历史标识和标签历史栈,所述标签历史标识用以标识所述MPLS报文中包括所述标签历史栈,所述标签历史栈包括所述Egress LSR的node segment和所述Ingress LSR的node segment;所述Egress LSR的node segment和所述Ingress LSR的node segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR;
    发送单元,用于沿着所述LSP隧道,发送所述生成单元生成的所述MPLS报文至所述Egress LSR。
  13. 一种标签交换路由器LSR,其特征在于,所述LSR适用于段路由SR的多协议标签交换MPLS网络,所述LSR为标签交换路径LSP隧道的出口标签交换路由器Egress LSR,所述LSR包括:
    生成单元,用于生成基于内部网关协议IGP的通告报文,所述通告报文用以向所述Ingress LSR通告所述Egress LSR具有识别标签历史栈能力;
    发送单元,用于发送所述生成单元生成的所述通告报文至所述LSP隧道的入口标签交换路由器Ingress LSR;
    接收单元,用于接收中间标签交换路由器Transit LSR发送的MPLS报文,所述Transit LSR为所述LSP隧道上连接所述Egress LSR的LSR,所述MPLS报文的MPLS标签栈包括:标签历史标识和标签历史栈,所述标签历史标识用以标识所述MPLS报文中包括所述标签历史栈,所述标签历史栈包括多个段segment,所述多个segment用以标识所述MPLS报文在所述LSP隧道转发时需依次经过的LSR;
    获取单元,用于从所述接收单元接收到的所述MPLS报文的所述MPLS标签栈中获取所述标签历史栈。
  14. 如权利要求13所述的LSR,其特征在于,所述通告报文为开放最短路径优先路由器信息不透明链路状态通告OSPF Router Information Opaque LSA,所述OSPF Router Information Opaque LSA包括段历史类型长度值Segment History Capability TLV,利用所述Segment History Capability TLV标识所述Egress LSR具有识别标签历史栈的能力。
  15. 如权利要求13所述的LSR,其特征在于,所述通告报文为包括中间系统到中间系统路由能力类型长度值IS-IS Router Capability TLV的报文,利用所述IS-IS Router Capability TLV包括的子类型长度值Sub-TLV标识所述Egress LSR具有识别标签历史栈的能力。
PCT/CN2015/073370 2014-04-02 2015-02-27 报文处理的方法及标签交换路由器 WO2015149598A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410132156.5A CN104980350B (zh) 2014-04-02 2014-04-02 报文处理的方法及标签交换路由器
CN201410132156.5 2014-04-02

Publications (1)

Publication Number Publication Date
WO2015149598A1 true WO2015149598A1 (zh) 2015-10-08

Family

ID=54239375

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/073370 WO2015149598A1 (zh) 2014-04-02 2015-02-27 报文处理的方法及标签交换路由器

Country Status (2)

Country Link
CN (1) CN104980350B (zh)
WO (1) WO2015149598A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112583731A (zh) * 2021-01-11 2021-03-30 北京华环电子设备有限公司 一种gre报文分片重组的方法及装置

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108702328B (zh) * 2016-02-15 2021-04-09 瑞典爱立信有限公司 用于穿越分段路由和mpls网络的业务的灵活路径拼接和选择的is-is扩展
CN109218195B (zh) * 2017-07-03 2022-05-31 中兴通讯股份有限公司 一种实现双向segment routing隧道的方法及装置
CN107547389B (zh) * 2017-08-30 2020-10-09 新华三技术有限公司 网络接入方法、装置及机器可读存储介质
US11477100B2 (en) 2017-09-26 2022-10-18 Zte Corporation Residence time measurement for traffic engineered network
CN110224934B (zh) * 2018-03-01 2021-11-09 中兴通讯股份有限公司 一种利用统一sr标签栈进行报文处理的方法及装置
CN114827019B (zh) * 2018-07-13 2023-08-22 华为技术有限公司 用于在网业务的mpls扩展头
CN109039902B (zh) * 2018-07-24 2021-02-26 新华三技术有限公司 一种组播报文的转发方法及装置
CN109067657B (zh) * 2018-08-24 2021-03-26 新华三技术有限公司 一种报文处理方法和装置
CN109347740B (zh) * 2018-11-19 2022-03-01 新华三技术有限公司 报文转发方法和装置
CN111371634B (zh) * 2018-12-26 2022-01-18 华为技术有限公司 一种通信方法、装置及系统
US11303549B2 (en) * 2020-05-22 2022-04-12 Juniper Networks, Inc. Segmented traceroute for segment routing traffic engineering

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2061186A1 (en) * 2007-11-14 2009-05-20 Nokia Siemens Networks Oy Method and device for determining a history of a connection in a newtwork and communication system comprising such device
CN101447916A (zh) * 2008-12-25 2009-06-03 中国电子科技集团公司第五十四研究所 多协议标记交换网络的双向复合信源定位方法
CN102098222A (zh) * 2011-02-09 2011-06-15 中兴通讯股份有限公司 利用mpls技术转发应用服务报文方法和转发节点

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103354520B (zh) * 2013-07-02 2016-11-23 华为技术有限公司 一种标签处理的方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2061186A1 (en) * 2007-11-14 2009-05-20 Nokia Siemens Networks Oy Method and device for determining a history of a connection in a newtwork and communication system comprising such device
CN101447916A (zh) * 2008-12-25 2009-06-03 中国电子科技集团公司第五十四研究所 多协议标记交换网络的双向复合信源定位方法
CN102098222A (zh) * 2011-02-09 2011-06-15 中兴通讯股份有限公司 利用mpls技术转发应用服务报文方法和转发节点

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112583731A (zh) * 2021-01-11 2021-03-30 北京华环电子设备有限公司 一种gre报文分片重组的方法及装置

Also Published As

Publication number Publication date
CN104980350A (zh) 2015-10-14
CN104980350B (zh) 2018-02-16

Similar Documents

Publication Publication Date Title
WO2015149598A1 (zh) 报文处理的方法及标签交换路由器
US11700198B2 (en) Transmission control method, node, network system and storage medium
CN109863725B (zh) 基于最大分段标识符深度的分段路由方法及电子设备
US10880203B2 (en) Centralized segment routing dataplane based backup path validation
US11095555B2 (en) Flexible label value encoding in label switched packet networks
US9369347B2 (en) Service to node resolution
US9998368B2 (en) Zone routing system
EP3748921B1 (en) Packet processing method and router
US8170033B1 (en) Virtual private local area network service (VPLS) flush mechanism for BGP-based VPLS networks
US10742599B2 (en) Conflict resolution in segment routing
CN113347091B (zh) 灵活算法感知边界网关协议前缀分段路由标识符
WO2017036233A1 (zh) Sr转发条目生成方法及装置
EP2869512A1 (en) Dynamic area filtering for link-state routing protocols
US20150109904A1 (en) Scalable edge node protection using segment routing
EP1913731B1 (en) Method and apparatus for enabling routing of label switched data packets
US11671352B2 (en) Message sending method, binding relationship advertising method, apparatus, and storage medium
EP2747356A1 (en) Reduced complexity multiprotocol label switching
EP3869754A1 (en) Multiple label spaces in a label switched router
US20160142284A1 (en) Establishing a multicast backup path
US10680941B2 (en) Graceful restart procedures for label switched paths with label stacks
Martini et al. Dynamic Placement of Multi-Segment Pseudowires
CN111224870B (zh) 一种SR-MPLS Anycast场景下的故障修复方法、设备和存储介质
EP3422645A1 (en) Conflict resolution in segment routing
Martini et al. RFC 7267: Dynamic Placement of Multi-Segment Pseudowires

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15773735

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase
122 Ep: pct application non-entry in european phase

Ref document number: 15773735

Country of ref document: EP

Kind code of ref document: A1