SRv6 header compression and restoration method, device and system and SRv6 header forwarding device
By calculating the mask MASK, the SID in the SRv6 packet is compressed to form CSR, which solves the problems of complex compression technology and poor compression effect of the existing SRv6 header, and achieves shortening of the message header length and improving forwarding efficiency, which is suitable for promotion in the current network.
Patent Information
- Application Number
- CN202510349935.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-06-20
AI Technical Summary
The existing SRv6 head compression technology is complex and has poor compression effect, which makes it difficult to promote in actual network applications.
By extracting the target IP address DIP and segment identifier list SidList, the mask MASK is calculated, the SID is compressed based on MASK, the different segments between SID and DIP are retained, and the number of segments is filled when the compressed segment number is less than the maximum number of segments of the different segments is formed to form the compressed segment routing expansion header CSR.
The SRv6 message header length is shortened, the problem of limited processing depth of old chips is solved, and the forwarding efficiency of SRv6 TE messages is improved. It does not require expansion of the BGP-LS protocol or re-planning the network configuration, which is suitable for smooth upgrades in the current network.
Smart Images

Figure CN120186089A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of SRv6 networks, and specifically to an SRv6 header compression and restoration method, device, system, and SRv6 header forwarding device. Background Art
[0002] In the era of cloud-network integration, flexible and agile network service capabilities directly affect the competitiveness of operators. SR (Segment Routing) is a source routing technology, and SRv6 (Segment Routing over IPv6) is the application of SR technology in IPv6 (Internet Protocol Version 6) networks. The emergence of SRv6 is a huge innovation. It combines SDN (Software Defined Network) technology to enable programmable networks, which provides innovative soil for network infrastructure services and value-added network services in the cloud-network era.
[0003] SRv6 technology uses 128-bit IPv6 addresses as SIDs (Segment IDs). With its extremely simple and programmable features, it realizes any access and any connection, can flexibly meet various network service requirements, and provides higher reliability and scalability. It will become the core technology of the next-generation bearer network. As SRv6 technology and standards gradually mature, mainstream equipment chip manufacturers and open source platforms have already supported SRv6, and domestic and foreign operators have begun SRv6 deployment.
[0004] Although SRv6 currently has many advantages mentioned above, when the number of SIDs increases, the problems caused by the excessive length of the SRv6 header are concentrated in the following two points:
[0005] 1. Large header overhead leads to low bandwidth utilization of network links. The effective payload data transmitted under the same MTU (Maximum Transmission Unit) decreases, and the transmission performance drops sharply. For example, the bandwidth utilization rate of a 256-byte payload packet is only about 60% in the case of an 8-layer SID; the increased header length may cause the packet size to exceed the MTU, resulting in fragmentation or packet loss, which leads to a sharp drop in transmission performance.
[0006] Second, old chips have limited message processing depth and have difficulty supporting SRv6 message headers that are too long.
[0007] Therefore, in actual live network applications, most operators deploy SRv6 BE (Best Effort) services, that is, without SidList, without path planning, and forwarding with best effort. The SRv6 TE (Traffic Engineering) service has not been promoted.
[0008] For this reason, the industry has proposed a variety of SRv6 header compression technologies, including relatively mature RFC (Request for Comments) drafts such as G-sid (Generalized Segment Identifier), U-sid (Micro Segment Identifier), and Srm6 (Segment Routing over Minimal IPv6).
[0009] Taking the currently most popular G-sid in China as an example, since the processing actions of the SRH (Segment Routing Header) are different when the forwarding plane processes End / EndX with and without the COC (Color-Aware Objective Function) attribute, at the protocol level, in order to be compatible with the original SRv6 uncompressed forwarding, it is necessary to configure the corresponding node compression attributes for the nodes within the compression domain, and allocate two types of SIDs with and without the COC attribute for END and END.X, and announce them to other nodes and controllers through IGP (Interior Gateway Protocol) and BGP-LS (Border Gateway Protocol-Link State).
[0010] According to the G-sid draft description, it is necessary to expand the SRv6 Capabilities sub-TLV and add the C-flag to announce the node's ability to support compression; if the head node does not report the SRv6 compression ability, then the SDN controller should not send an SRv6 Policy containing G-SID to the head node. If it is indeed necessary to send it, then only SIDs without the COC Flavor can be included, and they are arranged according to 128 bits; at the same time, two routing tables must also be generated at the forwarding level for querying routes with and without the COC attribute respectively.
[0011] Therefore, the G-sid solution must rely on the extension of the protocol layer, and also has higher requirements for the table resources of the forwarding plane; the u-sid and srm6 solutions proposed by other manufacturers are similar, without exception. However, due to the mixed use of new and old equipment in the existing network, and the different support of other vendors for various compression header technologies, this type of compression technology has been slow to be promoted.
[0012] In summary, although these existing compression schemes have achieved the compression goal, they all have some defects to a greater or lesser extent:
[0013] 1. A consistent Locator Block needs to be planned.
[0014] Second, the SRv6 protocol layer needs to be enhanced, and the control plane also needs to introduce new protocol extensions.
[0015] 3. It is necessary to add a new SID table or routing table entry, which wastes forwarding resources.
[0016] Therefore, various SRv6 header compression technologies have always remained in laboratories and various interoperability tests, and are difficult to promote in actual live network applications. Summary of the invention
[0017] The present application provides an SRv6 header compression and restoration method, device, system and SRv6 header forwarding device, which can solve the technical problems of complex SRv6 header compression technology and poor compression effect in the prior art.
[0018] In a first aspect, an embodiment of the present application provides an SRv6 header compression and restoration method, the compression and restoration method comprising:
[0019] When receiving an SRv6 message containing a segment routing extension header SRH, extract the target IP address DIP and the segment identifier list SidList, compare each segment identifier SID in the SidList with the DIP, and obtain a mask MASK, wherein the MASK contains difference segment information of all SIDs and DIPs, and the difference segment information includes the difference segment position of each SID and DIP and the maximum number of difference segments; compress each SID based on the MASK, retain the difference segment of each SID and DIP during compression, and make up the number of segments when the number of segments after compression is less than the maximum number of difference segments, so that each compressed segment identifier CSI has the same number of segments, and obtain a compressed segment routing extension header CSR containing a compressed segment identifier list CSL;
[0020] Before forwarding the SRv6 message containing the CSR, the CSI of the next hop node is extracted from the SidList based on the number of remaining segments, and the DIP in the CSR is updated based on the MASK and the CSI of the next hop node;
[0021] Determine whether there is a need for restoration. If so, restore each CSI in the CSR to SID based on the MASK to obtain an SRv6 packet containing the SRH; if not, obtain an SRv6 packet containing the CSR.
[0022] Combined with the first aspect, in one embodiment, the step of comparing each segment identifier SID in the SidList with the DIP to obtain the MASK specifically includes the following steps:
[0023] Compare each SID in the SidList with the DIP to obtain the comparison identifier mask_sid for each SID, and then perform a bitwise OR operation on all mask_sid to obtain the MASK containing the difference segment information of all SIDs and the DIP.
[0024] Combined with the first aspect, in one embodiment, the compression and restoration method further includes:
[0025] When compressing the SRH into the CSR, replace the routing type field in the SRH with the MASK field, and update the value of the next header field and the value of the extension header length field;
[0026] When restoring the CSR to the SRH, modify the MASK field in the CSR to the routing type field, and update the value of the next header field and the value of the extension header length field.
[0027] Combined with the first aspect, in one embodiment, the step of determining whether there is a need for restoration specifically includes the following steps:
[0028] By changing the Interior Gateway Protocol IGP, each node within the SRv6 domain advertises to adjacent nodes whether it has the processing ability for the CSR.
[0029] In a second aspect, an embodiment of the present application provides an SRv6 header compression and restoration device, and the compression and restoration device includes:
[0030] A compression module, which is used to extract a destination IP address DIP and a segment identifier list SidList when receiving an SRv6 packet containing a segment routing extension header SRH, compare each segment identifier SID in the SidList with the DIP to obtain a MASK, where the MASK contains the differential segment information of all SIDs and the DIP, and the differential segment information includes the differential segment positions and the maximum number of segments of each SID and the DIP; compress each SID based on the MASK, and retain the differential segments of each SID and the DIP during compression and supplement the number of segments when the number of segments after compression is less than the maximum number of differential segments, so that each compressed segment identifier CSI has the same number of segments, and obtain a compressed segment routing extension header CSR containing the compressed segment identifier list CSL.
[0031] A processing module, which is used to extract the CSI of the next-hop node from the SidList based on the remaining number of segments before forwarding an SRv6 packet containing the CSR, and update the DIP in the CSR based on the MASK and the CSI of the next-hop node.
[0032] It is also used to determine whether there is a restoration requirement. If so, restore each CSI in the CSR to an SID based on the MASK to obtain an SRv6 packet containing the SRH; if not, obtain an SRv6 packet containing the CSR.
[0033] Combined with the second aspect, in an implementation, when the compression module compares each segment identifier SID in the SidList with the DIP to obtain a MASK, it compares each SID in the SidList with the DIP to obtain the mask_sid of each SID, and then performs a bitwise OR operation on all mask_sid to obtain a MASK containing the differential segment information of all SIDs and the DIP.
[0034] Combined with the second aspect, in an implementation, the processing module is also used to replace the routing type field in the SRH with a MASK field, update the value of the next header field, and update the value of the extension header length field when compressing the SRH into a CSR.
[0035] The processing module is also used to modify the MASK field in the CSR to a routing type field, update the value of the next header field, and update the value of the extension header length field when restoring the CSR to an SRH.
[0036] Combined with the second aspect, in an implementation, the processing module is also used to change the IGP protocol when determining whether there is a restoration requirement, and each node in the SRv6 domain advertises to adjacent nodes whether it has the processing ability for the CSR.
[0037] In a third aspect, an embodiment of the present application provides an SRv6 header forwarding device, including the SRv6 header compression and decompression device described above, and further including a general SRv6 chip connected to the SRv6 header compression and decompression device.
[0038] In a fourth aspect, an embodiment of the present application provides an SRv6 header compression and decompression system, including the SRv6 header forwarding device described above, and further including a general SRv6 chip. The SRv6 header forwarding device including the SRv6 header compression and decompression device is used as the first node, and the general SRv6 chip without the SRv6 header compression and decompression device is used as the second node;
[0039] When the first node forwards the SRv6 packet to the next hop, it determines whether there is a decompression requirement. If so, after decompressing the CSR to the SRH, it sends the SRv6 packet containing the SRH to the next hop node; if not, it sends the SRv6 packet containing the CSR to the next hop node.
[0040] The beneficial effects brought by the technical solution provided by the embodiment of the present application include:
[0041] By losslessly compressing the SRH in the SRv6 packet into the CSR, the length of the packet header is shortened, solving the problem that old chips have difficulty supporting when the SRv6 packet header is too long due to limited packet processing depth, and improving the forwarding efficiency of SRv6 TE packets of old chips.
[0042] The target address in the CSR is updated in combination with the remaining hops, SidList, and MASK, so that the node with CSR processing ability can implement segment routing forwarding based on the CSR.
[0043] By determining whether there is a decompression requirement, when there is a decompression requirement, the CSR is losslessly decompressed to the SRH based on the MASK, and the SRv6 packet containing the SRH is forwarded to the next hop node. Compared with various current SRv6 compression technologies, this solution does not require expanding the BGP-LS protocol, the SDN controller is not aware, nor does it need to announce an additional SID table or routing table like other SRv6 compressed header technologies. There is no need to re-plan the original network configuration. Only by knowing whether the next hop node has CSR processing ability, it can be decided whether to perform a decompression operation and then forward the SRv6 packet containing the SRH to the next hop node or directly forward the SRv6 packet containing the CSR without performing a decompression operation to the next hop node. That is, the upgraded part of the nodes has a completely transparent impact on the original SRv6 network, which is more conducive to smooth upgrading in the existing network. Description of the Drawings
[0044] Figure 1 It is a schematic flowchart of an embodiment of the SRv6 header compression and decompression method of the present application;
[0045] Figure 2 Schematic diagram of functional modules of an embodiment of the SRv6 header compression and restoration device of the present application;
[0046] Figure 3 Schematic diagram of the working principle of an embodiment of the SRv6 header compression and restoration device of the present application;
[0047] Figure 4 Schematic diagram of the architecture of the SRv6 header compression and restoration system in a specific embodiment of the present application. Detailed implementation manners
[0048] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0049] First, some technical terms in the present application will be explained to facilitate the understanding of the present application by those skilled in the art.
[0050] SidList (Segment Identifier List), is an ordered list that contains a series of SIDs (Segment Identifiers). Each SID represents a segment in the network, and each segment is represented by a 128-bit IPv6 address. The IPv6 address is a 128-bit binary number, and directly using binary representation is very verbose. By converting every 4-bit binary number into 1-bit hexadecimal number, the 128-bit address can be represented as a 32-bit hexadecimal number. For further simplification, the 32-bit hexadecimal number is divided into 8 groups, each group of 4 bits, separated by a colon :, to form the standard IPv6 address format. The data packet will pass through these segments in sequence according to the order of the SIDs in the SidList, so as to achieve precise path control.
[0051] DIP (Destination IP Address), is a key field in the IPv6 packet header, used to specify the final destination of the data packet.
[0052] To make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0053] In a first aspect, an embodiment of the present application provides a method for SRv6 header compression and restoration.
[0054] In one embodiment, referring to Figure 1 , Figure 1 is a schematic flowchart of an embodiment of the SRv6 header compression and restoration method of the present application. As Figure 1 shown, the SRv6 header compression and restoration method includes:
[0055] Step S1: When receiving an SRv6 packet containing an SRH, extract the DIP and SidList, compare each SID in the SidList with the DIP to obtain a MASK, where the MASK contains the differential segment information of all SIDs and the DIP. The differential segment information includes the differential segment positions and the maximum number of segments of each SID and the DIP; compress each SID based on the MASK, and when compressing, retain the differential segments of each SID and supplement the number of segments when the number of compressed segments is less than the maximum number of segments of the differential segments, so that each CSI has the same number of segments, and obtain a compressed CSR containing a CSL;
[0056] Step S2: Before forwarding an SRv6 packet containing a CSR, extract the CSI of the next-hop node from the SidList based on the remaining number of segments, and update the DIP in the CSR based on the MASK and the CSI of the next-hop node;
[0057] Step S3: Determine whether there is a restoration requirement. If so, restore each CSI in the CSR to an SID based on the MASK to obtain an SRv6 packet containing an SRH; if not, obtain an SRv6 packet containing a CSR.
[0058] In this embodiment, when a node currently with CSR (Compress Segment Routing Header) processing capability receives an SRv6 packet containing an SRH, it extracts the DIP and SidList. The SidList contains multiple SIDs. Both the DIP and each SID are 128-bit IPv6 addresses, represented in the form of 8 groups of 4-bit hexadecimal numbers, with each group being 1 segment. So both the DIP and SID have 8 segments. After comparing each SID in the SidList with the DIP, all the different segments between the SIDs and the DIP are recorded. The positions and total number of the different segments are included in the MASK. When compressing each SID in the SidList based on the MASK, the segments of the SID that are different from the DIP are retained. If the number of segments after compression is less than the maximum number of different segments, the number of segments is supplemented. Taking the maximum number of different segments recorded by the MASK as 3 as an example, after the SID is compressed, a CSI (Compress Segment Identifier) is obtained. If the number of segments after compressing SID1 is 2 segments and the number of segments after compressing SID2 is 3 segments, then 1 segment needs to be added to the compressed SID1 so that the total number of segments in the CSI1 finally obtained according to SID1 and the CSI2 finally obtained according to SID2 is the same. Multiple CSIs with the same number of segments constitute an important part of the CSL (Compress Segment Identifier List). The CSR length containing the CSL is greatly reduced, which can meet the processing capabilities of existing general old SRv6 chips (referred to as general SRv6 chips).
[0059] Before forwarding an SRv6 packet containing CSR, a node currently with CSR processing capability extracts the CSI of the next-hop node from the SidList based on the remaining number of segments, updates the DIP in the CSR based on the MASK and the CSI of the next-hop node, and then forwards the SRv6 packet to the next-hop node corresponding to the updated DIP, so that the node with CSR processing capability also has the ability to perform segment routing forwarding based on CSR.
[0060] After the current node with CSR processing capability updates the DIP, it is necessary to determine whether there is a restoration requirement when forwarding the SRv6 packet to the next-hop node. If so, each CSI in the CSR is restored to an SID based on the MASK, obtaining a restored SidList containing multiple SIDs and a restored SRH containing the restored SidList. When sending the SRv6 packet containing the restored SRH to a traditional SRv6 chip without CSR processing capability, the traditional SRv6 chip will not perceive the previous compression and restoration operations and will only forward the packet according to the previous process. Nodes with CSR processing capability can seamlessly access nodes without CSR processing capability, achieving seamless upgrade. If not, the SRv6 packet containing the CSR is directly forwarded to the next-hop node, and the SRv6 TE packet is compressed for transmission, which can improve the forwarding efficiency. Compared with various current SRv6 compression technologies, this solution does not require extending the BGP-LS protocol, the SDN controller is not aware of it, and it does not need to announce an additional SID table or routing table like other SRv6 compression header technologies. There is no need to re-plan the original network configuration. Only by knowing whether the next-hop node has CSR processing capability, it can be decided whether to perform a restoration operation and then forward the SRv6 packet containing the SRH to the next-hop node or directly forward the SRv6 packet containing the CSR without performing a restoration operation. That is, the upgraded part of the nodes has a completely transparent impact on the original SRv6 network, which is more conducive to smooth upgrade in the existing network.
[0061] Further, in one embodiment, the above-mentioned comparison of each segment identifier SID in the SidList with the DIP to obtain the MASK specifically includes the following steps:
[0062] Each SID in the SidList is compared with the DIP to obtain a comparison identifier mask_sid for each SID, and then a bitwise OR operation is performed on all mask_sids to obtain a MASK containing the differential segment information of all SIDs and the DIP.
[0063] Taking the above MASK as an 8-bit binary number as an example, the above-mentioned comparison of each SID in the SidList with the DIP to obtain a MASK containing an 8-bit binary number specifically includes the following steps:
[0064] The segments where each SID is different from the DIP are marked as 1, and the rest are marked as 0 to obtain each mask_sid; the above differential segment information includes the positions and numbers of 1s in each mask_sid and the positions and numbers of 0s in the MASK.
[0065] In this embodiment, since both DIP and SID are represented in the form of 8 groups of 4-digit hexadecimal numbers, with each group as 1 segment, both DIP and SID have 8 segments. Then, it is preferred that mask_sid records all the different bits between SID and DIP in the form of 8-bit binary. Each bit in mask_sid corresponds to one segment in DIP or SID.
[0066] In mask_sid, the bits corresponding to the different segments between each SID and DIP are all set to 1. The total number of 1s in mask_sid is the total number of different segments between all SIDs and MASK, and the rest are set to 0.
[0067] In another specific embodiment, in mask_sid, the bits corresponding to the different segments between each SID and DIP are all set to 1. The total number of 1s in mask_sid is the total number of different segments between all SIDs and MASK, and the rest are set to 0.
[0068] Taking the different segment marked as 1 as an example, as shown in Table 1 below, it is a specific case schematic table for compressing SRH to CSR. By scanning the differences between each segment SL (i.e., SID) in SidList and DIP in the IPv6 header, the mask 0b 00001010 can be used to represent the different segments. MASK = mask_sid1|mask_sid2|mask_sid3..., and the maximum MASK is obtained by performing a bitwise OR operation on each mask_sid.
[0069] Based on the mask 0b 00001010 and the IPv6 header DIP as a reference, the compressed SidList can be recorded as 10:100, F:1, E:1,..., A:1, so as to convert SRH into the newly defined CSR.
[0070]
[0071] Table 1 Specific case schematic table for compressing SRH to CSR
[0072] When there is only 1 different segment, the compression ratio is 8:1; when there are 2 different segments, the compression ratio is 4:1; when there are 3 different segments, the compression ratio is 8:3; when there are 4 different segments, the compression ratio is 2:1. For each IPv6 packet, the compression ratio can be dynamic according to the actual situation. When the number of different segments exceeds 4, there is no obvious compression value, so compression may not be performed. According to actual research, in most cases, the compression ratio of the operator's in-network deployment can reach at least 4:1.
[0073] In theory, MASK can also be defined as 16 bits instead of just 8 bits. In this way, the division of the 16-byte IPv6 address can be more refined, and a higher compression ratio may be achieved. For the compression header with 16-bit MASK, the algorithm is similar, and theoretically, the compression effect will be better. However, the format of the compression header will be quite different from that of the standard SRH.
[0074] Further, in one embodiment, the DIP is updated according to the CSR, so that nodes that support IPv6+CSR headers can also forward in the forwarding manner of IPv6 Segment routing.
[0075] Table 2 Schematic table of specific cases for updating DIP according to CSR
[0076]
[0077] In this embodiment, when a node with CSR processing ability receives an IPv6 packet with an extended header of CSR, it first calculates the total number of segments of the uncompressed segments and the supplemented segments according to the number of bits set to 1 in the MASK, that is, the total number of different segments (or the maximum number of different segments). Taking the total number of segments as 2 as an example, as shown in Table 2, the schematic table of specific cases for updating DIP according to CSR, if the number of bits set to 1 in the MASK in Table 2 is 2, then the total number of segments = 2 * 16B = 32B. The offset is calculated according to the total number of segments as offset = CSL(32B) * Left(4 - 1), where 4 is the remaining number of segments, that is, the total number of nodes not yet reached. Take the data with a length of the total number of segments, that is, 32B data, from the offset, segment it by 16 bits, and then update the corresponding segments in the DIP in turn according to the positions of the bits set to 1 in the MASK:
[0078] The current DIP is [8000:0:0:1:C:0:2:0] (MASK = 00001010, CSL3 = D:2);
[0079] The updated DIP is DIP: [8000:0:0:1:D:0:2:0].
[0080] After updating the DIP, the process of querying the route forwarding is fully compatible with various actions (End, EndX, EndXwith psp, etc.) of SRv6 passing through the station.
[0081] Further, in one embodiment, the above compression and restoration method further includes:
[0082] When compressing the SRH into the CSR, replace the routing type field in the SRH with the MASK field, and update the value of the next header field and the value of the extended header length field;
[0083] When restoring CSR to SRH, the MASK field in CSR is modified to a routing type field, and the value of the Next Header field and the value of the Extension Header Length field are updated.
[0084] In this embodiment, the SRH extension header format defined in rfc8754 (Next Header = 43 in the extension header) is shown in Table 3 below. The CSR extension header format defined in this solution (after conversion, it is necessary to modify Next Header = 243 in the extension header to distinguish it from the SRH header) is shown in Table 4 below.
[0085] Table 3 Schematic table of the SRH extension header format defined in rfc8754
[0086]
[0087] Table 4 Schematic table of the CSR extension header format defined in this solution
[0088]
[0089] For lossless compression and restoration, when SRH is compressed to CSR, only the Routing Type, that is, the routing type, is modified in the first 8 bytes of data, and the Routing Type is modified to MASK. When CSR is restored to SRH, MASK is modified to a fixed value of 4, that is, the Routing Type field is used to replace the MASK field again.
[0090] In different IPv6 packets, the lengths of Compress Segment List[0] to Compress Segment List[n] obtained by compressing Segment List[0] to Segment List[n] according to MASK may vary from 16 bits to 64 bits. In the same packet, the lengths of Compress Segment List[0] to Compress Segment List[n] are consistent.
[0091] After conversion and restoration, it is necessary to recalculate Hdr Ext Len, that is, the extension header length, to the new length to conform to the IPv6 extension header standard.
[0092] Further, in one embodiment, the above determination of whether there is a restoration requirement specifically includes the following steps:
[0093] By changing the Interior Gateway Protocol IGP, each node within the SRv6 domain advertises to adjacent nodes whether it has the processing ability for CSR.
[0094] In this embodiment, by modifying the IGP protocol, devices within the domain can mutually learn whether the other party supports compressed header processing, without involving the modification of the BGP-LS protocol, thus reducing the requirements for the protocol.
[0095] In some other embodiments, in scenarios where some do not want to modify the IGP protocol, it can also be manually configured by setting a global switch. When a node configured with the global switch receives an SRv6 packet, it is defaulted that the packet contains an SRH and needs to be compressed into a CSR. Or when a node configured with the global switch forwards an SRv6 packet, it is defaulted that the next-hop node has or does not have the CSR processing ability. If it is pre-determined that the next-hop has the CSR processing ability, the SRv6 packet containing the CSR is directly forwarded to the next-hop. If it is pre-determined that the next-hop does not have the CSR processing ability, the CSR is directly restored to the SRH, and then the SRv6 packet containing the SRH is forwarded to the next-hop node.
[0096] In a second aspect, an embodiment of the present application further provides an SRv6 header compression and restoration device.
[0097] In one embodiment, referring to Figure 2 and Figure 3 , Figure 2 is a schematic diagram of the functional modules of an embodiment of the SRv6 header compression and restoration device of the present application, Figure 3 is a schematic diagram of the working principle of an embodiment of the SRv6 header compression and restoration device of the present application. As Figure 2 shown, the SRv6 header compression and restoration device includes:
[0098] A compression module, which is used to extract the destination IP address DIP and the segment identifier list SidList when receiving an SRv6 packet containing a segment routing header SRH, compare each segment identifier SID in the SidList with the DIP to obtain a MASK, and the MASK contains the differential segment information of all SIDs and the DIP. The above differential segment information includes the differential segment positions and the maximum number of segments of each SID and the DIP; compress each SID based on the MASK, and when compressing, retain the differential segments of each SID and supplement the number of segments when the number of compressed segments is less than the maximum number of differential segments, so that each compressed segment identifier CSI has the same number of segments, and obtain a compressed segment routing header CSR containing the compressed segment identifier list CSL;
[0099] A processing module, which is used to extract the CSI of the next-hop node from the SidList based on the remaining number of segments before forwarding the SRv6 packet containing the CSR, and update the DIP in the CSR based on the MASK and the CSI of the next-hop node;
[0100] It is also used to determine whether there is a restoration requirement. If so, each CSI in the CSR is restored to the SID based on the MASK to obtain an SRv6 packet containing the SRH; if not, an SRv6 packet containing the CSR is obtained.
[0101] In this embodiment, the compression module losslessly compresses the SRH in the SRv6 packet into the CSR, thereby shortening the packet header length, solving the problem that old chips have difficulty supporting when the SRv6 packet header is too long due to limited packet processing depth, and improving the forwarding efficiency of the SRv6 TE packet of old chips.
[0102] The processing module updates the destination address in the CSR in combination with the remaining hops, SidList, and MASK, so that nodes with CSR processing capabilities can implement segment routing forwarding based on the CSR.
[0103] The processing module determines whether there is a restoration requirement. When there is a restoration requirement, the CSR is losslessly restored to the SRH based on the MASK, and the SRv6 packet containing the SRH is forwarded to the next-hop node. Compared with current SRv6 compression technologies, this solution does not require extending the BGP-LS protocol, the SDN controller is not aware of it, nor does it need to announce an additional SID table or routing table like other SRv6 compression header technologies. There is no need to re-plan the original network configuration. It only needs to know whether the next-hop node has CSR processing capabilities to decide whether to perform a restoration operation and then forward the SRv6 packet containing the SRH to the next-hop node or directly forward the SRv6 packet containing the CSR without performing a restoration operation. That is, the upgraded part of the nodes has a completely transparent impact on the original SRv6 network, which is more conducive to smooth upgrading in the existing network.
[0104] Further, in one embodiment, when the above compression module compares each segment identifier SID in the SidList with the DIP to obtain the MASK, each SID in the SidList is compared with the DIP to obtain the mask_sid of each SID, and then a bitwise OR operation is performed on all mask_sids to obtain the MASK containing the difference segment information of all SIDs and the DIP.
[0105] Taking the above MASK as an 8-bit binary number as an example, when the above processing module compares each SID in the SidList with the DIP for processing to obtain the MASK containing 8-bit binary numbers, the segments where each SID is different from the DIP are marked as 1, and the rest are marked as 0 to obtain the MASK; the above difference segment information includes the position and number of 1s in the MASK, and the position and number of 0s in the MASK.
[0106] Further, in one embodiment, the above processing module is further configured to replace the routing type field in the SRH with the MASK field when compressing the SRH into the CSR, and update the value of the next header field and the value of the extended header length field;
[0107] The above processing module is further configured to modify the MASK field in the CSR to the routing type field when restoring the CSR to the SRH, and update the value of the next header field and the value of the extended header length field.
[0108] Further, in one embodiment, the above processing module is further configured to, when determining whether there is a restoration requirement, change the IGP protocol, and each node in the SRv6 domain advertises to adjacent nodes whether it has the processing ability for the CSR.
[0109] Among them, the functions of each module in the above SRv6 header compression and restoration device correspond to the steps in the above SRv6 header compression and restoration method embodiment, and their functions and implementation processes will not be elaborated here one by one.
[0110] In a third aspect, an embodiment of the present application provides an SRv6 header forwarding device, including the foregoing SRv6 header compression and restoration device, and further including a general SRv6 chip connected to the SRv6 header compression and restoration device.
[0111] In this embodiment, as Figure 3 shown, in view of the characteristics that some general SRv6 chips have limited packet parsing depth but are programmable, a pre-chip is configured for the general SRv6 chip, and the pre-chip can provide the function of mutual conversion between the SRH and the CSR. Figure 3 In the NP-bit general chip in
[0112]
[0113] When the above first node forwards the SRv6 packet to the next hop, it determines whether there is a restoration requirement. If so, after restoring the CSR to the SRH, it sends the SRv6 packet containing the SRH to the next hop node; if not, it sends the SRv6 packet containing the CSR to the next hop node.
[0114] In this embodiment, in the actual SRv6 network application, this compression and restoration technology can be used to improve the forwarding performance. Here, some extensions need to be made to the IGP protocol to form a sub-domain within the current SRv6 domain that can support the compression and restoration of the CSR header. All nodes within the sub-domain are first nodes, and all nodes outside the sub-domain are second nodes.
[0115] As Figure 4 As described above, it is a schematic diagram of the architecture of the SRv6 header compression and restoration system in a specific embodiment of this application. Among them, E, F, I, J, and K are newly upgraded nodes within the domain that support CSR. These nodes can extend the SRv6 Capabilities sub-TLV in the IGP protocol to advertise the ability of this node to support the CSR header externally. For nodes that do not support the CSR header (such as A, B, C, D, G, H, L), this TLV is ignored.
[0116] When the first node that supports the CSR header capability receives an SRv6 packet containing an SRH, it automatically compresses the SRH into a CSR. After compression, when preparing to forward externally, if it is found that the device pointed to by the outgoing port has the ability to support CSR, that is, it is also a first node, then no decompression is performed and it is directly forwarded out (for example, node F → node K). If the device pointed to by the outgoing port does not support CSR, that is, it is a second node, then decompression is performed to restore the packet to an SRv6 packet containing an SRH and then sent out.
[0117] When the compression sub-domain that can support CSR covers the head node, and the site pointed to by the outgoing port of the head node supports the CSR capability, then the SRv6 TE packet sent by the head node can be directly encapsulated in the IPv6+CSR format.
[0118] Similarly, when the compression sub-domain that can support CSR covers the tail node, the tail node can directly de-encapsulate the IPv6+CSR format packet, and the subsequent processing is exactly the same as that of SRv6 (such as End.DT4 / 6, End.DT2U, etc.).
[0119] This solution thus realizes the compressed transmission of SRv6 TE packets within the compression domain that supports the CSR header capability, improving the forwarding efficiency; at the same time, because it can be losslessly restored, devices that do not support this solution do not perceive any differences; the SDN controller also does not perceive whether the sites within the domain support the compression ability. Compared with existing various SRv6 compressed header technologies, the upgraded part of the devices has a completely transparent impact on the original SRv6 network, which is more conducive to smooth upgrading.
[0120] In some other embodiments, it is also possible not to modify the IGP packet, but to set up a CSR processing sub-domain within the SRv6 domain. All nodes in the CSR processing sub-domain are first nodes, and all nodes in the area outside the CSR processing sub-domain within the SRv6 domain are second nodes;
[0121] Configure a first global switch for the first node at the entrance of the CSR processing sub-domain. The first global switch is used to inform the first node at the entrance that after compressing the SRH in the received SRv6 packet into a CSR, it is sent to the first node.
[0122] Configure a second global switch for the first node at the exit of the CSR processing sub-domain. The second global switch is used to inform the first node at the exit that when forwarding an SRv6 packet containing a CSR, after restoring the CSR to an SRH, it is sent to the second node.
[0123] It should be noted that the serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.
[0124] The terms "including" and "having" and any variations thereof in the specification, claims and drawings of the present application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally further include unlisted steps or units, or may optionally further include other steps or units inherent to these processes, methods, products or devices. The descriptions with terms such as "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit that "first", "second" and "third" are of different types.
[0125] In the description of the embodiments of the present application, "exemplary", "for example" or "for instance" etc. are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary", "for example" or "for instance" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary", "for example" or "for instance" is intended to present relevant concepts in a specific manner.
[0126] In the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality of" means two or more than two.
[0127] In some processes described in the embodiments of the present application, there are multiple operations or steps that appear in a specific order. However, it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or may be executed in parallel. The serial numbers of the operations are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. Additionally, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0128] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases, the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disc) and includes several instructions for causing a terminal device to execute the methods described in the various embodiments of the present application.
[0129] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structural or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.
Claims
1. A SRv6 header compression and restoration method, characterized in that: The compression and restoration method comprises: When receiving an SRv6 message containing a segment routing extension header SRH, extract the target IP address DIP and the segment identifier list SidList, compare each segment identifier SID in the SidList with the DIP, and obtain a mask MASK, wherein the MASK contains difference segment information of all SIDs and DIPs, and the difference segment information includes the difference segment position of each SID and DIP and the maximum number of difference segments; compress each SID based on the MASK, retain the difference segment of each SID and DIP during compression, and make up the number of segments when the number of segments after compression is less than the maximum number of difference segments, so that each compressed segment identifier CSI has the same number of segments, and obtain a compressed segment routing extension header CSR containing a compressed segment identifier list CSL; Before forwarding the SRv6 message containing the CSR, the CSI of the next hop node is extracted from the SidList based on the number of remaining segments, and the DIP in the CSR is updated based on the MASK and the CSI of the next hop node; Determine whether there is a restoration requirement. If so, restore each CSI in the CSR to a SID based on the MASK to obtain an SRv6 message containing SRH; if not, obtain an SRv6 message containing the CSR.
2. The SRv6 header compression and restoration method according to claim 1, characterized in that: The step of comparing each segment identifier SID in SidList with DIP to obtain MASK specifically includes the following steps: Each SID in SidList is compared with DIP to obtain the comparison identifier mask_sid of each SID, and then all mask_sids are bitwise ORed to obtain a MASK containing the difference segment information of all SIDs and DIPs.
3. The SRv6 header compression and restoration method according to claim 1, characterized in that: The compression and restoration method further comprises: When compressing the SRH into a CSR, the routing type field in the SRH is replaced with the MASK field, and the value of the next header field and the value of the extended header length field are updated; When restoring the CSR to the SRH, the MASK field in the CSR is modified to the routing type field, and the value of the next header field is updated, as well as the value of the extended header length field.
4. The SRv6 header compression and restoration method according to claim 1, characterized in that: The determining whether there is a restoration requirement specifically includes the following steps: By changing the internal gateway protocol (IGP), each node in the SRv6 domain notifies adjacent nodes whether it has the processing capability for CSR.
5. An SRv6 header compression and restoration device, characterized in that: The compression and reduction device comprises: A compression module is used for extracting a target IP address DIP and a segment identifier list SidList when receiving an SRv6 message containing a segment routing extension header SRH, comparing each segment identifier SID in the SidList with the DIP to obtain a MASK, wherein the MASK contains difference segment information of all SIDs and DIPs, and the difference segment information includes a difference segment position of each SID and DIP and a maximum number of difference segments; compressing each SID based on the MASK, retaining the difference segment of each SID and DIP during compression, and supplementing the number of segments when the number of segments after compression is less than the maximum number of difference segments, so that each compressed segment identifier CSI has the same number of segments, and obtaining a compressed segment routing extension header CSR containing a compressed segment identifier list CSL; A processing module, which is used to extract the CSI of the next hop node from the SidList based on the number of remaining segments before forwarding the SRv6 message containing the CSR, and update the DIP in the CSR based on the MASK and the CSI of the next hop node; It is also used to determine whether there is a restoration requirement. If so, each CSI in the CSR is restored to a SID based on the MASK to obtain an SRv6 message containing SRH; if not, an SRv6 message containing the CSR is obtained.
6. The SRv6 header compression and restoration device according to claim 5, characterized in that: The compression module compares each segment identifier SID in SidList with DIP, and when obtaining MASK, compares each SID in SidList with DIP to obtain mask_sid of each SID, and then performs a bitwise OR operation on all mask_sids to obtain a MASK containing the difference segment information of all SIDs and DIPs.
7. The SRv6 header compression and restoration device according to claim 5, characterized in that: The processing module is further used to replace the routing type field in the SRH with the MASK field when compressing the SRH into the CSR, and to update the value of the next header field and the value of the extended header length field; The processing module is also used to modify the MASK field in the CSR to the routing type field when restoring the CSR to the SRH, and to update the value of the next header field and the value of the extended header length field.
8. The SRv6 header compression and restoration device according to claim 5, characterized in that: The processing module is also used to, when determining whether there is a restoration requirement, change the IGP protocol so that each node in the SRv6 domain notifies adjacent nodes whether it has the processing capability for CSR.
9. An SRv6 header forwarding device, characterized in that: It includes the SRv6 header compression and restoration device as described in claim 5, 6, 7 or 8, and also includes a universal SRv6 chip connected to the SRv6 header compression and restoration device.
10. An SRv6 header compression and restoration system, comprising the SRv6 header forwarding device according to claim 7, and further comprising a general SRv6 chip, wherein the SRv6 header forwarding device including the SRv6 header compression and restoration device is used as a first node, and the general SRv6 chip not including the SRv6 header compression and restoration device is used as a second node; When forwarding the SRv6 message to the next hop, the first node determines whether a restoration requirement is required. If so, after restoring the CSR to SRH, the SRv6 message containing the SRH is sent to the next hop node; if not, the SRv6 message containing the CSR is sent to the next hop node.