A segment routing data forwarding method and system based on address mapping
By designing an independent segment routing segment identification space and extending the segment routing list option in the IPv4 packet header, and encapsulating the route measurement TLV, the flexibility and accuracy issues of segment routing forwarding and performance measurement in IPv4 networks are solved, and flexible segment routing forwarding and accurate performance measurement in IPv4 networks are achieved.
Patent Information
- Application Number
- CN202411916477.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-12-24
AI Technical Summary
Existing technologies have difficulty in implementing flexible and scalable segment routing forwarding and accurate network performance measurement in IPv4 networks, especially due to the limited IPv4 address space and the lack of flexibility in segment identifier allocation.
An independent segment routing segment identifier space is designed, segment identifier types are defined, and the segment routing linked list option field is extended in the IPv4 packet header to encapsulate route-associated measurement TLVs to support segment routing packet forwarding and network fault management.
It realizes flexible segment routing forwarding and accurate network performance measurement in IPv4 networks, solves the problem of limited IPv4 address space, and improves the flexibility of network operation and maintenance and the accuracy of measurement.
Smart Images

Figure CN119996280B_ABST
Abstract
Description
Technical Field
[0001] The present 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] Current methods that rely on network address prefixes and device configuration to determine packet forwarding paths and end-to-end packet monitoring are no longer able to meet the ever-changing communication needs of network applications and the need for 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 into a segment sequence, guiding packet forwarding according to the segment sequence. Segment routing has two encapsulation formats at the forwarding layer: MPLS (SR MPLS) and IPv6 (SRv6). SRv6 inherits the advantages of SR MPLS and also offers unlimited label space, network-wide uniqueness, and reachability from any point. Furthermore, SRv6 can be easily extended based on the existing IPv6 Operations, Administration, and Maintenance (OAM) mechanisms to support fault management and performance measurement. By enabling programmable forwarding capabilities in network protocols, SRv6 can provide network applications with more flexible and diverse routing strategies, improving the quality of service. SRv6, through OAM extensions, can also implement route-associated network measurement. However, SRv6 technology is not compatible with the IPv4 protocol and cannot be used in IPv4 networks. A Chinese patent application with publication number CN114050996A discloses a segment routing extension message forwarding method, which designs an IPv4-oriented segment routing extension 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 an IPv4 network. However, this method uses IPv4 addresses as segment identifiers (SIDs, Segment IDs). On the one hand, the IPv4 address space is limited, and on the other hand, the segment identifier allocation lacks flexibility and scalability. Currently, some private networks use unique identifiers instead of IP addresses for communication. The existing methods are difficult to adapt to the future development needs of networks that are gradually increasing in scale and becoming increasingly complex. How to achieve flexible, scalable, IPv4-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] The technical problem to be solved by the present invention: In response to 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:
[0005] A segment routing data forwarding method based on address mapping comprises the following steps:
[0006] S1, design the segment identification space of segment routing and define the segment identification type of segment routing;
[0007] S2, extends the IPv4 packet header to add a segment routing table option field to support segment routing packet forwarding;
[0008] S3 encapsulates the route measurement TLV (type-length-value) in the segment routing table option to support network fault management and performance measurement;
[0009] S4, when forwarding data, encapsulates the segment routing header and IPv4 header outside the data message;
[0010] S5: Perform segment routing message forwarding processing.
[0011] 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.
[0012] 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 subtract 1 from the value of the remaining number of segments, and based on the remaining number of segments, update the IPv4 address corresponding to the next segment identification SID in the segment routing link table option to the destination address field of the IPv4 message header, 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 subtract 1 from the value of the remaining number of segments, and based on the remaining number of segments, update the IPv4 address corresponding to the next segment identification SID in the segment routing link table option to the destination address field of the IPv4 message header, and then forward the message according to the specified outbound interface.
[0013] Optionally, when the IPv4 header is extended in step S2 to add a segment routing list option field to support segment routing message forwarding, the segment routing list option field added to the IPv4 header includes: the next header, the segment routing list option length, the 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 field length of the next header is 1 byte, which identifies the list option or the type of header immediately following the segment routing list option; the field length of the segment routing list option length is 1 byte, which identifies the length of the segment routing list option, in units of 4 bytes, but does not include the first 8 bytes of the segment routing list option; the field length of the list option type is 1 byte, which identifies the segment routing list type, which is fixed to 0x01; the field length of the number of remaining segments is 1 byte, which identifies 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.
[0014] Optionally, in step S3, the fields of the TLV for encapsulating the route measurement in the segment routing link table option include type, length, measurement type, reserved, measurement data length, flag, remaining length, flow ID, flow message sequence and measurement data, wherein: the type field length is 1 byte, indicating the TLV type, and the type number is 0x01; the length field length is 1 byte, indicating the TLV data length, but excluding the type and length fields; the measurement type field length is 3 bytes, 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, a reserved field, and the default setting is "all 0"; the measurement data length field length is 5 bits, defining the data length carried by the measurement option; flag The flag field is 4 bits long and defines a series of flag bits used 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, the network node is 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 in the measurement domain and encapsulated in the instruction header to uniquely identify the measured flow information. The flow message sequence number field is 4 bytes long and 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 and is incremented by 1 for each message sent. It is used to mark the message sequence of the monitored flow. The measurement data field is of variable length and represents the specific data of the in-path measurement. It is arranged in sequence according to the data collection type and sequence indicated by the measurement type field.
[0015] Optionally, in step S4, encapsulating the segment routing header and IPv4 header outside the data message 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.
[0016] Optionally, when performing 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 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 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 end node, jump to step S5.4; If the hop is a segment routing transmission node, the segment routing transmission node will parse the destination address after receiving the segment routing message, search the IPv4 forwarding table and forward it 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+1 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.
[0017] 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.
[0018] 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 segment routing data forwarding method based on address mapping through a processor.
[0019] In addition, the present invention 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.
[0020] Compared with the prior art, the present invention mainly has the following advantages:
[0021] 1. The segment routing segment identification space designed by the present invention is independent of the IPv4 address space. On the one hand, it avoids the problem of limited IPv4 address space, and on the other hand, it is compatible with private networks that use unique identifiers for communication.
[0022] 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.
[0023] 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
[0024] Figure 1 Schematic diagram of the basic process of the method of the embodiment of the present invention.
[0025] Figure 2 A schematic diagram of the segment routing linked list option message format designed in an embodiment of the present invention.
[0026] Figure 3 A schematic diagram of the message format of the route-associated measurement TLV designed in an embodiment of the present invention.
[0027] Figure 4 Schematic diagram of the segment routing message format in an embodiment of the present invention.
[0028] Figure 5 Schematic diagram of the segment routing data forwarding process in an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The present invention aims to solve the problem of limited existing network routing strategies and difficulty in accurately measuring network performance by extending the segment routing list option in the IPv4 packet 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.
[0030] like Figure 1 As shown, the segment routing data forwarding method based on address mapping in this embodiment includes the following steps:
[0031] S1, design the segment identification space of segment routing and define the segment identification type of segment routing;
[0032] S2, extends the IPv4 packet header to add a segment routing table option field to support segment routing packet forwarding;
[0033] S3, encapsulates the route measurement TLV in the segment routing table option to support network fault management and performance measurement;
[0034] S4, when forwarding data, encapsulates the segment routing header and IPv4 header outside the data message;
[0035] S5: Perform segment routing message forwarding processing.
[0036] In step S1 of this embodiment, when designing the segment routing segment identifier space and defining the segment identifier type, the segment routing segment identifier space is independent of the IPv4 address space. The segment routing segment identifier (SID) is a 32-bit unsigned integer and does not carry parameter information. The segment identifier (SID) itself does not have routing functionality and is not in the same addressing space as the IP address or the node unique identifier. It requires mapping and conversion to implement routing addressing functionality.
[0037] In step S1 of this embodiment, when designing the segment routing segment identifier space and defining the segment identifier types, the defined segment identifier types include two segment identifier types: End SID and End.X SID. The instruction action executed by the node under the End SID segment identifier type is to decrement the value of the remaining number of segments by 1, and update the IPv4 address corresponding to the next segment identifier SID in the segment routing chain table option to the destination address field of the IPv4 packet header based on 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 identifier type is to decrement the value of the remaining number of segments by 1, and update the IPv4 address corresponding to the next segment identifier SID in the segment routing chain table option to the destination address field of the IPv4 packet header based on the remaining number of segments, and then forward the packet based on the specified outbound interface.
[0038] like Figure 2 As shown, in step S2 of this embodiment, when the IPv4 packet header is extended to add the segment routing table option field to support segment routing packet forwarding, the segment routing table option field added to the IPv4 packet header includes: next packet header, segment routing table option length, table option type, number of remaining segments, total number of segments, flag bit, label, segment list and optional TLV field, where:
[0039] 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.
[0040] The segment routing link table option length field is 1 byte long, identifying the segment routing link table option length in 4-byte units, but does not include the first 8 bytes of the segment routing link table option.
[0041] The length of the linked list option type field is 1 byte, identifying the segment routing linked list type, and is fixed to 0x01;
[0042] The field length of the number of remaining segments is 1 byte, which indicates the number of intermediate nodes that should still be visited before reaching the destination node;
[0043] 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;
[0044] The flag field is 1 byte long and indicates the packet's identifier. In this embodiment, bits 2-7 are reserved, indicating unused and for future use. They must be "0" during transmission and are ignored during reception. Bits 0-1 refer to the unified SID and can represent different identifier lengths for backward compatibility and expansion.
[0045] The tag field is 1 byte long and identifies packets in the same group. When the source does not use a tag, it must be set to "0" during transmission. When a tag is not used during segment routing header processing, the tag should be ignored.
[0046] 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.
[0047] The optional TLV field has a variable length. The TLV provides metadata for segment processing and is present only when the segment routing table option length is greater than the total number of segments + 1.
[0048] 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 a specific node with specific route measurement capability 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 encapsulating the route measurement in the segment routing table option include type, length, measurement type, reserved, measurement data length, flag, remaining length, flow ID, flow message sequence and measurement data, totaling 10 fields, among which:
[0049] The type field is 1 byte long and indicates the TLV type. The type number is 0x01.
[0050] The length field is 1 byte long and indicates the length of the TLV data, excluding the type and length fields.
[0051] The measurement type field is 3 bytes long and is used to describe the type of data collected, including four types: node identifier, receiving message interface index, sending message interface index, and message processing time in the device. In this embodiment, the values and types are as follows: a) 0x01: node identifier (IP address), corresponding to a measurement data length of 4 bytes; b) 0x02: receiving message interface index, corresponding to a measurement data length of 4 bytes; c) 0x04: sending message interface index, corresponding to a measurement data length of 4 bytes; d) 0x08: message processing time in the device, corresponding to a measurement data length of 4 bytes;
[0052] The reserved field is 1 byte long and is a reserved field. The default setting is "all 0";
[0053] The measurement data length field is 5 bits long and defines the length of the data carried by the measurement option.
[0054] The flag field is 4 bits long and defines a series of flag bits to indicate additional operations beyond data collection.
[0055] The remaining length field is 7 bits long and 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.
[0056] The flow ID field is 4 bytes long and is optional. 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.
[0057] The flow message sequence number field is 4 bytes long and is optional. It is generated by the first-hop node in the measurement domain and encapsulated in the instruction header. The sequence number starts at 0 and increases by 1 with each message sent. It is used to mark the message order of the monitored flow.
[0058] The length of the measurement data field 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].
[0059] In step S4 of this embodiment, when forwarding data, the segment routing header and the IPv4 header are encapsulated outside the data message respectively, 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.
[0060] When forwarding the segment routing message in step S5 of this embodiment, segment routing defines three types of segment routing nodes: a segment routing source node that generates the segment routing message; a segment routing transmission node that forwards the segment routing message but does not perform segment routing processing; and a segment routing end node that receives and processes the segment routing message. First, the segment routing source node inserts a 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 in the IP message header. It then searches the IPv4 forwarding table and forwards the segment routing message. If the message arrives at a transmission node, the transmission node will parse the destination address after receiving the segment routing message, search the IPv4 forwarding table, and forward it. If the message arrives at a segment routing end node, the node will search the local segment identifier according to the segment list [i], execute the corresponding instruction action, update the destination address field, forward the segment routing message, and perform 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+1 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 it. 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+1 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.
[0061] When 0 < i < n, if the instruction action is End, the node corresponding to segment list [i-1] updates the IP address corresponding to the segment identifier in segment list [i-1] with the remaining segment list -1, 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 IP address corresponding to the segment identifier in segment list [i-1] with the remaining segment list -1, and then 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 to forward the message.
[0062] 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 solutions adopted by the segment routing data forwarding method based on address mapping in this embodiment include: designing an independent segment identifier space and defining two segment identifier types to avoid the problems of limited IPv4 address space and poor flexibility in segment identifier allocation; extending the segment routing table option in the IPv4 message header to support segment routing forwarding; encapsulating the on-path measurement TLV in the segment routing table option to support on-path 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 table option in the IPv4 message header and carrying the on-path 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.
[0063] 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, wherein the microprocessor is programmed or configured to execute the segment routing data forwarding method based on address mapping.
[0064] In addition, this embodiment also provides a computer-readable storage medium, which stores a computer program or instruction. The computer program or instruction is programmed or configured to execute the segment routing data forwarding method based on address mapping through a processor.
[0065] In addition, this embodiment also provides a computer program product, including a computer program or instructions, which are programmed or configured to execute the segment routing data forwarding method based on address mapping through a processor.
[0066] 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 aspects. 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 code. 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 processes and / or boxes in the flowchart and / or block diagram, may be implemented by computer program instructions. These computer program instructions may 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 steps 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 the instruction device, which implements the function 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, thereby providing instructions 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.
[0067] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiment. All technical solutions based on the concept of the present invention are within the scope of protection of the present invention. It should be noted that for those skilled in the art, various improvements and modifications that do not depart from the principles of the present invention should also be considered within the scope of protection 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 table option field to support segment routing packet forwarding; S3, encapsulates the route measurement TLV in the segment routing 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, performing segment routing message forwarding processing; 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; when designing the segment routing segment identifier space and defining the segment identifier type in step S1, the defined segment identifier types include two segment identifier types: End SID and End.X SID. The instruction action executed by the node under the End SID segment identifier type is to subtract 1 from the value of the remaining number of segments, and update the IPv4 address corresponding to the next segment identifier SID in the segment routing chain table option to the destination address field of the IPv4 message header based on 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 identifier type is to subtract 1 from the value of the remaining number of segments, and update the IPv4 address corresponding to the next segment identifier SID in the segment routing chain table option to the destination address field of the IPv4 message header based on the remaining number of segments, and then forward the message according to the specified outbound interface.
2. The segment routing data forwarding method based on address mapping according to claim 1, characterized in that: When the IPv4 message header is extended to add the segment routing chain table option field to support segment routing message forwarding in step S2, the segment routing chain table option field that is extended to add to the IPv4 message header includes: next message header, segment routing chain table option length, chain table option type, remaining number of segments, total number of segments, flag bit, label, segment list and optional TLV field, wherein: the field length of the next message header is 1 byte, which identifies the chain table option or the type of message header that follows the segment routing chain table option; the field length of the segment routing chain table option length is 1 byte, which identifies the segment routing chain table option length, in units of 4 bytes, but does not include the first 8 bytes of the segment routing chain table option; the field length of the chain table option type is 1 byte, which identifies the segment routing chain table 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 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 element index starts from zero; the flag field is 1 byte long, indicating the identification of the packet; the label field is 1 byte long, identifying the same group of packets. When the source does not use a label, it must be set to "0" during transmission. When the label is not used during 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 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 optional TLV field has a variable field length. The TLV provides metadata for segment processing and only exists when the segment routing link list option length is greater than the total number of segments + 1.
3. 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 path measurement encapsulated in the segment routing link table option include type, length, measurement type, reserved, measurement data length, flag, remaining length, flow ID, flow message sequence and measurement data, wherein: the type field length is 1 byte, indicating the TLV type, and the type number is 0x01; the length field length is 1 byte, indicating the TLV data length, but excluding the type and length fields; the measurement type field length is 3 bytes, 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, a reserved field, and the default setting is "all 0"; the measurement data length field length is 5 bits, defining the data length carried by the measurement option; the flag The field is 4 bits long and defines a series of flag bits used to indicate additional operations beyond data collection. The remaining length field is 7 bits long and indicates 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 in the measurement domain and encapsulated in the instruction header to uniquely identify the measured flow information. The flow message sequence number field is 4 bytes long and 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 and increments by 1 with each message sent. It is used to mark the message sequence of the monitored flow. The measurement data field is variable in length and represents the specific data of the path measurement. It is arranged in sequence according to the data collection type and sequence indicated by the measurement type field.
4. 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 table option is encapsulated outside the data packet, so that the encapsulated data packet consists of two parts: the data part and the IPv4 header with the extended segment routing table option.
5. The segment routing data forwarding method based on address mapping according to claim 1, characterized in that: When the segment routing message is forwarded in step S5, segment routing defines three types of segment routing nodes: 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; The segment routing end node 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 list option in the IP message header and encapsulates the path information into the segment routing list option; S5.2, the segment routing source node copies the IP address corresponding to the n+1 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 to; S5.4, the segment routing end node searches for the local segment identifier according to the i+1 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, 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 1st segment list [0], decapsulates the message, removes the segment routing list option, forwards the IPv4 message, and finally sends the message to the destination host, ends and exits.
6. 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 recited in any one of claims 1 to 5.
7. 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 5 through a processor.
8. 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 5 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