Method, device, network equipment, system and storage medium for sending message

By generating and sending messages containing corresponding tags in edge network devices, the problem that first-level operators upgraded to SRv6 cannot provide CSC services to second-level operators running MPLS is solved, and compatibility and service provision between networks are achieved.

CN113852550BActive Publication Date: 2025-03-28HUAWEI TECH CO LTD

Patent Information

Application Number
CN202011098780.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-06-28
Filing Date
2020-10-14
Publication Date
2025-03-28
Estimated Expiration
2040-10-14

AI Technical Summary

Technical Problem

Level 1 operators upgraded to SRv6 cannot provide CSC services to level 2 operators running MPLS.

Method used

By receiving messages containing target segment identification in an edge network device, and generating and sending messages containing corresponding tags, the messages can be forwarded in the network of a secondary operator running MPLS.

Benefits of technology

The first-level operators that have been upgraded to SRv6 can provide CSC services to the second-level operators running MPLS, solving the compatibility issues between networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113852550B_ABST
    Figure CN113852550B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method, device, network equipment, system and storage medium for sending a message, which belongs to the field of communication technology. The edge network equipment of the first-level operator upgraded to the SRv6 network establishes a mapping relationship between a segment identifier and an MPLS label, and after receiving a message containing an MPLS label sent by the network equipment of the second-level operator, generates a message containing a segment identifier according to the mapping relationship, and the message containing the segment identifier is forwarded in the SRv6 network of the first-level operator, thereby solving the problem that the first-level operator upgraded to SRv6 cannot provide CSC services for the second-level operator running MPLS.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to Chinese patent application No. 202010598722.7, filed on June 28, 2020, and entitled “A method and network device for sending messages”, the entire contents of which are incorporated by reference in the embodiments of this application. Technical Field

[0002] The embodiments of the present invention relate to the field of communications, and in particular to a method, apparatus, network equipment, system and storage medium for sending a message. Background Art

[0003] The user of a border gateway protocol (BGP) / multiprotocol label switching (MPLS) Internet protocol (IP) virtual private network (VPN) service provider may also be a service provider itself. In this case, the service provider is called a provider carrier or first carrier, and the user of the service provider is called a customer carrier or second carrier. This networking model is called a carriers' carrier (CSC), with the lower-level service provider (SP) acting as a VPN customer of the higher-level SP.

[0004] When the Tier 1 operator's network is upgraded to Internet Protocol version 6 (IPv6) segment routing (SRv6) and uses SRv6 tunnels to carry VPN traffic, but the Tier 2 operator's network has not been upgraded and still runs MPLS, the Tier 1 operator that has upgraded to SRv6 cannot provide CSC services to the Tier 2 operator that runs MPLS. Summary of the invention

[0005] The present application proposes a method, apparatus, network device, system and storage medium for sending a message, which are used to solve the problem that a first-tier operator upgraded to SRv6 cannot provide CSC services for a second-tier operator running MPLS.

[0006] In a first aspect, a method for sending a message is provided, comprising: a first edge network device receives a first message containing a target segment identifier; thereafter, the first edge network device generates a second message containing a first label based on the first message, wherein the first label has a mapping relationship with the target segment identifier; and the first edge network device sends the second message.

[0007] By applying the solution provided in the present application, the export edge network equipment of the first-tier operator upgraded to the SRv6 network generates a second message containing a first label after receiving a first message containing a target segment identifier, so that the second message can be forwarded in the network of the second-tier operator running MPLS, thereby solving the problem that the first-tier operator upgraded to SRv6 cannot provide CSC services for the second-tier operator running MPLS.

[0008] In a possible implementation, the target segment identifier is a first segment identifier, and the first segment identifier is used to indicate decapsulation of a message header and an encapsulation label; the first edge network device generates a second message containing a first label based on the first message, including: the first edge network device decapsulates the SRv6 message header of the first message according to the first segment identifier, and based on the mapping relationship between the first segment identifier and the first label, encapsulates the decapsulated message with the first label to obtain a second message containing the first label.

[0009] The first segment identifier is used to indicate the decapsulation of the message header and the encapsulation label, so that the first edge network device can be triggered to convert the first message into the second message based on the first segment identifier, so that the second message can be transmitted in the network of the secondary operator running MPLS. The SRv6 message header of the first message decapsulated by the first edge network device according to the first segment identifier includes not only the IPv6 message header, but also the extended message header.

[0010] In a possible implementation, before the first edge network device generates a second message containing a first label according to the first message, the process further includes: the first edge network device receives a first route and a first label corresponding to the first route; the first edge network device publishes a second route carrying a first segment identifier based on the first route; the first edge network device establishes a mapping relationship between the first label and the first segment identifier. By establishing a mapping relationship between the first segment identifier and the first label during the process of publishing the route, it is convenient to quickly realize the conversion from the first message to the second message when the message is subsequently transmitted.

[0011] In one possible implementation, the target segment identifier is the second segment identifier, the first message also includes a first flag, the second segment identifier is used to indicate decapsulation of the message header, and the first flag is used to indicate the encapsulation label; the first edge network device generates a second message containing the first label based on the first message, including: the first edge network device decapsulates the IPv6 message header of the first message according to the second segment identifier, and according to the indication of the first flag, based on the mapping relationship between the second segment identifier and the first label, encapsulates the decapsulated message with the first label to obtain a second message containing the first label.

[0012] The second segment identifier is used to indicate the decapsulation of the message header, and the first flag is used to indicate the encapsulation label, so that the first edge network device can be triggered to convert the first message into the second message based on the second segment identifier and the first flag, so that the second message is transmitted in the network of the secondary operator running MPLS. The SRv6 message header of the first message decapsulated by the first edge network device according to the second segment identifier includes not only the IPv6 message header, but also the extended message header.

[0013] In a possible implementation, before the first edge network device generates the second message containing the first label according to the first message, the method further includes: the first edge network device receives the first route and the first label corresponding to the first route; the first edge network device publishes the third route carrying the second segment identifier based on the first route; the first edge network device establishes a mapping relationship between the first label and the second segment identifier. By establishing the mapping relationship between the second segment identifier and the first label in the process of publishing the route, it is convenient to quickly realize the conversion from the first message to the second message when the message is subsequently transmitted.

[0014] In a possible implementation manner, the first label is an MPLS label.

[0015] In one possible implementation, the first edge network device is an exit operator edge PE device of the first network in the operator's operator CSC system, the CSC system also includes a second network, the first network is an SRv6 network, the second network accesses the first network in MPLS mode, the first network is a network of a first-tier operator, and the second network is a network of a second-tier operator.

[0016] In one possible implementation, a first edge network device receives a first message containing a target segment identifier, including: an egress PE device of the first network receives a first message containing a target segment identifier sent by an ingress PE device of the first network; the first edge network device sends a second message, including: the egress PE device of the first network sends a second message to a customer edge CE device of the second network; wherein the first message is a data message and the second message is a data message.

[0017] In a possible implementation, the first edge network device receives the first route and the first label corresponding to the first route, including: the egress PE device of the first network receives the first route and the first label corresponding to the first route sent by the customer edge CE device of the second network.

[0018] In a possible implementation, the first edge network device publishes the second route carrying the first segment identifier based on the first route, including: the egress PE device of the first network sends the second route carrying the first segment identifier to the ingress PE device of the first network.

[0019] In a possible implementation, the first edge network device publishes a third route carrying the second segment identifier based on the first route, including: the egress PE device of the first network sends the third route carrying the second segment identifier to the ingress PE device of the first network.

[0020] In a possible implementation manner, the first network and the second network are in different autonomous domain systems.

[0021] In a second aspect, a method for sending a message is provided, the method comprising: a second edge network device receives a third message containing a second label, the second label has a mapping relationship with a target segment identifier, and the second edge network device generates a first message containing a target segment identifier based on the third message; thereafter, the second edge network device sends the first message.

[0022] By applying the solution provided in the present application, the ingress edge network device of the first-tier operator upgraded to the SRv6 network generates a first message containing a target segment identifier after receiving a third message containing a second label, so that the first message can be forwarded in the network of the first-tier operator upgraded to the SRv6 network, thereby solving the problem that the first-tier operator upgraded to SRv6 cannot provide CSC services for the second-tier operator running MPLS.

[0023] In one possible implementation, the target segment identifier is a first segment identifier, which is used to indicate decapsulation of the message header and encapsulation label; the second edge network device generates a first message containing the target segment identifier based on the third message, including: the second edge network device generates a first message containing the first segment identifier based on the mapping relationship between the second label and the first segment identifier.

[0024] By quickly generating a first message containing the first segment identifier based on the mapping relationship between the second label and the first segment identifier, the first message can be forwarded in the network of a first-tier operator upgraded to an SRv6 network, thereby solving the problem that a first-tier operator upgraded to SRv6 cannot provide CSC services for a second-tier operator running MPLS.

[0025] In a possible implementation, the second edge network device generates a first message containing a first segment identifier based on a mapping relationship between the second label and the first segment identifier, including: the second edge network device decapsulates the second label in the third message based on the mapping relationship between the second label and the first segment identifier, and encapsulates an SRv6 message header in the decapsulated message, wherein the SRv6 message header contains the first segment identifier. For example, the second edge network device pops up the second label in the third message based on the mapping relationship between the first segment identifier and the second label, and encapsulates an SRv6 message header in the message from which the second label is popped up, wherein the SRv6 message header contains the first segment identifier, thereby obtaining a first message containing the first segment identifier. Among them, the SRv6 message header encapsulated by the second edge network device includes not only an IPv6 message header, but also an extended message header.

[0026] In a possible implementation, before the second edge network device receives the third message containing the second label, it also includes: the second edge network device receives the second route carrying the first segment identifier; the second edge network device publishes a fourth route and a second label corresponding to the fourth route; the second edge network device establishes a mapping relationship between the second label and the first segment identifier.

[0027] By establishing a mapping relationship between the second label and the first segment identifier, it is convenient to quickly realize the conversion from the third message to the first message when the message is subsequently transmitted.

[0028] In one possible implementation, the target segment identifier is the second segment identifier, and the second segment identifier is used to indicate decapsulation of the message header; the second edge network device generates a first message containing the target segment identifier based on the third message, including: the second edge network device generates a first message containing the second segment identifier based on a mapping relationship between the second label and the second segment identifier, and the first message also includes a first flag, and the first flag is used to indicate the encapsulation label.

[0029] Based on the mapping relationship between the second label and the second segment identifier, a first message containing the second segment identifier and the first flag can be quickly generated, so that the first message can be forwarded in the network of the first-tier operator upgraded to the SRv6 network, thereby solving the problem that the first-tier operator upgraded to SRv6 cannot provide CSC services for the second-tier operator running MPLS.

[0030] In a possible implementation, the second edge network device generates a first message containing the second segment identifier based on the mapping relationship between the second label and the second segment identifier, including: the second edge network device decapsulates the second label in the third message based on the mapping relationship between the second segment identifier and the second label, and encapsulates the SRv6 message header in the decapsulated message, wherein the SRv6 message header contains the second segment identifier and the first flag. For example, the second edge network device pops up the second label in the third message based on the mapping relationship between the second segment identifier and the second label, and encapsulates the SRv6 message header in the message from which the second label is popped up, wherein the SRv6 message header contains the second segment identifier and the first flag, thereby obtaining a first message containing the first segment identifier and the first flag. Among them, the SRv6 message header encapsulated by the second edge network device includes not only the IPv6 message header, but also the extended message header.

[0031] In a possible implementation, before the second edge network device receives the third message containing the second label, it also includes: the second edge network device receives the third route carrying the second segment identifier; the second edge network device publishes a fourth route and a second label corresponding to the fourth route; the second edge network device establishes a mapping relationship between the second label and the second segment identifier.

[0032] By establishing a mapping relationship between the second label and the second segment identifier, it is convenient to quickly realize the conversion from the third message to the first message when the message is subsequently transmitted.

[0033] In a possible implementation manner, before the second edge network device publishes the fourth route and the second label corresponding to the fourth route, the method further includes: the second edge network device assigning the second label to the fourth route.

[0034] In a possible implementation manner, the second label is an MPLS label.

[0035] In a possible implementation manner, the first flag is located in a flag field of a segment routing header SRH of the first message.

[0036] In one possible implementation, the second edge network device is an entry operator edge PE device of the first network in the operator's operator CSC system, the CSC system also includes a third network, the first network is an SRv6 network, the third network accesses the first network via multi-protocol label switching MPLS, the first network is a network of a first-tier operator, and the third network is a network of a second-tier operator.

[0037] In one possible implementation, the second edge network device receives a third message containing a second label, including: an ingress PE device receives a third message containing a second label sent by a customer edge CE device of a third network; the second edge network device sends a first message, including: an ingress PE device of the first network sends a first message to an egress PE device of the first network; wherein the third message is a data message, and the first message is a data message.

[0038] In a possible implementation, the second edge network device receives the second route carrying the first segment identifier, including: the ingress PE device of the first network receives the second route carrying the first segment identifier sent by the egress PE device of the first network.

[0039] In a possible implementation, the second edge network device receives the third route carrying the second segment identifier, including: the ingress PE device of the first network receives the third route carrying the second segment identifier sent by the egress PE device of the first network.

[0040] In a possible implementation, the second edge network device publishes the fourth route and the second label corresponding to the fourth route, including: the ingress PE device of the first network publishes the fourth route and the second label corresponding to the fourth route to the CE device of the third network.

[0041] In a possible implementation manner, the first network and the third network are in different autonomous domain systems.

[0042] In a third aspect, a device for sending a message is provided, the device is applied to a first edge network device, and the device includes:

[0043] A first receiving module, used for receiving a first message containing a target segment identifier;

[0044] A generating module, configured to generate a second message containing a first label according to the first message, wherein the first label has a mapping relationship with a target segment identifier;

[0045] A sending module is used to send a second message.

[0046] In a possible implementation, the target segment identifier is a first segment identifier, and the first segment identifier is used to indicate decapsulation of the message header and encapsulation label;

[0047] The generating module is used to decapsulate the SRv6 message header of the first message according to the first segment identifier, and based on the mapping relationship between the first segment identifier and the first label, encapsulate the decapsulated message with the first label to obtain a second message containing the first label.

[0048] In a possible implementation, the device further includes:

[0049] A second receiving module, configured to receive a first route and a first label corresponding to the first route;

[0050] A first publishing module, configured to publish a second route carrying a first segment identifier based on the first route;

[0051] The first establishing module is used to establish a mapping relationship between the first label and the first segment identifier.

[0052] In a possible implementation, the target segment identifier is a second segment identifier, the first message further includes a first flag, the second segment identifier is used to indicate decapsulation of the message header, and the first flag is used to indicate an encapsulation label;

[0053] A generation module is used to decapsulate the SRv6 message header of the first message according to the second segment identifier, and according to the indication of the first flag, based on the mapping relationship between the second segment identifier and the first label, encapsulate the decapsulated message with the first label to obtain a second message containing the first label.

[0054] In a possible implementation, the device further includes:

[0055] A second receiving module, configured to receive a first route and a first label corresponding to the first route;

[0056] A second publishing module, configured to publish a third route carrying a second segment identifier based on the first route;

[0057] The second establishing module is used to establish a mapping relationship between the first label and the second segment identifier.

[0058] In a possible implementation manner, the first label is a Multi-Protocol Label Switching (MPLS) label.

[0059] In one possible implementation, the first edge network device is an exit operator edge PE device of the first network in the operator's operator CSC system, the CSC system also includes a second network, the first network is an SRv6 network, the second network accesses the first network in MPLS mode, the first network is a network of a first-tier operator, and the second network is a network of a second-tier operator.

[0060] In a possible implementation, the first receiving module is used to receive a first message containing a target segment identifier sent by an ingress PE device of the first network;

[0061] A sending module, used to send a second message to a customer edge CE device of a second network;

[0062] The first message is a data message, and the second message is a data message.

[0063] In a possible implementation manner, the second receiving module is configured to receive a first route and a first label corresponding to the first route sent by a customer edge CE device of the second network.

[0064] In a possible implementation, the first publishing module is configured to publish the second route carrying the first segment identifier to an ingress PE device of the first network.

[0065] In a possible implementation, the second publishing module is configured to publish a third route carrying the second segment identifier to an ingress PE device of the first network.

[0066] In a possible implementation manner, the first network and the second network are in different autonomous domain systems.

[0067] In a fourth aspect, a device for sending a message is provided, the device is applied to a second edge network device, and the device includes:

[0068] A first receiving module, used for receiving a third message containing a second tag;

[0069] A generating module, used for generating a first message containing a target segment identifier according to the third message, wherein the second label and the target segment identifier have a mapping relationship;

[0070] A sending module is used to send a first message.

[0071] In a possible implementation, the target segment identifier is a first segment identifier, and the first segment identifier is used to indicate decapsulation of the message header and encapsulation label;

[0072] The generating module is used to generate a first message containing the first segment identifier based on the mapping relationship between the second label and the first segment identifier.

[0073] In a possible implementation, a generation module is used to decapsulate the second label in the third message based on a mapping relationship between the second label and the first segment identifier, and encapsulate an SRv6 message header in the decapsulated message, wherein the SRv6 message header contains the first segment identifier.

[0074] In a possible implementation, the device further includes:

[0075] A second receiving module, used for receiving a second route carrying the first segment identifier;

[0076] A publishing module, used for publishing a fourth route and a second label corresponding to the fourth route;

[0077] The first establishing module is used to establish a mapping relationship between the second label and the first segment identifier.

[0078] In a possible implementation, the target segment identifier is a second segment identifier, and the second segment identifier is used to indicate decapsulation of the message header;

[0079] The generating module is used to generate a first message containing the second segment identifier based on the mapping relationship between the second label and the second segment identifier, wherein the first message also includes a first flag, and the first flag is used to indicate the encapsulation label.

[0080] In a possible implementation, a generation module is used to decapsulate the second label in the third message based on a mapping relationship between the second segment identifier and the second label, and encapsulate an SRv6 message header in the decapsulated message, wherein the SRv6 message header contains the second segment identifier and the first flag.

[0081] In a possible implementation, the device further includes:

[0082] A third receiving module, used for receiving a third route carrying a second segment identifier;

[0083] A publishing module, used for publishing a fourth route and a second label corresponding to the fourth route;

[0084] The second establishing module is used to establish a mapping relationship between the second label and the second segment identifier.

[0085] In a possible implementation manner, the second label is an MPLS label.

[0086] In a possible implementation manner, the first flag is located in a flag field of a segment routing header SRH of the first message.

[0087] In one possible implementation, the second edge network device is an entry operator edge PE device of the first network in the operator's operator CSC system, the CSC system also includes a third network, the first network is an SRv6 network, the third network accesses the first network in MPLS mode, the first network is a network of a first-level operator, and the third network is a network of a second-level operator.

[0088] In a possible implementation, the first receiving module is used to receive a third message containing a second tag sent by a customer edge CE device of a third network;

[0089] A sending module, used to send a first message to an egress PE device of a first network;

[0090] Among them, the third message is a data message, and the first message is a data message.

[0091] In a possible implementation, the second receiving module is configured to receive a second route carrying the first segment identifier and sent by an egress PE device of the first network.

[0092] In a possible implementation, the third receiving module is configured to receive a third route carrying the second segment identifier sent by an egress PE device of the first network.

[0093] In a possible implementation manner, the publishing module is configured to publish the fourth route and the second label corresponding to the fourth route to the CE device of the third network.

[0094] In a possible implementation manner, the device further includes an allocating module, configured to allocate a second label to the fourth route.

[0095] In a possible implementation manner, the first network and the third network are in different autonomous domain systems.

[0096] In a fifth aspect, a network device is provided, comprising a processor, the processor being coupled to a memory, the memory storing at least one program instruction or code, and the at least one program instruction or code being loaded and executed by the processor so that the network device implements the method for sending a message in any one of the first aspect or the second aspect.

[0097] In a sixth aspect, a computer-readable storage medium is provided, wherein the storage medium stores at least one program instruction or code, and when the program instruction or code is loaded and executed by a processor, the computer implements the method for sending a message as described in any one of the first aspect or the second aspect.

[0098] In the seventh aspect, a system for sending a message is provided, the system comprising a first edge network device and a second edge network device, the first edge network device being used to execute the method for sending a message described in the first aspect or any possible implementation of the first aspect, and the second edge network device being used to execute the method for sending a message described in the second aspect or any possible implementation of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0099] Figure 1 It is a network diagram of an operator's operator;

[0100] Figure 2 It is a schematic diagram of the control plane of the transmission process of routing in the CSC system;

[0101] Figure 3 It is a schematic diagram of the forwarding plane of the data message transmission process in the CSC system;

[0102] Figure 4 is a flow chart of a method for sending a message provided by an embodiment of the present invention;

[0103] Figure 5 This is a schematic diagram of the structure of an SRv6 message;

[0104] Figure 6is a flow chart of a method for sending a message provided by an embodiment of the present invention;

[0105] Figure 7 is a schematic diagram of the interactive process of routing information provided by an embodiment of the present invention;

[0106] Figure 8 is a flow chart of a method for sending a message provided by an embodiment of the present invention;

[0107] Fig. 9 is a schematic diagram of the interactive process of routing information provided by an embodiment of the present invention;

[0108] Fig.10 is a flow chart of a method for sending a message provided by an embodiment of the present invention;

[0109] Fig.11 is a schematic diagram of a CSC network provided by an embodiment of the present invention;

[0110] Fig.12 It is a schematic diagram of a process of sending a message provided by an embodiment of the present invention;

[0111] Fig.13 is another CSC networking schematic diagram provided by an embodiment of the present invention;

[0112] Fig.14 It is a schematic diagram of the structure of a device for sending a message provided by an embodiment of the present invention;

[0113] Fig.15 It is a schematic diagram of the structure of a device for sending a message provided by an embodiment of the present invention;

[0114] Fig.16 It is a schematic diagram of the structure of a device for sending a message provided by an embodiment of the present invention;

[0115] Fig.17 It is a schematic diagram of the structure of a device for sending a message provided by an embodiment of the present invention;

[0116] Fig.18 It is a schematic diagram of the structure of a device for sending a message provided by an embodiment of the present invention;

[0117] Fig.19 It is a schematic diagram of the structure of a device for sending a message provided by an embodiment of the present invention;

[0118] Fig. 20 is a schematic diagram of the structure of a network device provided by an embodiment of the present invention;

[0119] Fig.21 is a schematic diagram of the structure of a network device provided by an embodiment of the present invention;

[0120] Fig. 22 It is a schematic diagram of the structure of a network device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0121] The terms used in the implementation mode of the present application are only used to explain the embodiments of the present application, and are not intended to limit the present application. The embodiments of the present invention are described below in conjunction with the accompanying drawings.

[0122] In CSC networking, lower-level SPs act as VPN clients of higher-level SPs, such as Figure 1 As shown in Figure 1, the CSC network includes a provider carrier and a customer carrier. The provider carrier is also called a first carrier, and the customer carrier is also called a second carrier. When the second carrier runs BGP / MPLS VPN, and the backbone network of the first carrier and the site of the second carrier are in different autonomous systems (AS), the routing information interaction process is as follows: Figure 2 As shown in the figure, D represents the destination address of the route, N represents the next hop, and L represents the label.

[0123] exist Figure 2 In the CSC system shown, the CSC system includes a first network, a second network, and a third network, and the three networks are located in different ASs. Figure 2 As shown, the AS of the first network is 200, the AS of the second network is 300, and the AS of the third network is 100. PE is a provider edge device, such as Figure 2 PE1 is the ingress PE device of the first network, PE2 is the egress PE device of the first network, PE3 and PE4 are the PE devices of the second network and the third network respectively. CE is the customer edge device, such as Figure 2 CE1 and CE2 in the figure are CE devices for connecting the third network and the second network to the first network, respectively. Exemplarily, the PE and CE devices include but are not limited to routers or switches. Figure 2 The interactive process shown is a schematic diagram of the control plane of the transmission process of routing in the CSC system. The first network is the network of the first-level operator, and the second network and the third network are the networks of the second-level operator. Next, taking PE4 publishing the VPN route 10.1.1.1 / 32 to PE3 as an example, the interactive process of routing between the PEs of the second network and the third network, that is, the PEs of the second-level operator, is explained, including but not limited to the following processes.

[0124] 11. PE4 publishes the route to PE4 (destination D: PE4) to CE2 through the interior gateway protocol (IGP) of the second network, i.e., the second carrier, and also assigns label L"1 to the next hop of IGP for the route to PE4 (destination D: PE4). Based on the label distribution protocol (LDP), a public network label switching path (LSP) tunnel is established between PE4 and CE2.

[0125] 12. CE2 assigns label L1 to the route to PE4 (destination D: PE4, next hop N: CE2) through the multi protocol external border gateway protocol (MP-EBGP) connection established between CE2 and PE2, and publishes the label L1 and routing information (destination D: PE4, next hop N: CE2) to PE2.

[0126] 13. PE2 publishes the route to PE2 to PE1 through the IGP of the first network. PE2 also allocates a public network label L' to the route to PE2, and establishes a public network LSP between PE2 and PE1.

[0127] 14. PE2 assigns label L2 to the route to PE4 (destination D: PE4, next hop N: PE2), and publishes the route information (destination D: PE4, next hop N: PE2) and label L2 to PE1 through the multi protocol internal border gateway protocol (MP-IBGP).

[0128] 15. PE1 assigns label L3 to the route to PE4 (destination D: PE4, next hop N: PE1) through the MP-EBGP connection established between PE1 and CE1, and publishes the routing information (destination D: PE4, next hop N: PE1) and label L3 to CE1.

[0129] 16. CE1 advertises the route to CE1 to PE3 through the IGP of the third network. CE1 also assigns a public network label L"2 to the route to CE1, and establishes a public network LSP of the third network between CE1 and PE3.

[0130] 17. CE1 assigns label L4 to the route to PE4 (destination D: PE4, next hop N: CE1), and publishes the route information (destination D: PE4, next hop N: CE1) and label L4 to PE3 through the MP-IBGP connection established between CE1 and PE3.

[0131] 18. At this time, the route and label to PE4 are published to PE3; a BGP LSP is formed between PE4 and PE3. That is, when the route information to PE4 is successfully published to PE3, the MP-EBGP connection is successfully established between PE3 and PE4. PE4 allocates a private network label IL to the VPN route 10.1.1.1 / 32, and sends the route 10.1.1.1 / 32 and the private network label IL to PE3 through the MP-EBGP connection.

[0132] It should be noted that the above only takes PE4 advertising its route to PE3 as an example for explanation, and the process of PE3 advertising its route to PE4 is similar to this, which will not be repeated here.

[0133] In addition to exchanging routing information, the CSC system also supports the transmission of data packets. The schematic diagram of the forwarding plane of the data packet transmission process in the CSC system is as follows: Figure 3 As shown in the figure. Taking the data message as a VPN message as an example, Figure 3 In the figure, IL represents a private network label; L' represents a public network label of the first network; L"1 and L"2 represent public network labels of the second network and the third network respectively; L1, L2, L3, and L4 represent labels allocated for the route to PE4. Next, taking the sending of a message with a destination address of 10.1.1.1 / 32 as an example, the method of sending a message is described, including but not limited to the following processes.

[0134] 21. After PE3 receives the VPN message (IP packet) with the destination address of 10.1.1.1 / 32, it pushes the private network label IL, label L4 and outer public network label L"2 into the VPN message, and transmits the message containing the private network label IL, label L4 and outer public network label L"2 to CE1 through the public network LSP tunnel of the third network.

[0135] Before transmitting the message to CE1, the previous-hop LSR of CE1 removes the outer public network label L"2.

[0136] 22. CE1 performs label switching, pops out label L4, pushes in label L3, and forwards the packet containing private network label IL and label L3 to PE1.

[0137] 23. PE1 also performs label exchange, pops out label L3, pushes in label L2, and then pushes in public network label L', and transmits the message containing private network label IL, label L2 and public network label L' to PE2 through the public network tunnel LSP.

[0138] The public network label L' is popped out on the previous-hop LSR of PE2.

[0139] 24. PE2 also performs label exchange, pops out label L2, pushes label L1, and forwards the message containing private network label IL and label L1 to CE2.

[0140] 25. CE2 pops up label L1, then pushes in the public network label L"1 of the second network, and transmits the message containing the private network label IL and the public network label L"1 to PE4 through the tunnel of the LSP of the second network.

[0141] Before transmitting the packet containing the private network label IL and the public network label L"1 to PE4, the previous-hop LSR of PE4 pops out the public network label L"1 of the secondary operator.

[0142] 26. PE4 pops up the private network label IL and forwards the IP packet to CE4 based on the private network label IL.

[0143] In a traditional CSC system, MP-EBGP is used between the first network, the second network, and the third network, and MP-IBGP is used within the first network, the second network, and the third network. The route to the loopback interface of PE4 of the second network is announced to PE3 of the third network, so that the second network and the third network can establish end-to-end services without the need for the first-tier operator to be aware of it.

[0144] However, when the first network is upgraded to SRv6, the SRv6 tunnel is used to carry VPN traffic, while the second and third networks of the second-tier operator are not upgraded and still use the traditional MPLS method to access the first network. At this time, the ingress PE device of the first network cannot convert the VPN traffic encapsulated in MPLS into VPN traffic encapsulated in SRv6. Similarly, the egress PE device of the first network cannot convert the VPN traffic encapsulated in SRv6 into VPN traffic encapsulated in MPLS. It is precisely because of this that the first-tier operator that has upgraded to SRv6 cannot provide CSC services for the second-tier operator running MPLS. Therefore, the first-tier operator is required to provide a CSC solution based on SRv6.

[0145] In this regard, an embodiment of the present invention provides a technical solution, which enables the ingress PE device of the first-tier operator to convert VPN traffic encapsulated in MPLS into VPN traffic encapsulated in SRv6. Similarly, the egress PE device of the first-tier operator can convert VPN traffic encapsulated in SRv6 into VPN traffic encapsulated in MPLS. In this way, the first-tier operator that has upgraded to SRv6 can provide CSC services to the second-tier operator of MPLS. The method of sending a message is described as follows, taking the egress PE (PE2) device of the first-tier operator as the first edge network device, and the first edge network device executing the method, as shown in FIG. Figure 4 As shown, the method of sending a message includes but is not limited to the following processes.

[0146] 401. A first edge network device receives a first message containing a target segment identifier.

[0147] Here, the first message is a data message.

[0148] Since the first edge network device is the egress PE device of the first-tier operator upgraded to SRv6 in the CSC system, and the network path in SRv6 is divided into segments, each segment is identified by a segment ID (SID). SID is an IPv6 address that has both the routing capabilities of a common IPv6 address and the behavior capabilities unique to SRv6. Each SRv6 node maintains a SID table (part of the routing table), which consists of many 128-bit SIDs. The SID standard format includes a locator field + a function field, and optionally, an Args field.

[0149] Among them, Locator is a locator that identifies the SRv6 node. Each node has a globally unique Locator value as a shared prefix of the local SID. Other nodes access the node SID through the Locator route. Function identifies different behaviors within the SRv6 node, such as END, END.X, etc. A few behaviors also need to pass the Args parameter. After receiving the IPv6 message, the SRv6 node will search the global routing table according to the IPv6 destination address (destination adddress, DA). If a certain SID is matched, it will be handled by the behavior or Behavior defined by the SID, otherwise the conventional routing forwarding action will be performed. Therefore, the first edge network device receives the first message transmitted by the SRv6 tunnel, and the first message contains a target segment identifier. The embodiment of the present invention does not limit the content of the target segment identifier. In the embodiment of the present invention, in order to achieve end-to-end service connection without upgrading the network of the secondary operator, the target segment identifier in the embodiment of the present invention is used to indicate the decapsulation of the message header and the encapsulation label, so that the first message can be transmitted in the MPLS tunnel.

[0150] In a possible implementation, the target segment identifier is the first segment identifier, which is used to indicate the decapsulation of the message header and the encapsulation label. In an exemplary embodiment, the SRv6 protocol is extended to add a first segment identifier SRv6SID: END.DM, which has the function of decapsulating the SRv6 message header and encapsulating the MPLS label. It can be understood that the function of the SRv6 SID is to connect the SRv6 tunnel and the MPLS tunnel.

[0151] END.DM SID processing logic, an example is as follows:

[0152] IF NH=SRH and SL>0 / / If the next hop packet header is SRH and SL is greater than 0

[0153] drop the packet / / drop the packet

[0154] ELSE IF ENH=137

[0155] pop the (outer) SRv6 header and its extension headers / / Pop the SRv6 header and extension header

[0156] pushed the MPLS label associated with SRv6 SID

[0157] forward via the MPLS forwarding table / / Forward via the MPLS forwarding table

[0158] ELSE

[0159] Send an ICMP parameter problem message / / Send an ICMP parameter problem message

[0160] drop the packet

[0161] In addition to extending a new SID to indicate the decapsulation of the message header and the encapsulation label, thereby realizing the connection between the SRv6 tunnel and the MPLS tunnel, the embodiment of the present invention also supports the combination of SID+flag to indicate the decapsulation of the message header and the encapsulation label. Therefore, in a possible implementation, the target segment identifier is the second segment identifier, the first message also includes the first flag, the second segment identifier is used to indicate the decapsulation of the message header, and the first flag is used to indicate the encapsulation label.

[0162] The embodiments of the present invention do not limit the content of the first flag and its position in the message. In the SRv6 scenario, in order to implement SRv6 based on the IPv6 forwarding plane, a new IPv6 extension header is added. The IPv6 extension header is a segment routing header (SRH) defined based on the original routing extension header of the IPv6 message, also known as an SRH extension header. The SRH extension header can be used to specify an IPv6 path or a service, and stores multiple segment identifiers of IPv6. The head node that sends the message adds one or more SRH extension headers to the message, and the intermediate nodes can forward the IPv6 message according to the path information contained in the SRH extension header. For example, the structure of an SRv6 message is as follows: Figure 5 As shown, the SRv6 message includes an IPv6 message header, an SRH and a payload. Among them, the payload in the SRv6 message is, for example, an IPv4 message, an IPv6 message or an Ethernet frame. The payload in the SRv6 message can be called an original message. The IPv6 message header includes a source address (SA) and a DA. In an ordinary IPv6 message, the IPv6 DA is fixed. In SRv6, the IPv6 DA identifies the next node of the current message. In the SR tunnel, the SR node continuously updates the destination address to complete hop-by-hop forwarding. The SID carried by the destination address in the IPv6 message header is called an active SID. SRH is an IPv6 extension header. SRH is used to implement SRv6 based on the IPv6 forwarding plane. The meaning of each field of the SRH is as follows.

[0163] Next Header Type: The SRv6 message may include one or more extension headers or one or more high-level headers after the extension header. The Next Header is used to identify the type of the message header immediately following the SRH. The length of the Next Header Type field may be 8 bits.

[0164] Header Extended Length (Hdr Ext Len): used to indicate the length of the SRH header. The length of the SRH header mainly refers to the length of the segment list, for example, the length from segment list[0] to segment list[n].

[0165] Routing Type: used to identify the routing header type, SRH Type is 4. The length of the routing type field can be 8 bits.

[0166] Segments Left (SL): used to indicate the number of intermediate nodes that should still be visited before reaching the destination node. The SL field can also be called the remaining node field. The value of the SL field can indicate the active SID in the segment list. The length of SL can be 8 bits. For example, if the segment list includes 5 SIDs, namely SID0, SID1, SID2, SID3 and SID4, and the SL value is 2, it means that there are 2 unprocessed SIDs in the segment list, namely SID0 and SID1, the SID currently to be processed in the segment list is SID2, and there are 2 SIDs that have been processed in the segment list, namely SID3 and SID4.

[0167] Last Entry: The index of the last element of the segment list in the segment list. The length of the Last Entry field can be 8 bits.

[0168] Flags: used to indicate some identifiers of the data packet. The length of the Flags field can be 8 bits.

[0169] Tag: used to identify packets in the same group. The length of the Tag field can be 16 bits.

[0170] Segment list [n]: can include one or more SIDs, each SID can be in the form of an IPv6 address, so the segment list can also be understood as an explicit IPv6 address stack. The segment list can be recorded as segment list [n], the length of segment list [n] is 128 * n bits, and the segment list can be encoded from the last segment of the path. Segment list is in the form of an IPv6 address.

[0171] TLV: is a coding format. TLV includes type, length and value. SRH can include one TLV or multiple TLVs. Different TLVs in SRH can have parallel relationship or nested relationship.

[0172] In a possible implementation, the first flag is set in the Flags field of the SRH. The encapsulation label is indicated by Flags. For example, the value of a specified bit in the 8 bits of Flags is defined as 1 to indicate the encapsulation label. The function of indicating the decapsulation of the message header and the encapsulation label is implemented by the second segment identifier and the first flag.

[0173] It should be noted that the above method of using the first segment identifier or the second segment identifier + the first flag is only an example to indicate the function of decapsulating the message header and encapsulating the label. In addition, other methods that can indicate the decapsulation of the message header and the encapsulation label are within the protection scope of the embodiments of the present invention.

[0174] 402. The first edge network device generates a second message containing a first label according to the first message, and the first label has a mapping relationship with the target segment identifier.

[0175] Here, the second message is a data message.

[0176] According to different situations of the target segment identifier described in 401, the method in which the first edge network device generates the second message containing the first label according to the first message also includes but is not limited to any one of the following two methods.

[0177] Method 1, the target segment identifier is the first segment identifier, and the first segment identifier is used to indicate the decapsulation of the message header and the encapsulation label; the first edge network device generates a second message containing the first label based on the first message, including: the first edge network device decapsulates the SRv6 message header of the first message according to the first segment identifier, and based on the mapping relationship between the first segment identifier and the first label, encapsulates the decapsulated message with the first label to obtain the second message containing the first label.

[0178] The first segment identifier is used to indicate the decapsulation of the message header and the encapsulation label, so based on the first segment identifier, the first edge network device can be triggered to convert the first message into the second message, so that the second message can be transmitted in the network of the secondary operator running MPLS. Among them, the SRv6 message header of the first message decapsulated by the first edge network device according to the first segment identifier not only includes decapsulation of the IPv6 message header, but if the first message also includes an extended message header, it is also necessary to decapsulate the extended message header, and then encapsulate the first label in the decapsulated message. The first label is an MPLS label. The embodiment of the present invention does not limit the establishment method of the mapping relationship between the first label and the first segment identifier, which can be determined in the interaction process of routing information. For example, before the first edge network device generates a second message containing the first label according to the first message, it also includes: the first edge network device receives the first route and the first label corresponding to the first route; the first edge network device publishes the second route carrying the first segment identifier based on the first route; the first edge network device establishes a mapping relationship between the first label and the first segment identifier. By establishing a mapping relationship between the first segment identifier and the first label during the process of publishing the route, it is convenient to quickly implement the conversion from the first message to the second message during the subsequent transmission of the message.

[0179] The first route is a route published by a CE in a network of a secondary operator, and the CE assigns a first label to the first route. After receiving the first route, the first edge network device publishes a second route carrying a first segment identifier, and in order to be able to implement the conversion between the segment identifier and the label in the subsequent process, the first edge network device establishes a mapping relationship between the first label and the first segment identifier. After establishing the mapping relationship between the first label and the first segment identifier, the first edge network device stores the mapping relationship to apply the mapping relationship in the subsequent message transmission process.

[0180] Method two, the target segment identifier is the second segment identifier, the first message also includes a first flag, the second segment identifier is used to indicate decapsulation of the message header, and the first flag is used to indicate the encapsulation label; the first edge network device generates a second message containing the first label according to the first message, including: the first edge network device decapsulates the SRv6 message header of the first message according to the second segment identifier, and according to the indication of the first flag, based on the mapping relationship between the second segment identifier and the first label, encapsulates the decapsulated message with the first label to obtain a second message containing the first label.

[0181] The second segment identifier is used to indicate the decapsulation of the message header, and the first flag is used to indicate the encapsulation label, so based on the second segment identifier and the first flag, the first edge network device can be triggered to convert the first message into the second message, so that the second message is transmitted in the network of the secondary operator running MPLS. Among them, the SRv6 message header of the first message decapsulated by the first edge network device according to the second segment identifier includes not only the IPv6 message header, but also the extended message header. For example, the extended message header is SRH.

[0182] In the second mode, the second segment identifier is combined with the first flag to realize the indication function of the first segment identifier in the first situation. The embodiment of the present invention does not limit the establishment method of the mapping relationship between the second segment identifier and the first label, and it can be established in the process of interactive routing information. For the second mode, before the first edge network device generates the second message containing the first label according to the first message, it also includes: the first edge network device receives the first route and the first label corresponding to the first route; the first edge network device publishes the third route carrying the second segment identifier based on the first route; the first edge network device establishes the mapping relationship between the first label and the second segment identifier. By establishing the mapping relationship between the second segment identifier and the first label in the process of publishing the route, it is convenient to quickly realize the conversion from the first message to the second message when the message is transmitted subsequently. The second mode is the same as the mode of establishing the mapping relationship in the first mode, except that the segment identifier corresponding to the first label in the mapping relationship is different. After the first edge network device establishes the mapping relationship between the first label and the second segment identifier, the first edge network device stores the mapping relationship to apply the mapping relationship in the subsequent message transmission process.

[0183] It should be noted that the above-mentioned method 1 and method 2 are different methods of generating a second message containing a first label in response to different situations of the target segment identifier contained in the first message, and one of the two methods can be adopted. Exemplarily, after the first edge network device receives the first route and the first label corresponding to the first route, it can establish a mapping relationship between the first label and the first segment identifier, and a mapping relationship between the first label and the second segment identifier. Subsequently, it is determined based on which mapping relationship to generate the second message containing the first label according to which segment identifier the received first message carries.

[0184] 403. The first edge network device sends a second message.

[0185] Since the second message contains the first label, the second message can be transmitted in the MPLS tunnel, so that the first-tier operator's network is upgraded to SRv6 while the second-tier operator's network is not upgraded. The first-tier operator can provide services to the second-tier operator normally.

[0186] Exemplarily, the first edge network device is a first network in the CSC system (eg Figure 2The CSC system shown in FIG. 1 is an egress PE device in a network of a first-tier operator with an AS of 100. The CSC system also includes a second network (such as Figure 2 In the CSC system shown, the network of a secondary operator in AS 300 is a first network that is an SRv6 network, and the second network is connected to the first network in MPLS mode.

[0187] The first edge network device sends a second message, including: the egress PE device sends the second message to the CE device of the second network. The first edge network device receives a first route and a first label corresponding to the first route, including: the first edge network device receives the first route and the first label corresponding to the first route sent by the CE device of the second network.

[0188] Take the ingress PE device of the first-tier operator as the second edge network device, and the method of sending a message executed by the second edge network device as an example for explanation. Figure 6 As shown, including but not limited to the following processes.

[0189] 601. The second edge network device receives a third message containing a second label.

[0190] Here, the third message is a data message.

[0191] The second edge network device is an ingress PE device of a first-tier operator, and thus the received third message is a message transmitted from an MPLS tunnel, and the third message contains an MPLS label, namely, a second label. The second label is an MPLS label, such as Figure 2 As shown, the second label refers to the label allocated by the route announced by the second edge network device, namely the ingress PE device (PE1) of the first-level operator to the CE (CE1) device of the second-level operator, and the ingress PE device publishes the MPLS label to the CE device in the network of the second-level operator.

[0192] 602. The second edge network device generates a first message including a target segment identifier according to the third message, and the second label has a mapping relationship with the target segment identifier.

[0193] Here, the first message is a data message.

[0194] After the second edge network device receives the third message containing the second label, it pops the second label out of the third message. Since the second edge network device is an ingress PE device in the network of a first-tier operator, it will encapsulate the segment identifier to transmit the message in the SRv6 tunnel. In order to determine which segment identifier the second label is mapped to, the second edge network device may pre-establish a mapping relationship between the second label and the corresponding target segment identifier, so that after receiving the third message containing the second label, the first message containing the target segment identifier is generated based on the mapping relationship between the second label and the target segment identifier. The embodiment of the present invention does not limit the manner of establishing the mapping relationship between the second label and the target segment identifier, and it can be established during the interaction of routing information. Exemplarily, based on different situations of the target segment identifier, generating a first message containing the target segment identifier includes but is not limited to any of the following two methods.

[0195] Method 1, for the target segment identifier, the first segment identifier is used to indicate the decapsulation of the message header and the encapsulation label; the second edge network device generates a first message containing the target segment identifier based on the third message, including: the second edge network device generates a first message containing the first segment identifier based on the mapping relationship between the second label and the first segment identifier.

[0196] By quickly generating a first message containing the first segment identifier based on the mapping relationship between the second label and the first segment identifier, the first message can be forwarded in the network of a first-tier operator upgraded to an SRv6 network, thereby solving the problem that a first-tier operator upgraded to SRv6 cannot provide CSC services for a second-tier operator running MPLS.

[0197] In a possible implementation, the second edge network device generates a first message containing a first segment identifier based on a mapping relationship between the second label and the first segment identifier, including: the second edge network device decapsulates the second label in the third message based on the mapping relationship between the second label and the first segment identifier, and encapsulates an SRv6 message header in the decapsulated message, wherein the SRv6 message header contains the first segment identifier. For example, the second edge network device pops up the second label in the third message based on the mapping relationship between the first segment identifier and the second label, and encapsulates an SRv6 message header in the message from which the second label is popped up, wherein the SRv6 message header contains the first segment identifier, thereby obtaining a first message containing the first segment identifier. Among them, the SRv6 message header encapsulated by the second edge network device includes not only an IPv6 message header, but also an extended message header.

[0198] For method one, before the second edge network device receives the third message containing the second label, it also includes: the second edge network device receives the second route carrying the first segment identifier; the second edge network device publishes a fourth route and a second label corresponding to the fourth route; the second edge network device establishes a mapping relationship between the second label and the first segment identifier.

[0199] The second route is a route published by the first edge network device in the network of the first-tier operator, and carries the first segment identifier. After receiving the second route, the second edge network device publishes the fourth route and the second label corresponding to the fourth route, and in order to be able to realize the conversion of the segment identifier and the label in the subsequent time, the second edge network device establishes a mapping relationship between the second label and the first segment identifier. After establishing the mapping relationship between the second label and the first segment identifier, the second edge network device stores the mapping relationship so as to apply the mapping relationship in the subsequent message transmission process, so as to quickly realize the conversion of the third message to the first message.

[0200] Method two, for the target segment identifier as the second segment identifier, the second segment identifier is used to indicate the decapsulation of the message header; the second edge network device generates a first message containing the target segment identifier according to the third message, including: the second edge network device generates a first message containing the second segment identifier based on the mapping relationship between the second label and the second segment identifier, the first message also includes a first flag, and the first flag is used to indicate the encapsulation label.

[0201] Based on the mapping relationship between the second label and the second segment identifier, a first message containing the second segment identifier and the first flag can be quickly generated, so that the first message can be forwarded in the network of the first-tier operator upgraded to the SRv6 network, thereby solving the problem that the first-tier operator upgraded to SRv6 cannot provide CSC services for the second-tier operator running MPLS.

[0202] In a possible implementation, the second edge network device generates a first message containing the second segment identifier based on the mapping relationship between the second label and the second segment identifier, including: the second edge network device decapsulates the second label in the third message based on the mapping relationship between the second segment identifier and the second label, and encapsulates the SRv6 message header in the decapsulated message, wherein the SRv6 message header contains the second segment identifier and the first flag. For example, the second edge network device pops up the second label in the third message based on the mapping relationship between the second segment identifier and the second label, and encapsulates the SRv6 message header in the message from which the second label is popped up, wherein the SRv6 message header contains the second segment identifier and the first flag, thereby obtaining a first message containing the first segment identifier and the first flag. Among them, the SRv6 message header encapsulated by the second edge network device includes not only the IPv6 message header, but also the extended message header.

[0203] For method two, before the second edge network device receives the third message containing the second label, it also includes: the second edge network device receives the third route carrying the second segment identifier; the second edge network device publishes the fourth route and the second label corresponding to the fourth route; the second edge network device establishes a mapping relationship between the second label and the second segment identifier.

[0204] The third route is a route published by the first edge network device in the network of the first-tier operator, and carries the second segment identifier. After receiving the third route, the second edge network device assigns a second label to the fourth route. The second edge network device publishes the fourth route and the second label corresponding to the fourth route, and in order to be able to realize the conversion of the segment identifier and the label in the subsequent time, the second edge network device establishes a mapping relationship between the second label and the second segment identifier. After establishing the mapping relationship between the second label and the second segment identifier, the second edge network device stores the mapping relationship to apply the mapping relationship in the subsequent message transmission process, so as to quickly realize the conversion of the third message to the first message.

[0205] It should be noted that the above-mentioned method 1 and method 2 for generating the first message containing the target segment identifier can be adopted selectively, that is, the first message containing the first segment identifier or the first message containing the second segment identifier can be generated according to different situations. Exemplarily, if in the process of exchanging routing information, the second edge network device receives the second route carrying the first segment identifier, and a mapping relationship between the second label and the first segment identifier is established, then after the second edge network device receives the second message, method 1 can be used to generate the first message containing the first segment identifier. If in the process of exchanging routing information, the second edge network device receives the third route carrying the second segment identifier, and a mapping relationship between the second label and the second segment identifier is established, then after the second edge network device receives the second message, method 2 can be used to generate the first message containing the second segment identifier.

[0206] If, during the interaction of routing information, the second edge network device receives both the second route carrying the first segment identifier and establishes a mapping relationship between the second label and the first segment identifier, and the third route carrying the second segment identifier and establishes a mapping relationship between the second label and the second segment identifier, then after receiving the second message, the second edge network device may use method one to generate a first message containing the first segment identifier or use method two to generate a first message containing the second segment identifier. In the case where the second edge network device has established a mapping relationship between the second label and the first segment identifier and a mapping relationship between the second label and the second segment identifier, after receiving the second message, the second edge network device generates the first message based on which mapping relationship, that is, method one or method two. The embodiment of the present invention does not limit this. For example, the second edge network device may randomly select a mapping relationship to generate the first message. Alternatively, each mapping relationship is used crosswise to generate the first message. For example, if the second edge network device generates the first message containing the first segment identifier based on the mapping relationship between the second label and the first segment identifier, then the next time the second message containing the second label is received, the second edge network device can generate the first message containing the second segment identifier based on the mapping relationship between the second label and the second segment identifier.

[0207] 603. The second edge network device sends a first message.

[0208] In an embodiment of the present invention, the second edge network device is an ingress PE device of the first network in the CSC system. The CSC system also includes a third network. The first network is an SRv6 network of IPv6. The third network accesses the first network in MPLS mode. The first network is a network of a first-tier operator, and the third network is a network of a second-tier operator.

[0209] Exemplarily, the second edge network device receives a third message containing a second label, including: the ingress PE device of the first network receives the third message containing the second label sent by the CE device of the third network; the second edge network device sends a first message, including: the ingress PE device of the first network sends the first message to the egress PE device of the first network. The second edge network device receives a second route carrying a first segment identifier, including: the ingress PE device of the first network receives the second route carrying the first segment identifier sent by the egress PE device of the first network. The second edge network device receives a third route carrying a second segment identifier, including: the ingress PE device of the first network receives the third route carrying the second segment identifier sent by the egress PE device of the first network. The second edge network device publishes a fourth route and a second label corresponding to the fourth route, including: the ingress PE device of the first network publishes the fourth route and the second label corresponding to the fourth route to the CE device of the third network.

[0210] Since the first message contains the target segment identifier, the first message can be transmitted in the SRv6 tunnel, so that the network of the first-tier operator is upgraded to SRv6 while the network of the second-tier operator is not upgraded. The first-tier operator can provide services to the second-tier operator normally.

[0211] Next, based on the above Figure 4 and Figure 6 For example, taking the target segment identifier as the first segment identifier, the first edge network device as the egress PE device of the first network, and the second edge network device as the ingress PE device of the first network as an example, for the routing information interaction scenario, such as Figure 7 As shown, the interaction of routing information between the egress PE device of the first network and the ingress PE device of the first network includes but is not limited to the following processes.

[0212] 701. A CE device of a second network sends a first route and a first label corresponding to the first route to an egress PE device of a first network.

[0213] 702. An egress PE device of a first network establishes a mapping relationship between a first label and a first segment identifier.

[0214] 703 , the egress PE device of the first network publishes a second route carrying the first segment identifier to the ingress PE device of the first network based on the first route.

[0215] 704, the ingress PE device of the first network publishes the fourth route and the second label corresponding to the fourth route, and establishes a mapping relationship between the second label and the first segment identifier. Before the ingress PE device of the first network publishes the fourth route and the second label corresponding to the fourth route, it also includes: the ingress PE device of the first network assigns the second label to the fourth route.

[0216] based on Figure 7 In the interactive process of routing information shown in the figure, if the CSC system also includes a third network, the second edge network device also publishes a fourth route and the second label to the CE device of the third network, so that the CE device of the third network can forward the message based on the fourth route and the second label. When sending a data message between the CE device of the third network and the CE device of the second network, the method for sending the data message is as follows Figure 8 As shown, including but not limited to the following processes.

[0217] 801. A CE device of a third network sends a third message containing a second label to an ingress PE device of a first network, where the third message is a data message.

[0218] 802. An ingress PE device of the first network generates a first message including a first segment identifier according to a third message. The second label and the first segment identifier have a mapping relationship. The first message is a data message.

[0219] 803. The ingress PE device of the first network sends a first message to the egress PE device of the second network.

[0220] 804. The egress PE device of the first network generates a second message containing a first label according to the first message. The first label and the first segment identifier have a mapping relationship. The second message is a data message.

[0221] 805. The egress PE device of the first network sends a second message to the CE device of the second network.

[0222] Taking the target segment identifier as the second segment identifier as an example, for the routing information interaction scenario, such as Fig. 9 As shown, the interaction of routing information between the egress PE device of the first network and the ingress PE device of the first network includes but is not limited to the following processes.

[0223] 901. A CE device of a second network sends a first route and a first label corresponding to the first route to an egress PE device of a first network.

[0224] 902. An egress PE device of a first network establishes a mapping relationship between a first label and a second segment identifier.

[0225] 903 , the egress PE device of the first network publishes a third route carrying the second segment identifier to the ingress PE device of the first network based on the first route.

[0226] 904, the ingress PE device of the first network publishes the fourth route and the second label corresponding to the fourth route, and establishes a mapping relationship between the second label and the second segment identifier. Before the ingress PE device of the first network publishes the fourth route and the second label corresponding to the fourth route, it also includes: the ingress PE device of the first network assigns the second label to the fourth route.

[0227] based on Fig. 9 In the interactive process of routing information shown in the figure, if the CSC system also includes a third network, the second edge network device also publishes a fourth route and the second label to the CE device of the third network, so that the CE device of the third network can forward the message based on the fourth route and the second label. When sending a message between the CE device of the third network and the CE device of the second network, the method of sending the message is as follows Fig.10 As shown, including but not limited to the following processes.

[0228] 1001. A CE device of a third network sends a third message containing a second label to an ingress PE device of a first network, where the third message is a data message.

[0229] 1002. An ingress PE device of a first network generates a first message including a second segment identifier according to a third message. The first message also includes a first flag. The second label and the second segment identifier have a mapping relationship. The first message is a data message.

[0230] 1003. The ingress PE device of the first network sends a first message to the egress PE device of the first network.

[0231] 1004. The egress PE device of the first network generates a second message containing a first label according to the first message. The first label and the second segment identifier have a mapping relationship. The second message is a data message.

[0232] 1005. The egress PE device of the first network sends a second message to the CE device of the second network.

[0233] The technical solution provided by the embodiment of the present invention is applied to Fig.11 Take the networking diagram shown in the figure as an example. Fig.11 In the figure, PE1 and PE2 are located in the first network, which is the network of the first-tier operator (providing operator) and has been upgraded to support SRv6. Among them, PE1 is the ingress PE device of the first-tier operator, and PE2 is the egress PE device of the first-tier operator. CE1 and CE2 access the backbone network of the first-tier operator as CE devices. PE3 and PE4 are the equipment of the second-tier operator, providing access for the customers of the second-tier operator. CE1 and CE2, PE3 and PE4 are located in the network of the second-tier operator, which supports MPLS forwarding but does not support SRv6. Among them, PE3 and CE1 are located in the third network, PE4 and CE2 are located in the second network, and the second network and the third network are both networks of the second-tier operator (customer operator). Optionally, the second network and the third network can be networks of different second-tier operators or networks of the same second-tier operator.

[0234] For routing information interaction scenarios:

[0235] Taking PE4 advertising the VPN route 10.1.1.1 / 32 to PE3 as an example, PE2 receives the route (destination D: PE4, next hop N: CE2) and the first MPLS label advertised by CE2 from CE2. The route published by PE2 to PE1 carries the SRv6 SID (END.DM). PE2 establishes a mapping relationship between the SRv6 SID and the first MPLS label. The first MPLS label refers to the MPLS label allocated to the route (destination D: PE4, next hop N: CE2) advertised by CE2 to PE2.

[0236] When PE1 receives the route carrying the SRv6 SID and publishes the route to CE1 through LDP or BGP label-unicast (LU), it establishes a mapping relationship between the second MPLS label and the SRv6 SID. The second MPLS label refers to the MPLS label allocated by PE1 to the route (destination D: PE4, next hop N: PE1) announced by CE1 and published to CE1. After that, CE1 announces the route to PE4 (destination D: PE4, next hop N: CE1) to PE3 through LDP.

[0237] It should be noted that, in addition to carrying the SRv6SID (END.DM) for decapsulating the IPv6 header and encapsulating the MPLS header, the route announced by PE2 to PE1 may optionally not carry the SRv6 SID (END.DM) but carry another segment identifier, namely, the second segment identifier in 401, which is used to indicate the decapsulation of the packet header. Regardless of the segment identifier, after announcing the route of PE4 to PE3, PE3 and PE4 establish an MP-EBGP service, such as a VPN service.

[0238] For the scenario of sending messages:

[0239] like Fig.12 As shown, take PE3 sending a message with a destination address of 10.1.1.1 / 32 to PE4 as an example. The message is sent to PE1, and PE1 receives the message with the second MPLS label (such as Fig.12 The VPN packet encapsulated with the MPLS label 2) shown in the figure has, in addition to the second MPLS label and the payload, a VPN label 1 (VPN label 1 is associated with the destination address 10.1.1.1 / 32). PE1 strips off the second MPLS label according to the previously saved mapping relationship between the second MPLS label and the SRv6 SID, and then encapsulates the SRv6 packet header with the SRv6 SID (END.DM). The packet encapsulated with the SRv6 packet header is forwarded using SRv6 in the first-tier operator network. After PE2 receives the SRv6-encapsulated packet (including the SRv6 SID), it pops up (i.e. strips off) the SRv6 packet header according to the previously saved mapping relationship between the SRv6 SID (END.DM) and the first MPLS label, and then encapsulates the first MPLS label (as shown in the figure). Fig.12 The MPLS label 1) shown in the figure generates a new message, which is sent to CE2 and forwarded using MPLS in the secondary operator network including CE2.

[0240] It should be noted that Figure 2 , Figure 3 , Fig.11 and Fig.12 This is only an example of a CSC system. The embodiment of the present invention does not limit the CSC system, nor does it limit whether a secondary operator uses a VPN. Fig.13 In the CSC system shown in FIG. 1 , the SRv6 message header involved in the embodiment of the present invention includes not only the IPv6 message header, but also the extended message header. For example, the message format of the SRv6 message can be as follows: Figure 5 Furthermore, the decapsulation involved in the embodiment of the present invention refers to stripping.

[0241] The above introduces the method for sending a message provided by an embodiment of the present application. Corresponding to the above method, an embodiment of the present application also provides a device for sending a message. Fig.14 is a schematic diagram of a structure of a device for sending a message provided in an embodiment of the present application, the device is applied to a first edge network device, the first edge network device is the above-mentioned Figures 4 to 13 The first edge network device shown in any of the accompanying drawings. Fig.14 As shown in the following multiple modules, the Fig.14 The device for sending a message shown can perform all or part of the operations performed by the first edge network device. It should be understood that the device may include more additional modules than the modules shown or omit some of the modules shown, and the embodiments of the present application are not limited to this. Fig.14 As shown, the device comprises:

[0242] The first receiving module 1401 is used to receive a first message containing a target segment identifier;

[0243] A generating module 1402, configured to generate a second message including a first label according to the first message, wherein the first label has a mapping relationship with a target segment identifier;

[0244] The sending module 1403 is configured to send a second message.

[0245] In a possible implementation, the target segment identifier is a first segment identifier, and the first segment identifier is used to indicate decapsulation of the message header and encapsulation label;

[0246] The generating module 1402 is configured to decapsulate the SRv6 message header of the first message according to the first segment identifier, and based on the mapping relationship between the first segment identifier and the first label, encapsulate the decapsulated message with the first label to obtain a second message containing the first label.

[0247] In one possible implementation, Fig.15 As shown, the device also includes:

[0248] The second receiving module 1404 is configured to receive a first route and a first label corresponding to the first route;

[0249] A first publishing module 1405, configured to publish a second route carrying a first segment identifier based on the first route;

[0250] The first establishing module 1406 is used to establish a mapping relationship between the first label and the first segment identifier.

[0251] In a possible implementation manner, the device further includes a first storage module, configured to store a mapping relationship between the first label and the first segment identifier.

[0252] In a possible implementation, the target segment identifier is a second segment identifier, the first message further includes a first flag, the second segment identifier is used to indicate decapsulation of the message header, and the first flag is used to indicate an encapsulation label;

[0253] The generating module 1402 is used to decapsulate the SRv6 message header of the first message according to the second segment identifier, and encapsulate the first label on the decapsulated message according to the indication of the first flag and based on the mapping relationship between the second segment identifier and the first label to obtain a second message containing the first label.

[0254] In one possible implementation, Fig.16 As shown, the device also includes:

[0255] The second receiving module 1404 is configured to receive a first route and a first label corresponding to the first route;

[0256] A second publishing module 1407, configured to publish a third route carrying a second segment identifier based on the first route;

[0257] The second establishing module 1408 is used to establish a mapping relationship between the first label and the second segment identifier.

[0258] In a possible implementation, the device further includes a second storage module, configured to store a mapping relationship between the first tag and the second segment identifier.

[0259] In a possible implementation manner, the first label is an MPLS label.

[0260] In one possible implementation, the first edge network device is an egress PE device of a first network in a CSC system. The CSC system also includes a second network. The first network is an SRv6 network. The second network accesses the first network via MPLS. The first network is a network of a first-tier operator, and the second network is a network of a second-tier operator.

[0261] In a possible implementation, the first receiving module 1401 is configured to receive a first message containing a target segment identifier sent by an ingress PE device of a first network;

[0262] The sending module 1403 is used to send a second message to the CE device of the second network;

[0263] The first message is a data message, and the second message is a data message.

[0264] In a possible implementation, the second receiving module 1404 is configured to receive a first route and a first label corresponding to the first route sent by a customer edge CE device of the second network.

[0265] In a possible implementation, the first publishing module 1405 is configured to publish the second route carrying the first segment identifier to an ingress PE device of the first network.

[0266] In a possible implementation, the second publishing module 1407 is configured to publish the third route carrying the second segment route to the ingress PE device of the first network.

[0267] In a possible implementation manner, the first network and the second network are in different autonomous domain systems.

[0268] Fig.17 is a schematic diagram of a structure of a device for sending a message provided in an embodiment of the present application, the device is applied to a second edge network device, the second edge network device is the above Figures 4 to 13 The second edge network device shown in any of the accompanying drawings. Fig.17 As shown in the following multiple modules, the Fig.17 The device for sending a message shown can perform all or part of the operations performed by the second edge network device. It should be understood that the device may include more additional modules than the modules shown or omit some of the modules shown, and the embodiments of the present application are not limited to this. Fig.17 As shown, the device comprises:

[0269] The first receiving module 1701 is used to receive a third message containing a second tag;

[0270] A generating module 1702, configured to generate a first message including a target segment identifier according to the third message, wherein the second label and the target segment identifier have a mapping relationship;

[0271] The sending module 1703 is used to send a first message.

[0272] In a possible implementation, the target segment identifier includes a first segment identifier, and the first segment identifier is used to indicate decapsulation of the message header and encapsulation label;

[0273] The generating module 1702 is used to generate a first message containing the first segment identifier based on the mapping relationship between the second label and the first segment identifier.

[0274] In one possible implementation, generation module 1702 is used to decapsulate the second label in the third message based on the mapping relationship between the second label and the first segment identifier, and encapsulate the Internet Protocol version 6 IPv6 message header in the decapsulated message, wherein the IPv6 message header contains the first segment identifier.

[0275] In one possible implementation, see Fig.18 , the device further comprises:

[0276] The second receiving module 1704 is used to receive a second route carrying the first segment identifier;

[0277] A publishing module 1705, configured to publish a fourth route and a second label corresponding to the fourth route;

[0278] The first establishing module 1706 is used to establish a mapping relationship between the second label and the first segment identifier.

[0279] In a possible implementation, the device further includes a first storage module, configured to store a mapping relationship between the second tag and the first segment identifier.

[0280] In a possible implementation, the target segment identifier includes a second segment identifier, and the second segment identifier is used to indicate decapsulation of the message header;

[0281] The generating module 1702 is used to generate a first message containing the second segment identifier based on the mapping relationship between the second label and the second segment identifier, wherein the first message further includes a first flag, and the first flag is used to indicate an encapsulation label.

[0282] In one possible implementation, generation module 1702 is used to decapsulate the second label in the third message based on the mapping relationship between the second segment identifier and the second label, and encapsulate the SRv6 message header in the decapsulated message, where the SRv6 message header contains the second segment identifier and the first flag.

[0283] In one possible implementation, see Fig.19 , the device further comprises:

[0284] The third receiving module 1707 is used to receive a third route carrying a second segment identifier;

[0285] A publishing module 1705, configured to publish a fourth route and a second label corresponding to the fourth route;

[0286] The second establishing module 1708 is used to establish a mapping relationship between the second label and the second segment identifier.

[0287] In a possible implementation manner, the device further includes a second storage module, configured to store a mapping relationship between the second label and the second segment identifier.

[0288] In a possible implementation manner, the second label is an MPLS label.

[0289] In a possible implementation manner, the first flag is located in a flag field of a segment routing header SRH of the first message.

[0290] In one possible implementation, the second edge network device is an ingress PE device of the first network in the CSC system, the CSC system also includes a third network, the first network is an SRv6 network, the third network accesses the first network via MPLS, the first network is a network of a first-tier operator, and the third network is a network of a second-tier operator.

[0291] In a possible implementation, the first receiving module 1701 is configured to receive a third message containing a second tag sent by a customer edge CE device of a third network;

[0292] The sending module 1703 is used to send a first message to an egress PE device of the first network;

[0293] Among them, the third message is a data message, and the first message is a data message.

[0294] In a possible implementation, the second receiving module 1704 is configured to receive a second route carrying a first segment identifier and sent by an egress PE device of the first network.

[0295] In a possible implementation, the third receiving module 1707 is configured to receive a third route carrying the second segment identifier sent by an egress PE device of the first network.

[0296] In a possible implementation, the publishing module 1705 is configured to publish the fourth route and the second label corresponding to the fourth route to the CE device of the third network.

[0297] In a possible implementation manner, the device further includes an allocating module, configured to allocate a second label to the fourth route.

[0298] In a possible implementation manner, the first network and the third network are in different autonomous domain systems.

[0299] It should be understood that the above Figure 14-Figure 19When the device provided realizes its functions, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0300] The specific hardware structure of the PE device in the above embodiment is as follows: Fig. 20 The network device 1500 shown includes a transceiver 1501, a processor 1502 and a memory 1503. The transceiver 1501, the processor 1502 and the memory 1503 are connected via a bus 1504. The transceiver 1501 is used to receive and send messages, the memory 1503 is used to store instructions or program codes, and the processor 1502 is used to call the instructions or program codes in the memory 1503 so that the PE device executes the relevant processing steps of the PE device (such as PE1 and PE2) in the above method embodiment. In a specific embodiment, the network device 1500 of the embodiment of the present application may correspond to the first edge network device in each of the above method embodiments. The processor 1502 in the network device 1500 reads the instructions or program codes in the memory 1503 so that Fig. 20 The illustrated network device 1500 is capable of performing all or part of the operations performed by the first edge network device.

[0301] In a specific embodiment, the network device 1500 of the embodiment of the present application may correspond to the second edge network device in each of the above-mentioned method embodiments, and the processor 1502 in the network device 1500 reads the instruction or program code in the memory 1503, so that Fig. 20 The illustrated network device 1500 is capable of performing all or part of the operations performed by the second edge network device.

[0302] The network device 1500 may also correspond to the above Figure 14-19 The device shown, for example, Figure 14-16 The first receiving module 1401, the second receiving module 1404, the first publishing module 1405, the second publishing module 1407 and the sending module 1403 involved in the embodiment are equivalent to the transceiver 1501, and the generating module 1402, the first establishing module 1406 and the second establishing module 1409 are equivalent to the processor 1502. For another example, Figure 17-Figure 19 The first receiving module 1701, the sending module 1703, the second receiving module 1704, the publishing module 1705 and the third receiving module 1707 involved are equivalent to the transceiver 1501, and the generating module 1702, the first establishing module 1706 and the second establishing module 1708 are equivalent to the processor 1502.

[0303] See also Fig.21 , Fig.21 A schematic diagram of the structure of a network device 2000 provided by an exemplary embodiment of the present application is shown. Fig.21 The network device 2000 shown is used to perform the above Figure 4 , Figure 6-Figure 13 The operations involved in the method for sending a message are shown. The network device 2000 is, for example, a switch, a router, etc.

[0304] like Fig.21 As shown, the network device 2000 includes at least one processor 2001 , a memory 2003 , and at least one communication interface 2004 .

[0305] The processor 2001 is, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing units (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the scheme of the present application. For example, the processor 2001 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. It can implement or execute various logic blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of the present invention. The processor may also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0306] Optionally, the network device 2000 further includes a bus. The bus is used to transmit information between the components of the network device 2000. The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.21 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus. Fig.21 In addition to being connected by a bus, the components of the network device 2000 may also be connected by other means, and the embodiment of the present invention does not limit the connection method of the components.

[0307] The memory 2003 is, for example, a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2003 is, for example, independent and connected to the processor 2001 via a bus. The memory 2003 can also be integrated with the processor 2001.

[0308] The communication interface 2004 uses any transceiver type device for communicating with other devices or communication networks, and the communication network can be Ethernet, radio access network (RAN) or wireless local area network (WLAN), etc. The communication interface 2004 can include a wired communication interface and can also include a wireless communication interface. Specifically, the communication interface 2004 can be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a wireless local area network (WLAN) interface, a cellular network communication interface or a combination thereof. The Ethernet interface can be an optical interface, an electrical interface or a combination thereof. In an embodiment of the present application, the communication interface 2004 can be used for the network device 2000 to communicate with other devices.

[0309] In a specific implementation, as an embodiment, the processor 2001 may include one or more CPUs, such as Fig.21 0 and CPU1 shown in FIG. Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0310] In a specific implementation, as an embodiment, the network device 2000 may include multiple processors, such as Fig.21 2001 and processor 2005 are shown in FIG. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0311] In a specific implementation, as an embodiment, the network device 2000 may further include an output device and an input device. The output device communicates with the processor 2001 and may display information in a variety of ways. For example, the output device may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device communicates with the processor 2001 and may receive user input in a variety of ways. For example, the input device may be a mouse, a keyboard, a touch screen device, or a sensor device.

[0312] In some embodiments, the memory 2003 is used to store the program code 2010 for executing the solution of the present application, and the processor 2001 can execute the program code 2010 stored in the memory 2003. That is, the network device 2000 can implement the message processing method provided by the method embodiment through the processor 2001 and the program code 2010 in the memory 2003. The program code 2010 may include one or more software modules. Optionally, the processor 2001 itself can also store the program code or instruction for executing the solution of the present application.

[0313] In a specific embodiment, the network device 2000 of the embodiment of the present application may correspond to the first edge network device in each of the above-mentioned method embodiments, and the processor 2001 in the network device 2000 reads the program code 2010 in the memory 2003 or the program code or instruction stored in the processor 2001 itself, so that Fig.21 The illustrated network device 2000 is capable of performing all or part of the operations performed by the first edge network device.

[0314] In a specific embodiment, the network device 2000 of the embodiment of the present application may correspond to the second edge network device in each of the above-mentioned method embodiments, and the processor 2001 in the network device 2000 reads the program code 2010 in the memory 2003 or the program code or instruction stored in the processor 2001 itself, so that Fig.21 The illustrated network device 2000 is capable of performing all or part of the operations performed by the second edge network device.

[0315] The network device 2000 may also correspond to the above Figure 14-19 The device shown, Figure 14-19 Each functional module in the apparatus shown is implemented using software of the network device 2000. In other words, Figure 14-19 The functional modules included in the apparatus shown are generated after the processor 2001 of the network device 2000 reads the program code 2010 stored in the memory 2003. For example, Figure 14-16 The first receiving module 1401, the second receiving module 1404, the first publishing module 1405, the second publishing module 1407 and the sending module 1403 involved in the communication interface 2004 are equivalent to the communication interface 2004, and the generating module 1402, the first establishing module 1406 and the second establishing module 1409 are equivalent to the processor 2001 and / or the processor 2005. For another example, Figure 17-Figure 19 The first receiving module 1701, sending module 1703, second receiving module 1704, publishing module 1705 and third receiving module 1707 involved are equivalent to the communication interface 2004, and the generating module 1702, the first establishing module 1706 and the second establishing module 1708 are equivalent to the processor 2001 and / or the processor 2005.

[0316] in, Figure 4 , Figure 6-Figure 12 Each step of the method for sending a message shown is completed by an integrated logic circuit of hardware or software instructions in the processor of the network device 2000. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

[0317] See also Fig. 22 , Fig. 22 A schematic diagram showing the structure of a network device 2100 provided by another exemplary embodiment of the present application is shown. Fig. 22 The network device 2100 shown is used to perform the above Figure 4 , Figure 6-Figure 12 All or part of the operations involved in the method for sending a message shown. The network device 2100 is, for example, a switch, a router, etc. The network device 2100 can be implemented by a general bus architecture.

[0318] like Fig. 22 As shown, the network device 2100 includes: a main control board 2110 and an interface board 2130 .

[0319] The main control board is also called a main processing unit (MPU) or a route processor card. The main control board 2110 is used to control and manage various components in the network device 2100, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 2110 includes: a central processing unit 2111 and a memory 2112.

[0320] The interface board 2130 is also called a line processing unit (LPU), a line card or a service board. The interface board 2130 is used to provide various service interfaces and realize the forwarding of data packets. The service interface includes but is not limited to an Ethernet interface, a POS (Packet over SONET / SDH) interface, etc., and the Ethernet interface is, for example, a Flexible Ethernet Service Interface (Flexible Ethernet Clients, FlexE Clients). The interface board 2130 includes: a central processing unit 2131, a network processor 2132, a forwarding table entry memory 2134 and a physical interface card (PIC) 2133.

[0321] The central processor 2131 on the interface board 2130 is used to control and manage the interface board 2130 and communicate with the central processor 2111 on the main control board 2110 .

[0322] The network processor 2132 is used to implement the message sending process. The network processor 2132 can be in the form of a forwarding chip. The forwarding chip can be a network processor (NP). In some embodiments, the forwarding chip can be implemented by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA). Specifically, the network processor 2132 is used to forward the received message based on the forwarding table stored in the forwarding table entry memory 2134. If the destination address of the message is the address of the network device 2100, the message is sent to the CPU (such as the central processor 2131) for processing; if the destination address of the message is not the address of the network device 2100, the next hop and the output interface corresponding to the destination address are found from the forwarding table according to the destination address, and the message is forwarded to the output interface corresponding to the destination address. Among them, the processing of the uplink message may include: processing of the message input interface, forwarding table search; the processing of the downlink message may include: forwarding table search, etc. In some embodiments, the central processor can also perform the function of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, so that the forwarding chip is not required in the interface board.

[0323] The physical interface card 2133 is used to implement the physical layer docking function, whereby the original traffic enters the interface board 2130, and the processed message is sent out from the physical interface card 2133. The physical interface card 2133, also called a daughter card, can be installed on the interface board 2130, and is responsible for converting the photoelectric signal into a message and forwarding the message to the network processor 2132 for processing after checking the legitimacy of the message. In some embodiments, the central processor 2131 can also perform the functions of the network processor 2132, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 2132 is not required in the physical interface card 2133.

[0324] Optionally, the network device 2100 includes multiple interface boards, for example, the network device 2100 further includes an interface board 2140, and the interface board 2140 includes: a central processor 2141, a network processor 2142, a forwarding table entry memory 2144, and a physical interface card 2143. The functions and implementation methods of the components in the interface board 2140 are the same or similar to those of the interface board 2130, and are not described in detail here.

[0325] Optionally, the network device 2100 further includes a switching fabric board 2120. The switching fabric board 2120 may also be referred to as a switch fabric unit (SFU). When the network device has multiple interface boards, the switching fabric board 2120 is used to complete data exchange between the interface boards. For example, the interface board 2130 and the interface board 2140 may communicate through the switching fabric board 2120.

[0326] The main control board 2110 is coupled to the interface board. For example, the main control board 2110, the interface board 2130, the interface board 2140, and the switching network board 2120 are connected to the system backplane through the system bus to achieve intercommunication. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 2110 and the interface board 2130 and the interface board 2140, and the main control board 2110 and the interface board 2130 and the interface board 2140 communicate through the IPC channel.

[0327] Logically, the network device 2100 includes a control plane and a forwarding plane. The control plane includes a main control board 2110 and a central processing unit 2111. The forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 2134, a physical interface card 2133, and a network processor 2132. The control plane performs functions such as a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the status of the network device. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 2132 forwards the message received by the physical interface card 2133 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 2134. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same network device.

[0328] It is worth noting that there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, they can jointly realize load sharing and redundant backup. In a centralized forwarding architecture, network devices may not need switching network boards, and the interface board is responsible for processing the service data of the entire system. In a distributed forwarding architecture, network devices may have at least one switching network board, and data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices with distributed architectures are greater than those of network devices with centralized architectures. Optionally, the network device may have only one board, that is, no switching board, and the functions of the interface board and the main control board are integrated on the board. In this case, the central processor on the interface board and the central processor on the main control board can be combined into one central processor on the board to perform the functions of the two. This type of network device has low data exchange and processing capabilities (for example, low-end switches or routers and other network devices). The specific architecture to be adopted depends on the specific networking deployment scenario, and no limitation is made here.

[0329] In a specific embodiment, the network device 2100 corresponds to the above Figure 14-16 Any of the devices shown in the figure for sending a message applied to a first edge network device. In some embodiments, Figure 14-16 The first receiving module 1401 , the first publishing module 1405 and the second publishing module 1407 in the apparatus for sending a message are equivalent to the physical interface card 2133 in the network device 2100 . Figure 14-16 The second receiving module 1404 and the sending module 1403 in the apparatus for sending a message are equivalent to the physical interface card 2143 in the network device 2100 . Figure 14-16The generation module 1402 , the first establishment module 1406 and the second establishment module 1409 in the device for sending a message are equivalent to at least one of the central processor 2111 , the network processor 2132 and the network processor 2142 in the network device 2100 .

[0330] In some embodiments, the network device 2100 also corresponds to the above Figure 17-Figure 19 Any of the devices shown for sending a message applied to a second edge network device. In some embodiments, Figure 17-Figure 19 The first receiving module 1701 and the publishing module 1705 in the apparatus for sending a message are equivalent to the physical interface card 2133 in the network device 2100 . Figure 17-Figure 19 The sending module 1703 , the second receiving module 1704 and the third receiving module 1707 in the apparatus for sending a message are equivalent to the physical interface card 2143 in the network device 2100 . Figure 17-19 The generating module 1702, the first establishing module 1706, and the second establishing module 1708 in the device for sending a message are equivalent to at least one of the central processor 2111, the network processor 2132, and the network processor 2142 in the network device 2100. Among them, at least one of the central processor 2111, the network processor 2132, and the network processor 2142 refers to any one of the central processor 2111, the network processor 2132, and the network processor 2142, or any combination of multiple thereof.

[0331] Based on the above Fig. 20 , Fig.21 and Fig. 22 The network device shown in the embodiment of the present application further provides a communication system, the communication system comprising: a first edge network device and a second edge network device. Optionally, the first edge network device is Fig. 20 The network device 1500 or Fig.21 The network device 2000 or Fig. 22 The network device 2100 shown in FIG. 2 is a second edge network device. Fig. 20 The network device 1500 or Fig.21 The network device 2000 or Fig. 22 Network device 2100 is shown.

[0332] The method performed by the first edge network device and the second edge network device can be referred to above. Figure 4 , Figure 6-Figure 12 The relevant description of the illustrated embodiment will not be repeated here.

[0333] It should be understood that the above processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced RISC machines (ARM) architecture.

[0334] Further, in an optional embodiment, the memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. The memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

[0335] The memory may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memory. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM) and direct memory bus random access memory (DR RAM).

[0336] A computer-readable storage medium is also provided, wherein the storage medium stores at least one program instruction or code, and when the program instruction or code is loaded and executed by a processor, the computer implements the above Figure 4 , Figure 6-Figure 12 Any method for sending a message as described in .

[0337] The present application provides a computer program. When the computer program is executed by a computer, a processor or a computer can be enabled to execute the corresponding steps and / or processes in the above method embodiments.

[0338] A chip is provided, comprising a processor, for calling and executing instructions stored in a memory from the memory, so that a communication device equipped with the chip executes the methods in the above aspects.

[0339] Another chip is provided, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, the processor is used to execute the code in the memory, and when the code is executed, the processor is used to execute the methods in the above aspects.

[0340] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk), etc.

[0341] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation methods of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present application should be included in the scope of protection of the present application.

[0342] Those of ordinary skill in the art will appreciate that, in conjunction with the various method steps and modules described in the embodiments disclosed herein, they can be implemented in software, hardware, firmware, or any combination thereof. In order to clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0343] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0344] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer program instructions. As an example, the method of the embodiment of the present application can be described in the context of a machine executable instruction, and the machine executable instruction is such as included in the program module executed in the device on the real or virtual processor of the target. Generally speaking, a program module includes a routine, a program, a library, an object, a class, a component, a data structure, etc., which performs a specific task or realizes a specific abstract data structure. In various embodiments, the function of the program module can be merged or divided between the described program modules. The machine executable instruction for the program module can be executed in a local or distributed device. In a distributed device, the program module can be located in both a local and a remote storage medium.

[0345] The computer program code for realizing the method for the embodiment of the present application can be written in one or more programming languages. These computer program codes can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by a computer or other programmable data processing device, causes the function / operation specified in the flow chart and / or block diagram to be implemented. The program code can be executed completely on a computer, partially on a computer, as an independent software package, partially on a computer and partially on a remote computer or completely on a remote computer or server.

[0346] In the context of the embodiments of the present application, computer program codes or related data may be carried by any appropriate carrier to enable a device, apparatus or processor to perform the various processes and operations described above. Examples of carriers include signals, computer readable media, and the like.

[0347] Examples of signals may include electrical, optical, radio, acoustic or other forms of propagated signals, such as carrier waves, infrared signals, etc.

[0348] A machine-readable medium may be any tangible medium that contains or stores a program for or related to an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More detailed examples of machine-readable storage media include an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0349] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0350] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, or it can be an electrical, mechanical or other form of connection.

[0351] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0352] In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0353] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0354] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there a limitation on quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of the various described examples, a first edge network device may be referred to as a second edge network device, and similarly, a second edge network device may be referred to as a first edge network device. Both the first edge network and device and the second edge network device may be edge network devices, and in some cases, may be separate and different edge network devices.

[0355] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0356] The term "at least one" in this application means one or more, and the term "multiple" in this application means two or more, for example, multiple second messages means two or more second messages. The terms "system" and "network" are often used interchangeably herein.

[0357] It should be understood that the terms used in the description of the various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0358] It should also be understood that the term “comprise” (also known as “includes,” “including,” “comprises” and / or “comprising”) when used in this specification specifies the presence of stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0359] It should also be understood that the terms "if" and "if" may be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, the phrases "if it is determined that ..." or "if [a stated condition or event] is detected" may be interpreted to mean "upon determining that ..." or "in response to determining that ..." or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.

[0360] It should be understood that determining B based on A does not mean determining B only based on A. B can also be determined based on A and / or other information.

[0361] It should also be understood that the references to "one embodiment", "an embodiment", or "a possible implementation" throughout the specification mean that specific features, structures, or characteristics related to the embodiment or implementation are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment", or "a possible implementation" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

Claims

1. A method for sending a message, characterized in that: The method comprises: A first edge network device receives a first message containing a target segment identifier, the first edge network device is an egress operator edge PE device of a first network in an operator CSC system of an operator and is not located in a second network included in the CSC system, the first network is a network of a first-tier operator and is an Internet Protocol version 6 IPv6 segment routing SRv6 network, the second network accesses the first network in a multi-protocol label switching MPLS manner, the second network is a network of a second-tier operator, the first-tier operator is a Border Gateway Protocol BGP / Multi-protocol Label Switching MPLS Internet Protocol IP Virtual Private Network VPN service provider, and the second-tier operator is a user of the first-tier operator and a service provider; The first edge network device generates a second message containing a first label according to the first message, and the first label has a mapping relationship with the target segment identifier; The first edge network device sends the second message to a device of the second network.

2. The method according to claim 1, characterized in that: The target segment identifier is a first segment identifier, and the first segment identifier is used to indicate decapsulation of the message header and encapsulation label; The first edge network device generates a second message containing a first label according to the first message, including: The first edge network device decapsulates the SRv6 message header of the first message according to the first segment identifier, and based on a mapping relationship between the first segment identifier and the first label, encapsulates the decapsulated message with the first label to obtain a second message containing the first label.

3. The method according to claim 2, characterized in that Before the first edge network device generates a second message containing a first label according to the first message, the method further includes: The first edge network device receives a first route and a first label corresponding to the first route; The first edge network device publishes a second route carrying the first segment identifier based on the first route; The first edge network device establishes a mapping relationship between the first label and the first segment identifier.

4. The method according to claim 1, characterized in that: The target segment identifier is a second segment identifier, the first message further includes a first flag, the second segment identifier is used to indicate decapsulation of the message header, and the first flag is used to indicate an encapsulation label; The first edge network device generates a second message containing a first label according to the first message, including: The first edge network device decapsulates the SRv6 message header of the first message according to the second segment identifier, and according to the indication of the first flag, based on the mapping relationship between the second segment identifier and the first label, encapsulates the decapsulated message with the first label to obtain a second message containing the first label.

5. The method according to claim 4, characterized in that Before the first edge network device generates a second message containing a first label according to the first message, the method further includes: The first edge network device receives a first route and a first label corresponding to the first route; The first edge network device publishes a third route carrying the second segment identifier based on the first route; The first edge network device establishes a mapping relationship between the first label and the second segment identifier.

6. The method according to any one of claims 1 to 5, characterized in that: The first label is an MPLS label.

7. The method according to claim 1, characterized in that The first edge network device receives a first message containing a target segment identifier, including: the egress PE device of the first network receives the first message containing a target segment identifier sent by an ingress PE device of the first network; The first edge network device sends the second message to the device of the second network, including: the egress PE device of the first network sends the second message to the customer edge CE device of the second network; The first message is a data message, and the second message is a data message.

8. The method according to any one of claims 1-5 and 7, characterized in that: The first network and the second network are in different autonomous domain systems.

9. A method for sending a message, characterized in that: The method comprises: The second edge network device receives a third message containing a second label from a device of a third network included in the operator's operator CSC system, the second edge network device is an ingress operator edge PE device of the first network in the CSC system and is not located in the third network, the first network is a network of a first-tier operator and is an Internet Protocol version 6 IPv6 segment routing SRv6 network, the third network accesses the first network in a multi-protocol label switching MPLS manner, the third network is a network of a second-tier operator, the first-tier operator is a border gateway protocol BGP / multi-protocol label switching MPLS Internet Protocol IP virtual private network VPN service provider, and the second-tier operator is a user of the first-tier operator and a service provider; The second edge network device generates a first message including a target segment identifier according to the third message, and the second label has a mapping relationship with the target segment identifier; The second edge network device sends the first message.

10. The method according to claim 9, characterized in that The target segment identifier is a first segment identifier, and the first segment identifier is used to indicate decapsulation of the message header and encapsulation label; The second edge network device generates a first message including a target segment identifier according to the third message, including: The second edge network device generates a first message including the first segment identifier based on a mapping relationship between the second label and the first segment identifier.

11. The method according to claim 10, characterized in that The second edge network device generates a first message including the first segment identifier based on a mapping relationship between the second label and the first segment identifier, including: The second edge network device decapsulates the second label in the third message based on the mapping relationship between the second label and the first segment identifier, and encapsulates an SRv6 message header in the decapsulated message, wherein the SRv6 message header contains the first segment identifier.

12. The method according to claim 10 or 11, characterized in that: Before the second edge network device receives the third message containing the second label, the method further includes: The second edge network device receives a second route carrying the first segment identifier; The second edge network device publishes a fourth route and a second label corresponding to the fourth route; The second edge network device establishes a mapping relationship between the second label and the first segment identifier.

13. The method according to claim 9, characterized in that The target segment identifier is a second segment identifier, and the second segment identifier is used to indicate decapsulation of the message header; The second edge network device generates a first message including a target segment identifier according to the third message, including: The second edge network device generates a first message containing the second segment identifier based on a mapping relationship between the second label and the second segment identifier. The first message also includes a first flag, and the first flag is used to indicate an encapsulation label.

14. The method according to claim 13, characterized in that The second edge network device generates a first message including the second segment identifier based on a mapping relationship between the second label and the second segment identifier, including: The second edge network device decapsulates the second label in the third message based on the mapping relationship between the second segment identifier and the second label, and encapsulates an SRv6 message header in the decapsulated message, wherein the SRv6 message header contains the second segment identifier and the first flag.

15. The method according to claim 13 or 14, characterized in that Before the second edge network device receives the third message containing the second label, the method further includes: The second edge network device receives a third route carrying the second segment identifier; The second edge network device publishes a fourth route and a second label corresponding to the fourth route; The second edge network device establishes a mapping relationship between the second label and the second segment identifier.

16. The method according to any one of claims 9-11, 13-14, characterized in that: The second label is an MPLS label.

17. The method according to claim 13 or 14, characterized in that The first flag is located in a flag field of a segment routing header SRH of the first message.

18. The method according to any one of claims 9-11, 13-14, characterized in that: The second edge network device receives a third message containing a second label from a device of a third network included in the operator CSC system of the operator, comprising: the ingress PE device of the first network receives a third message containing a second label sent by a customer edge CE device of the third network; The second edge network device sending the first message includes: the ingress PE device of the first network sending the first message to the egress PE device of the first network; The third message is a data message, and the first message is a data message.

19. The method according to claim 12, characterized in that The second edge network device receives the second route carrying the first segment identifier, including: the ingress PE device of the first network receives the second route carrying the first segment identifier sent by the egress PE device of the first network.

20. The method according to claim 15, characterized in that The second edge network device receives the third route carrying the second segment identifier, including: the ingress PE device of the first network receives the third route carrying the second segment identifier sent by the egress PE device of the first network.

21. The method according to any one of claims 9-11, 13-14, 19-20, characterized in that: The first network and the third network are in different autonomous domain systems.

22. A device for sending a message, characterized in that: The device is applied to a first edge network device, the first edge network device is an egress operator edge PE device of a first network in an operator CSC system of an operator and is not located in a second network included in the CSC system, the first network is a network of a first-tier operator and is an Internet Protocol version 6 IPv6 segment routing SRv6 network, the second network accesses the first network in a multi-protocol label switching MPLS manner, the second network is a network of a second-tier operator, the first-tier operator is a border gateway protocol BGP / multi-protocol label switching MPLS Internet Protocol IP virtual private network VPN service provider, the second-tier operator is a user of the first-tier operator and a service provider, the device includes: A first receiving module, used for receiving a first message containing a target segment identifier; A generating module, configured to generate a second message containing a first label according to the first message, wherein the first label has a mapping relationship with the target segment identifier; A sending module is used to send the second message to the device of the second network.

23. The device according to claim 22, characterized in that The target segment identifier is a first segment identifier, and the first segment identifier is used to indicate decapsulation of the message header and encapsulation label; The generating module is configured to decapsulate the SRv6 message header of the first message according to the first segment identifier, and based on a mapping relationship between the first segment identifier and the first label, encapsulate the decapsulated message with the first label to obtain a second message containing the first label.

24. The device according to claim 23, characterized in that The device further comprises: A second receiving module, configured to receive a first route and a first label corresponding to the first route; A first publishing module, configured to publish a second route carrying the first segment identifier based on the first route; The first establishing module is used to establish a mapping relationship between the first label and the first segment identifier.

25. The device according to claim 22, characterized in that The target segment identifier is a second segment identifier, the first message further includes a first flag, the second segment identifier is used to indicate decapsulation of the message header, and the first flag is used to indicate an encapsulation label; The generation module is used to decapsulate the SRv6 message header of the first message according to the second segment identifier, and according to the indication of the first flag, based on the mapping relationship between the second segment identifier and the first label, encapsulate the decapsulated message with the first label to obtain a second message containing the first label.

26. The device according to claim 25, characterized in that The device further comprises: A second receiving module, configured to receive a first route and a first label corresponding to the first route; A second publishing module, configured to publish a third route carrying the second segment identifier based on the first route; The second establishing module is used to establish a mapping relationship between the first label and the second segment identifier.

27. The device according to any one of claims 22 to 26, characterized in that: The first label is an MPLS label.

28. The device according to claim 22, characterized in that The first receiving module is used to receive a first message containing a target segment identifier sent by an ingress PE device of the first network; The sending module is used to send the second message to the customer edge CE device of the second network; The first message is a data message, and the second message is a data message.

29. The device according to any one of claims 22-26 and 28, characterized in that: The first network and the second network are in different autonomous domain systems.

30. A device for sending a message, characterized in that: The device is applied to a second edge network device, the second edge network device is an ingress operator edge PE device of a first network in an operator CSC system of an operator and is not located in a third network included in the CSC system, the first network is a network of a first-tier operator and is an Internet Protocol version 6 IPv6 segment routing SRv6 network, the third network accesses the first network in a multi-protocol label switching MPLS manner, the third network is a network of a second-tier operator, the first-tier operator is a border gateway protocol BGP / multi-protocol label switching MPLS Internet Protocol IP virtual private network VPN service provider, the second-tier operator is a user of the first-tier operator and a service provider, the device includes: A first receiving module, configured to receive a third message containing a second tag from a device on the third network; a generating module, configured to generate a first message containing a target segment identifier according to the third message, wherein the second label has a mapping relationship with the target segment identifier; A sending module is used to send the first message.

31. The device according to claim 30, characterized in that The target segment identifier is a first segment identifier, and the first segment identifier is used to indicate decapsulation of the message header and encapsulation label; The generating module is used to generate a first message containing the first segment identifier based on a mapping relationship between the second label and the first segment identifier.

32. The device according to claim 31, characterized in that The generating module is used to decapsulate the second label in the third message based on the mapping relationship between the second label and the first segment identifier, and encapsulate the SRv6 message header in the decapsulated message, wherein the SRv6 message header contains the first segment identifier.

33. The device according to claim 31 or 32, characterized in that The device further comprises: A second receiving module, configured to receive a second route carrying the first segment identifier; A publishing module, used for publishing a fourth route and a second label corresponding to the fourth route; The first establishing module is used to establish a mapping relationship between the second label and the first segment identifier.

34. The device according to claim 30, characterized in that The target segment identifier is a second segment identifier, and the second segment identifier is used to indicate decapsulation of the message header; The generating module is used to generate a first message containing the second segment identifier based on a mapping relationship between the second label and the second segment identifier, wherein the first message further includes a first flag, and the first flag is used to indicate an encapsulation label.

35. The device according to claim 34, characterized in that The generating module is used to decapsulate the second label in the third message based on the mapping relationship between the second segment identifier and the second label, and encapsulate the SRv6 message header in the decapsulated message, wherein the SRv6 message header contains the second segment identifier and the first flag.

36. The device according to claim 34 or 35, characterized in that The device further comprises: A third receiving module, used for receiving a third route carrying the second segment identifier; A publishing module, used for publishing a fourth route and a second label corresponding to the fourth route; The second establishing module is used to establish a mapping relationship between the second label and the second segment identifier.

37. The device according to any one of claims 30-32, 34-35, characterized in that: The second label is an MPLS label.

38. The device according to claim 34 or 35, characterized in that The first flag is located in a flag field of a segment routing header SRH of the first message.

39. The device according to any one of claims 30-32, 34-35, characterized in that: The first receiving module is used to receive a third message containing a second tag sent by a customer edge CE device of the third network; The sending module is used to send the first message to the egress PE device of the first network; The third message is a data message, and the first message is a data message.

40. The device according to claim 33, characterized in that The second receiving module is used to receive a second route carrying the first segment identifier sent by an egress PE device of the first network.

41. The device according to claim 36, characterized in that The third receiving module is used to receive a third route carrying the second segment identifier sent by an egress PE device of the first network.

42. The device according to any one of claims 30-32, 34-35, 40-41, characterized in that: The first network and the third network are in different autonomous domain systems.

43. A network device, characterized in that: The network device includes: a processor, the processor is coupled to a memory, the memory stores at least one program instruction or code, and the at least one program instruction or code is loaded and executed by the processor so that the network device implements the method for sending a message described in any one of claims 1-21.

44. A system for sending a message, characterized in that: The system includes a first edge network device and a second edge network device, the first edge network device is used to execute the method for sending a message described in any one of claims 1-8, and the second edge network device is used to execute the method for sending a message described in any one of claims 9-21.

45. A computer-readable storage medium, characterized in that The storage medium stores at least one program instruction or code, and when the program instruction or code is loaded and executed by the processor, the computer implements the method for sending a message as described in any one of claims 1 to 21.

Citation Information

Patent Citations

  • Communication method and device for SRV6 network and IP MPLS network

    CN110266592A

Cited By

  • Method and apparatus for sending message, and network device, system and storage medium

    WO2022001835A1