Network coding erasure correction method and system for SRv6 multi-hop network
By encoding and decoding data per hop route in the SRv6 network, the problem of data packet loss in the SRv6 network is solved, and the forwarding performance and data reliability of the network are improved.
Patent Information
- Application Number
- CN202510454616.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-06-24
AI Technical Summary
In SRv6 networks, how to reduce or even eliminate data packet loss on each segment routing link of the IPv6 data plane, thereby improving the overall forwarding performance of the SRv6 network.
By encoding the original data on each hop route in the SRv6 network and decoding it on the router on the receiving end, the erasure of data packet loss transmitted through the SRv6 network is realized.
It effectively reduces the occurrence of data packet loss in SRv6 network and improves the overall forwarding performance and data reliability of the network.
Smart Images

Figure CN120200951A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a network coding and erasure method and system for an SRv6 multi-hop network, belonging to the technical field of computer network research. Background Art
[0002] SRv6 (Segment Routing IPv6) is a segment routing network architecture implemented based on the IPv6 data plane. It is designed based on the source routing concept and supports inserting forwarding instructions at the head node to guide the forwarding of data packets. Simply put: SRv6 = SR (Segment Routing) + IPv6. The core idea of the SR technology is to cut the packet forwarding path into different segments and insert segment information into the packet at the starting point of the path. Intermediate nodes only need to forward according to the segment information carried in the packet. The combination of network coding and erasure with SRv6 can ensure the reliable transmission of data on each segment routing link in the IPv6 data plane of the SRv6 network.
[0003] Therefore, how to reduce or even eliminate network packet loss through the function of network coding and erasure during the data forwarding process on each segment routing link in the IPv6 data plane of the SRv6 network, so as to improve the overall forwarding performance of the SRv6 network, is an urgent problem to be solved in the Internet SRv6 network. Summary of the Invention
[0004] Aiming at the deficiencies of the prior art, the present invention provides a network coding and erasure method and system for an SRv6 multi-hop network. By performing coding operations on the original data on each hop of the SRv6 network and performing decoding operations on the routers at the other end of the SRv6 network that receive the network-coded data, the goal of correcting and deleting lost packets in the data transmitted through the SRv6 network is achieved.
[0005] Specifically, when the centralized controller issues the SRv6 routing table to the SRv6 network, it will issue the information required for network coding to the routers that support SRv6 forwarding at the same time. The starting router of the SRv6 network will perform coding operations on the original data. The relay routers of the SRv6 network will perform decoding operations on the coded network data, and then perform coding operations after completing the work of data correction and deletion, and send them to the next relay node of the SRv6 network. After repeating the above operations in the SRv6 network, the original network data is forwarded to the final node, thus providing a guarantee for correcting and deleting lost packets in the SRv6 network environment.
[0006] The technical solution of the present invention is as follows:
[0007] A network coding and erasure method for an SRv6 multi-hop network, the steps are as follows:
[0008] (1) After the router starts up, a segment routing network coding table is created;
[0009] (2) The router receives multiple segment routing network coding messages sent by the centralized controller and fills the multiple segment routing network coding messages into the local segment routing network coding table;
[0010] (3) The router receives a normal IPv6 packet and determines whether to forward it;
[0011] (4) When the router receives an IPv6 data packet with the destination address being this router and including an SRH extension header, the packet is processed and then forwarded.
[0012] Preferably according to the present invention, in step (1), the segment routing network coding table includes the destination IPv6 network segment, the destination IPv6 network segment mask, the set of router IPv6 addresses for segment routing, the number of encoded data packets, the number of encoded redundant packets, the number of decoded data packets, and the number of decoded redundant packets, where;
[0013] The destination IPv6 network segment is the destination IPv6 network prefix for the router to forward traffic through the SRv6 technology, the destination IPv6 network segment mask is the destination IPv6 network prefix mask for the router to forward traffic through the SRv6 technology, the set of router IPv6 addresses for segment routing is the IPv6 address of each hop router on the SRv6 segment routing forwarding path, the number of encoded data packets is the number of cached data packets required for the network coding of the router supporting network coding, the number of encoded redundant packets is the number of redundant data packets required for the network coding of the router supporting network coding, the number of decoded data packets is the number of cached data packets required for the network decoding of the router supporting decoding, which refers to the number of data packets for network decoding between the router and the previous hop router in the segment routing network, and the number of decoded redundant packets is the number of redundant packets to be received for the network decoding of the router supporting decoding, which refers to the number of redundant packets for network decoding between the router and the previous hop router in the segment routing network. The initial segment routing network coding table is empty.
[0014] Preferably according to the present invention, in step (2), the segment routing network coding information includes the destination IPv6 network segment, the destination IPv6 network segment mask, the set of router IPv6 addresses for segment routing, the number of encoded data packets, the number of encoded redundant packets, the number of decoded data packets, and the number of decoded redundant packets.
[0015] Preferably according to the present invention, in step (3), specifically, when the router receives a normal IPv6 data packet, the IPv6 destination address D of the packet is extracted dst , and the following formula is used to match it with the segment routing network coding table;
[0016] P dst &Plen , D dst &P len
[0017] Wherein, P dst is the destination IPv6 network segment of the segment routing network coding table, and P len is the destination IPv6 network segment mask of the segment routing network coding table, and P dst is bitwise ANDed with P len , and D dst is bitwise ANDed with P len . If the results of both are the same, record this table entry and execute steps (3.1) and (3.2); otherwise, execute step (3.3).
[0018] (3.1): Construct an SRH (Segment Routing Header) extension header for the IPv6 packet, and initialize each field of the SRH extension header according to the protocol. The SRH extension header includes the next header type, header length, routing header type, number of segments, last segment index value, packet identifier, and segment list. Among them;
[0019] The next header type is the header type of the payload carried after the SRH header, and initialize by filling in the next header field of the IPv6 packet header; the header length is the total length of the SRH extension header, and initialize by adding the lengths of each field of the SRH extension header and filling in the result; the routing header type is the type of the SRH extension header, and initialize by filling in 4 to represent the segment routing extension header; the number of segments is the number of segment routers in the segment list, and initialize by filling in the number of segment routers in the segment list; the last segment index value is the index value of the last-hop segment router in the segment list, and initialize by filling in the index value of the last-hop segment router in the segment list; the packet identifier is the number of the current segment routing, and initialize by filling in the value assigned by the router system; the segment list is the IPv6 addresses of multiple routers on the segment routing path, and initialize by filling in the set of IPv6 addresses of the segment routers in the table entry record obtained in step (3). Except for the first record, fill in according to the order and assign an index value to each router IPv6 address from small to large. Put the destination address of the IPv6 packet into the first record of the segment list in the SRH extension header, and at the same time replace the destination address of the IPv6 packet with the IPv6 router address of the first record in the set of IPv6 addresses of the segment routers in the table entry record obtained in step (3).
[0020] (3.2): After obtaining N ordinary IPv6 packets with the SRH extension header added, which is equal to the number of encoded packets in the table entry record obtained in step (3), concatenate them into D ori+seg original data block, and then calculate the redundant data according to the following formula;
[0021] D ori+seg *W code =R ori+seg
[0022] Among them, D ori+seg is the original data block including the SRH extension header, W code is the encoded coefficient data block, R ori+seg is the redundant data block including the SRH extension header, and forward the message to the next SRv6 router node;
[0023] (3.3): Discard the message and record the log information.
[0024] Preferably according to the present invention, in step (4), specifically:
[0025] The router receives an IPv6 data packet with the destination address being this router and including the SRH extension header, reads the first record R dst and the number of segments (Segment Left) in the SRH extension header segment list, and determines the operation process according to the segment value.
[0026] Preferably according to the present invention, in step (4), if the segment value is 1, then:
[0027] (4.1): Through the record R obtained in step (4) dst match with the segment routing network coding table entry, take out the destination IPv6 network segment and the destination IPv6 network segment mask in the network coding table entry, and judge whether these two values are equal according to the following formula:
[0028] R dst &P mask , P pre &P mask
[0029] Among them, P mask is the destination IPv6 network segment mask, P pre is the destination IPv6 network segment. If they are equal, the matching is successful, record the matching record. Within a unit time, after the router receives a certain number of data packets and redundant packets, read the number m of decoded data packets and the number k of decoded redundant packets in the table entry of step (4), splice m - x messages into the original data block D seg(m-k) , splice k - y redundant messages into the redundant data block. Among them, x is the number of lost original messages, y is the number of lost redundant data, and then calculate the lost data according to the following formula:
[0030] (D seg(m-k) +R k-y )*W code-x-y =D seg(x)
[0031] Among them, D seg(m-k) is the original data block with SRH extension header after losing x packets, R k-y is the received redundant data block, W code-x-y is the coefficient data block for excluding lost data, D seg(x) is the lost data block with SRH extension header recovered;
[0032] (4.2): Use the R dst recorded in step (4) to replace the destination address of the IPv6 packet and forward it out of the router.
[0033] Preferably according to the present invention, in step (4), if the segmentation value is not 1, then:
[0034] (4-1): Match the R dst obtained and recorded in step (4) with the segment routing network coding table entry and record this table entry;
[0035] (4-2): Within a unit time, after the router receives a certain number of data packets and redundant packets, use the formula in step (4.1) to perform network decoding on the data packets;
[0036] (4-3): In the normally received and recovered data packets carrying the SRH extension header, clear the last record in the segment list in the SRH extension header, and at the same time read out the last record in the current segment list, replace the destination address with the IPv6 address value of the last record, and subtract 1 from the segmentation value in the SRH extension header;
[0037] (4-4) Use the network coding formula in step (3.2) to encode the data packets and send the data packets and the redundant packets calculated by the encoding.
[0038] A network coding erasure system for an SRv6 multi-hop network, comprising:
[0039] A creation module for creating a segment routing network coding table;
[0040] A network coding information receiving module for receiving multiple pieces of segment routing network coding information sent over and filling the multiple pieces of segment routing network coding information into the local segment routing network coding table;
[0041] An IPv6 packet receiving module for receiving ordinary IPv6 packets and determining whether to forward them;
[0042] A processing module for receiving an IPv6 data packet with the destination address being this router and containing an SRH extension header, processing the packet and then forwarding it.
[0043] The beneficial effects of the present invention are as follows:
[0044] In the present invention, by performing an encoding operation on the original data on each hop route in the SRv6 network and performing a decoding operation on the router at the other end of the SRv6 network that receives the network-coded data, the goal of erasure correction for the data transmitted through the SRv6 network after packet loss is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a schematic diagram of the network coding erasure topology of the present invention;
[0046] Figure 2 It is a schematic diagram of the network coding representation of the present invention, including a destination IPv6 network segment field occupying 128 bits, a destination IPv6 network segment mask field occupying 128 bits, several router IPv6 address fields of the segment routing occupying 128 bits, an encoded packet number field occupying 8 bits, an encoded redundant packet number field occupying 8 bits, a decoded packet number field occupying 8 bits, and a decoded redundant packet number field occupying 8 bits;
[0047] Figure 3 It is a schematic flowchart of an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0048] The present invention will be further described below by way of embodiments in conjunction with the accompanying drawings, but is not limited thereto.
[0049] Embodiment 1:
[0050] As Figure 3 shown, this embodiment provides a network coding erasure method for an SRv6 multi-hop network. The application scenario is as Figure 1 shown. The central controller is located at the upper part in the network, which is used to mark the position of the network coding erasure function of the central controller for the SRv6 multi-hop network in the control plane; the communication initiator and the router for SRv6 routing and network coding erasure are located at the lower part, which is used to represent the position of the data plane in the network coding erasure of the SRv6 multi-hop network;
[0051] The specific steps are as follows:
[0052] S100: After the router starts, it creates a segment routing network coding table and configures the initial value.
[0053] S200: The router receives the segment routing network coding information sent by the central controller and fills the local segment routing network coding table.
[0054] S300: After the router receives a normal IPv6 data packet, it uses the destination address of the packet to match the segment routing network coding table. If there is a match, it records relevant information and executes S301 and S302. If there is no match, it executes S303;
[0055] S301: Using the record obtained in S300, construct and add an SRH extension header for the normal IPv6 packet;
[0056] S302: Using the coding parameters in the record obtained in S300, perform network coding on the cached IPv6 packet with the SRH extension header added, and send it out;
[0057] S303: Discard the packet and record a log.
[0058] S400: When the router receives an IPv6 packet with the destination being this router and containing an SRH extension header, read the Segment Left field in the SRH extension header. If it is equal to 1, execute S401 and S402. Otherwise, execute S500;
[0059] S401: Using the R obtained in S400 dst Match the decoding parameters in the segment routing network coding table, perform a decoding operation on the packets cached within a unit time, and restore the packets lost during transmission;
[0060] S402: Using the R obtained in S400 dst Replace the destination address field of the IPv6 packet and forward it out.
[0061] S500: Using the R obtained in S400 dst Match the segment routing network coding table and record the matching entry;
[0062] S600: For the packets received within a unit time, perform decoding on the data packets using the method of S401;
[0063] S700: Update the SRH header information of the decoded packet according to the SRv6 protocol;
[0064] S800: Perform network coding on all packets using the network coding algorithm of S302 and send the data out from the router.
[0065] Embodiment 2:
[0066] This embodiment provides a network coding erasure system for an SRv6 multi-hop network, including:
[0067] A creation module for creating a segment routing network coding table;
[0068] A network coding information receiving module is used to receive multiple segment routing network coding information sent, and fill the multiple segment routing network coding information into a local segment routing network coding table;
[0069] An IPv6 message receiving module is used to receive common IPv6 messages and determine whether to forward them;
[0070] The processing module is used to receive an IPv6 data message whose destination address is the router and contains an SRH extension header, and forward the message after processing.
[0071] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A network coding erasure method for SRv6 multi-hop networks, characterized in that: Here are the steps: (1) Create a segment routing network coding table; (2) receiving multiple pieces of segment routing network coding information sent, and filling the multiple pieces of segment routing network coding information into a local segment routing network coding table; (3) Receive ordinary IPv6 messages and determine whether to forward them; (4) After receiving an IPv6 data packet with the destination address being the local router and containing an SRH extension header, the packet is processed and then forwarded.
2. The network coding erasure method for SRv6 multi-hop network according to claim 1, characterized in that: In step (1), the segment routing network coding table includes the destination IPv6 network segment, the destination IPv6 network segment mask, the segment routing router IPv6 address set, the number of encoded data packets, the number of encoded redundant packets, the number of decoded data packets and the number of decoded redundant packets.
3. The network coding erasure method for SRv6 multi-hop network according to claim 2, characterized in that: In step (2), the segment routing network coding information includes the destination IPv6 network segment, the destination IPv6 network segment mask, the segment routing router IPv6 address set, the number of encoded data packets, the number of encoded redundant packets, the number of decoded data packets and the number of decoded redundant packets.
4. The network coding erasure method for SRv6 multi-hop network according to claim 3, characterized in that: In step (3), specifically, a normal IPv6 datagram is received and the IPv6 destination address D of the message is extracted. dst , match it with the segment routing network coding table according to the following formula; P dst &P len ,D dst &P len Among them, P dst The destination IPv6 network segment of the segment routing network encoding table, P len The destination IPv6 network mask for the segment routing network encoding table, P dst With P len Bitwise AND, D dst With P len Bitwise AND, if the two results are the same, record this entry and execute steps (3.1) and (3.2), otherwise, execute step (3.3); (3.1): Construct an SRH extension header for the IPv6 message, initialize each field of the SRH extension header according to the protocol, the SRH extension header includes the next header type, header length, routing header type, number of segments, last segment index value, data packet identifier and segment list, put the destination address of the IPv6 message into the first record of the segment list of the SRH extension header, and replace the destination address of the IPv6 message with the IPv6 router address of the first record of the router IPv6 address set of the segment routing in the table entry record obtained in step (3); (3.2): After obtaining N ordinary IPv6 data packets with SRH extension headers added, which are equal to the number of coded packets in the table entry record obtained in step (3), they are assembled into D ori+seg The original data block, and then calculate the redundant data according to the following formula; D ori+seg *W code =R ori+seg Among them, D ori+seg is the original data block including the SRH extension header, W code is the coding coefficient data block, R ori+seg Forward the message to the next SRv6 router node for the redundant data block including the SRH extension header; (3.3): Discard the message and record the log information.
5. The network coding erasure method for SRv6 multi-hop network according to claim 4, characterized in that: In step (4), specifically: After receiving an IPv6 datagram with the destination address being this router and containing an SRH extension header, read the first record R in the SRH extension header segment list. dst and the number of segments, and determine the operation process based on the segment value.
6. The network coding erasure method for SRv6 multi-hop network according to claim 5, characterized in that: In step (4), if the segment value is 1, then: (4.1): Record R obtained through step (4) dst Match the segment routing network coding table entry, take out the destination IPv6 network segment and destination IPv6 network segment mask in the network coding table entry, and determine whether the two values are equal according to the following formula: R dst &P mask ,P pre &P mask Among them, P mask is the destination IPv6 network mask, P pre The destination IPv6 network segment is equal. If they are equal, the match is successful and the matching record is recorded. In a unit time, after the router receives a certain number of data packets and redundant packets, it reads the number of decoded data packets m and the number of decoded redundant packets k in the table entry of step (4) and splices the mx packets into the original data block D. seg(m-k) , ky redundant messages are spliced into redundant data blocks, where x is the number of lost original messages and y is the number of lost redundant data. Then the lost data is calculated according to the following formula: (D seg(m-k) +R k-y )*W code-x-y =D seg(x) Among them, D seg(m-k) is the original data block with SRH extension header after x messages are lost, R k-y is the received redundant data block, W code-x-y To remove the coefficient data block with missing data, D seg(x) To recover the lost data block with SRH extension header; (4.2): Using the R recorded in step (4) dst Replace the destination address of the IPv6 message and forward it out of the router.
7. The network coding erasure method for SRv6 multi-hop network according to claim 5, characterized in that: In step (4), if the segment value is not 1, then: (4-1): Record R obtained through step (4) dst Match it with the segment routing network coding table entry and record this entry; (4-2): After receiving a certain number of data packets and redundant packets in a unit time, the router uses the formula in step (4.1) to perform network decoding on the data packets; (4-3): In the data packet that is normally received and recovered and carries the SRH extension header, the last record in the segment list in the SRH extension header is cleared, and the last record in the current segment list is read out, and the destination address is replaced with the IPv6 address value of the last record, and the segment value in the SRH extension header is reduced by 1; (4-4) Use the network coding formula in step (3.2) to encode the data packet, and send out the data packet and the redundant packet calculated by the coding.
8. A network coding erasure system for SRv6 multi-hop networks, characterized in that: include: Create a module for creating a segment routing network coding table; A network coding information receiving module is used to receive multiple segment routing network coding information sent, and fill the multiple segment routing network coding information into a local segment routing network coding table; An IPv6 message receiving module is used to receive common IPv6 messages and determine whether to forward them; The processing module is used to receive an IPv6 data message whose destination address is the router and contains an SRH extension header, and forward the message after processing.