Compressed SRv6-based optimization method and system for second-hop-from-last pop-up

By encoding the penultimate hop node index and segment index on the SRv6 head node, and determining whether it is the penultimate hop node in the middle processing node and performing pop-up operations, the problems of high processing pressure and inflexible configuration in the existing technology are solved, and a more efficient and flexible SRv6 network deployment is achieved.

CN119814891APending Publication Date: 2025-04-11JIANGSU FUTURE NETWORKS INNOVATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510040593.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

When processing SRv6 messages in the prior art, the tail node processing pressure is high and the configuration is inflexible. It is impossible to flexibly choose to perform the pop-up operation in the second to last jump or the last jump according to the needs.

Method used

When encapsulating the initial SRv6 message on the SRv6 head node, the penultimate hop node index and segment index are encoded into the IPv6 destination address, and the processing node in the middle of the SRv6 determines whether it is the penultimate hop node based on these indexes, thereby performing the penultimate hop bounce operation.

Benefits of technology

It significantly reduces the processing pressure on the tail node, enhances configuration flexibility and interoperability, and allows flexible selection of the penultimate jump or the last jump for pop-up operation according to the needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814891A_ABST
    Figure CN119814891A_ABST
Patent Text Reader

Abstract

The invention relates to a method and a system for optimizing the last but one pop-up based on compressed SRv6, and the method comprises the steps: responding to the received flow needing SRv6 forwarding, and packaging an initial SRv6 message through an SRv6 head node; the outer layer IPv6 destination address of the initial SRv6 message comprises a penultimate hop node index used for identifying a penultimate hop node and a segment index used for assisting judgment of the penultimate hop node; receiving an initial SRv6 message through an SRv6 intermediate processing node, and judging whether the SRv6 intermediate processing node is a penultimate hop node or not according to the index of the penultimate hop node in the IPv6 message destination address and the segment index; if yes, executing a last but one pop-up operation; and receiving the message processed by the last but one hop node through the SRv6 tail node, and carrying out de-encapsulation and forwarding. According to the method, the decapsulation operation is advanced to the penultimate hop node, so that the processing pressure of the tail node is obviously reduced, and the flexibility of the scheme is enhanced by being compatible with the pop-up mark in the SRv6 native local identifier.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of communication technology, and in particular relates to an optimization method and system for penultimate hop popping based on compressed SRv6. Background Art

[0002] As a new type of network protocol, segment routing (SRv6) technology based on the IPv6 data plane implements path constraints for messages in the network by carrying IPv6 address lists and subscripts in the segment routing header (SRH) of the IPv6 extended message. The address list constitutes a network path (Segment List), and the SRv6 path policy (SRv6 Policy) contains multiple groups of candidate paths, each of which is composed of multiple Segment Lists. Each path node (Segment) is represented by a complete 128-bit IPv6 address. However, when the path is long and the stack is too deep, the SRv6 message header will be too long, reducing network transmission efficiency.

[0003] To solve this problem, compressed SRv6 (G-SRv6) came into being. G-SRv6 uses 32-bit compressed node identifiers, which effectively reduces the overhead of the Segment List by up to 75%, significantly improving network transmission efficiency. However, since compressed SRv6 splits a 128-bit IPv6 address space into four 32-bit address spaces, it is necessary to combine the segment left and the segment index to fully determine a node identifier. At the same time, the insufficient part of the IPv6 address is filled with all 0s, making it impossible to quickly determine the penultimate hop node through the index.

[0004] This defect leads to the following major deficiencies in the existing technology: First, the decapsulation of the SRv6 message header can only be performed at the SRv6 tail node, which greatly increases the performance pressure of the tail node device and easily causes network bottlenecks. Second, the existing technology cannot flexibly choose to perform the pop-up operation at the penultimate hop or the last hop according to the configuration, which is incompatible with the pop-up flag in the SRv6 native local identifier, limiting the flexibility and interoperability of network deployment. Therefore, a new technical solution is urgently needed to overcome the above shortcomings and achieve more efficient and flexible SRv6 network deployment. Summary of the invention

[0005] The object of the present invention is to provide an optimization method and system for popping the penultimate hop based on compressed SRv6 to solve the problems of high message processing pressure and inflexible configuration in the prior art.

[0006] To achieve one of the above-mentioned purposes, an embodiment of the present invention provides an optimization method for the penultimate hop pop-up based on compressed SRv6, which is characterized by comprising: In response to receiving traffic that needs to be forwarded by SRv6, encapsulating an initial SRv6 message through an SRv6 head node; the outer IPv6 destination address of the initial SRv6 message includes a penultimate hop node index for identifying a penultimate hop node and a segment index for assisting in determining the penultimate hop node; Receive the initial SRv6 message through the SRv6 intermediate processing node, and determine whether the SRv6 intermediate processing node is the penultimate hop node according to the index of the penultimate hop node and the segment index in the destination address of the IPv6 message; if so, perform the penultimate hop pop-up operation; The SRv6 tail node receives the message processed by the penultimate hop node, decapsulates and forwards it.

[0007] As a further improvement of an embodiment of the present invention, the method further includes that encapsulating the initial SRv6 message through the SRv6 head node includes: Encapsulating and compressing an SRv6 message header according to the segment list configuration, wherein the compressed SRv6 message header includes an original segment remainder and a current segment remainder; The penultimate hop node index is encoded in the 2nd to 7th bits of the IPv6 destination address, and the segment index is encoded in the least significant two bits of the IPv6 destination address.

[0008] As a further improvement of an embodiment of the present invention, the method further includes, according to the second hop node index and segment index encoded in the outer IPv6 destination address, combined with the message header information, determining whether the SRv6 intermediate processing node is the penultimate hop node, including, Extract the second hop node index and segment index in the IPv6 destination address, as well as the original segment remainder and the current segment remainder in the compressed SRv6 message header, and calculate the index value of the SRv6 intermediate processing node in the segment list. The calculation formula is: (Original segment remaining - Current segment remaining) * 4 + segment index, If the calculated index value is equal to the second hop node index, the SRv6 intermediate processing node is determined to be the penultimate hop node.

[0009] As a further improvement of an embodiment of the present invention, the method further includes that the penultimate jump pop operation includes: Decapsulating the compressed SRv6 message header, and obtaining the last local identifier from the segment list of the decapsulated SRv6 message header; The last local identifier is encapsulated into a best-effort forwarding message as a destination address, and subsequent forwarding is performed according to the destination address.

[0010] As a further improvement of an embodiment of the present invention, the method further includes, if the calculated index value is not equal to the second hop node index, determining that the SRv6 intermediate processing node is not the penultimate hop node, and performing conventional SRv6 forwarding processing; the steps of the conventional SRv6 forwarding processing include: decrementing the current segment remainder in the compressed SRv6 header based on the current segment remainder in the compressed SRv6 header; Obtaining a next local identifier from the segment list of the compressed SRv6 message header according to the decremented current segment remainder; Updating the compressed local identifier in the IPv6 destination address to the next local identifier, and updating the segment index in the IPv6 destination address to the segment index value corresponding to the next local identifier; Perform route lookup based on the updated IPv6 destination address and forward the updated SRv6 message to the next hop node.

[0011] As a further improvement of an embodiment of the present invention, the method further includes that the “receiving, by the SRv6 tail node, the message processed by the penultimate hop node, and performing decapsulation and forwarding” includes: Matching a locally configured decapsulation identifier according to the outer IPv6 destination address of the best-effort forwarding message; Decapsulate the outer IPv6 message and forward the inner message to the destination address; The decapsulation process includes matching the identifier in the message header with the routing table to ensure accurate forwarding of the message in the network.

[0012] As a further improvement of an embodiment of the present invention, the method also includes that the SRv6 head node uses the G-SRv6 mechanism to compress the SRv6 message header to reduce the overhead of the segment list, reduce the size of the message header, and reduce redundant data in the message header by carrying multiple types of SIDs.

[0013] To achieve one of the above-mentioned purposes of the invention, an embodiment of the present invention further provides an optimization system for popping the penultimate hop based on compressed SRv6, characterized in that it includes an encapsulation module, a judgment module and a forwarding module; The encapsulation module is used to encapsulate the initial SRv6 message through the SRv6 head node in response to receiving the traffic that needs to be forwarded by SRv6; the outer IPv6 destination address of the initial SRv6 message includes the penultimate hop node index for identifying the penultimate hop node and the segment index for assisting the penultimate hop node judgment; The judgment module is used to receive an initial SRv6 message through an SRv6 intermediate processing node, and judge whether the SRv6 intermediate processing node is the penultimate hop node according to the index of the penultimate hop node and the segment index in the destination address of the IPv6 message; if so, perform a penultimate hop pop-up operation; The forwarding module is used to receive, through the SRv6 tail node, the message processed by the penultimate hop node, and perform decapsulation and forwarding.

[0014] To achieve one of the above-mentioned purposes of the invention, an embodiment of the present invention further provides an electronic device, comprising a memory and a processor, characterized in that the memory stores a computer program that can be run on the processor, and when the program is executed on the processor, the steps in the optimization method of popping out the penultimate hop based on compressed SRv6 are implemented as described above.

[0015] To achieve one of the above-mentioned purposes of the invention, an embodiment of the present invention further provides a storage medium, wherein the storage medium stores a computer program, and wherein when the computer program is executed by a processor, the steps in the optimization method for popping out the penultimate hop based on compressed SRv6 are implemented as described above.

[0016] Compared with the prior art, the present invention provides an optimization method and system for popping out the penultimate hop based on compressed SRv6, which significantly reduces the processing pressure of the tail node by advancing the decapsulation operation to the penultimate hop node, and enhances the flexibility and interoperability of the solution by being compatible with the pop-up flag in the SRv6 native local identifier. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is an overall flow chart of the optimization method for popping the penultimate hop based on compressed SRv6 according to the present invention.

[0018] Figure 2 It is a schematic diagram of SRv6Policy, an embodiment of the optimization method for popping the penultimate hop based on compressed SRv6 according to the present invention.

[0019] Figure 3 It is a schematic diagram of the destination address encoding of the optimization method for popping the penultimate hop based on compressed SRv6 according to the present invention.

[0020] Figure 4 It is a schematic diagram of the architecture of the optimization system for penultimate hop pop-up based on compressed SRv6 according to the present invention. DETAILED DESCRIPTION

[0021] The present invention will be described in detail below in conjunction with the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional changes made by a person skilled in the art based on these embodiments are all within the scope of protection of the present invention.

[0022] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0023] SRv6 Policy technology is a tunnel diversion technology developed on the basis of SRv6 technology. SRv6-TE path calculation calculates the tunnel path according to the Color attribute representing the service level agreement (SLA) requirements of the service tunnel. The service network head node matches the corresponding tunnel to forward service traffic through the extended service routing Color community attribute and network remote node information. SRv6 Policy technology can be used to customize SRv6 tunnel paths for services with specific SLA requirements and implement application-level service forwarding network segmentation. For a further detailed description of SRv6 Policy, please refer to the relevant introduction, which will not be repeated here.

[0024] G-SRv6 (Compressed SRv6) is a general mechanism compatible with SRv6 that supports carrying multiple types of SIDs (node ​​identifiers) of different lengths. These SIDs are called G-SIDs (Generalized SIDs). G-SRv6 can reduce the Segment List (also known as SID List) overhead by up to 75% by carrying compressed generalized SIDs, thereby solving the SRv6 header overhead problem.

[0025] In the first embodiment of the present invention, the present invention provides an optimization method for popping the penultimate hop based on compressed SRv6, such as Figure 1 As shown, the method includes, S1: In response to receiving traffic that needs to be forwarded by SRv6, encapsulate an initial SRv6 message through an SRv6 head node; the outer IPv6 destination address of the initial SRv6 message includes a penultimate hop node index for identifying the penultimate hop node and a segment index for assisting the penultimate hop node judgment; S2: Receive the initial SRv6 message through the SRv6 intermediate processing node, and determine whether the SRv6 intermediate processing node is the penultimate hop node according to the index of the penultimate hop node and the segment index in the destination address of the IPv6 message; if so, perform the penultimate hop pop-up operation; S3: The SRv6 tail node receives the message processed by the penultimate hop node, decapsulates it, and forwards it.

[0026] The technical solution of the embodiment of the present application is applicable to a network that supports SRv6 Policy (segment routing policy based on IPv6) technology, which includes multiple nodes. For example, a non-SRv6 head node, a non-SRv6 tail node, and a non-SRv6 penultimate hop processing node only need to support IPv6. The tunnel established between the forwarding nodes can be a segment routing traffic engineering (Segment Routing Over IPv6-Traffic Engineering, SRv6-TE) tunnel. The forwarding node supports SRv6Policy services.

[0027] It should be noted that the node may be a switch, a router, or other equipment or network element that supports forwarding messages or data, and the embodiments of the present application are not limited to this.

[0028] In a specific implementation of the present invention, the initial SRv6 message is encapsulated by the SRv6 head node, specifically, Encapsulating and compressing an SRv6 message header according to the segment list configuration, wherein the compressed SRv6 message header includes an original segment remainder and a current segment remainder; The penultimate hop node index is encoded in the 2nd to 7th bits of the IPv6 destination address, and the segment index is encoded in the least significant two bits of the IPv6 destination address.

[0029] It should be noted that the SRv6 head node determines the segment list (Segment List) that needs to be encapsulated based on the pre-configured or dynamically learned SRv6 path strategy. The path strategy contains multiple groups of candidate paths, and each group of candidate paths contains multiple SegmentLists. Each Segment List consists of a series of segments (Segments), each segment corresponds to an SRv6 node, represented by a 128-bit IPv6 address. In order to reduce the overhead of the SRv6 message header, the SRv6 head node compresses the 128-bit IPv6 address into a 32-bit compressed local identifier (Compressed Locator). The compression process usually divides the IPv6 address into multiple 32-bit fields and selects one of the fields as the compressed local identifier according to predefined rules. The compressed segment list is the compressed segment list.

[0030] It should be noted that the SRv6 head node constructs a compressed SRv6 message header based on the compressed segment list. The message header contains the following key fields: Original Segments Left: Indicates the number of segments that the initial SRv6 message needs to pass through, that is, the length of the compressed segment list. This field remains unchanged during the message forwarding process. Current Segments Left: Indicates the number of segments that the current message still needs to pass through. This field decreases after each SRv6 intermediate node is processed. The initial value is the original segment remaining. Segment List: Contains a series of 32-bit compressed local identifiers, arranged in the order of the SRv6 nodes that the message needs to pass through.

[0031] It should be noted that in order to achieve the penultimate hop pop-up optimization, the SRv6 head node encodes the following information into a specific bit segment of the IPv6 destination address when encapsulating the message: Penultimate hop node index: This index is used to uniquely identify the penultimate segment (i.e., the penultimate hop node) in the segment list. The specific encoding method is to encode the index value in a specific bit segment of the IPv6 destination address, for example, from the 2nd to the 7th bit. This position is chosen because it can provide sufficient index space (6 bits, which can represent 64 different penultimate hop nodes) without interfering with other important functions of the IPv6 address. Segment index: This index is used to assist the penultimate hop node in determining whether it is the penultimate hop node. The specific encoding method is to encode the subscript value (i.e., segment index) of the segment corresponding to the penultimate hop node in the segment list in a specific bit segment of the IPv6 destination address, for example, the lowest two bits. Using two bits can represent four different segments, which is sufficient in many practical application scenarios.

[0032] In a specific embodiment of the present invention, according to the second hop node index and segment index encoded in the outer IPv6 destination address, combined with the message header information, it is determined whether the SRv6 intermediate processing node is the penultimate hop node, specifically, Extract the second hop node index and segment index in the IPv6 destination address, as well as the original segment remainder and the current segment remainder in the compressed SRv6 message header, and calculate the index value of the SRv6 intermediate processing node in the segment list. The calculation formula is: (Original segment remainder - Current segment remainder) * 4 + segment index If the calculated index value is equal to the second hop node index, the SRv6 intermediate processing node is determined to be the penultimate hop node.

[0033] It should be noted that the core idea of ​​the above calculation formula is to map the compressed segment list index back to the index space of the original segment list, and accurately locate it in combination with the segment index, so as to determine whether the current node is the penultimate hop node. Among them, multiplying by 4 (or adjusting according to the actual compression ratio) is a crucial step, which makes up for the change in index space caused by compression. Through this formula, the intermediate node does not need to maintain the complete segment list information, and can complete the judgment of the penultimate hop only through the limited information in the message header, which greatly improves the processing efficiency.

[0034] In a specific embodiment of the present invention, the penultimate jump pop operation is specifically, Decapsulating the compressed SRv6 message header, and obtaining the last local identifier from the segment list of the decapsulated SRv6 message header; The last local identifier is encapsulated into a best-effort forwarding message as a destination address, and subsequent forwarding is performed according to the destination address.

[0035] It should be noted that after receiving the SRv6 message, the penultimate hop node identifies itself as the penultimate hop node through the aforementioned method (i.e., calculation and judgment based on the second hop node index and segment index in the IPv6 destination address combined with the message header information).

[0036] The penultimate hop node performs decapsulation and removes the compressed SRv6 header. The decapsulation process includes: locating the SRv6 header: locating the starting position of the SRv6 header according to the Next Header field in the IPv6 header; removing the SRv6 header: removing the SRv6 header from the message; after removal, the payload of the original SRv6 message (i.e., the original IPv6 message or upper-layer protocol data) is exposed; obtaining the segment list: extracting the segment list from the decapsulated SRv6 header; although the header has been removed, the segment list information needs to be temporarily stored during the decapsulation process for use in subsequent steps.

[0037] Extract the last local identifier from the segment list of the decapsulated SRv6 header. This identifier corresponds to the last node in the SRv6 path, that is, the tail node.

[0038] It should be noted that the penultimate hop node constructs a new best-effort packet, also known as a common IPv6 packet. The construction process includes: Copy the original IPv6 message: copy the original IPv6 message content exposed after decapsulation to the new best-effort forwarding message as its payload; encapsulate a new IPv6 message header: encapsulate a new IPv6 message header for the new best-effort forwarding message; set the destination address: set the last local identifier extracted from the SRv6 message header as the destination address of the new IPv6 message header; this address points to the tail node of the SRv6 path; set the source address: set the IPv6 address of the penultimate hop node as the source address of the new IPv6 message header; other fields: set other necessary fields in the new IPv6 message header, such as version, protocol, etc.

[0039] It should be noted that the penultimate hop node performs standard IPv6 forwarding operations based on the destination address (i.e., the last local identifier) ​​in the new IPv6 packet header, and sends the best effort packet to the tail node. The forwarding at this time is no longer based on the SRv6 protocol, but on the traditional IP routing lookup and forwarding mechanism.

[0040] In a specific embodiment of the present invention, if the calculated index value is not equal to the second hop node index, it is determined that the SRv6 intermediate processing node is not the penultimate hop node, and conventional SRv6 forwarding processing is performed; the steps of conventional SRv6 forwarding processing are specifically, decrementing the current segment remainder in the compressed SRv6 header based on the current segment remainder in the compressed SRv6 header; Obtaining a next local identifier from the segment list of the compressed SRv6 message header according to the decremented current segment remainder; Updating the compressed local identifier in the IPv6 destination address to the next local identifier, and updating the segment index in the IPv6 destination address to the segment index value corresponding to the next local identifier; Perform route lookup based on the updated IPv6 destination address and forward the updated SRv6 message to the next hop node.

[0041] It should be noted that the intermediate node decrements the value of the "Current Segment Remaining" field in the compressed SRv6 message header by 1. This field indicates the number of segments that the message still needs to pass through, and the value decreases by 1 for each intermediate node it passes through. The intermediate node obtains the next local identifier from the segment list of the compressed SRv6 message header based on the value of the Current Segment Remaining field after decrementing. The specific process includes that the value of the Current Segment Remaining actually points to an offset in the segment list. For example, if the value of the Current Segment Remaining is 2, it means that the second element in the segment list needs to be obtained (counting from 0). The intermediate node reads the corresponding 32-bit compressed local identifier from the segment list based on the offset.

[0042] It should be noted that the intermediate node needs to update the destination address in the IPv6 message header in order to forward the message to the next SRv6 node. The update process includes replacing the original compressed local identifier in the IPv6 destination address with the next local identifier just obtained from the segment list. Since the segment index is also encoded in the IPv6 destination address, the index value also needs to be updated. The new segment index value should be the subscript of the next local identifier in the compressed segment list. For example, if the next local identifier is the third element in the list, the new segment index value is 2. The intermediate node performs a route lookup based on the updated IPv6 destination address. This lookup process is a standard IPv6 route lookup, which searches the routing table based on the destination address to determine the interface and address of the next hop. The intermediate node then forwards the updated SRv6 message to the next hop node through the corresponding interface.

[0043] In a specific embodiment of the present invention, the SRv6 tail node receives the message processed by the penultimate hop node, decapsulates and forwards the message, specifically, Matching a locally configured decapsulation identifier according to the outer IPv6 destination address of the best-effort forwarding message; Decapsulate the outer IPv6 message and forward the inner message to the destination address; The decapsulation process includes matching the identifier in the message header with the routing table to ensure accurate forwarding of the message in the network.

[0044] It should be noted that the tail node searches for the locally configured decapsulation identifier (Decapsulation Locator) based on the outer IPv6 destination address of the received best-effort forwarding message. The decapsulation identifier is one or more IPv6 addresses pre-configured on the tail node, which are used to identify the message that needs to be decapsulated. The tail node usually maintains a local routing table or a special decapsulation identifier list. It matches the outer IPv6 destination address of the received message with these configured identifiers. The matching method can be an exact match, that is, the destination address of the message must be exactly the same as the configured identifier; or it can be a prefix match, that is, the prefix of the destination address of the message is consistent with the prefix of the configured identifier. The specific matching method used depends on the network configuration.

[0045] If the match succeeds, the tail node will perform the decapsulation operation and remove the outer IPv6 header. The decapsulation process includes: locating the IPv6 header: determining the start and end positions of the outer IPv6 header; then removing the IPv6 header: removing the outer IPv6 header from the message. After removal, the original inner message (for example, the original IPv6 message or upper-layer protocol data, such as TCP / UDP data packets) is exposed. The tail node forwards the message according to the destination address of the inner message obtained after decapsulation. The tail node searches the local routing table according to the destination address of the inner message, and forwards the inner message to the final destination through the corresponding interface according to the result of the route search.

[0046] It should be noted that in the step of matching the decapsulation identifier, the tail node does not simply compare the address, but more importantly, verifies through the routing table whether the address actually points to itself. For example, if the configured decapsulation identifier is an address pointing to the loopback interface of the tail node, the tail node will check whether there is a route to the loopback interface in the routing table. In the step of forwarding the inner message, the tail node uses the standard IP routing lookup mechanism to look up the routing table according to the destination address of the inner message to ensure that the message can be correctly forwarded to the final destination.

[0047] In a specific embodiment of the present invention, the SRv6 head node uses the G-SRv6 mechanism to compress the SRv6 message header to reduce the overhead of the segment list, reduce the size of the message header, and reduce redundant data in the message header by carrying multiple types of SIDs.

[0048] It should be noted that G-SRv6 introduces the concept of universal SID, which allows the carrying of multiple SIDs of different types and lengths, rather than being limited to the traditional 128-bit IPv6 address-based SID. These different types of SIDs are collectively referred to as G-SIDs. This provides a basis for compressing SIDs. The core of G-SRv6 is to compress SIDs. Traditional SRv6 uses 128-bit IPv6 addresses as SIDs, which significantly increases the overhead of the message header when the segment list is long. G-SRv6 uses compression technology to compress 128-bit SIDs into shorter identifiers, such as 32 bits or shorter. Common compression methods include: compressed prefixes and local identifiers. G-SRv6 uses G-SID containers to uniformly carry native SRv6 SIDs and compressed G-SIDs. This makes G-SRv6 compatible with traditional SRv6 devices and achieves smooth evolution of the network. Through G-SID containers, the network can upgrade some nodes on demand to support G-SRv6 without having to replace all devices at once. G-SRv6 supports mixed programming of normal SRv6 SIDs and compressed G-SIDs. This means that in the same segment list, 128-bit native SIDs and compressed G-SIDs can be used at the same time. This provides greater flexibility, allowing the network to select the appropriate SID type based on actual conditions. For example, for nodes that require a globally unique identifier, native SIDs can be used; for local or intra-domain nodes, compressed G-SIDs can be used. By compressing SIDs, G-SRv6 effectively reduces redundant data in the message header. For example, if multiple SIDs share the same prefix, the prefix only needs to be carried once in the message header, without having to be repeated multiple times. This significantly reduces the size of the message header and improves the utilization of network bandwidth.

[0049] In a specific implementation scenario of the present invention, Figure 2 The figure shows a schematic diagram of an SRv6 Policy in an embodiment. The SRv6 head node R1 establishes an SRv6 Policy, and the path of the Segment List of the SRv6 head node is R1-R2-R3-R4, the Segment Left is 0, the Segment Index is 3, and the penultimate hop node index is 2. The ordinary processing node R2 performs the node identifier action, and the penultimate hop node R3 determines the segment remaining and the segment index is the same as the penultimate hop node index, so R3 is the penultimate hop node, and R3 will decapsulate the SRv6 message header, and use the last local identifier as the destination address of the outer IPv6, and encapsulate the message as an SRv6 BE (Best Effort) message.

[0050] In a specific implementation scenario of the present invention, Figure 3The following is a schematic diagram of the destination address encoding. The destination address of the outer IPv6 message is divided into five parts. The first part is the compressed SRv6 common prefix, which is aligned to 8 bits, so it can occupy up to the upper 88 bits of the 128 bits. The second part is the compressed local identifier, which occupies 32 bits and follows the first part. The third part is the penultimate hop node index, which occupies the second to seventh bits of the destination address. The fourth part is the segment index, which occupies the lower two bits of the destination address. The rest is the all-zero pad of the fifth part.

[0051] In the second embodiment of the present invention, the present invention provides an optimization system for popping the penultimate hop based on compressed SRv6, such as Figure 4 As shown, the system includes an encapsulation module 1, a judgment module 2 and a forwarding module 3; The encapsulation module 1 is used to encapsulate the initial SRv6 message through the SRv6 head node in response to receiving the traffic that needs to be forwarded by SRv6; the outer IPv6 destination address of the initial SRv6 message includes the penultimate hop node index for identifying the penultimate hop node and the segment index for assisting the penultimate hop node judgment; The judgment module 2 is used to receive the initial SRv6 message through the SRv6 intermediate processing node, and judge whether the SRv6 intermediate processing node is the penultimate hop node according to the index and segment index of the penultimate hop node in the destination address of the IPv6 message; if so, perform the penultimate hop pop-up operation; The forwarding module 3 is used to receive, through the SRv6 tail node, the message processed by the penultimate hop node, and perform decapsulation and forwarding.

[0052] In a third embodiment of the present invention, the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the program is executed on the processor, the steps in the optimization method for popping out the penultimate hop based on compressed SRv6 as described above are implemented.

[0053] In a fourth embodiment of the present invention, the present invention provides a storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps in the optimization method for popping out the penultimate hop based on compressed SRv6 as described above.

[0054] In summary, the present invention provides an optimization method and system for popping the penultimate hop based on compressed SRv6, which significantly reduces the processing pressure of the tail node by advancing the decapsulation operation to the penultimate hop node, and enhances the flexibility and interoperability of the solution by being compatible with the pop-up flag in the SRv6 native local identifier.

[0055] It should be understood that although this specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each implementation mode may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

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

[0057] The modules described as separate components may or may not be physically separated, and the components shown 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 present implementation scheme.

[0058] 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 in the form of hardware plus software functional modules.

[0059] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for a computer system (which can be a personal computer, a server, or a network system, etc.) or a processor to perform some steps of the method described 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 codes.

[0060] Finally, it should be noted that the above implementation modes are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned implementation modes, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned implementation modes, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various implementation modes of the present application.

Claims

1. An optimization method for popping the penultimate hop based on compressed SRv6, characterized in that: include, In response to receiving traffic that needs to be forwarded by SRv6, encapsulate the initial SRv6 message through the SRv6 head node; The outer IPv6 destination address of the initial SRv6 message includes a penultimate hop node index for identifying the penultimate hop node and a segment index for assisting the penultimate hop node judgment; Receive the initial SRv6 message through the SRv6 intermediate processing node, and determine whether the SRv6 intermediate processing node is the penultimate hop node according to the index of the penultimate hop node and the segment index in the destination address of the IPv6 message; if so, perform the penultimate hop pop-up operation; The SRv6 tail node receives the message processed by the penultimate hop node, decapsulates and forwards it.

2. The optimization method for penultimate hop popping based on compressed SRv6 according to claim 1, characterized in that: The encapsulation of the initial SRv6 message by the SRv6 head node includes: Encapsulating and compressing an SRv6 message header according to the segment list configuration, wherein the compressed SRv6 message header includes an original segment remainder and a current segment remainder; The penultimate hop node index is encoded in the 2nd to 7th bits of the IPv6 destination address, and the segment index is encoded in the least significant two bits of the IPv6 destination address.

3. The optimization method for popping the penultimate hop based on compressed SRv6 according to claim 1, characterized in that: According to the second hop node index and segment index encoded in the outer IPv6 destination address, combined with the message header information, determine whether the SRv6 intermediate processing node is the penultimate hop node, including: Extract the second hop node index and segment index in the IPv6 destination address, as well as the original segment remainder and the current segment remainder in the compressed SRv6 message header, and calculate the index value of the SRv6 intermediate processing node in the segment list. The calculation formula is: (Original segment remainder - Current segment remainder) * 4 + segment index, If the calculated index value is equal to the second hop node index, the SRv6 intermediate processing node is determined to be the penultimate hop node.

4. The optimization method for popping the penultimate hop based on compressed SRv6 according to claim 3, characterized in that: The penultimate jump pop operation includes: Decapsulating the compressed SRv6 message header, and obtaining the last local identifier from the segment list of the decapsulated SRv6 message header; The last local identifier is encapsulated into a best-effort forwarding message as a destination address, and subsequent forwarding is performed according to the destination address.

5. The optimization method for penultimate hop popping based on compressed SRv6 according to claim 4, characterized in that: If the calculated index value is not equal to the second hop node index, it is determined that the SRv6 intermediate processing node is not the penultimate hop node, and conventional SRv6 forwarding processing is performed; The steps of the conventional SRv6 forwarding process include: decrementing the current segment remainder in the compressed SRv6 header based on the current segment remainder in the compressed SRv6 header; Obtaining a next local identifier from the segment list of the compressed SRv6 message header according to the decremented current segment remainder; Updating the compressed local identifier in the IPv6 destination address to the next local identifier, and updating the segment index in the IPv6 destination address to the segment index value corresponding to the next local identifier; Perform route lookup based on the updated IPv6 destination address and forward the updated SRv6 message to the next hop node.

6. The optimization method for penultimate hop popping based on compressed SRv6 according to claim 4, characterized in that: The “receiving, through the SRv6 tail node, the message processed by the penultimate hop node, and performing decapsulation and forwarding” includes: Matching a locally configured decapsulation identifier according to the outer IPv6 destination address of the best-effort forwarding message; Decapsulate the outer IPv6 message and forward the inner message to the destination address; The decapsulation process includes matching the identifier in the message header with the routing table to ensure accurate forwarding of the message in the network.

7. The optimization method for penultimate hop popping based on compressed SRv6 according to claim 1, characterized in that: Also includes, The SRv6 head node compresses the SRv6 message header using the G-SRv6 mechanism to reduce the overhead of the segment list, reduce the size of the message header, and reduce redundant data in the message header by carrying multiple types of SIDs.

8. An optimization system for penultimate hop pop-up based on compressed SRv6, characterized in that: It includes encapsulation module, judgment module and forwarding module; The encapsulation module is used to encapsulate the initial SRv6 message through the SRv6 head node in response to receiving the traffic that needs to be forwarded by SRv6; the outer IPv6 destination address of the initial SRv6 message includes the penultimate hop node index for identifying the penultimate hop node and the segment index for assisting the penultimate hop node judgment; The judgment module is used to receive an initial SRv6 message through an SRv6 intermediate processing node, and judge whether the SRv6 intermediate processing node is the penultimate hop node according to the index of the penultimate hop node and the segment index in the destination address of the IPv6 message; if so, perform a penultimate hop pop-up operation; The forwarding module is used to receive, through the SRv6 tail node, the message processed by the penultimate hop node, and perform decapsulation and forwarding.

9. An electronic device, comprising a memory and a processor, characterized in that: The memory stores a computer program that can be run on the processor, and when the program is executed on the processor, the steps in the optimization method for popping the penultimate hop based on compressed SRv6 as described in any one of claims 1 to 7 are implemented.

10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps in the optimization method for popping the penultimate hop based on compressed SRv6 are implemented as described in any one of claims 1 to 7.