Message transmission method and device, electronic equipment and medium

By using universal decapsulation to check the VRF routing service identifier and the destination IPv6 address of the new outer IPv6 header in the SRv6 network node, the routing resource waste caused by multiple VRF settings Service SIDs and routing tables in the prior art is solved, and efficient routing resource utilization and performance improvement is achieved.

CN120166067APending Publication Date: 2025-06-17NEW H3C TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510402822.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-06-17

AI Technical Summary

Technical Problem

In the SRv6 network, in the prior art, Service SID and routing table are set for multiple VRFs respectively, resulting in waste of routing resources and performance impact.

Method used

By using universal decapsulation in network nodes to check VRF routing service identifiers, decapsulate SRv6 messages and obtain the destination IPv6 address of the new outer IPv6 header, encapsulate the new outer IPv6 header based on this address, and realize the isolated transmission of multiple SRv6 messages.

Benefits of technology

It reduces the waste of routing resources, improves router performance, and realizes effective isolated transmission of multiple SRv6 messages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120166067A_ABST
    Figure CN120166067A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a message transmission method and device, electronic equipment and a medium. In the embodiment of the invention, the universal Service SID can be matched with the target IPv6 addresses of the outer layer IPv6 headers of the plurality of SRv6 messages, the de-encapsulation of different SRv6 messages can be realized only by setting one universal Service SID, and the isolated transmission of the plurality of SRv6 messages can be realized only by setting one routing table. Therefore, the problem of resource waste caused by the fact that a plurality of VRFs respectively set respective Service SID and respective routing tables in the prior art can be effectively solved, and optimal utilization of routing resources can be effectively realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communication technologies, and in particular, to a method and apparatus for packet transmission, an electronic device, and a medium. Background Art

[0002] In a Segment Routing over IPv6 (SRv6) network based on an Internet Protocol Version 6 (IPv6) forwarding plane, N Virtual Private Network (VPN) instances (Virtual Routing Forwarding, VRF) are created between an Ingress Provider Edge (Ingress PE) and an Egress Provider Edge (Egress PE) to enable different types of packets to be transmitted through different tunnels, so as to isolate multi-service traffic.

[0003] In practical applications, as Figure 1 shown, when the Ingress PE receives a destination IPv6 address fd00:0200:1111:fff0:bbb1:0000:0000:0000 in the outer IPv6 header carried in the SRv6 packet, which matches the Service Segment Identifier (Service SID) fd00:0200:2222:fff0:bbb1:0000:0000:0000 configured for de-encapsulation and VRF routing lookup in the local VRF-A-TC1, the outer IPv6 header of the SRv6 packet is de-encapsulated to strip the destination IPv6 address in the outer IPv6 header, and a routing lookup is performed in the routing table of VRF-A-TC1 based on the destination IP address in the inner IP header to obtain the Service SID fd00:0200:2222:fff0:bbb1:0000:0000:0000 of VRF-A-TC1 at the Egress PE end. The found Service SID is used as the destination IPv6 address of the outer IPv6 header to encapsulate the outer IPv6 header, and the de-encapsulated packet is re-encapsulated. The re-encapsulated SRv6 packet is transmitted to the Egress PE through the corresponding tunnel1.

[0004] However, in the above method, at the Ingress PE, Service SIDs are respectively set for three VRFs to match different outer destination IPv6 addresses, and three Service SIDs are obtained from the peer Egress PE and used as the destination IPv6 addresses of the new outer IPv6 header respectively. Also, three identical routing tables are set up to achieve isolated transmission of SRv6 packets, which will cause waste of routing resources and affect the performance of the router. Summary of the Invention

[0005] In view of this, embodiments of the present application provide a packet transmission method, apparatus, electronic device, and medium to achieve optimized utilization of routing resources.

[0006] An embodiment of the present application provides a packet transmission method, which is applied to a network node in a Segment Routing over IPv6 (SRv6) network based on the Internet Protocol Version 6 (IPv6) forwarding plane. The method includes:

[0007] Receiving an SRv6 packet of a first VPN;

[0008] When it is determined that the destination IPv6 address of the outer IPv6 header of the SRv6 packet matches the local VRF routing service identifier for general decapsulation, the outer IPv6 header of the SRv6 packet is decapsulated to strip the destination IPv6 address of the outer IPv6 header, and a destination IPv6 address for encapsulating a new outer IPv6 header of a second VPN is obtained for the SRv6 packet;

[0009] Based on the obtained destination IPv6 address of the new outer IPv6 header, a new outer IPv6 header is encapsulated for the SRv6 packet from which the destination IPv6 address of the original outer IPv6 header has been stripped.

[0010] As an embodiment, obtaining a destination IPv6 address for encapsulating a new outer IPv6 header of a second VPN by the SRv6 packet further includes:

[0011] Obtaining a VRF identifier from the destination IPv6 address of the original outer IPv6 header stripped from the SRv6 packet;

[0012] Based on the destination IP address of the inner IP header of the SRv6 packet, a peer VRF routing service identifier for general decapsulation is found in the local Longest Prefix Match (LPM) table;

[0013] Combining the obtained VRF identifier and the peer VRF routing service identifier for general decapsulation, and determining the combination result as the destination IPv6 address of the new outer IPv6 header for encapsulating the second VPN.

[0014] As an embodiment, the local general decapsulation to check the VRF routing service identifier and the peer general decapsulation to check the VRF routing service identifier support IPv6 or Internet Protocol version 4 (IPv4).

[0015] As an embodiment, before determining that the destination IPv6 address of the outer IPv6 header of the SRv6 packet matches the local general decapsulation to check the VRF routing service identifier, the method further includes:

[0016] Aggregate the decapsulation to check the VRF routing service identifiers corresponding to different VPNs with the same locator and tenant ID into the local general decapsulation to check the VRF routing service identifier.

[0017] As an embodiment, before determining that the destination IPv6 address of the outer IPv6 header of the SRv6 packet matches the local general decapsulation to check the VRF routing service identifier, the method further includes:

[0018] Receive the peer general decapsulation to check the VRF routing service identifier;

[0019] Record the received peer general decapsulation to check the VRF routing service identifier in the LPM table.

[0020] An embodiment of the present application further provides a packet transmission device, which is applied to a network node in a segment routing SRv6 network based on the Internet Protocol version 6 (IPv6) forwarding plane. The device includes:

[0021] A receiving module, configured to receive an SRv6 packet of a first VPN;

[0022] A decapsulation module, configured to, when determining that the destination IPv6 address of the outer IPv6 header of the SRv6 packet matches the local general decapsulation to check the VRF routing service identifier, decapsulate the outer IPv6 header of the SRv6 packet to strip the destination IPv6 address of the outer IPv6 header, and obtain the destination IPv6 address for encapsulating a new outer IPv6 header of a second VPN for the SRv6 packet;

[0023] An encapsulation module, configured to encapsulate a new outer IPv6 header for the SRv6 packet from which the destination IPv6 address of the original outer IPv6 header has been stripped based on the obtained destination IPv6 address of the new outer IPv6 header.

[0024] As an embodiment, obtaining the destination IPv6 address for encapsulating a new outer IPv6 header of a second VPN for the SRv6 packet further includes:

[0025] Obtain a VRF identifier from the destination IPv6 address of the original outer IPv6 header stripped from the SRv6 packet;

[0026] Based on the destination IP address of the inner IP header of the SRv6 packet, find the peer general decapsulation lookup VRF routing service identifier in the local longest prefix match (LPM) table;

[0027] Combine the obtained VRF identifier and the peer general decapsulation lookup VRF routing service identifier, and determine the combined result as the destination IPv6 address of the new outer IPv6 header used for encapsulating the second VPN.

[0028] As an embodiment, the local general decapsulation lookup VRF routing service identifier and the peer general decapsulation lookup VRF routing service identifier support IPv6 or Internet Protocol Version 4 (IPv4).

[0029] As an embodiment, before determining that the destination IPv6 address of the outer IPv6 header of the SRv6 packet matches the local general decapsulation lookup VRF routing service identifier, the decapsulation module is further used for:

[0030] Aggregate the decapsulation lookup VRF routing service identifiers corresponding to different VPNs with the same location identifier (locator) and tenant identifier (tenant_ID) into the local general decapsulation lookup VRF routing service identifier.

[0031] As an embodiment, before determining that the destination IPv6 address of the outer IPv6 header of the SRv6 packet matches the local general decapsulation lookup VRF routing service identifier, the receiving module is further used for:

[0032] Receive the peer general decapsulation lookup VRF routing service identifier;

[0033] Record the received peer general decapsulation lookup VRF routing service identifier in the LPM table.

[0034] An embodiment of the present application further provides an electronic device, including: a processor and a computer-readable storage medium for storing computer program instructions. When the computer program instructions are run by the computer-readable storage medium, the processor is caused to execute the steps of the above method.

[0035] An embodiment of the present application further provides a machine-readable storage medium. The storage medium stores computer program instructions, and when the computer program instructions are executed, the steps of the above method can be implemented.

[0036] As can be seen from the above technical solutions, in this embodiment, after receiving the SRv6 packet of the first VPN, when it is determined that the destination IPv6 address of the outer IPv6 header of the SRv6 packet matches the local general decapsulation lookup VRF routing service identifier, the outer IPv6 header of the SRv6 packet is decapsulated to strip the destination IPv6 address of the outer IPv6 header, and a destination IPv6 address for obtaining a new outer IPv6 header for encapsulating the second VPN is obtained for the SRv6 packet. A new outer IPv6 header is encapsulated for the SRv6 packet with the destination IPv6 address of the original outer IPv6 header stripped based on the obtained destination IPv6 address of the new outer IPv6 header. Since the general Service SID can match the destination IPv6 addresses of the outer IPv6 headers of multiple SRv6 packets, therefore, only one general Service SID needs to be set to achieve the decapsulation of different SRv6 packets, and only one routing table needs to be set to achieve the isolated transmission of multiple SRv6 packets, which can solve the problem of resource waste caused by setting respective Service SIDs and respective routing tables for multiple VRFs in the prior art, and can effectively realize the optimized utilization of routing resources. Description of the Drawings

[0037] Figure 1 Schematic diagram of packet transmission in the prior art provided by the embodiment of the present application;

[0038] Figure 2 Schematic diagram of the network architecture provided by the embodiment of the present application:

[0039] Figure 3 Schematic diagram of the flow of the method provided by the embodiment of the present application;

[0040] Figure 4 Schematic diagram of packet transmission provided by the embodiment of the present application;

[0041] Figure 5 Schematic diagram of the structure of the device provided by the embodiment of the present application;

[0042] Figure 6 Schematic diagram of the structure of the electronic device provided by the embodiment of the present application. Detailed Embodiments

[0043] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and make the above objects, features, and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0044] Before introducing the method provided by the embodiment of the present application, the network architecture provided by the embodiment of the present application will be described first:

[0045] Please refer to Figure 2 , Figure 2 , which is the network architecture diagram provided by the embodiment of the present application. This network architecture is the implementation environment of the method provided by the embodiment of the present application. The method provided by the embodiment of the present application is applied in a scenario where at least two SRv6 segment networks are interconnected. The method provided by the embodiment of the present application is applied to a network node that serves as both an egress node (i.e., Egress PE) of one SRv6 segment network and an ingress node (i.e., Ingress PE) of another SRv6 segment network in the SRv6 network. For example, it is applied to Figure 2 the network node 102 shown in

[0046] . Here, the network node 102 is both the egress node of the SRv6 segment network 100 and the ingress node of the SRv6 segment network 200.

[0047] It should be noted that for the sake of simplicity of the drawings, the padding 0s in the Service SIDs in the drawings of the present application that do not affect the description of the solution are omitted. For example, fd00:0200:2222:fff0:bbb1:0000:0000:0000 is represented as d00:0200:2222:fff0:bbb1 in the drawings.

[0047] Combined with the above network architecture, the method provided by the embodiment of the present application will be described below:

[0048] Please refer to Figure 3 , Figure 3 , which is the flowchart of the method provided by the embodiment of the present application.

[0049] As Figure 3 shown, the process may include the following steps:

[0050] Step S301: Receive an SRv6 packet of the first virtual private network (VPN).

[0051] In this embodiment, the SRv6 packet is an SRv6 packet with an IPv4 packet or an IPv6 packet as the internal payload and encapsulated in an IPv6 format on the outer layer. In this way, the IPv4 packet or the IPv6 packet is encapsulated in this SRv6 packet, enabling both the IPv4 packet and the IPv6 packet to be transmitted in the SRv6 network.

[0052] Step S302: When it is determined that the destination IPv6 address of the outer IPv6 header of the SRv6 packet matches the local general decapsulation lookup VRF routing service identifier, decapsulate the outer IPv6 header of the SRv6 packet to strip the destination IPv6 address of the outer IPv6 header and obtain the destination IPv6 address for the new outer IPv6 header used to encapsulate the second VPN for the SRv6 packet.

[0053] In this embodiment, the specific implementation method for determining whether the destination IPv6 address of the outer IPv6 header of the SRv6 packet matches the local general decapsulation lookup VRF routing service identifier (general Service SID) will be described in a specific embodiment later and will not be elaborated here.

[0054] The above-mentioned specific implementation method for obtaining the destination IPv6 address of the new outer IPv6 header used to encapsulate the second VPN for the SRv6 packet will also be described in a specific embodiment later and will not be elaborated here.

[0055] Step S303: Based on the obtained destination IPv6 address of the new outer IPv6 header, encapsulate a new outer IPv6 header for the SRv6 packet whose original outer IPv6 header's destination IPv6 address has been stripped off.

[0056] In this embodiment, the SRv6 packet that obtains the destination IPv6 address of the new outer IPv6 header is transmitted according to the tunnel corresponding to the destination IPv6 address of the new outer IPv6 header.

[0057] So far, the Figure 3 shown process is completed.

[0058] Through Figure 3 As can be seen from the shown process, after receiving the SRv6 packet of the first VPN, when it is determined that the destination IPv6 address of the outer IPv6 header of the SRv6 packet matches the local general decapsulation lookup VRF routing service identifier, the outer IPv6 header of the SRv6 packet is decapsulated to strip off the destination IPv6 address of the outer IPv6 header, and the destination IPv6 address of the new outer IPv6 header used to encapsulate the second VPN is obtained for the SRv6 packet. Based on the obtained destination IPv6 address of the new outer IPv6 header, a new outer IPv6 header is encapsulated for the SRv6 packet whose original outer IPv6 header's destination IPv6 address has been stripped off. Since the general Service SID can match the destination IPv6 addresses of the outer IPv6 headers of multiple SRv6 packets, therefore, only one general Service SID needs to be set to achieve the decapsulation of multiple SRv6 packets with the same locator field and tenent_ID, and only one routing table needs to be set to achieve the isolated transmission of multiple SRv6 packets, which can solve the problem of resource waste caused by setting respective Service SIDs and respective routing tables for multiple VRFs in the prior art and can effectively realize the optimized utilization of routing resources.

[0059] The following elaborates in detail the determination of whether the destination IPv6 address of the outer IPv6 header of the SRv6 packet matches the local general decapsulation lookup VRF routing service identifier:

[0060] It should be noted that the Service SID types mentioned in this application are all End.DT46 SIDs. The Service SID of the End.DT46 SID type is used to de-encapsulate packets (i.e., remove the IPv6 header) and search the routing table within the matching VRF.

[0061] The specific format of the Service SID of the End.DT46 SID type is as follows:

[0062] [locator(48bits)][tenent_ID(28bits)][TC_ID(4bits)][appended 0(48bits)]

[0063] Among them, the locator is used to represent the locator of the network node, occupying 48 bits;

[0064] the tenent_ID is used to represent the tenant, occupying 28 bits;

[0065] the TC_ID is used to represent the traffic class, occupying 4 bits;

[0066] the appended is used to represent the placeholder character for padding with 0, occupying 48 bits.

[0067] The local general Service SID of any network node is obtained by aggregating the Service SIDs corresponding to different VPNs with the same locator and tenent_ID. After obtaining the local general Service SID of this network node, the ternary content addressable memory (TCAM) table entry and the intermediate state engine matching (ISEM) table entry are pre-configured inside the chip of this network node. The TCAM table entry records the locator character of this local general Service SID, and the ISEM table entry stores the tenent_ID character of this local general Service SID.

[0068] Based on the above description, the specific implementation method for determining whether the destination IPv6 address of the outer IPv6 header of the SRv6 packet received by this network node matches the local general situation of this network node receiving the SRv6 packet: match the destination IPv6 address of the outer IPv6 header of the SRv6 packet with the locally stored TCAM table entry and SEM table entry to determine whether to perform IPv6 header de-encapsulation. If they match, perform de-encapsulation; if they do not match, do not perform de-encapsulation.

[0069] Optionally, in the specific format of the above Service SID, the locator occupies 48 bits and the tenent_ID occupies 28 bits. Then, by comparing whether the characters in the first 76 bits of the destination IPv6 address in the outer IPv6 header of the received SRv6 packet match the content in the locally stored TCAM entry and SEM entry (here, the match can mean the same characters), it is determined whether to perform IPv6 header decapsulation. If there is a match, IPv6 decapsulation is performed; if there is no match, decapsulation is not performed.

[0070] In this embodiment, a local general Service ID can perform decapsulation on the SRv6 packets with the destination IPv6 addresses of the outer IPv6 headers having the same locator and tenent_ID. This enables the destination IPv6 addresses of the outer IPv6 headers of multiple SRv6 packets to all match the general Service ID, thus eliminating the need to set multiple Service IDs as in the prior art to match multiple SRv6s, which can effectively save routing resources.

[0071] The above has elaborated in detail on the matching between the destination IPv6 address of the outer IPv6 header of the SRv6 packet and the local general decapsulation check VRF routing service identifier.

[0072] The following elaborates in detail on the specific implementation manner of obtaining the destination IPv6 address of the new outer IPv6 header for encapsulating the second VPN for the SRv6 packet:

[0073] After determining that the destination IPv6 address of the outer IPv6 header of the SRv6 packet received by this network node matches the local general Service SID and performing decapsulation on the outer IPv6 header of the SRv6 packet and stripping the destination IPv6 address of the outer IPv6 header, first, a VRF identifier is obtained from the destination IPv6 address of the original outer IPv6 header stripped from the SRv6 packet. Exemplarily, a TC_ID is extracted from the destination IPv6 address of the original outer IPv6 header, where different VRFs correspond to different TC_IDs.

[0074] After that, based on the destination IP address of the inner IP header of the SRv6 packet, in the Longest Prefix Match (LPM) table in the VRF pointed to by the local general Service SID, a peer general Service SID that matches the destination IP address of the inner IP header is found. Here, it should be noted that an Ingress PE in a VRF is called a peer for an Egress PE, and vice versa, as Figure 2As shown, in the SRv6 segment network 200, network node 102 and network node 103 are peers of each other. Before the network node 102 determines whether the destination IPv6 address of the outer IPv6 header of the received SRv6 packet matches the local general Service SID, it will receive the general Service SID sent by the peer (network node 103) using the Border Gateway Protocol (BGP). After receiving the peer general Service SID, the network node 102 will record it in the local LPM table.

[0075] After that, the obtained VRF identifier and the peer general Service SID are combined. Exemplarily, the extracted TC_ID and the peer general Service SID are combined to obtain the destination IPv6 address of the new outer IPv6 header for encapsulating the second VPN.

[0076] Finally, the network node has pre-configured the correspondence between the TC_ID and the outgoing interface. Different TC_IDs correspond to different outgoing interfaces, and different outgoing interfaces correspond to different tunnels. Thus, after obtaining the destination IPv6 address of the new outer IPv6 header for encapsulating the second VPN, the corresponding outgoing interface is found according to the TC_ID in the destination IPv6 address of the new outer IPv6 header, and the SRv6 packet with the destination IPv6 address of the new outer IPv6 header newly obtained is transmitted to the peer through the tunnel connected by the corresponding outgoing interface.

[0077] In this embodiment, instead of directly using the found Service ID as the destination IPv6 address of the new outer IPv6 header, the VRF identifier extracted from the destination IPv6 address of the original outer IPv6 header that has been stripped and the peer general Service ID are combined as the destination IPv6 address of the new outer IPv6 header. This combination method only requires one peer general Service ID and one routing table to obtain the destination IPv6 addresses of the new outer IPv6 headers for multiple SRv6 packets respectively, so as to enable multiple SRv6 packets to be transmitted through different tunnels. It does not require multiple peer Service SIDs and multiple routing tables as in the prior art to enable multiple SRv6 packets to be transmitted through different tunnels, which can reduce the waste of routing resources and achieve the optimized utilization of routing resources.

[0078] The above has elaborated in detail the specific implementation manner of obtaining the destination IPv6 address of the new outer IPv6 header for encapsulating the second VPN for the above SRv6 packet.

[0079] To elaborate the method provided in this application in more detail, the following combines Figure 2 the network architecture shown, combined withFigure 4 The following process describes the solution provided by this application in a more specific manner by way of specific embodiments.

[0080] As Figure 2 shown, the terminal sends the IPv4 original packet to network node 101 (i.e., the Ingress PE in the SRv6 segment network 100. Here, network node 101 only serves as the Ingress PE in the SRv6 segment network 100). Network node 101 finds the general Service SID of the peer network node 102 in the LMP table indicated by the first VRF. The Differentiated Services Code Point (DSCP) field is extracted from the packet header of the IPv4 original packet, and the DSCP field and the general Service SID of network node 102 are combined to form the destination IPv6 address of the outer IPv6 header. Based on the obtained destination IPv6 address of the outer IPv6 header, the outer IPv6 header is encapsulated for the IPv4 original packet to obtain the first SRv6 packet. The first SRv6 packet is transmitted to network node 102.

[0081] It should be noted that a first VPN is formed between network node 101 and network node 102. The first VPN corresponds to the first VRF, and a second VPN is formed between network node 102 and network node 103. The second VPN corresponds to the second VRF.

[0082] For example, after receiving the IPv4 original packet, network node 101 obtains the general Service SID of peer network node 102 as fd00:0200:1111:fff0:bbb0:0000:0000:0000 from the first VRF, extracts the DSCP field 1 from the packet header of the IPv4 original packet, and combines the general Service SID of network node 102 and the DSCP field 1 to form the destination IPv6 address fd00:0200:1111:fff0:bbb1:0000:

[0083] 0000:0000. And so on. If the DSCP field extracted from the packet header of the IPv4 original packet is 2, the destination IPv6 address of the outer IPv6 header is fd00:0200:1111:fff0:bbb2:0000:0000:0000. If the DSCP field extracted from the packet header of the IPv4 original packet is 3, the destination IPv6 address of the outer IPv6 header is fd00:0200:1111:fff2:bbb3:0000:0000:0000.

[0084] Figure 4In this case, after the network node 102 receives the first SRv6 packet of the first VPN, if the destination IPv6 address of the outer IPv6 header of the first SRv6 packet matches the local general Service SID of the network node 102, the network node 102 performs IPv6 header decapsulation on the first SRv6 packet to strip the destination IPv6 address of the outer IPv6 header.

[0085] Figure 4 In this case, the TC_ID is extracted from the destination IPv6 address of the original outer IPv6 header that has been stripped. Based on the destination IP address of the inner IP header, the general Service SID of the network node 103 is found in the LPM table of the second VRF pointed to by the local general Service SID of the network node 102, and the extracted TC_ID and the general Service SID of the network node 103 are combined to obtain the destination IPv6 address of the new outer IPv6 header for encapsulating the second VPN, thereby obtaining a second SRv6 packet.

[0086] For example, continuing with the previous example, if the destination IPv6 address of the outer IPv6 header of the first SRv6 packet is fd00:0200:1111:fff0:bbb1:0000:0000:0000, the TC_ID extracted after decapsulation is 1, and the general Service SID of the network node 103 is fd00:0200:2222:fff1:bbb0:0000:0000:0000, the destination IPv6 address of the new outer IPv6 header obtained after combining the two is fd00:0200:2222:fff0:bbb1:0000:0000:0000.

[0087] And so on, if the destination IPv6 address of the outer IPv6 header of the first SRv6 packet is fd00:0200:1111:fff0:bbb2:0000:0000:0000, the TC_ID extracted after decapsulation is 2, and the general Service SID of the network node 103 is fd00:0200:2222:fff1:bbb0:0000:0000:0000, the destination IPv6 address of the new outer IPv6 header obtained after combining the two is fd00:0200:2222:fff0:bbb2:0000:0000:0000.

[0088] If the destination IPv6 address of the outer IPv6 header of the first SRv6 packet is fd00:0200:1111:fff0:bbb2:0000:0000:0000, the TC_ID extracted after decapsulation is 3, and the general Service SID of network node 103 is fd00:0200:2222:fff1:bbb0:0000:0000:0000. After combining the two, the destination IPv6 address of the new outer IPv6 header obtained is fd00:0200:2222:fff0:bbb3:0000:0000:0000.

[0089] Figure 4 In, network node 102 transmits the second SRv6 packet to network node 103 according to the tunnel linked by the egress interface indicated by the TC_ID in the destination IPv6 address of the new outer IPv6 header.

[0090] Specifically, the TC_ID in the destination IPv6 address of the new outer IPv6 header is 1, corresponding to the egress interface connecting tunnel1. The second SRv6 packet is forwarded to network node 103 through tunnel1. The TC_ID in the destination IPv6 address of the new outer IPv6 header is 2, corresponding to the egress interface connecting tunnel2. The second SRv6 packet is forwarded to network node 103 through tunnel2. The TC_ID in the destination IPv6 address of the new outer IPv6 header is 3, corresponding to the egress interface connecting tunnel3. The second SRv6 packet is forwarded to network node 103 through tunnel3.

[0091] Figure 4 The illustrated embodiment and Figure 1 Comparing with the existing technology shown, the solution provided by the embodiment of the present application only needs to set a local general Service ID at network node 102 to be able to decapsulate 3 SRv6 packets. Only need to obtain the general Service ID of network node 103, and combine the general Service ID of network node 103 and the VRF identifier extracted from the destination IPv6 address of the original outer IPv6 header that has been stripped, then each of the 3 SRv6 packets can obtain a different destination IPv6 address of the new outer IPv6 header to be transmitted through 3 tunnels respectively. This is compared with Figure 1 At network node 102, it is necessary to set Service SIDs for 3 VRFs respectively, obtain 3 Service SIDs set for 3 VRFs at network node 103 as the destination IPv6 addresses of the outer IPv6 headers, and set 3 identical routing tables for route lookup, which can effectively save routing resources and improve the performance of the router.

[0092] The method provided by the embodiments of the present application has been described above. Next, the device provided by the embodiments of the present application will be described:

[0093] See Figure 5 , Figure 5 which is the structure diagram of the device provided by the embodiments of the present application. This device is applied to a network node in the SRv6 network, such as Figure 5 shown, the device includes: a receiving module 501, a decapsulation module 502, and an encapsulation module 502.

[0094] The receiving module 501 is configured to receive an SRv6 packet of a first virtual private network (VPN);

[0095] The decapsulation module 502 is configured to, when determining that the destination IPv6 address of the outer IPv6 header of the SRv6 packet matches the local general decapsulation lookup VRF routing service identifier, decapsulate the outer IPv6 header of the SRv6 packet to strip the destination IPv6 address of the outer IPv6 header, and obtain the destination IPv6 address for encapsulating a new outer IPv6 header of the second VPN for the SRv6 packet;

[0096] The encapsulation module 503 is configured to encapsulate a new outer IPv6 header for the SRv6 packet from which the destination IPv6 address of the original outer IPv6 header has been stripped based on the obtained destination IPv6 address of the new outer IPv6 header.

[0097] As an embodiment, obtaining the destination IPv6 address for encapsulating a new outer IPv6 header of the second VPN for the SRv6 packet further includes:

[0098] Obtaining a VRF identifier from the destination IPv6 address of the original outer IPv6 header stripped from the SRv6 packet;

[0099] Based on the destination IP address of the inner IP header of the SRv6 packet, finding the peer general decapsulation lookup VRF routing service identifier in the local longest prefix match (LPM) table;

[0100] Combining the obtained VRF identifier and the peer general decapsulation lookup VRF routing service identifier, and determining the combination result as the destination IPv6 address for encapsulating a new outer IPv6 header of the second VPN.

[0101] As an embodiment, the local general decapsulation lookup VRF routing service identifier and the peer general decapsulation lookup VRF routing service identifier support IPv6 or Internet Protocol version 4 (IPv4).

[0102] As an embodiment, before determining that the destination IPv6 address of the outer IPv6 header of the SRv6 packet matches the local general decapsulation lookup VRF routing service identifier, the decapsulation module is further configured to:

[0103] Aggregate the decapsulation lookup VRF routing service identifiers corresponding to different VPNs with the same location identifier locator and tenant identifier tenent_ID into a local common decapsulation lookup VRF routing service identifier.

[0104] As an embodiment, before determining that the destination IPv6 address of the outer IPv6 header of the SRv6 packet matches the local common decapsulation lookup VRF routing service identifier, the receiving module is further configured to:

[0105] Receive the peer common decapsulation lookup VRF routing service identifier;

[0106] Record the received peer common decapsulation lookup VRF routing service identifier in the LPM table.

[0107] So far, the structure description of the Figure 5 shown device is completed.

[0108] Refer to Figure 6 , Figure 5 which is the structural diagram of the electronic device provided by the embodiment of the present application. As Figure 6 shown, the hardware structure may include: a processor and a machine-readable storage medium, and the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is configured to execute the machine-executable instructions to implement the method disclosed in the above examples of the present application.

[0109] Based on the same application concept as the above method, the embodiment of the present application also provides a machine-readable storage medium, on which several computer instructions are stored. When the computer instructions are executed by a processor, the method disclosed in the above examples of the present application can be implemented.

[0110] Exemplarily, the above machine-readable storage medium can be any electronic, magnetic, optical or other physical storage device, which can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Radom Access Memory, random access memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, dvd, etc.), or similar storage media, or a combination thereof.

[0111] The above are only the embodiments of the present application and are not used to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.

Claims

1. A message transmission method, characterized in that: The method is applied to a network node in a segment routing SRv6 network based on an Internet Protocol version 6 IPv6 forwarding plane, and the method comprises: Receiving an SRv6 message of a first virtual private network VPN; When it is determined that the destination IPv6 address of the outer IPv6 header of the SRv6 message matches the local general decapsulation query virtual private network instance VRF routing service identifier, decapsulate the outer IPv6 header of the SRv6 message to strip off the destination IPv6 address of the outer IPv6 header, and obtain the destination IPv6 address of a new outer IPv6 header for encapsulating the second VPN for the SRv6 message; Based on the obtained destination IPv6 address of the new outer IPv6 header, a new outer IPv6 header is encapsulated in the SRv6 packet with the destination IPv6 address of the original outer IPv6 header stripped off.

2. The method according to claim 1, characterized in that The step of obtaining, for the SRv6 message, a destination IPv6 address of a new outer IPv6 header for encapsulating the second VPN further comprises: Obtaining a VRF identifier from the destination IPv6 address of the original outer IPv6 header stripped from the SRv6 message; Based on the destination IP address of the inner IP header of the SRv6 message, find the peer general decapsulation query VRF routing service identifier in the local longest prefix match LPM table; The obtained VRF identifier is combined with the peer-end universal decapsulation and query VRF routing service identifier, and the combination result is determined as the destination IPv6 address of the new outer IPv6 header for encapsulating the second VPN.

3. The method according to claim 1 or 2, characterized in that: The local universal decapsulation and VRF routing service identifier and the peer universal decapsulation and VRF routing service identifier support IPv6 or Internet Protocol version 4 IPv4.

4. The method according to any one of claims 1 to 3, characterized in that: Before determining that the destination IPv6 address of the outer IPv6 header of the SRv6 message matches the local universal decapsulation and VRF routing service identifier, the method further includes: The decapsulation and VRF routing service identifiers corresponding to different VPNs having the same location identifier locator and tenant identifier tenent_ID are aggregated into a local universal decapsulation and VRF routing service identifier.

5. The method according to claim 1, characterized in that Before determining that the destination IPv6 address of the outer IPv6 header of the SRv6 message matches the local universal decapsulation and VRF routing service identifier, the method further includes: Receive the peer end’s general decapsulation to check the VRF routing service identifier; The received universal decapsulation query VRF routing service identifier of the opposite end is recorded in the LPM table.

6. A message transmission device, characterized in that: The device is applied to a network node in a segment routing SRv6 network based on the sixth version of the Internet Protocol IPv6 forwarding plane, and the device includes: A receiving module, used to receive an SRv6 message of a first virtual private network VPN; a decapsulation module, configured to, when determining that the destination IPv6 address of the outer IPv6 header of the SRv6 message matches the local general decapsulation query VRF routing service identifier, decapsulate the outer IPv6 header of the SRv6 message to strip off the destination IPv6 address of the outer IPv6 header, and obtain the destination IPv6 address of a new outer IPv6 header for encapsulating the second VPN for the SRv6 message; The encapsulation module is used to encapsulate a new outer IPv6 header for the SRv6 message with the destination IPv6 address of the original outer IPv6 header stripped off based on the destination IPv6 address of the obtained new outer IPv6 header.

7. The device according to claim 6, characterized in that The step of obtaining, for the SRv6 message, a destination IPv6 address of a new outer IPv6 header for encapsulating the second VPN further comprises: Obtaining a VRF identifier from the destination IPv6 address of the original outer IPv6 header stripped from the SRv6 message; Based on the destination IP address of the inner IP header of the SRv6 message, find the peer general decapsulation query VRF routing service identifier in the local longest prefix match LPM table; The obtained VRF identifier is combined with the peer-end universal decapsulation and query VRF routing service identifier, and the combination result is determined as the destination IPv6 address of the new outer IPv6 header for encapsulating the second VPN.

8. The device according to claim 6, characterized in that The local universal decapsulation and VRF routing service identifier and the peer universal decapsulation and VRF routing service identifier support IPv6 or Internet Protocol version 4 IPv4; and / or, Before determining that the destination IPv6 address of the outer IPv6 header of the SRv6 message matches the local general decapsulation query VRF routing service identifier, the decapsulation module is further used to: Aggregate the decapsulation and VRF routing service identifiers corresponding to different VPNs with the same location identifier locator and tenant identifier tenent_ID into a local universal decapsulation and VRF routing service identifier; and / or, Before determining that the destination IPv6 address of the outer IPv6 header of the SRv6 message matches the local general decapsulation and VRF routing service identifier, the receiving module is further used to: Receive the peer end’s general decapsulation to check the VRF routing service identifier; The received universal decapsulation query VRF routing service identifier of the opposite end is recorded in the LPM table.

9. An electronic device, characterized in that: The electronic device includes: Processor; and A computer-readable storage medium having computer program instructions stored therein, wherein the computer program instructions, when executed by the processor, cause the processor to perform the steps of the method according to any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, which, when executed by a processor, enable the processor to perform the steps of any one of the methods of claims 1 to 5.