Segmented routing data forwarding method and system based on address mapping
By designing independent segment routing segment identification space and extended segment routing link list options in IPv4 networks, combined with the TLV along the route measurement, the difficulties of segment routing forwarding and performance measurement in IPv4 networks are solved, and flexible and scalable segment routing forwarding and highly accurate network performance measurement are achieved.
Patent Information
- Application Number
- CN202411916477.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2044-12-24
AI Technical Summary
The prior art is difficult to implement flexible and scalable segment routing forwarding in IPv4 networks and it is difficult to accurately measure network performance.
By designing an independent segment routing segment identification space and expanding segment routing link list options in the IPv4 message header, segment routing message forwarding is supported. In addition, the TLV for on-road measurement is encapsulated in the segmented routing linked list option for network failure management and performance measurement.
It realizes flexible and scalable segment routing forwarding in IPv4 networks, improves the accuracy of network performance measurement, and reduces the difficulty of network operation and maintenance.
Smart Images

Figure CN119996280A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of computer networks, and in particular relates to a segment routing data forwarding method and system based on address mapping. Background Art
[0002] At present, the packet forwarding path and end-to-end packet monitoring methods that rely on network address prefixes and device configurations are difficult to meet the ever-changing communication needs of network applications and the needs of more accurate network performance monitoring. Segment Routing for IPv6 (SRv6) is a source routing technology that allocates segments to each node or link. The head node combines these segments to form a segment sequence and guides the message to be forwarded according to the segment sequence. Segment routing has two encapsulation formats at the forwarding layer, one is MPLS, namely SR MPLS, and the other is IPv6, namely SRv6. SRv6 not only inherits the advantages of SR MPLS, but also has the advantages of unlimited label space, uniqueness in the entire network, and reachability at any point. In addition, SRv6 can be simply extended based on the existing IPv6 OAM (Operations, Administration and Maintenance) mechanism to support fault management and performance measurement. The use of SRv6 technology can provide more flexible and rich routing strategies for network applications by enabling the programmable forwarding capability of the network protocol, thereby improving the service quality of network applications; SRv6 can implement route-associated network measurement based on OAM extension. However, SRv6 technology is not compatible with the IPv4 protocol and cannot be used in IPv4 networks. The Chinese patent application with publication number CN114050996A discloses a segment routing extended message forwarding method, which designs an IPv4-oriented segment routing extended message header SRHv4, records IPv4 network segment routing information in SRHv4, and constructs an IPv4 segment routing forwarding system, thereby realizing segment routing forwarding in the IPv4 network. However, this method uses IPv4 addresses as segment identifiers (SID, Segment ID). On the one hand, the IPv4 address space is limited, and on the other hand, the segment identifier allocation lacks flexibility and scalability. At present, some private networks use unique identity identifiers instead of IP addresses for communication. The existing methods are difficult to adapt to the future network development needs that are gradually increasing in scale and becoming increasingly complex. How to achieve flexible, scalable, IPv4 network-compatible segment routing forwarding and more accurate network performance measurement has become a key technical problem that needs to be solved urgently. Summary of the invention
[0003] Technical problem to be solved by the present invention: In view of the above-mentioned problems in the prior art, a segmented routing data forwarding method and system based on address mapping are provided. The present invention aims to solve the problem that the existing network routing strategy is limited and it is difficult to accurately measure network performance.
[0004] In order to solve the above technical problems, the technical solution adopted by the present invention is: A segment routing data forwarding method based on address mapping comprises the following steps: S1, design the segment identification space of segment routing and define the segment identification type of segment routing; S2, extends the IPv4 packet header to add a segment routing list option field to support segment routing packet forwarding; S3, encapsulates the path measurement TLV (type length value) in the segment routing link table option to support network fault management and performance measurement; S4, when forwarding data, encapsulates the segment routing header and IPv4 header outside the data message; S5: Perform segment routing message forwarding processing.
[0005] Optionally, when designing the segment routing segment identifier space and defining the segment identifier type in step S1, the segment routing segment identifier space is independent of the IPv4 address space, and the segment identifier of the segment routing is a 32-bit unsigned integer and does not carry parameter information.
[0006] Optionally, when designing the segment routing segment identification space and defining the segment identification type in step S1, the defined segment identification types include two segment identification types, End SID and End.X SID. The instruction action executed by the node under the End SID segment identification type is to reduce the value of the remaining number of segments by 1, and update the IPv4 address corresponding to the next segment identification SID in the segment routing chain table option to the destination address field of the IPv4 message header according to the remaining number of segments, and then look up the table for forwarding; the instruction action executed by the node under the End.X SID segment identification type is to reduce the value of the remaining number of segments by 1, and update the IPv4 address corresponding to the next segment identification SID in the segment routing chain table option to the destination address field of the IPv4 message header according to the remaining number of segments, and then forward the message according to the specified outbound interface.
[0007] Optionally, when the IPv4 message header is extended in step S2 to add a segment routing linked list option field to support segment routing message forwarding, the segment routing linked list option field added to the IPv4 message header includes: the next message header, the segment routing linked list option length, the linked list option type, the remaining number of segments, the total number of segments, the flag bit, the label, the segment list and the optional TLV field, wherein: the field length of the next message header is 1 byte, identifying the type of the linked list option or message header immediately following the segment routing linked list option; the field length of the segment routing linked list option length is 1 byte, identifying the length of the segment routing linked list option, in units of 4 bytes, but excluding the first 8 bytes of the segment routing linked list option; the field length of the linked list option type is 1 byte, identifying the segment routing linked list type, fixed to 0x01; the field length of the remaining number of segments is 1 byte, identifying the number of intermediate nodes that should still be visited before reaching the destination node; the total number of segments The field length is 1 byte, indicating the index of the last element in the segment list for identifying the number of segments, where the index of the element starts from zero; the field length of the flag bit is 1 byte, indicating the identification of the data packet; the field length of the label is 1 byte, identifying the same group of data packets, when the source does not use the label, it must be set to "0" during transmission, when the label is not used during the segment routing header processing, the label should be ignored; the field length of the segment list is 4 bytes, identifying the segment identifier SID of a segment in the segment routing, segment list [i] represents the i-th segment of the segment list, 0≤i≤n, the segment list is encoded starting from the last segment of the segment routing policy, so that the first element in the segment list contains the last segment of the segment routing policy, the second element contains the second to last segment of the segment routing policy, and so on; the field length of the optional TLV field is variable, TLV provides metadata for segment processing, and TLV only exists when the segment routing link list option length is greater than the total number of segments + 1.
[0008] Optionally, in step S3, the fields of the TLV for encapsulating the in-path measurement in the segment routing linked list option include type, length, measurement type, reserved, measurement data length, flag, remaining length, flow ID, flow message sequence and measurement data, wherein: the field length of the type is 1 byte, indicating the TLV type, and the type number is 0x01; the field length of the length is 1 byte, indicating the TLV data length, but excluding the two fields of type and length; the field length of the measurement type is 3 bytes, which is used to describe the data type collected, including node identification, receiving message interface index, sending message interface index, and message processing time in the device; the reserved field length is 1 byte, which is a reserved field, and the default setting is "all 0"; the field length of the measurement data length is 5 bits, which defines the data length carried by the measurement option; flag The length of the flag field is 4 bits, which defines a series of flag bits to indicate additional operations other than data collection; the length of the remaining length field is 7 bits, which is used to indicate the remaining data carrying space. When the remaining length is 0, the network node is not allowed to insert new data; the length of the flow ID field is 4 bytes, which is an optional field. It is generated by the first hop node in the measurement domain and encapsulated in the instruction header to uniquely identify the measured flow information; the length of the flow message sequence number field is 4 bytes, which is an optional field. It is generated by the first hop node in the measurement domain and encapsulated in the instruction header. It starts counting from 0. Each time a message is sent, the sequence number is increased by 1 to mark the message sequence of the monitored flow; the field length of the measurement data is variable, indicating the specific data of the route measurement, and is arranged in sequence according to the data collection type and sequence indicated by the measurement type field.
[0009] Optionally, in step S4, encapsulating the segment routing header and IPv4 header outside the data message separately when forwarding data means encapsulating and inserting the IPv4 header of the segment routing list option outside the data message, so that the encapsulated data packet consists of two parts: the data part and the IPv4 header of the extended segment routing list option.
[0010] Optionally, when performing the segment routing message forwarding processing in step S5, segment routing defines three types of segment routing nodes, namely, the segment routing source node that generates the segment routing message; the segment routing transmission node that forwards the segment routing message but does not perform the segment routing processing; and the segment routing end node that receives and processes the segment routing message, and the segment routing message forwarding processing includes: S5.1, the segment routing source node inserts the segment routing linked list option in the IP message header, and encapsulates the path information into the segment routing linked list option; S5.2, the segment routing source node copies the IP address corresponding to the n+1th segment list [n] to the destination address of the IP message header, and then searches the IPv4 forwarding table to forward the segment routing message; S5.3, if the next hop of the received segment routing message is the segment routing end node, jump to step S5.4; otherwise, if the next hop of the received segment routing message is If the hop is a segment routing transmission node, then after receiving the segment routing message, the segment routing transmission node parses the destination address, searches the IPv4 forwarding table and forwards it to the next hop, and jumps to step S5.3; S5.4, the segment routing end node searches for the local segment identifier according to the i+1th segment list [i], executes the corresponding instruction action, updates the destination address field, forwards the segment routing message, and performs corresponding processing according to the TLV in the segment routing linked list option; S5.5, determines whether i is equal to 0, if not, jumps to step S5.4; otherwise, jumps to step S5.6; S5.6, the segment routing end node searches for the local segment identifier according to the first segment list [0], decapsulates the message, removes the outer IPv4 message and the segment routing linked list option, forwards the inner IPv4 message, and finally sends the message to the destination host, ends and exits.
[0011] In addition, the present invention also provides a segment routing data forwarding system based on address mapping, comprising a microprocessor and a memory connected to each other, wherein the microprocessor is programmed or configured to execute the segment routing data forwarding method based on address mapping.
[0012] In addition, the present invention also provides a computer-readable storage medium, in which a computer program or instruction is stored. The computer program or instruction is programmed or configured to execute the address mapping-based segment routing data forwarding method through a processor.
[0013] In addition, the present invention also provides a computer program product, including a computer program or an instruction, wherein the computer program or the instruction is programmed or configured to execute the address mapping-based segment routing data forwarding method through a processor.
[0014] Compared with the prior art, the present invention mainly has the following advantages: 1. The segmented routing segment identification space designed by the present invention is independent of the IPv4 address space, which avoids the problem of limited IPv4 address space on the one hand, and is compatible with private networks that use unique identification for communication on the other hand.
[0015] 2. The present invention extends the segment routing linked list option for the IPv4 message header, and can implement segment routing forwarding compatible with the IPv4 protocol.
[0016] 3. The path-associated measurement TLV designed in the present invention can more accurately perform network fault management and performance measurement without introducing additional measurement messages. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 Schematic diagram of the basic flow of the method of the embodiment of the present invention.
[0018] Figure 2 A schematic diagram of the segment routing linked list option message format designed in an embodiment of the present invention.
[0019] Figure 3 The figure is a schematic diagram of the message format of the path-associated measurement TLV designed in the embodiment of the present invention.
[0020] Figure 4 Schematic diagram of the segment routing message format in an embodiment of the present invention.
[0021] Figure 5 The figure is a schematic diagram of the segment routing data forwarding process in an embodiment of the present invention. DETAILED DESCRIPTION
[0022] The segment routing data forwarding method and system based on address mapping of the present invention aims to solve the problem that the existing network routing strategy is limited and it is difficult to accurately measure network performance by extending the segment routing list option of the IPv4 message header and carrying the route measurement TLV. The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments of the specification.
[0023] like Figure 1 As shown, the segment routing data forwarding method based on address mapping in this embodiment includes the following steps: S1, design the segment identification space of segment routing and define the segment identification type of segment routing; S2, extends the IPv4 packet header to add a segment routing list option field to support segment routing packet forwarding; S3, encapsulates the route measurement TLV in the segment routing link table option to support network fault management and performance measurement; S4, when forwarding data, encapsulates the segment routing header and IPv4 header outside the data message; S5: Perform segment routing message forwarding processing.
[0024] When designing the segment identification space of segment routing and defining the segment identification type in step S1 of this embodiment, the segment identification space of segment routing is independent of the address space of IPv4, and the segment identification SID of segment routing is a 32-bit unsigned integer and does not carry parameter information. The segment identification SID itself does not have a routing function, and is not in the same addressing space as the IP address or the node unique identity, and needs to be mapped and converted before the routing addressing function can be realized.
[0025] When designing the segment identification space of the segment routing and defining the segment identification type in step S1 of this embodiment, the defined segment identification types include two segment identification types, namely, End SID and End.X SID, wherein: the instruction action executed by the node under the End SID segment identification type is to reduce the value of the number of remaining segments by 1, and update the IPv4 address corresponding to the next segment identification SID in the segment routing chain table option to the destination address field of the IPv4 message header according to the remaining number of segments, and then look up the table for forwarding; the instruction action executed by the node under the End.X SID segment identification type is to reduce the value of the number of remaining segments by 1, and update the IPv4 address corresponding to the next segment identification SID in the segment routing chain table option to the destination address field of the IPv4 message header according to the remaining number of segments, and then forward the message according to the specified outbound interface.
[0026] like Figure 2 As shown, in step S2 of this embodiment, when the IPv4 message header is extended to add the segment routing linked list option field to support segment routing message forwarding, the segment routing linked list option field added to the IPv4 message header includes: the next message header, the segment routing linked list option length, the linked list option type, the number of remaining segments, the total number of segments, the flag bit, the label, the segment list and the optional TLV field, wherein: The next header field is 1 byte long and identifies the type of the linked list option or header that follows the segment routing linked list option. The length of the segment routing chain table option length field is 1 byte, which identifies the segment routing chain table option length in 4-byte units, but does not include the first 8 bytes of the segment routing chain table option; The length of the linked list option type field is 1 byte, identifying the segment routing linked list type, and is fixed to 0x01; The field length of the number of remaining segments is 1 byte, indicating the number of intermediate nodes that should still be visited before reaching the destination node; The field length of the total number of segments is 1 byte, indicating the index of the last element in the segment list for identifying the number of segments, where the index of the element starts from zero; The flag field length is 1 byte, indicating the identification of the data packet; in this embodiment, bits 2-7 are reserved, indicating that they are not used and are for future use, and must be "0" when transmitted and ignored when received. Bits 0-1 refer to the unified SID and can represent different identification lengths for backward compatible extensions; The tag field is 1 byte long and identifies the same group of packets. When the source does not use the tag, it must be set to "0" during transmission. When the tag is not used during segment routing header processing, the tag should be ignored; The segment list field is 4 bytes long and identifies the segment identifier SID of a segment in the segment routing. Segment List [i] represents the i-th segment in the segment list, 0≤i≤n. The segment list is encoded starting from the last segment of the segment routing policy, so that the first element in the segment list (Segment List [0]) contains the last segment of the segment routing policy, the second element contains the second to last segment of the segment routing policy, and so on. The length of the optional TLV field is variable. The TLV provides metadata for segment processing. The TLV exists only when the segment routing link table option length is greater than the total number of segments + 1.
[0027] In step S3 of this embodiment, the route measurement TLV is encapsulated in the segment routing linked list option to support network fault management and performance measurement. The route measurement TLV will only be processed by the segment node specified in the linked list option, supporting the operation and maintenance personnel to select specific nodes with specific route measurement capabilities to perform route measurement operations based on the network node capabilities. Figure 3 As shown, in step S3 of this embodiment, the fields of the TLV encapsulated in the segment routing link table option for the route measurement include type, length, measurement type, reserved, measurement data length, flag, remaining length, flow ID, flow message sequence and measurement data, a total of 10 fields, where: The type field is 1 byte long, indicating the TLV type, and the type number is 0x01; The length field is 1 byte long, indicating the length of the TLV data, but excluding the type and length fields; The field length of the measurement type is 3 bytes, which is used to describe the data type collected, including node identification, receiving message interface index, sending message interface index, and message processing time in the device. In this embodiment, the assignment and type are as follows: a) 0x01: node identification (IP address), corresponding to the measurement data length of 4 bytes; b) 0x02: receiving message interface index, corresponding to the measurement data length of 4 bytes; c) 0x04: sending message interface index, corresponding to the measurement data length of 4 bytes; d) 0x08: message processing time in the device, corresponding to the measurement data length of 4 bytes; The reserved field length is 1 byte, the reserved field is set to "all 0" by default; The field length of the measurement data length is 5 bits, which defines the length of the data carried by the measurement option; The flag field is 4 bits long and defines a series of flag bits to indicate additional operations beyond data collection; The remaining length field is 7 bits long and is used to indicate the remaining data carrying space. When the remaining length is 0, network nodes are not allowed to insert new data. The flow ID field is 4 bytes long and is an optional field. It is generated by the first-hop node of the measurement domain and encapsulated in the instruction header to uniquely identify the measured flow information. The field length of the flow message sequence number is 4 bytes. It is an optional field. It is generated by the first hop node in the measurement domain and encapsulated in the instruction header. The number starts from 0. Each time a message is sent, the sequence number increases by 1. It is used to mark the message order of the monitoring flow. The field length of the measurement data is variable, indicating the specific data of the road measurement. It is arranged in sequence according to the data collection type and sequence indicated by the measurement type field, and can be expressed as measurement data [n].
[0028] In step S4 of this embodiment, when forwarding data, the segment routing header and the IPv4 header are respectively encapsulated outside the data message, which means that the IPv4 header with the segment routing list option is encapsulated outside the data message, so that the encapsulated data packet consists of two parts: the data part and the IPv4 header with the extended segment routing list option. The format of the segment routing message is as follows: Figure 4 shown.
[0029] When the segment routing message forwarding process is performed in step S5 of this embodiment, segment routing defines three types of segment routing nodes, namely, the segment routing source node that generates the segment routing message; the segment routing transmission node that forwards the segment routing message but does not perform segment routing processing; and the segment routing end node that receives and processes the segment routing message. First, the segment routing source node inserts the segment routing linked list option into the IP message header, encapsulates the path information into the segment routing linked list option, and copies the IP address corresponding to the segment list [n] to the destination address of the IP message header, and then searches the IPv4 forwarding table to forward the segment routing message. If the message arrives at the transmission node, the transmission node parses the destination address after receiving the segment routing message, searches the IPv4 forwarding table for forwarding; if the message arrives at the segment routing end node, the node searches the local segment identifier according to the segment list [i], executes the corresponding instruction action, updates the destination address field, forwards the segment routing message, and performs corresponding processing according to the TLV in the segment routing linked list option. When the message arrives at the segment routing end node indicated by segment list [0], the node searches for the local segment identifier according to segment list [0], decapsulates the message, removes the outer IPv4 message header and segment routing list options, forwards the inner IPv4 message according to the instruction action, and finally sends the message to the destination host. Figure 5 As shown, the segment routing message forwarding process in this embodiment includes: S5.1, the segment routing source node inserts the segment routing linked list option in the IP message header, and encapsulates the path information into the segment routing linked list option; S5.2, the segment routing source node copies the IP address corresponding to the n+1th segment list [n] to the destination address of the IP message header, and then searches the IPv4 forwarding table to forward the segment routing message; S5.3, if the next hop of the received segment routing message is the segment routing end node, jump to step S5.4; otherwise, if the next hop of the received segment routing message is the segment routing transmission node, then after receiving the segment routing message, the segment routing transmission node searches the IPv4 forwarding table based on the destination address and forwards the message. Send to the next hop and jump to step S5.3; S5.4, the segment routing end node searches for the local segment identifier according to the i+1th segment list [i], executes the corresponding instruction action, updates the destination address field, forwards the segment routing message, and performs corresponding processing according to the TLV in the segment routing list option; S5.5, determines whether i is equal to 0, if not, jump to step S5.4; otherwise, jump to step S5.6; S5.6, the segment routing end node searches for the local segment identifier according to the first segment list [0], decapsulates the message, removes the outer IPv4 message and the segment routing list option, forwards the inner IPv4 message, and finally sends the message to the destination host, ends and exits.
[0030] When 0﹤i﹤n, if the instruction action is End, the node corresponding to segment list [i-1] updates the remaining segment list -1, the IP address corresponding to the segment identifier in segment list [i-1] to the destination address in the IPv4 message header, and then searches the IPv4 forwarding table to forward the segment routing message; if the instruction action is End.X, the node corresponding to segment list [i-1] updates the remaining segment list -1, the IP address corresponding to the segment identifier in segment list [i-1] to the destination address in the IPv4 message header, and directly forwards the segment routing message to the adjacent router bound to End.X. When i=0, if the instruction action is End.X, the segment routing end node corresponding to segment list [0] decapsulates the message, removes the segment routing linked list option, and forwards the message to the specified IPv4 Layer 3 neighbor; if the instruction action is End, the segment routing end node corresponding to segment list [0] decapsulates the message, removes the segment routing linked list option, and searches the IPv4 forwarding table for forwarding.
[0031] In summary, in order to solve the problem that the existing network routing strategy is limited and it is difficult to accurately measure network performance, the technical solution adopted by the segment routing data forwarding method based on address mapping in this embodiment includes: designing an independent segment identification space and defining two segment identification types to avoid the problem of limited IPv4 address space and poor flexibility in segment identification allocation; extending the segment routing linked list option in the IPv4 message header to support segment routing forwarding; encapsulating the route measurement TLV in the segment routing linked list option to support route network measurement; and performing message forwarding processing after encapsulating the segment routing message. The segment routing data forwarding method based on address mapping in this embodiment solves the problem that the existing network routing strategy is limited and it is difficult to accurately measure network performance by extending the segment routing linked list option in the IPv4 message header and carrying the route measurement TLV. The segment routing data forwarding method based on address mapping in this embodiment can expand the routing strategy, realize segment routing forwarding compatible with IPv4 networks, improve the accuracy of network performance measurement, and reduce the difficulty of network operation and maintenance.
[0032] In addition, this embodiment also provides a segment routing data forwarding system based on address mapping, including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the segment routing data forwarding method based on address mapping.
[0033] In addition, this embodiment also provides a computer-readable storage medium, in which a computer program or instruction is stored. The computer program or instruction is programmed or configured to execute the segment routing data forwarding method based on address mapping through a processor.
[0034] In addition, this embodiment also provides a computer program product, including a computer program or instructions, which are programmed or configured to execute the address mapping-based segment routing data forwarding method through a processor.
[0035] Those skilled in the art should understand that the technical solutions provided by the embodiments of the present application may be in the form of methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the process Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0036] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A segment routing data forwarding method based on address mapping, characterized in that: The steps include: S1, design the segment identification space of segment routing and define the segment identification type of segment routing; S2, extends the IPv4 packet header to add a segment routing list option field to support segment routing packet forwarding; S3, encapsulates the route measurement TLV in the segment routing link table option to support network fault management and performance measurement; S4, when forwarding data, encapsulates the segment routing header and IPv4 header outside the data message; S5: Perform segment routing message forwarding processing.
2. The segment routing data forwarding method based on address mapping according to claim 1 is characterized in that: When designing the segment identification space of segment routing and defining the segment identification type in step S1, the segment identification space of segment routing is independent of the address space of IPv4, and the segment identification of segment routing is a 32-bit unsigned integer and does not carry parameter information.
3. The segment routing data forwarding method based on address mapping according to claim 2, characterized in that: When designing the segment identification space of the segment routing and defining the segment identification type in step S1, the defined segment identification types include two segment identification types, namely, End SID and End.X SID. The instruction action executed by the node under the End SID segment identification type is to reduce the value of the number of remaining segments by 1, and update the IPv4 address corresponding to the next segment identification SID in the segment routing chain table option to the destination address field of the IPv4 message header according to the remaining number of segments, and then look up the table for forwarding; the instruction action executed by the node under the End.X SID segment identification type is to reduce the value of the number of remaining segments by 1, and update the IPv4 address corresponding to the next segment identification SID in the segment routing chain table option to the destination address field of the IPv4 message header according to the remaining number of segments, and then forward the message according to the specified outbound interface.
4. The segment routing data forwarding method based on address mapping according to claim 1 is characterized in that: When the segment routing linked list option field is extended to the IPv4 message header in step S2 to support segment routing message forwarding, the segment routing linked list option field extended to the IPv4 message header includes: the next message header, the segment routing linked list option length, the linked list option type, the remaining number of segments, the total number of segments, the flag bit, the label, the segment list and the optional TLV field, wherein: the field length of the next message header is 1 byte, which identifies the type of the linked list option or message header immediately following the segment routing linked list option; the field length of the segment routing linked list option length is 1 byte, which identifies the segment routing linked list option length, in units of 4 bytes, but does not include the first 8 bytes of the segment routing linked list option; the field length of the linked list option type is 1 byte, which identifies the segment routing linked list type, which is fixed to 0x01; the field length of the remaining number of segments is 1 byte, which identifies the number of intermediate nodes that should still be visited before reaching the destination node; the field length of the total number of segments is 1 byte, which identifies the number of intermediate nodes that should still be visited before reaching the destination node; the field length of the total number of segments is 1 byte, which identifies the number of intermediate nodes that should still be visited before reaching the destination node; the field length of the total number of segments is 1 byte, which identifies the number of intermediate nodes that should still be visited before reaching the destination node; the field length of the segment routing linked list option length ... The segment length is 1 byte, indicating the index of the last element in the segment list for identifying the number of segments, where the index of the element starts from zero; the flag field is 1 byte long, indicating the identification of the data packet; the label field is 1 byte long, identifying the same group of data packets, when the source does not use the label, it must be set to "0" during transmission, when the label is not used during the segment routing header processing, the label should be ignored; the segment list field is 4 bytes long, identifying the segment identifier SID of a segment in the segment routing, segment list [i] represents the i-th segment of the segment list, 0≤i≤n, the segment list is encoded from the last segment of the segment routing policy, so that the first element in the segment list contains the last segment of the segment routing policy, the second element contains the second to last segment of the segment routing policy, and so on; the optional TLV field has a variable field length, TLV provides metadata for segment processing, and TLV only exists when the segment routing link list option length is greater than the total number of segments + 1.
5. The segment routing data forwarding method based on address mapping according to claim 1, characterized in that: In step S3, the fields of the TLV for encapsulating the route measurement in the segment routing chain table option include type, length, measurement type, reserved, measurement data length, flag, remaining length, flow ID, flow message sequence and measurement data, wherein: the field length of the type is 1 byte, indicating the TLV type, and the type number is 0x01; the field length of the length is 1 byte, indicating the TLV data length, but excluding the two fields of type and length; the field length of the measurement type is 3 bytes, which is used to describe the data type collected, including node identification, receiving message interface index, sending message interface index, and message processing time in the device; the reserved field length is 1 byte, which is a reserved field, and the default setting is "all 0"; the field length of the measurement data length is 5 bits, which defines the data length carried by the measurement option; the flag The field length is 4 bits, which defines a series of flag bits to indicate additional operations other than data collection; the field length of the remaining length is 7 bits, which is used to indicate the remaining data carrying space. When the remaining length is 0, the network node is not allowed to insert new data; the field length of the flow ID is 4 bytes, which is an optional field. It is generated by the first hop node in the measurement domain and encapsulated in the instruction header to uniquely identify the measured flow information; the field length of the flow message sequence number is 4 bytes, which is an optional field. It is generated by the first hop node in the measurement domain and encapsulated in the instruction header. It starts counting from 0. Each time a message is sent, the sequence number is increased by 1 to mark the message sequence of the monitored flow; the field length of the measurement data is variable, indicating the specific data of the route measurement, which is arranged in sequence according to the data collection type and sequence indicated by the measurement type field.
6. The segment routing data forwarding method based on address mapping according to claim 1, characterized in that: In step S4, when data is forwarded, an IPv4 header with the segment routing list option is encapsulated outside the data message, so that the encapsulated data packet consists of two parts: a data part and an IPv4 header with the extended segment routing list option.
7. The segment routing data forwarding method based on address mapping according to claim 1, characterized in that: When the segment routing message forwarding process is performed in step S5, segment routing defines three types of segment routing nodes, namely, a segment routing source node that generates a segment routing message; a segment routing transmission node that forwards the segment routing message but does not perform segment routing processing; A segment routing end node receives and processes a segment routing message, and the segment routing message forwarding process includes: S5.1, the segment routing source node inserts a segment routing linked list option in the IP message header, and encapsulates the path information into the segment routing linked list option; S5.2, the segment routing source node copies the IP address corresponding to the n+1th segment list [n] to the destination address of the IP message header, and then searches the IPv4 forwarding table to forward the segment routing message; S5.3, if the next hop of the received segment routing message is the segment routing end node, then jump to step S5.4; otherwise, if the next hop of the received segment routing message is the segment routing transmission node, then the segment routing transmission node forwards the destination address after receiving the segment routing message. The line is parsed, the IPv4 forwarding table is searched and forwarded to the next hop, and the step S5.3 is jumped; S5.4, the segment routing end node searches for the local segment identifier according to the i+1th segment list [i], executes the corresponding instruction action, updates the destination address field, forwards the segment routing message, and performs corresponding processing according to the TLV in the segment routing linked list option; S5.5, determines whether i is equal to 0, if not, jumps to step S5.4; otherwise, jumps to step S5.6; S5.6, the segment routing end node searches for the local segment identifier according to the first segment list [0], decapsulates the message, removes the segment routing linked list option, forwards the IPv4 message, and finally sends the message to the destination host, ends and exits.
8. A segment routing data forwarding system based on address mapping, comprising a microprocessor and a memory connected to each other, characterized in that: The microprocessor is programmed or configured to execute the segment routing data forwarding method based on address mapping as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program or instruction stored therein, characterized in that: The computer program or instruction is programmed or configured to execute the segment routing data forwarding method based on address mapping according to any one of claims 1 to 7 through a processor.
10. A computer program product comprising a computer program or instructions, characterized in that The computer program or instruction is programmed or configured to execute the segment routing data forwarding method based on address mapping according to any one of claims 1 to 7 through a processor.
Citation Information
Patent Citations
Segment routing extension message forwarding method
CN114050996A
Segment routing processing method, processing apparatus and sending apparatus
WO2016115850A1
Method and apparatus for encapsulating extension header of ipv6 packet
WO2022078509A1
Time delay measurement method and apparatus based on srv6 sid
WO2022117092A1
Performance measurement in a segment routing network
WO2022132208A1