A message forwarding method and device
By obtaining different types of segment identification information in the SRv6 network, determining the TI-LFA FRR path and encapsulating the message, the packet loss problem caused by nodes that support MPLS SR but not SRv6 is solved, and the forwarding efficiency and user experience of the network are improved. .
Patent Information
- Application Number
- CN202210604521.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-05-31
AI Technical Summary
In an SRv6 network, some network nodes support MPLS SR but do not support SRv6, causing the source node to be unable to determine the TI-LFA FRR path. This in turn causes long-term packet loss when the main path fails, affecting the network experience.
Determine the TI-LFA FRR path by obtaining the End SID and End. Encapsulate service packets based on constrained path information to ensure that packets can be forwarded in a timely manner.
This effectively avoids packet loss problems and improves network forwarding efficiency and user experience.
Smart Images

Figure CN115037675B
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a message forwarding method and device. Background Art
[0002] Segment Routing (SR) is a protocol designed based on the concept of source routing to forward data packets in the network. SR divides the network path into segments, assigns segment identifiers (SIDs) to these segments or nodes, and carries sequentially arranged segment identifiers in data packets, allowing data packets to be transmitted through the forwarding path indicated by the segment identifiers.
[0003] Segment Routing Internet Protocol version 6 (SRv6) refers to combining SR technology with Internet Protocol version 6 (IPv6) protocol, defining it as an instantiated SRv6 SID according to the format of IPv6 address, and implementing SR function based on the forwarding plane of IPv6.
[0004] In an SRv6 network, when a source node on any primary path needs to determine the TI-LFA FRR (Topology-IndepEndent Loop-free Alternate Fast Reroute) path corresponding to the path, it needs to obtain the END SID (i.e., the segment identifier of a network node that supports both Multiprotocol Label Switching (MPLS) Segment Routing (Segment Routing with MPLS, MPLS SR) and SRv6) of each network node in the entire SRv6 network and the Endpoint with Layer-3 cross-connect (End.X SID, i.e., the link segment identifier corresponding to the network node that supports SRv6) to determine the TI-LFA FRR path corresponding to the path.
[0005] However, in the case where there are individual network nodes in the SRv6 network that support MPLS SR but not SRv6, the source node cannot determine the TI-LFAFRR path corresponding to the path because the corresponding END SID and End.X SID cannot be provided. As a result, when the source node uses the main path to forward service messages, once the main path fails, for example, a network node or a link on the main path fails, the source node needs to re-determine a new forwarding path and then use the new forwarding path to forward service messages because there is no corresponding backup path. This will cause packet loss for a long time, resulting in a poor network experience. Summary of the invention
[0006] In order to overcome the problems existing in the related art, the present application provides a message forwarding method and device.
[0007] According to a first aspect of an embodiment of the present application, a message forwarding method is provided, the method being applied to a source node on any primary path in an SRv6 network, the method comprising:
[0008] According to the acquired segment identification information and link segment identification information of other network nodes except the source node in the SRv6 network, determine the TI-LFA FRR path corresponding to the main path and the constraint path information corresponding to the TI-LFA FRR path, wherein, when any other network node supports both MPLS SR and SRv6, the segment identification information of the other network node is the End SID of the other network node, and the link segment identification information of the other network node is the End.X SID of the other network node; when any other network node supports MPLS SR but does not support SRv6, the segment identification information of the other network node is the Node SID of the other network node, and the link segment identification information of the other network node is the Adj SID of the other network node, the constraint path information includes the segment identification information and / or link segment identification information of at least one designated network node on the TI-LFA FRR path, and the total number of all designated network nodes is not more than 3, and all designated network nodes do not include the source node and the destination node on the main path;
[0009] When a service message is received and a failure of the main path is detected, if the constraint path information contains at least one segment identification information and / or link segment identification information of a designated network node that supports MPLS SR but does not support SRv6, the service message is encapsulated according to the constraint path information and a preset encapsulation rule, and the encapsulated service message is forwarded to the next-hop network node, wherein the next-hop network node is determined by the source node based on the backup forwarding table corresponding to the TI-LFA FRR path.
[0010] According to a second aspect of an embodiment of the present application, a message forwarding device is provided, the device being applied to a source node on any primary path in an SRv6 network, the device comprising:
[0011] a determination module, configured to determine the TI-LFA FRR path corresponding to the main path and the constraint path information corresponding to the TI-LFAFRR path according to the acquired segment identification information and link segment identification information of other network nodes except the source node in the SRv6 network, wherein when any other network node supports both MPLS SR and SRv6, the segment identification information of the other network node is the End SID of the other network node, and the link segment identification information of the other network node is the End.X SID of the other network node; when any other network node supports MPLS SR but does not support SRv6, the segment identification information of the other network node is the Node SID of the other network node, and the link segment identification information of the other network node is the Adj SID of the other network node, the constraint path information includes the segment identification information and / or link segment identification information of at least one designated network node on the TI-LFA FRR path, and the total number of all designated network nodes is not more than 3, and all designated network nodes do not include the source node and the destination node on the main path;
[0012] The first encapsulation and forwarding module is used to encapsulate the service message according to the constraint path information and the preset encapsulation rule, and forward the encapsulated service message to the next-hop network node when a service message is received and a failure of the main path is detected. If the constraint path information contains at least one segment identification information and / or link segment identification information of a designated network node that supports MPLS SR but does not support SRv6, the next-hop network node is determined by the source node based on the backup forwarding table corresponding to the TI-LFA FRR path.
[0013] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0014] In an embodiment of the present application, when there are individual network nodes in the SRv6 network that support MPLS SR but not SRv6, for a source node on any primary path, the TI-LFA FRR path corresponding to the path can be determined based on the End SID and End.X SID of the network nodes in the SRv6 network that support both MPLS SR and SRv6, and the Node SID and / or Adj SID of the network nodes that support MPLS SR but not SRv6, so that when the primary path fails, the source node can promptly use the constraint path information corresponding to the TI-LFA FRR path corresponding to the path to forward related service messages, without packet loss, thereby improving the network experience.
[0015] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in the specification and constitute a part of this application, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.
[0017] Figure 1 A flowchart of a message forwarding method provided in an embodiment of the present application;
[0018] Figure 2A One of the networking diagrams of the SRv6 network provided in the embodiment of the present application;
[0019] Figure 2B The service message provided in the embodiment of this application is Figure 2A A schematic diagram of message formats on the network node A1, network node MER2 and network node MER1 sides in the network shown;
[0020] Figure 3A The second networking diagram of the SRv6 network provided in the embodiment of the present application;
[0021] Figure 3B The service message provided in the embodiment of this application is Figure 3A A schematic diagram of message formats of network node A1, network node A3, network node MER2 and network node MER1 in the network shown;
[0022] Figure 4A The third networking diagram of the SRv6 network provided in the embodiment of the present application;
[0023] Figure 4B The service message provided in the embodiment of this application is Figure 4AA schematic diagram of message formats of network node A1, network node A3, network node MER2 and network node MER1 in the network shown;
[0024] Figure 5 A schematic diagram of the structure of a message forwarding method provided in an embodiment of the present application;
[0025] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0027] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0028] It should be understood that, although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" or "if" as used herein may be interpreted as "at the time of" or "when...".
[0029] Next, the embodiments of the present application are described in detail.
[0030] The present application embodiment provides a message forwarding method, which is applied to a source node on any primary path in an SRv6 network, such as Figure 1 As shown, the method may include the following steps:
[0031] S11. Determine the TI-LFA FRR path corresponding to the primary path and the constraint path information corresponding to the TI-LFA FRR path according to the acquired segment identification information and link segment identification information of other network nodes except the source node in the SRv6 network.
[0032] In this step, when any other network node supports both MPLS SR and SRv6, the segment identification information of the other network node is the End SID of the other network node, and the link segment identification information of the other network node is the End.X SID of the other network node.
[0033] When any other network node supports MPLS SR but does not support SRv6, the segment identification information of the other network node is the Node SID of the other network node, and the link segment identification information of the other network node is the Adj SID of the other network node.
[0034] In addition, in this step, the constraint path information includes the segment identification information and / or link segment identification information of at least one designated network node on the TI-LFA FRR path, and the total number of all designated network nodes is not greater than 3, all designated network nodes do not include the source node and the destination node on the main path, and the segment identification information and / or link segment identification information of all designated network nodes on the TI-LFA FRR path included in the constraint path information are arranged in order from near to far of all designated network nodes on the TI-LFA FRR path.
[0035] Here, for any designated network node in the constraint path information, once the TI-LFA FRR path is determined, the relevant information of the designated network node included in the constraint path information is also determined, which may be the segment identification information of the designated network node, or the link segment identification information of the designated network node, or the segment identification information and link segment identification information of the designated network node.
[0036] S12. When a service message is received and a failure of the main path is detected, if the constraint path information contains at least one segment identification information and / or link segment identification information of a designated network node that supports MPLS SR but does not support SRv6, the service message is encapsulated according to the constraint path information and the preset encapsulation rule, and the encapsulated service message is forwarded to the next-hop network node.
[0037] In this step, the next hop network node is determined by the source node based on the backup forwarding table corresponding to the TI-LFA FRR path.
[0038] It should be noted that in an embodiment of the present application, for the above-mentioned source node, the segment identification information and link segment identification information of other network nodes in the SRv6 network except the source node can be obtained by parsing the Label Switched Path (LSP) message sent by the neighboring network node.
[0039] Furthermore, for other network nodes that support both MPLS SR and SRv6, the source node can obtain the End SID and End.X SID, as well as the Node SID and Adj SID of the other network nodes; for other network nodes that support MPLS SR but do not support SRv6, the source node can obtain the Node SID and Adj SID of the other network nodes.
[0040] Subsequently, when the source node determines the TI-LFA FRR path corresponding to the main path and the constraint path information corresponding to the TI-LFA FRR path, it uses the End SID and End.XSID of other network nodes that support both MPLS SR and SRv6, and the Node SID and Adj SID of other network nodes that support MPLS SR but not SRv6 to determine the TI-LFA FRR path. The specific determination process is similar to the existing determination process of only using the End SID and End.XSID of the relevant network nodes that support both MPLS SR and SRv6 to determine the corresponding TI-LFA FRR path and related constraint path information, and will not be described in detail here.
[0041] Here, the total link cost (Cost) value of the TI-LFA FRR path is the smallest, and the corresponding constraint path information (also called Repair List) records the segment identification information and / or link segment identification information of at least one designated network node that can accurately guide the service message to the corresponding destination node.
[0042] Specifically, in the above step S12, when the total number of all designated nodes is 1, the above source node can encapsulate the service message in the following manner:
[0043] When it is determined based on the constraint path information that the designated network node included in the constraint path information supports MPLSSR but does not support SRv6, the first MPLS label information is encapsulated for the service message to obtain the encapsulated service message, wherein the first MPLS label information includes the Node SID and / or Adj SID of the designated network node included in the constraint path information.
[0044] It should be noted that, in an embodiment of the present application, for any designated network node included in the constraint path information, if the segment identification information and / or link segment identification information of the designated network node in the constraint path information is the End SID and / or End.X SID of the designated network node, it is determined that the designated network node supports both MPLS SR and SRv6; if the segment identification information and / or link segment identification information of the designated network node is the NodeSID and / or Adj SID of the designated network node, it is determined that the designated network node supports MPLS SR but does not support SRv6.
[0045] Here, the encapsulated service message is used to instruct the designated network node to pop out the first MPLS label information and then forward it to the corresponding destination node when receiving the encapsulated service message.
[0046] When the total number of all designated nodes is 2, the above source node can encapsulate the service message in the following way:
[0047] For the first designated network node and the second designated network node in the constrained path information, if it is determined according to the constrained path information that the first designated network node supports both MPLS SR and SRv6, and the second designated network node supports MPLS SR but does not support SRv6, a first IPv6 header, a first Segment Routing Header (SRH) header, and a second MPLS label information are encapsulated for the service message to obtain an encapsulated service message, wherein the source IPv6 address in the first IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the first designated network node included in the constrained path information, the segment list information in the first SRH header includes the End SID and / or End.X SID of the first designated network node, the second MPLS label information includes the Node SID and / or Adj SID of the second designated network node included in the constrained path information, and the second MPLS label information is located after the first SRH header; here, the first SRH header also includes the number of remaining segments (Segment The SL value in the first SRH header = 0, and the segment list information in the first SRH header may be specifically Segment List[0] = the End SID and / or End.X SID of the first specified network node;
[0048] If it is determined according to the constrained path information that the first designated network node supports MPLS SR but not SRv6, and the second designated network node supports both MPLS SR and SRv6, the third MPLS label information, the second IPv6 header and the second SRH header are encapsulated for the service message to obtain an encapsulated service message, wherein the third MPLS label information includes the Node SID and / or Adj SID of the first designated network node included in the constrained path information, the source IPv6 address in the second IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the two designated network nodes included in the constrained path information, the segment list information in the second SRH header includes the End SID and / or End.X SID of the second designated network node, and the third MPLS label information is located in front of the second SRH header; here, the second SRH header also includes information such as an SL value, the SL value in the second SRH header=0, and the segment list information in the second SRH header can be specifically Segment List[0]=End SID of the second designated network node. SID and / or End.X SID;
[0049] If it is determined according to the constrained path information that both the first designated network node and the second designated network node support MPLS SR but do not support SRv6, the fourth MPLS label information is encapsulated for the service message, wherein the fourth MPLS label information sequentially includes: the Node SID and / or AdjSID of the first designated network node included in the constrained path information, and the Node SID and / or Adj SID of the second designated network node.
[0050] In this way, for the above-mentioned source node, when it is determined based on the constraint path information that the first designated network node supports both MPLS SR and SRv6, and the second designated network node supports MPLS SR but does not support SRv6, the encapsulated message can instruct the first designated network node to perform SRv6 decapsulation on the encapsulated message, and further forward the decapsulated message (carrying relevant MPLS label information) to the second designated network node, which pops out the relevant MPLS label information in the decapsulated message and then forwards it to the corresponding destination node.
[0051] In the case where it is determined based on the constraint path information that the first designated network node supports MPLS SR but does not support SRv6, and the second designated network node supports both MPLS SR and SRv6, the encapsulated message can instruct the first designated network node to pop out the relevant MPLS label information in the encapsulated message, and then forward it to the second designated network node, which will perform SRv6 decapsulation and then forward it to the corresponding destination node.
[0052] In the case where it is determined based on the constraint path information that both the first designated network node and the second designated network node support MPLS SR but do not support SRv6, the encapsulated message can instruct the first designated network node to pop out the first layer of MPLS label information in the encapsulated message, and then forward it to the second designated network node, which then pops out the second layer of MPLS label information and then forwards it to the corresponding destination node.
[0053] When the total number of all designated nodes is 3, the service message is encapsulated according to the constraint path information and the preset encapsulation rule, specifically including:
[0054] For the first designated network node, the second designated network node, and the third designated network node in the constrained path information, if it is determined according to the constrained path information that the first designated network node supports both MPLS SR and SRv6, the second designated network node supports MPLS SR but does not support SRv6, and the third designated network node supports both MPLS SR and SRv6, then a third IPv6 header, a third SRH header, fifth MPLS label information, a fourth IPv6 header, and a fourth SRH header are encapsulated for the service message to obtain an encapsulated service message, wherein the source IPv6 address of the third IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the first designated network node included in the constrained path information, the segment list information in the third SRH header includes the End SID and / or End.X SID of the first designated network node, and the fifth MPLS label information includes the Node SID and / or Adj SID of the second designated network node included in the constrained path information. SID, the source IPv6 address of the fourth IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the third designated network node included in the constrained path information, the segment list information in the fourth SRH header includes the End SID and / or End.X SID of the third designated network node, and the fifth MPLS label information is located in front of the fourth IPv6 header and behind the third SRH header; here, the third SRH header and the fourth SRH header both further include information such as SL value, the SL value in the third SRH header and the fourth SRH header=0, the segment list information in the third SRH header can be specifically Segment List[0]=End SID and / or End.X SID of the first designated network node, and the segment list information in the fourth SRH header can be specifically Segment List[0]=End SID and / or End.X SID of the third designated network node;
[0055] If it is determined according to the constrained path information that the first designated network node and the second designated network node support both MPLS SR and SRv6, and the third designated network node supports MPLS SR but does not support SRv6, a fifth IPv6 header, a fifth SRH header and sixth MPLS label information are encapsulated for the service message to obtain an encapsulated service message, wherein the source IPv6 address of the fifth IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the first designated network node included in the constrained path information, the fifth SRH header sequentially includes: the End SID and / or End.X SID of the second designated network node, and the End SID and / or End.XSID of the first designated network node, the sixth MPLS label information includes the Node SID and / or Adj SID of the third designated network node included in the constrained path information, and the sixth MPLS label information is located behind the fifth SRH header; here, the fifth SRH header also includes information such as an SL value, the SL value in the fifth SRH header=1, and the fifth SRH header is a 100M packet. The segment list information in the header may specifically be: Segment List[0]=End SID and / or End.X SID of the second specified network node, Segment List[1]=End SID and / or End.X SID of the first specified network node;
[0056] If it is determined according to the constrained path information that the first designated network node supports both MPLS SR and SRv6, and the second designated network node and the third designated network node both support MPLS SR but do not support SRv6, a sixth IPv6 header, a sixth SRH header and a seventh MPLS label information are encapsulated for the service message to obtain an encapsulated service message, wherein the source IPv6 address of the sixth IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the first designated network node included in the constrained path information, the segment list information in the sixth SRH header includes the End SID and / or End.X SID of the first designated network node, and the seventh MPLS label information includes, in sequence: the Node SID and / or Adj SID of the second designated network node included in the constrained path information, and the Node SID and / or Adj SID of the third designated network node. SID, the seventh MPLS label information is located behind the sixth SRH header; here, the sixth SRH header also includes information such as the SL value, the SL value in the sixth SRH header = 0, and the segment list information in the sixth SRH header can be specifically Segment List[0] = the End SID and / or End.X SID of the first specified network node;
[0057] If it is determined according to the constrained path information that the first designated network node supports MPLS SR but not SRv6, and the second designated network node and the third designated network node both support MPLS SR and SRv6, the eighth MPLS label information, the seventh IPv6 header and the seventh SRH header are encapsulated for the service message to obtain an encapsulated service message, wherein the eighth MPLS label information includes the Node SID and / or Adj SID of the first designated network node included in the constrained path information, the source IPv6 address of the seventh IPv6 header is the IPv6 address of the source node, and the destination IPv6 address is the End SID and / or End.X SID of the second designated network node included in the constrained path information, and the seventh SRH header includes in sequence: the End SID and / or End.X SID of the third designated network node included in the constrained path information, and the End SID and / or End.X SID of the second designated network node. SID, the eighth MPLS label information is located in front of the seventh IPv6 header; here, the seventh SRH header also includes information such as the SL value, the SL value in the seventh SRH header = 1, and the segment list information in the seventh SRH header can be specifically: Segment List[0] = End SID and / or End.XSID of the third designated network node, Segment List[1] = End SID and / or End.X SID of the second designated network node;
[0058] If it is determined according to the constrained path information that the first designated network node supports MPLS SR but not SRv6, the second designated network node supports both MPLS SR and SRv6, and the third designated network node supports MPLS SR but not SRv6, then the service message is encapsulated with ninth MPLS label information, eighth IPv6 header, eighth SRH header and tenth MPLS label information to obtain an encapsulated service message, wherein the ninth MPLS label information includes the Node SID and / or Adj SID of the first designated network node included in the constrained path information, the source IPv6 address of the eighth IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the EndSID and / or End.X SID of the second designated network node included in the constrained path information, the segment list information in the eighth SRH header includes the End SID and / or End.X SID of the second designated network node, the tenth MPLS label information includes the Node SID and / or Adj SID of the third designated network node included in the constrained path information. SID and / or AdjSID, the ninth MPLS label information is located in front of the eighth IPv6 header, and the tenth MPLS label information is located in front of the eighth SRH header; here, the eighth SRH header also includes information such as an SL value, the SL value in the eighth SRH header=0, and the segment list information in the eighth SRH header can be specifically Segment List[0]=End SID and / or End.X SID of the second designated network node;
[0059] If it is determined according to the constrained path information that both the first designated network node and the second designated network node support MPLS SR but do not support SRv6, and the third designated network node supports both MPLS SR and SRv6, the eleventh MPLS label information, the ninth IPv6 header and the ninth SRH header are encapsulated for the service message to obtain an encapsulated service message, wherein the eleventh MPLS label information sequentially includes: the Node SID and / or AdjSID of the first designated network node included in the constrained path information, and the Node SID and / or AdjSID of the second designated network node, the source IPv6 address of the ninth IPv6 header is the IPv6 address of the source node, and the destination IPv6 address is the End SID and / or End.X SID of the third designated network node included in the constrained path information, the segment list information in the ninth SRH header includes the End SID and / or End.X SID of the third designated network node, and the eleventh MPLS label information is located in front of the ninth IPv6 header; here, the ninth SRH header also includes information such as the SL value, and the ninth SRH The SL value in the header = 0, and the segment list information in the ninth SRH header may be specifically Segment List[0] = End SID and / or End.X SID of the third designated network node;
[0060] If it is determined according to the constraint path information that the first designated network node, the second designated network node and the third designated network node all support MPLS SR but do not support SRv6, the twelfth MPLS label information is encapsulated for the service message to obtain the encapsulated service message, wherein the twelfth MPLS label information includes, in sequence: the Node SID and / or Adj SID of the first designated network node included in the constraint path information, the Node SID and / or Adj SID of the second designated network node included in the constraint path information, and the Node SID and / or Adj SID of the third designated network node included in the constraint path information.
[0061] In this manner, for the above-mentioned source node, when it is determined based on the constrained path information that the first designated network node supports both MPLS SR and SRv6, the second designated network node supports MPLS SR but does not support SRv6, and the third designated network node supports both MPLS SR and SRv6, the encapsulated message can instruct the first designated network node to perform SRv6 decapsulation on the encapsulated message, and further forward the decapsulated message to the second designated network node, which pops out the relevant MPLS label information in the decapsulated message and then forwards it to the third designated network node, which performs SRv6 decapsulation again and forwards the decapsulated message to the corresponding destination node.
[0062] When it is determined based on the constrained path information that the first designated network node and the second designated network node support both MPLS SR and SRv6, and the third designated network node supports MPLS SR but does not support SRv6, the encapsulated message can instruct the first designated network node to change the encapsulated service message (change the destination address in the corresponding IPv6 header and the value of SL in the corresponding SRH header) and then forward it to the second designated network node, which performs SRv6 decapsulation on the changed message and further forwards the decapsulated message to the third designated network node, which pops out the relevant MPLS label information in the decapsulated message and then forwards it to the corresponding destination node.
[0063] In the case where it is determined based on the constrained path information that the first designated network node supports both MPLS SR and SRv6, and the second designated network node and the third designated network node both support MPLS SR but do not support SRv6, the encapsulated message can instruct the first designated network node to perform SRv6 decapsulation on the encapsulated service message, and further forward the decapsulated message to the second designated network node, and after the second designated network node pops up the first layer of MPLS label information, it is further forwarded to the third designated network node, and after the third designated network node pops up the second layer of MPLS label information, it is forwarded to the corresponding destination node.
[0064] In the case where it is determined based on the constrained path information that the first designated network node supports MPLS SR but not SRv6, and the second designated network node and the third designated network node both support MPLS SR and SRv6, the encapsulated message can instruct the first designated network node to pop out the relevant MPLS label information in the encapsulated service message, and then further forward it to the second designated network node, which changes it (changes the destination address in the corresponding IPv6 header and the value of SL in the corresponding SRH header) and then forwards it to the third designated network node, which decapsulates the changed message in SRv6 and then forwards it to the corresponding destination node.
[0065] In the case where it is determined based on the constrained path information that the first designated network node supports MPLS SR but not SRv6, the second designated network node supports both MPLS SR and SRv6, and the third designated network node supports MPLS SR but not SRv6, the encapsulated message can instruct the first designated network node to pop out the relevant MPLS label information in the encapsulated service message, and then further forward it to the second designated network node, which decapsulates the SRv6 message and then forwards it to the third designated network node, which then pops out the relevant MPLS label information in the decapsulated message and then forwards it to the corresponding destination node.
[0066] When it is determined based on the constrained path information that both the first designated network node and the second designated network node support MPLS SR but not SRv6, and the third designated network node supports both MPLS SR and SRv6, the encapsulated message can instruct the first designated network node to pop out the first layer MPLS label information in the encapsulated service message, and then further forward it to the second designated network node, which then continues to pop out the second layer MPLS label information and then forwards it to the third designated network node, which then decapsulates the SRv6 and then forwards it to the corresponding destination node.
[0067] When it is determined based on the constraint path information that the first designated network node, the second designated network node and the third designated network node all support MPLS SR but do not support SRv6, the encapsulated message can instruct the first designated network node to pop out the first layer of MPLS label information in the encapsulated service message, and then further forward it to the second designated network node, and the second designated network node continues to pop out the second layer of MPLS label information and then forward it to the third designated network node, and the third designated network node continues to pop out the third layer of MPLS label information and then forward it to the corresponding destination node.
[0068] Further, in an embodiment of the present application, for the above-mentioned source node, when receiving a service message and monitoring that the main path has a fault, if the segment identification information and / or link segment identification information of the designated network node that supports MPLS SR but does not support SRv6 does not exist in the constraint path information, it is still processed according to the existing process, that is, the tenth IPv6 header and the tenth SRH header are encapsulated for the service message to obtain the encapsulated service message; wherein the source IPv6 address of the tenth IPv6 header is the IPv6 address of the source node, and the destination IPv6 address is the EndSID and / or End.X SID of the first designated network node included in the constraint path information, and the tenth SRH header includes the End SID and / or End.X SID of all designated network nodes included in the constraint path information, and the End SID and / or End.X SID of all designated network nodes are arranged in order from far to near according to all designated network nodes on the TI-LFAFRR path.
[0069] The above-mentioned message forwarding method is described in detail below with reference to specific embodiments.
[0070] Embodiment 1
[0071] like Figure 2A As shown, it is assumed that the network node MER1 ( Figure 2A MER1), network node A1 ( Figure 2A A1) and network node A2 ( Figure 2A Assume that network node MER2 ( Figure 2A MER2) supports MPLS SR but not SRv6.
[0072] Assume that the main path is network node A1->network node MER1. Also, assume that network node A1 is the source node, and assume that network node A1 determines that the TI-LFA FRR path corresponding to the main path is network node A1->network node A2->network node MER2 based on the End SID and End.X SID of network node A2, the Node SID and AdjSID of network node MER2, and the End SID and End.X SID of network node MER1, and the corresponding constraint path information includes the Node SID and Adj SID of network node MER2.
[0073] Assume that at a certain moment, network node A1 receives a service message and finds that the main path fails at this time, for example, the link between network node A1 and network node MER1 fails. In this case, network node A1 can determine, based on the content in the constraint path information, that the designated network node (i.e., network node MER2) included in the constraint path information supports MPLS SR but does not support SRv6. At this time, network node A1 encapsulates the service message with MPLS label information including the Node SID and Adj SID of network node MER2, and forwards the encapsulated message to the next-hop network node (i.e., network node A2).
[0074] Here, the specific message format of the service message can be as follows Figure 2B As shown. Figure 2B In the figure, the source IPv6 address of the service message (ie, the IPv6 address of the network node A1) is represented by A1, the destination IPv6 address of the service message (ie, the IPv6 address of the network node MER1) is represented by MER1, and the payload content of the service message is IP data.
[0075] After receiving the encapsulated message, network node A2 finds that the encapsulated message carries MPLS label information that is not its own Node SID and Adj SID. At this time, network node A2 forwards the encapsulated message to network node MER2 based on the MPLS forwarding table.
[0076] The network node MER2 receives the encapsulated message (the specific message format can be as follows Figure 2BAfter receiving the encapsulated message, it is found that the encapsulated message carries the MPLS label information including its own Node SID and Adj SID. At this time, the network node MER2 pops up the Node SID and Adj SID carried in the encapsulated message, obtains the service message, and then determines the outbound interface of the service message based on the Adj SID, and forwards the service message to the network node MER1 through the determined outbound interface. Here, the message format of the service message arriving at the network node MER1 side can be as follows: Figure 2B shown.
[0077] Embodiment 2
[0078] like Figure 3A As shown, it is assumed that the network node MER1 ( Figure 3A MER1), network node A1 ( Figure 3A A1 in the figure), network node A2 ( Figure 3A A2) and network node MER2 ( Figure 3A MER2) supports both MPLS SR and SRv6; assuming that network node A3 ( Figure 3A A3 in the figure supports MPLS SR but not SRv6.
[0079] Assume that the main path is network node A1->network node MER1. Also, assume that network node A1 is a source node, and assume that network node A1 determines that the TI-LFA FRR path corresponding to the main path is network node A1->network node A3->network node MER2->network node MER1 based on the End SID and End.X SID of network node A2, the Node SID (e.g., Node1 SID) and Adj SID (e.g., Adj1 SID) of network node A3, the End SID and End.X SID (e.g., End2.x) of network node MER2, and the End SID and End.X SID of network node MER1, and the corresponding constraint path information includes the Node SID and Adj SID of network node A3, and the End.X SID (i.e., End2.x) of network node MER2.
[0080] Assume that at a certain moment, network node A1 receives a service message and finds that the main path fails at this time, for example, the link between network node A1 and network node MER1 fails. In this case, network node A1 can determine, based on the content in the constrained path information, that the first designated network node (i.e., network node A3) included in the constrained path information supports MPLS SR but not SRv6, and the second designated network node (i.e., network node MER2) supports both MPLS SR and SRv6. At this time, network node A1 encapsulates the service message with MPLS label information including Node1 SID and Adj1 SID, IPv6 header and SRH header, and forwards the encapsulated message to the next-hop network node (i.e., network node A3).
[0081] Here, the specific message format of the service message can be as follows Figure 3B As shown. Figure 3B In the figure, the source IPv6 address of the service message (ie, the IPv6 address of the network node A1) is represented by A1, the destination IPv6 address of the service message (ie, the IPv6 address of the network node MER1) is represented by MER1, and the payload content of the service message is IP data.
[0082] In addition, the source IPv6 address in the above IPv6 header is the IPv6 address of the network node A1, and the destination IPv6 address is the End.X SID (i.e., End2.x) of the network node MER2. The segment list information in the above SRH header is Segment List[0] = End.X SID (i.e., End2.x) of the network node MER2, and the SL value in the above SRH header = 0.
[0083] After receiving the encapsulated message (the specific message format can be as follows Figure 3B After that, it is found that the encapsulated message carries the MPLS label information including its own Node1 SID and Adj 1SID. At this time, the network node A3 pops out the Node1 SID and Adj1 SID carried in the encapsulated message, and then determines the outbound interface of the popped-up message based on the Adj 1SID, and forwards the popped-up message to the network node MER2 through the determined outbound interface.
[0084] After receiving the pop-up message (the specific message format can be as follows Figure 3BAs shown in the figure, after finding that the destination IPv6 address in the IPv6 header is its own End.X SID and the SL value in the SRH header = 0, the network node MER2 performs SRv6 decapsulation on the popped-up message to obtain the service message, and determines the outbound interface of the service message based on the End.X SID, and forwards the service message to the network node MER1 through the determined outbound interface. Here, the message format of the service message arriving at the network node MER1 side can be as follows: Figure 3B shown.
[0085] Embodiment 3
[0086] like Figure 4A As shown, it is assumed that the network node MER1 ( Figure 4A MER1), network node A1 ( Figure 4A A1 in the figure), network node A2 ( Figure 4A A2) and network node A3 ( Figure 4A Assume that network node MER2 ( Figure 4A MER2) supports MPLS SR but not SRv6.
[0087] Assume that the main path is network node A1->network node MER1. Also, assume that network node A1 is a source node, and assume that network node A1 determines that the TI-LFA FRR path corresponding to the main path is network node A1->network node A3->network node MER2->network node MER1 based on the End SID and End.X SID of network node A2, the End SID and End.X SID (e.g., End1.x) of network node A3, the Node SID (e.g., Node2 SID) and Adj SID (e.g., Adj2 SID) of network node MER2, and the End SID and End.X SID of network node MER1, and the corresponding constraint path information includes the End.X SID (i.e., End1.x) of network node A3, and the Node SID and Adj SID of network node MER2.
[0088] Assume that at a certain moment, network node A1 receives a service message and finds that the main path fails at this time, for example, the link between network node A1 and network node MER1 fails. In this case, network node A1 can determine, based on the content in the constrained path information, that the first designated network node (i.e., network node A3) included in the constrained path information supports both MPLS SR and SRv6, and the second designated network node (i.e., network node MER2) supports MPLS SR but does not support SRv6. At this time, network node A1 encapsulates the service message with an IPv6 header, an SRH header, and MPLS label information including Node2 SID and Adj2 SID, and forwards the encapsulated message to the next-hop network node (i.e., network node A3).
[0089] Here, the specific message format of the service message can be as follows Figure 4B As shown. Figure 4B In the figure, the source IPv6 address of the service message (ie, the IPv6 address of the network node A1) is represented by A1, the destination IPv6 address of the service message (ie, the IPv6 address of the network node MER1) is represented by MER1, and the payload content of the service message is IP data.
[0090] In addition, the source IPv6 address in the above IPv6 header is the IPv6 address of network node A1, and the destination IPv6 address is the End.X SID (i.e., End1.x) of network node A3. The segment list information in the above SRH header is Segment List[0]=End.X SID (i.e., End1.x) of network node A3, and the SL value in the above SRH header=0.
[0091] After receiving the encapsulated message (the specific message format can be as follows Figure 4B After receiving the packet, it is found that the destination IPv6 address in the IPv6 header of the encapsulated message is its own End.X SID, and the SL value in the SRH header = 0. At this time, network node A3 performs SRv6 decapsulation on the encapsulated message, determines the outbound interface of the decapsulated message based on End.X SID, and forwards the decapsulated message to network node MER2 through the determined outbound interface.
[0092] After receiving the decapsulated message (the specific message format can be as follows Figure 4BAfter the decapsulation, it is found that the decapsulated message carries the MPLS label information including its own Node2 SID and Adj2 SID. At this time, the network node MER2 pops up the Node2 SID and Adj2 SID carried in the decapsulated message, obtains the service message, determines the outbound interface of the service message based on the Adj1 SID, and forwards the service message to the network node MER1 through the determined outbound interface. Here, the message format of the service message arriving at the network node MER1 side can be as follows: Figure 4B shown.
[0093] It can be seen from the above technical solution that in an embodiment of the present application, when there are individual network nodes in the SRv6 network that support MPLS SR but not SRv6, for the source node on any main path, the TI-LFA FRR path corresponding to the path can be determined based on the End SID and End.X SID of the network nodes in the SRv6 network that support both MPLS SR and SRv6, and the Node SID and / or Adj SID of the network nodes that support MPLS SR but not SRv6, so that when the main path fails, the source node can promptly use the constraint path information corresponding to the TI-LFA FRR path corresponding to the path to forward related business messages, and there will be no packet loss problem, thereby improving the network experience.
[0094] Based on the same inventive concept, the present application also provides a message forwarding device, which is applied to a source node on any primary path in an SRv6 network. Figure 5 As shown, specifically including:
[0095] A determination module 51 is configured to determine the TI-LFA FRR path corresponding to the main path and the constraint path information corresponding to the TI-LFAFRR path according to the acquired segment identification information and link segment identification information of other network nodes except the source node in the SRv6 network, wherein when any other network node supports both MPLS SR and SRv6, the segment identification information of the other network node is the End SID of the other network node, and the link segment identification information of the other network node is the End.X SID of the other network node; when any other network node supports MPLS SR but does not support SRv6, the segment identification information of the other network node is the Node SID of the other network node, and the link segment identification information of the other network node is the Adj SID of the other network node, and the constraint path information includes the segment identification information and / or link segment identification information of at least one designated network node on the TI-LFA FRR path, and the total number of all designated network nodes is not more than 3, and all designated network nodes do not include the source node and the destination node on the main path;
[0096] The first encapsulation and forwarding module 52 is used to encapsulate the service message according to the constraint path information and the preset encapsulation rule, and forward the encapsulated service message to the next-hop network node when a service message is received and a failure of the main path is detected. If the constraint path information contains at least one segment identification information and / or link segment identification information of a designated network node that supports MPLS SR but does not support SRv6, the next-hop network node is determined by the source node based on the backup forwarding table corresponding to the TI-LFA FRR path.
[0097] Preferably, the first encapsulation and forwarding module is specifically used to:
[0098] When the total number of all designated nodes is 1, and it is determined based on the constraint path information that the designated network node included in the constraint path information supports MPLS SR but does not support SRv6, the first MPLS label information is encapsulated for the service message to obtain an encapsulated service message, wherein the first MPLS label information includes the Node SID and / or Adj SID of the designated network node included in the constraint path information.
[0099] Preferably, the first encapsulation and forwarding module is specifically used to:
[0100] When the total number of all designated nodes is 2, for the first designated network node and the second designated network node in the constrained path information, if it is determined according to the constrained path information that the first designated network node supports both MPLS SR and SRv6, and the second designated network node supports MPLS SR but does not support SRv6, then encapsulate the service message with a first IPv6 header, a first SRH header, and second MPLS label information to obtain an encapsulated service message, wherein the source IPv6 address in the first IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the first designated network node included in the constrained path information, the segment list information in the first SRH header includes the End SID and / or End.X SID of the first designated network node, the second MPLS label information includes the Node SID and / or Adj SID of the second designated network node included in the constrained path information, and the second MPLS label information is located after the first SRH header;
[0101] If it is determined according to the constrained path information that the first designated network node supports MPLS SR but not SRv6, and the second designated network node supports both MPLS SR and SRv6, third MPLS label information, a second IPv6 header, and a second SRH header are encapsulated for the service message to obtain an encapsulated service message, wherein the third MPLS label information includes the Node SID and / or Adj SID of the first designated network node included in the constrained path information, the source IPv6 address in the second IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the two designated network nodes included in the constrained path information, the segment list information in the second SRH header includes the End SID and / or End.X SID of the second designated network node, and the third MPLS label information is located in front of the second SRH header;
[0102] If it is determined according to the constrained path information that both the first designated network node and the second designated network node support MPLS SR but do not support SRv6, the fourth MPLS label information is encapsulated for the service message, wherein the fourth MPLS label information sequentially includes: the Node SID and / or Adj SID of the first designated network node included in the constrained path information, and the Node SID and / or Adj SID of the second designated network node.
[0103] Preferably, the first encapsulation and forwarding module is specifically used to:
[0104] When the total number of all designated nodes is 3, for the first designated network node, the second designated network node and the third designated network node in the constrained path information, if it is determined according to the constrained path information that the first designated network node supports both MPLS SR and SRv6, the second designated network node supports MPLS SR but does not support SRv6, and the third designated network node supports both MPLS SR and SRv6, then a third IPv6 header, a third SRH header, fifth MPLS label information, a fourth IPv6 header and a fourth SRH header are encapsulated for the service message to obtain an encapsulated service message, wherein the source IPv6 address of the third IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the first designated network node included in the constrained path information, the segment list information in the third SRH header includes the End SID and / or End.X SID of the first designated network node, and the fifth MPLS label information includes the Node SID and / or Adj SID of the second designated network node included in the constrained path information. SID, the source IPv6 address of the fourth IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the third designated network node included in the constrained path information, the segment list information in the fourth SRH header includes the End SID and / or End.X SID of the third designated network node, and the fifth MPLS label information is located in front of the fourth IPv6 header and behind the third SRH header;
[0105] If it is determined according to the constrained path information that the first designated network node and the second designated network node support both MPLS SR and SRv6, and the third designated network node supports MPLS SR but does not support SRv6, a fifth IPv6 header, a fifth SRH header and sixth MPLS label information are encapsulated for the service message to obtain an encapsulated service message, wherein the source IPv6 address of the fifth IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the first designated network node included in the constrained path information, the fifth SRH header sequentially includes: the End SID and / or End.X SID of the second designated network node, and the EndSID and / or End.X SID of the first designated network node, the sixth MPLS label information includes the Node SID and / or Adj SID of the third designated network node included in the constrained path information, and the sixth MPLS label information is located after the fifth SRH header;
[0106] If it is determined according to the constrained path information that the first designated network node supports both MPLS SR and SRv6, and the second designated network node and the third designated network node both support MPLS SR but do not support SRv6, a sixth IPv6 header, a sixth SRH header and a seventh MPLS label information are encapsulated for the service message to obtain an encapsulated service message, wherein the source IPv6 address of the sixth IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the first designated network node included in the constrained path information, the segment list information in the sixth SRH header includes the End SID and / or End.X SID of the first designated network node, the seventh MPLS label information includes in sequence: the Node SID and / or Adj SID of the second designated network node included in the constrained path information, and the Node SID and / or Adj SID of the third designated network node, and the seventh MPLS label information is located after the sixth SRH header;
[0107] If it is determined according to the constrained path information that the first designated network node supports MPLS SR but does not support SRv6, and the second designated network node and the third designated network node both support MPLS SR and SRv6, encapsulate the service message with eighth MPLS label information, a seventh IPv6 header and a seventh SRH header to obtain an encapsulated service message, wherein the eighth MPLS label information includes the Node SID and / or Adj SID of the first designated network node included in the constrained path information, the source IPv6 address of the seventh IPv6 header is the IPv6 address of the source node, and the destination IPv6 address is the End SID and / or End.X SID of the second designated network node included in the constrained path information, and the seventh SRH header sequentially includes: the EndSID and / or End.X SID of the third designated network node included in the constrained path information, and the End SID and / or End.X SID of the second designated network node, and the eighth MPLS label information is located in front of the seventh IPv6 header;
[0108] If it is determined according to the constrained path information that the first designated network node supports MPLS SR but not SRv6, the second designated network node supports both MPLS SR and SRv6, and the third designated network node supports MPLS SR but not SRv6, then the service message is encapsulated with ninth MPLS label information, an eighth IPv6 header, an eighth SRH header, and tenth MPLS label information to obtain an encapsulated service message, wherein the ninth MPLS label information includes the Node SID and / or Adj SID of the first designated network node included in the constrained path information, the source IPv6 address of the eighth IPv6 header is the IPv6 address of the source node, and the destination IPv6 address is the End SID and / or End.X SID of the second designated network node included in the constrained path information, the segment list information in the eighth SRH header includes the End SID and / or End.X SID of the second designated network node, and the tenth MPLS label information includes the Node SID and / or Adj SID of the third designated network node included in the constrained path information. SID, the ninth MPLS label information is located in front of the eighth IPv6 header, and the tenth MPLS label information is located in front of the eighth SRH header;
[0109] If it is determined according to the constrained path information that both the first designated network node and the second designated network node support MPLS SR but do not support SRv6, and the third designated network node supports both MPLS SR and SRv6, then the service message is encapsulated with eleventh MPLS label information, a ninth IPv6 header, and a ninth SRH header to obtain an encapsulated service message, wherein the eleventh MPLS label information sequentially includes: the Node SID and / or Adj SID of the first designated network node included in the constrained path information, and the Node SID and / or AdjSID of the second designated network node, the source IPv6 address of the ninth IPv6 header is the IPv6 address of the source node, and the destination IPv6 address is the End SID and / or End.X SID of the third designated network node included in the constrained path information, the segment list information in the ninth SRH header includes the End SID and / or End.X SID of the third designated network node, and the eleventh MPLS label information is located in front of the ninth IPv6 header;
[0110] If it is determined according to the constrained path information that the first designated network node, the second designated network node, and the third designated network node all support MPLS SR but do not support SRv6, the twelfth MPLS label information is encapsulated for the service message to obtain an encapsulated service message, wherein the twelfth MPLS label information includes, in sequence: the Node SID and / or Adj SID of the first designated network node included in the constrained path information, the Node SID and / or Adj SID of the second designated network node included in the constrained path information, and the Node SID and / or Adj SID of the third designated network node included in the constrained path information.
[0111] Preferably, the device further comprises:
[0112] The second encapsulation and forwarding module ( Figure 5 (not shown) is used for, when receiving the service message and monitoring that the primary path fails, if the segment identification information and / or link segment identification information of the designated network node that supports MPLS SR but does not support SRv6 does not exist in the constraint path information, then encapsulating the service message with a tenth IPv6 header and a tenth SRH header to obtain an encapsulated service message;
[0113] Among them, the source IPv6 address of the tenth IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the first designated network node included in the constrained path information, and the tenth SRH header includes the End SID and / or End.X SID of all designated network nodes included in the constrained path information, and the End SID and / or End.X SID of all designated network nodes are arranged in order from far to near according to all designated network nodes on the TI-LFA FRR path.
[0114] It can be seen from the above technical solutions that, in an embodiment of the present application, when there are individual network nodes in the SRv6 network that support MPLS SR but not SRv6, for the source node on any main path, the TI-LFA FRR path corresponding to the path can be determined based on the End SID and End.X SID of the network nodes in the SRv6 network that support both MPLS SR and SRv6, and the Node SID and / or Adj SID of the network nodes that support MPLS SR but not SRv6, so that when the main path fails, the source node can promptly use the constraint path information corresponding to the TI-LFA FRR path corresponding to the path to forward related business messages, and there will be no packet loss problem, thereby improving the network experience.
[0115] The present application also provides an electronic device, such as Figure 6 As shown, it includes a processor 61 and a machine-readable storage medium 62, wherein the machine-readable storage medium 62 stores machine-executable instructions that can be executed by the processor 61, and the processor 61 is prompted by the machine-executable instructions to implement the steps of the above-mentioned message forwarding method.
[0116] The machine-readable storage medium may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk storage. Optionally, the machine-readable storage medium may also be at least one storage device located away from the processor.
[0117] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0118] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned message forwarding method are implemented.
[0119] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A message forwarding method, It is characterized in that The method is applied to a source node on any primary path in a segment routing and Internet Protocol Version 6 (SRv6) network, and the method comprises: According to the acquired segment identification information and link segment identification information of other network nodes except the source node in the SRv6 network, determine the topology-independent loop-free backup fast rerouting TI-LFA FRR path corresponding to the main path and the constraint path information corresponding to the TI-LFA FRR path, wherein, when any other network node supports both multi-protocol label switching segment routing MPLS SR and SRv6, the segment identification information of the other network node is the endpoint segment identification End SID of the other network node, and the link segment identification information of the other network node is the endpoint three-layer cross-connection segment identification End.XSID of the other network node; when any other network node supports MPLS SR but does not support SRv6, the segment identification information of the other network node is the node segment identification Node SID of the other network node, and the link segment identification information of the other network node is the adjacent segment identification Adj SID of the other network node, and the constraint path information includes the TI-LFA Segment identification information and / or link segment identification information of at least one designated network node on the FRR path, and the total number of all designated network nodes is no more than 3, and all designated network nodes do not include the source node and the destination node on the primary path; When a service message is received and a failure of the main path is detected, if the constraint path information contains at least one segment identification information and / or link segment identification information of a designated network node that supports MPLS SR but does not support SRv6, the service message is encapsulated according to the constraint path information and the preset encapsulation rules, and the encapsulated service message is forwarded to the next-hop network node, wherein the next-hop network node is determined by the source node based on the backup forwarding table corresponding to the TI-LFA FRR path.
2. The method according to claim 1, It is characterized in that When the total number of all designated nodes is 1, encapsulating the service message according to the constrained path information and the preset encapsulation rule specifically includes: When it is determined according to the constrained path information that the designated network node included in the constrained path information supports MPLS SR but does not support SRv6, first multi-protocol label switching MPLS label information is encapsulated for the service message to obtain an encapsulated service message, wherein the first MPLS label information includes the NodeSID and / or Adj SID of the designated network node included in the constrained path information.
3. The method according to claim 1, It is characterized in that When the total number of all designated nodes is 2, encapsulating the service message according to the constrained path information and the preset encapsulation rule specifically includes: For the first designated network node and the second designated network node in the constrained path information, if it is determined according to the constrained path information that the first designated network node supports both MPLS SR and SRv6, and the second designated network node supports MPLS SR but does not support SRv6, then encapsulate the service message with a first Internet Protocol version 6 IPv6 header, a first routing extension header SRH header, and second MPLS label information to obtain an encapsulated service message, wherein the source IPv6 address in the first IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the first designated network node included in the constrained path information, the segment list information in the first SRH header includes the End SID and / or End.X SID of the first designated network node, the second MPLS label information includes the Node SID and / or Adj SID of the second designated network node included in the constrained path information, and the second MPLS label information is located after the first SRH header; If it is determined according to the constrained path information that the first designated network node supports MPLS SR but not SRv6, and the second designated network node supports both MPLS SR and SRv6, third MPLS label information, a second IPv6 header, and a second SRH header are encapsulated for the service message to obtain an encapsulated service message, wherein the third MPLS label information includes the Node SID and / or Adj SID of the first designated network node included in the constrained path information, the source IPv6 address in the second IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the two designated network nodes included in the constrained path information, the segment list information in the second SRH header includes the End SID and / or End.X SID of the second designated network node, and the third MPLS label information is located in front of the second SRH header; If it is determined according to the constrained path information that both the first designated network node and the second designated network node support MPLS SR but do not support SRv6, the fourth MPLS label information is encapsulated for the service message, wherein the fourth MPLS label information sequentially includes: the Node SID and / or Adj SID of the first designated network node included in the constrained path information, and the Node SID and / or Adj SID of the second designated network node.
4. The method according to claim 1, It is characterized in that When the total number of all designated nodes is 3, encapsulating the service message according to the constrained path information and the preset encapsulation rule specifically includes: For the first designated network node, the second designated network node, and the third designated network node in the constrained path information, if it is determined according to the constrained path information that the first designated network node supports both MPLS SR and SRv6, the second designated network node supports MPLS SR but does not support SRv6, and the third designated network node supports both MPLS SR and SRv6, then a third IPv6 header, a third SRH header, fifth MPLS label information, a fourth IPv6 header, and a fourth SRH header are encapsulated for the service message to obtain an encapsulated service message, wherein the source IPv6 address of the third IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the first designated network node included in the constrained path information, the segment list information in the third SRH header includes the End SID and / or End.X SID of the first designated network node, and the fifth MPLS label information includes the Node SID and / or Adj SID of the second designated network node included in the constrained path information. SID, the source IPv6 address of the fourth IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the third designated network node included in the constrained path information, the segment list information in the fourth SRH header includes the End SID and / or End.XSID of the third designated network node, and the fifth MPLS label information is located in front of the fourth IPv6 header and behind the third SRH header; If it is determined according to the constrained path information that the first designated network node and the second designated network node support both MPLS SR and SRv6, and the third designated network node supports MPLS SR but does not support SRv6, a fifth IPv6 header, a fifth SRH header and sixth MPLS label information are encapsulated for the service message to obtain an encapsulated service message, wherein the source IPv6 address of the fifth IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the first designated network node included in the constrained path information, the fifth SRH header sequentially includes: the End SID and / or End.X SID of the second designated network node, and the End SID and / or End.X SID of the first designated network node, the sixth MPLS label information includes the Node SID and / or Adj SID of the third designated network node included in the constrained path information, and the sixth MPLS label information is located after the fifth SRH header; If it is determined according to the constrained path information that the first designated network node supports both MPLS SR and SRv6, and the second designated network node and the third designated network node both support MPLS SR but do not support SRv6, a sixth IPv6 header, a sixth SRH header and seventh MPLS label information are encapsulated for the service message to obtain an encapsulated service message, wherein the source IPv6 address of the sixth IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the first designated network node included in the constrained path information, the segment list information in the sixth SRH header includes the End SID and / or End.X SID of the first designated network node, the seventh MPLS label information sequentially includes: the Node SID and / or Adj SID of the second designated network node included in the constrained path information, and the Node SID and / or Adj SID of the third designated network node, and the seventh MPLS label information is located after the sixth SRH header; If it is determined according to the constrained path information that the first designated network node supports MPLS SR but does not support SRv6, and the second designated network node and the third designated network node both support MPLS SR and SRv6, encapsulate the service message with eighth MPLS label information, a seventh IPv6 header and a seventh SRH header to obtain an encapsulated service message, wherein the eighth MPLS label information includes the Node SID and / or Adj SID of the first designated network node included in the constrained path information, the source IPv6 address of the seventh IPv6 header is the IPv6 address of the source node, and the destination IPv6 address is the End SID and / or End.X SID of the second designated network node included in the constrained path information, and the seventh SRH header sequentially includes: the End SID and / or End.X SID of the third designated network node included in the constrained path information, and the End SID and / or End.X SID of the second designated network node, and the eighth MPLS label information is located in front of the seventh IPv6 header; If it is determined according to the constrained path information that the first designated network node supports MPLS SR but not SRv6, the second designated network node supports both MPLS SR and SRv6, and the third designated network node supports MPLS SR but not SRv6, then the service message is encapsulated with ninth MPLS label information, an eighth IPv6 header, an eighth SRH header, and tenth MPLS label information to obtain an encapsulated service message, wherein the ninth MPLS label information includes the Node SID and / or Adj SID of the first designated network node included in the constrained path information, the source IPv6 address of the eighth IPv6 header is the IPv6 address of the source node, and the destination IPv6 address is the End SID and / or End.X SID of the second designated network node included in the constrained path information, the segment list information in the eighth SRH header includes the End SID and / or End.X SID of the second designated network node, and the tenth MPLS label information includes the Node SID and / or Adj SID of the third designated network node included in the constrained path information. SID, the ninth MPLS label information is located in front of the eighth IPv6 header, and the tenth MPLS label information is located in front of the eighth SRH header; If it is determined according to the constrained path information that both the first designated network node and the second designated network node support MPLS SR but do not support SRv6, and the third designated network node supports both MPLS SR and SRv6, then encapsulate the service message with eleventh MPLS label information, a ninth IPv6 header, and a ninth SRH header to obtain an encapsulated service message, wherein the eleventh MPLS label information sequentially includes: the Node SID and / or Adj SID of the first designated network node included in the constrained path information, and the Node SID and / or Adj SID of the second designated network node, the source IPv6 address of the ninth IPv6 header is the IPv6 address of the source node, and the destination IPv6 address is the End SID and / or End.X SID of the third designated network node included in the constrained path information, the segment list information in the ninth SRH header includes the End SID and / or End.X SID of the third designated network node, and the eleventh MPLS label information is located in front of the ninth IPv6 header; If it is determined according to the constrained path information that the first designated network node, the second designated network node, and the third designated network node all support MPLS SR but do not support SRv6, the twelfth MPLS label information is encapsulated for the service message to obtain an encapsulated service message, wherein the twelfth MPLS label information includes, in sequence: the Node SID and / or Adj SID of the first designated network node included in the constrained path information, the Node SID and / or Adj SID of the second designated network node included in the constrained path information, and the Node SID and / or Adj SID of the third designated network node included in the constrained path information.
5. The method according to claim 1, It is characterized in that The method further comprises: When the service message is received and a failure of the primary path is detected, if the segment identification information and / or link segment identification information of the designated network node that supports MPLS SR but does not support SRv6 does not exist in the constrained path information, a tenth IPv6 header and a tenth SRH header are encapsulated for the service message to obtain an encapsulated service message; Among them, the source IPv6 address of the tenth IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.XSID of the first designated network node included in the constrained path information, and the tenth SRH header includes the End SID and / or End.X SID of all designated network nodes included in the constrained path information, and the End SID and / or End.X SID of all designated network nodes are arranged in order from far to near according to all designated network nodes on the TI-LFA FRR path.
6. A message forwarding device, It is characterized in that The device is applied to a source node on any main path in a segment routing and Internet Protocol Version 6 SRv6 network, and the device includes: A determination module, used to determine the topology-independent loop-free backup fast rerouting TI-LFAFRR path corresponding to the main path and the constraint path information corresponding to the TI-LFA FRR path according to the acquired segment identification information and link segment identification information of other network nodes except the source node in the SRv6 network, wherein, when any other network node supports both multi-protocol label switching segment routing MPLS SR and SRv6, the segment identification information of the other network node is the destination segment identification End SID of the other network node, and the link segment identification information of the other network node is the endpoint three-layer cross-connection segment identification End.X SID of the other network node; when any other network node supports MPLS SR but does not support SRv6, the segment identification information of the other network node is the node segment identification Node SID of the other network node, and the link segment identification information of the other network node is the adjacent segment identification Adj SID of the other network node. SID, the constraint path information includes the segment identification information and / or link segment identification information of at least one designated network node on the TI-LFAFRR path, and the total number of all designated network nodes is not more than 3, and all designated network nodes do not include the source node and the destination node on the main path; The first encapsulation and forwarding module is used to encapsulate the service message according to the constraint path information and the preset encapsulation rule, and forward the encapsulated service message to the next-hop network node when a service message is received and a failure of the main path is detected. If the constraint path information contains at least one segment identification information and / or link segment identification information of a designated network node that supports MPLS SR but does not support SRv6, the next-hop network node is determined by the source node based on the backup forwarding table corresponding to the TI-LFA FRR path.
7. The device according to claim 6, It is characterized in that The first encapsulation and forwarding module is specifically used to: When the total number of all designated nodes is 1 and it is determined according to the constrained path information that the designated network node included in the constrained path information supports MPLS SR but does not support SRv6, first multi-protocol label switching MPLS label information is encapsulated for the service message to obtain an encapsulated service message, wherein the first MPLS label information includes the Node SID and / or Adj SID of the designated network node included in the constrained path information.
8. The device according to claim 6, It is characterized in that The first encapsulation and forwarding module is specifically used to: When the total number of all designated nodes is 2, for the first designated network node and the second designated network node in the constrained path information, if it is determined according to the constrained path information that the first designated network node supports both MPLS SR and SRv6, and the second designated network node supports MPLS SR but not SRv6, a first Internet Protocol version 6 IPv6 header, a first routing extension header SRH header, and second MPLS label information are encapsulated for the service message to obtain an encapsulated service message, wherein the source IPv6 address in the first IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the first designated network node included in the constrained path information, the segment list information in the first SRH header includes the End SID and / or End.X SID of the first designated network node, the second MPLS label information includes the Node SID and / or Adj SID of the second designated network node included in the constrained path information, and the second MPLS label information is located after the first SRH header; If it is determined according to the constrained path information that the first designated network node supports MPLS SR but not SRv6, and the second designated network node supports both MPLS SR and SRv6, third MPLS label information, a second IPv6 header, and a second SRH header are encapsulated for the service message to obtain an encapsulated service message, wherein the third MPLS label information includes the Node SID and / or Adj SID of the first designated network node included in the constrained path information, the source IPv6 address in the second IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the two designated network nodes included in the constrained path information, the segment list information in the second SRH header includes the End SID and / or End.X SID of the second designated network node, and the third MPLS label information is located in front of the second SRH header; If it is determined according to the constrained path information that both the first designated network node and the second designated network node support MPLS SR but do not support SRv6, the fourth MPLS label information is encapsulated for the service message, wherein the fourth MPLS label information sequentially includes: the Node SID and / or Adj SID of the first designated network node included in the constrained path information, and the Node SID and / or Adj SID of the second designated network node.
9. The device according to claim 6, It is characterized in that The first encapsulation and forwarding module is specifically used to: When the total number of all designated nodes is 3, for the first designated network node, the second designated network node and the third designated network node in the constrained path information, if it is determined according to the constrained path information that the first designated network node supports both MPLS SR and SRv6, the second designated network node supports MPLS SR but does not support SRv6, and the third designated network node supports both MPLS SR and SRv6, then a third IPv6 header, a third SRH header, fifth MPLS label information, a fourth IPv6 header and a fourth SRH header are encapsulated for the service message to obtain an encapsulated service message, wherein the source IPv6 address of the third IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the first designated network node included in the constrained path information, the segment list information in the third SRH header includes the End SID and / or End.X SID of the first designated network node, and the fifth MPLS label information includes the Node SID and / or Adj SID of the second designated network node included in the constrained path information. SID, the source IPv6 address of the fourth IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the third designated network node included in the constrained path information, the segment list information in the fourth SRH header includes the End SID and / or End.X SID of the third designated network node, and the fifth MPLS label information is located in front of the fourth IPv6 header and behind the third SRH header; If it is determined according to the constrained path information that the first designated network node and the second designated network node support both MPLS SR and SRv6, and the third designated network node supports MPLS SR but does not support SRv6, a fifth IPv6 header, a fifth SRH header and sixth MPLS label information are encapsulated for the service message to obtain an encapsulated service message, wherein the source IPv6 address of the fifth IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the first designated network node included in the constrained path information, the fifth SRH header sequentially includes: the End SID and / or End.X SID of the second designated network node, and the End SID and / or End.X SID of the first designated network node, the sixth MPLS label information includes the Node SID and / or Adj SID of the third designated network node included in the constrained path information, and the sixth MPLS label information is located after the fifth SRH header; If it is determined according to the constrained path information that the first designated network node supports both MPLS SR and SRv6, and the second designated network node and the third designated network node both support MPLS SR but do not support SRv6, a sixth IPv6 header, a sixth SRH header and seventh MPLS label information are encapsulated for the service message to obtain an encapsulated service message, wherein the source IPv6 address of the sixth IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.X SID of the first designated network node included in the constrained path information, the segment list information in the sixth SRH header includes the End SID and / or End.X SID of the first designated network node, the seventh MPLS label information sequentially includes: the Node SID and / or Adj SID of the second designated network node included in the constrained path information, and the Node SID and / or Adj SID of the third designated network node, and the seventh MPLS label information is located after the sixth SRH header; If it is determined according to the constrained path information that the first designated network node supports MPLS SR but does not support SRv6, and the second designated network node and the third designated network node both support MPLS SR and SRv6, encapsulate the service message with eighth MPLS label information, a seventh IPv6 header and a seventh SRH header to obtain an encapsulated service message, wherein the eighth MPLS label information includes the Node SID and / or Adj SID of the first designated network node included in the constrained path information, the source IPv6 address of the seventh IPv6 header is the IPv6 address of the source node, and the destination IPv6 address is the End SID and / or End.X SID of the second designated network node included in the constrained path information, and the seventh SRH header sequentially includes: the End SID and / or End.X SID of the third designated network node included in the constrained path information, and the End SID and / or End.X SID of the second designated network node, and the eighth MPLS label information is located in front of the seventh IPv6 header; If it is determined according to the constrained path information that the first designated network node supports MPLS SR but not SRv6, the second designated network node supports both MPLS SR and SRv6, and the third designated network node supports MPLS SR but not SRv6, then the service message is encapsulated with ninth MPLS label information, an eighth IPv6 header, an eighth SRH header, and tenth MPLS label information to obtain an encapsulated service message, wherein the ninth MPLS label information includes the Node SID and / or Adj SID of the first designated network node included in the constrained path information, the source IPv6 address of the eighth IPv6 header is the IPv6 address of the source node, and the destination IPv6 address is the End SID and / or End.X SID of the second designated network node included in the constrained path information, the segment list information in the eighth SRH header includes the End SID and / or End.X SID of the second designated network node, and the tenth MPLS label information includes the Node SID and / or Adj SID of the third designated network node included in the constrained path information. SID, the ninth MPLS label information is located in front of the eighth IPv6 header, and the tenth MPLS label information is located in front of the eighth SRH header; If it is determined according to the constrained path information that both the first designated network node and the second designated network node support MPLS SR but do not support SRv6, and the third designated network node supports both MPLS SR and SRv6, then encapsulate the service message with eleventh MPLS label information, a ninth IPv6 header, and a ninth SRH header to obtain an encapsulated service message, wherein the eleventh MPLS label information sequentially includes: the Node SID and / or Adj SID of the first designated network node included in the constrained path information, and the Node SID and / or Adj SID of the second designated network node, the source IPv6 address of the ninth IPv6 header is the IPv6 address of the source node, and the destination IPv6 address is the End SID and / or End.X SID of the third designated network node included in the constrained path information, the segment list information in the ninth SRH header includes the End SID and / or End.X SID of the third designated network node, and the eleventh MPLS label information is located in front of the ninth IPv6 header; If it is determined according to the constrained path information that the first designated network node, the second designated network node, and the third designated network node all support MPLS SR but do not support SRv6, the twelfth MPLS label information is encapsulated for the service message to obtain an encapsulated service message, wherein the twelfth MPLS label information includes, in sequence: the Node SID and / or Adj SID of the first designated network node included in the constrained path information, the Node SID and / or Adj SID of the second designated network node included in the constrained path information, and the Node SID and / or Adj SID of the third designated network node included in the constrained path information.
10. The device according to claim 6, It is characterized in that The device also includes: A second encapsulation and forwarding module is configured to, when receiving the service message and monitoring that the primary path fails, if the segment identification information and / or link segment identification information of the designated network node that supports MPLS SR but does not support SRv6 does not exist in the constrained path information, encapsulate the service message with a tenth IPv6 header and a tenth SRH header to obtain an encapsulated service message; Among them, the source IPv6 address of the tenth IPv6 header is the IPv6 address of the source node, the destination IPv6 address is the End SID and / or End.XSID of the first designated network node included in the constrained path information, and the tenth SRH header includes the End SID and / or End.X SID of all designated network nodes included in the constrained path information, and the End SID and / or End.X SID of all designated network nodes are arranged in order from far to near according to all designated network nodes on the TI-LFA FRR path.
