Data packet processing method and device, equipment, medium and product
By extending fields in the segmented routing header to carry in-band traffic information and generating target segmented routing protocols, it solves the complex problem of INT detection deployment under IPv6, and realizes real-time detection and lightweight specified path detection capabilities.
Patent Information
- Application Number
- CN202411823108.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-28
AI Technical Summary
Under the IPv6 protocol stack, INT detection deployment is relatively complicated, which affects the detection effect of INT, especially the compatibility of old equipment and different device mechanisms is difficult to achieve.
By extending the extensible fields of the segmented routing header, carrying in-band traffic information, generating the extended target segmented routing protocol, and forwarding the data packet to the next hop device node according to the protocol, real-time detection of INT is realized.
The deployment of INT detection is simplified, the real-time detection effect of INT is ensured, and it is suitable for different devices and protocol stacks, especially in IPv6 environments, providing lightweight specified path detection capabilities.
Smart Images

Figure CN119728540A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, equipment, medium and product for processing a data packet. Background Art
[0002] High-speed networks have the ability to optimize transmission paths and control congestion. To achieve transmission path optimization and congestion control, real-time detection of traffic forwarding paths and forwarding quality is required. At present, the main method is to introduce in-band network telemetry (INT) into high-speed networks for network monitoring. INT is based on the in-band flow analyzer (IFA) protocol and can monitor the ingress and egress ports of each device on the packet forwarding path, the timestamp information and residence time of the ingress and egress devices, and the congestion information of the queue.
[0003] At present, in order to realize the collection of IFA information under the IPv6 protocol stack, the software and hardware of network devices need to redefine the mechanism. Different network devices may have different corresponding mechanisms, and some old network devices are difficult to support the IFA protocol. This makes INT detection deployment more complicated and affects the detection effect of INT. Summary of the invention
[0004] In view of this, the present disclosure provides a data packet processing method, apparatus, device, medium and product to solve the problem of complicated INT detection deployment.
[0005] In a first aspect, the present disclosure provides a method for processing a data packet, comprising:
[0006] Obtaining in-band traffic information required for forwarding a data packet in a segmented network, wherein the data packet is forwarded in the segmented network based on a segment routing protocol, wherein a segment routing header of the segment routing protocol includes an extensible field;
[0007] Filling the in-band traffic information into the extensible field to obtain an extended target segment routing protocol;
[0008] The data packet is forwarded to the next-hop device node according to the extended target segment routing protocol.
[0009] In a second aspect, the present disclosure provides a data packet processing device, comprising:
[0010] An acquisition module, used for acquiring in-band traffic information required for forwarding a data packet in a segmented network, wherein the data packet is forwarded in the segmented network based on a segment routing protocol, and a segment routing header of the segment routing protocol includes an extensible field;
[0011] An extension module, used for filling the in-band traffic information into the extendable field to obtain an extended target segment routing protocol;
[0012] The forwarding module is used for forwarding the data packet to the next hop device node according to the extended target segment routing protocol.
[0013] In a third aspect, the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for processing data packets of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0014] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for processing a data packet of the first aspect or any corresponding embodiment thereof.
[0015] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, where the computer instructions are used to enable a computer to execute the method for processing a data packet of the first aspect or any corresponding embodiment thereof.
[0016] The data packet processing method, apparatus, device, medium and product provided by the embodiments of the present disclosure forward data packets in a segmented network based on in-band traffic information, and the forwarding of data packets between device nodes is based on a segment routing protocol. By acquiring the in-band traffic information required for data packet forwarding and filling the in-band traffic information into the extensible field in the segment routing header, a target segment routing protocol is generated, and the data packet is forwarded from the current device node to the next-hop device node according to the target segment routing protocol. Thus, by carrying in-band traffic information through extensible fields, it is possible to define in-band traffic information in the segment routing header, thereby achieving real-time detection of INT through forwarding of data packets between device nodes, simplifying the deployment of INT detection, and ensuring the real-time detection effect of INT. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 is a CLOS architecture diagram of a data center according to an embodiment of the present disclosure;
[0019] Figure 2is a schematic diagram of data packet forwarding according to an embodiment of the present disclosure;
[0020] Figure 3 is a flowchart of a method for processing a data packet according to an embodiment of the present disclosure;
[0021] Figure 4 is a schematic diagram of fields of a segment routing header according to an embodiment of the present disclosure;
[0022] Figure 5 is a flowchart of another method for processing a data packet according to an embodiment of the present disclosure;
[0023] Figure 6 is a schematic diagram of an extensible field of a segment routing header according to an embodiment of the present disclosure;
[0024] Figure 7 is a schematic diagram of a segment routing header carrying IFA information according to an embodiment of the present disclosure;
[0025] Figure 8 is a schematic diagram of specifying a forwarding path through a segment routing technology according to an embodiment of the present disclosure;
[0026] Fig. 9 is a structural block diagram of a data packet processing device according to an embodiment of the present disclosure;
[0027] Fig.10 It is a schematic diagram of the hardware structure of the computer device of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0029] With the rapid development of artificial intelligence / machine learning, data-driven reasoning and decision-making and large model training have become the core of application and research. With the rapid development of large models, the scale of data required for model training continues to expand, and data processing, storage and transmission are facing huge challenges. The network scale in the data center (DC) is getting larger and larger, the single port capacity and port density of the equipment are greatly improved, the scale of CLOS architecture is getting larger and larger, and the interconnection links between CLOS layers are becoming more and more dense. Figure 1The coordinated scheduling of data and computing power between DCs also places higher demands on the carrying capacity of Data Center Interconnect (DCI) links and backbone networks.
[0030] The above changes in demand require upgrading network equipment and network architecture, and put forward new requirements for network operation and maintenance. That is, large model training requires high-speed networks, and transmission path optimization and congestion control are basic capability requirements of high-speed networks. To achieve transmission path optimization and congestion control, it is necessary to first realize real-time detection of business traffic forwarding paths and forwarding quality, that is, it is necessary to collect more and more comprehensive information from the network in real time, and based on this information, timely discover and warn congestion and trigger optimization actions.
[0031] High-speed networks have the ability to optimize transmission paths and control congestion. To achieve transmission path optimization and congestion control, real-time detection of traffic forwarding paths and forwarding quality is required. At present, the main method is to introduce in-band telemetry technology (INT) into high-speed networks for network monitoring. Specifically, INT is a network monitoring technology that collects data from device nodes. The device nodes actively send the collected data to the collector, providing real-time, high-speed data collection functions to achieve the purpose of monitoring the performance of network devices and network operation. Figure 2 As shown, when a data packet is forwarded from device node ser1 to device node ser2, when it passes through device nodes s0, s1 and s0, data collection is achieved by combining the hop-by-hop metadata writing capability.
[0032] INT is based on the Inband Flow Analyzer (IFA) protocol, which can monitor the inbound and outbound ports of each device on the packet forwarding path, the timestamp information and residence time of the inbound and outbound devices, the congestion information of the queue, etc. The current IPv4 protocol number of IFA is 253. In the IPv6 packet header, the NextHdr value of the IFA Header inherits the IPv4 protocol number value, indicating that the next IPv6 header is the IFA Header.
[0033] INT needs to detect the specified transmission path. The current DC network scenario mainly uses the hash algorithm (Hash) of Equal-Cost Multipath Routing (ECMP) to determine the forwarding path of the service traffic. It is difficult to directly construct an INT detection data packet forwarded along the determined path at the source end. There are currently two main ways to detect the forwarding path: one is to construct a detection data packet on demand, using tools such as ping to find service traffic packet loss, and then directly construct a detection data packet according to the five-tuple of the packet loss service traffic; the other is to construct a detection data packet in an always-on manner, by fully monitoring the service traffic in the network and trying a certain range of source ports to traverse all network paths from the source end.
[0034] High-speed network (RDMA) is the main evolution direction of the network, and INT is the main means of high-speed network monitoring and measurement. Currently, under the IPv6 protocol stack, in order to realize the collection of IFA information, the NextHdr of IPv6 is extended to carry the information of IFAHeader. In the assembly of IFA data packets, the IFA header and metadata information should be inserted into the original IPv6 data packets. That is, the software and hardware of network equipment need to redefine some mechanisms and algorithms, add corresponding bits to the data packet to carry IFAHeader and payload information, and for some old network equipment, it is difficult to support the IFA protocol, and corresponding upgrades are required to support the corresponding functions. This makes the deployment of INT detection more complicated, affecting the detection effect of INT.
[0035] Based on this, the disclosed technical solution carries IFA information by extending the Optional-TLV (Type Length Value) of the Segment Routing Header (SRH), and directly constructs a detection data packet flowing through the specified path at the source end through the arrangement of the segment identifier list (Segment List), so that the detection traffic flows directly through the specified transmission path. As a result, under the IPv6 protocol stack, the INT capability with specified path detection can be lightweight. As long as the device node can support SRv6 capabilities, the corresponding functions can be implemented, and the IFA information carried by the Optional TLV field can be sent to the control server for reading and analysis.
[0036] According to an embodiment of the present disclosure, an embodiment of a method for processing a data packet is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0037] In this embodiment, a method for processing a data packet is provided, which can be used in computer devices, such as computer servers, etc. Figure 3 is a flowchart of a method for processing a data packet according to an embodiment of the present disclosure, such as Figure 3 As shown, the process includes the following steps:
[0038] Step S101, obtaining in-band traffic information required for forwarding data packets in a segmented network.
[0039] The data packet is forwarded in the segmented network based on a segment routing protocol, and the segment routing header of the segment routing protocol includes an extensible field.
[0040] In-band traffic information (i.e., IFA information) indicates the relevant information of the network interface required for the data packet to be transmitted from the current device node to the next device node. Specifically, it may include device input and output ports, port numbers, port utilization, data packet counts, received data packet timestamps, sent data packet timestamps, data packet residence time, data packet forwarding counts, etc.
[0041] Specifically, the in-band traffic information is pre-set and can be configured according to the operating system, network environment and programming language. When forwarding data packets, the forwarding configuration information of the device node in the segmented network can be parsed to obtain the IFA information required for the device node to forward the data packet.
[0042] The Segment Routing (SR) protocol is a forwarding mechanism based on the Source Routing (Sourcing Routing) protocol. SR divides the network path into segments and assigns SIDs (Segment IDs) to these segments and network nodes. A specified forwarding path is obtained by arranging the SIDs in order (Segment List).
[0043] The segment routing protocol is used to support the forwarding of data packets in the segmented network. The segment routing protocol has a corresponding segment routing header to determine the next hop device node corresponding to the data packet through the information carried in the header. An extensible field is set in the segment routing header, which is used to define the IFA information required to forward the data packet.
[0044] In a specific example, take the segment routing protocol SRv6 as an example. SRv6 is built on the basis of IPv6 and has a larger address space and an improved header format, which has better scalability and flexibility. SRv6 allows source routing, that is, the source node (for example, a router or host) can specify the path that a data packet should take in the network by including a series of segments in the packet header, and each segment represents a specific function or node in the network. SRv6 allows specific paths and services to be defined by specifying a sequence of segments in the packet header, which can simplify network configuration and service deployment. SRv6 can also be used for traffic engineering to guide traffic along the required path to optimize network resource utilization. SRv6 can also implement end-to-end network services such as network slicing and network function chaining by specifying the required segments in the packet header. SRv6 also supports network slicing, that is, creating isolated virtual network parts within the physical network infrastructure to provide customized services for different customers or applications. SRv6 can also be deployed gradually in existing networks, allowing a smooth transition from traditional routing protocols to SRv6 without interfering with network operations.
[0045] Specifically, the Segment Routing Header (SRH) of the SRv6 protocol is provided with an Optional Type Length Value (Optional-TLV) field of variable length, such as Figure 4As shown, the Optional-TLV field is determined as an extensible field, and the value of the type field in the Optional-TLV field is defined to indicate that the information carried by the Optional-TLV is IFA information. The segment routing header of the SRv6 protocol is also provided with: the next header field (Next header), which is used to specify the type of the next header following the SRv6 header, and its value is a protocol number, which is used to indicate the type of subsequent data; the header extension length (Hdr Ext Len), which is used to indicate the length of the extended part of the SRv6 header, in units of 8 bytes. The length of the header extension is determined by this field so that the subsequent header and data can be correctly parsed; the routing type (Routing Type) identifies the type of the SRv6 header, and its value indicates different routing functions or operations. Here, the value can be 4; the last entry (Last Entry), which is used to indicate the last segment in the current SRv6 path to determine the end position of the path; the flag bit (Flags): used to indicate the characteristics, processing mode or other related information of the path; the tag (Tag), an optional field, is used to carry specific label or identification information for marking, classification or other purposes in path processing; the segment identification list (Segment List), which is used to specify the forwarding path of the data packet; the remaining field (Segment Left), which is used to indicate the position of the data packet on the specified forwarding path.
[0046] Step S102, filling the in-band traffic information into the extensible field to obtain an extended target segment routing protocol.
[0047] The extensible field in the segment routing header is parsed to determine the format of the extensible field and the location of the extensible field in the data structure of the segment routing header. As described above, in combination with the forwarding mechanism of the data packet, the in-band traffic information that needs to be filled in the extensible field can be determined. According to the format requirements of the extensible field, the in-band traffic information is formatted and converted so that the in-band traffic information conforms to the format and data type of the extensible field.
[0048] By programming or configuring, the in-band traffic information is filled into the extensible field, specifically including configuring the type, data length and value of the extensible field. Then, the filled extensible field is encapsulated into the segment routing header to form an extended target segment routing protocol.
[0049] Taking the SRv6 protocol as an example, before filling, it is necessary to obtain the specification and field definition of the SRv6 protocol, so as to determine the filling format and filling position of the in-band traffic information in the extensible field according to the specification and field definition.
[0050] It should be noted that in order to ensure the integrity, accuracy and consistency of the data, relevant specifications and conventions must be followed when filling in extensible fields, for example, the value of the Type field must be determined according to RFC8754 and the unified allocation of IANA (The Internet Assigned Numbers Authority).
[0051] Step S103: forwarding the data packet to the next-hop device node according to the extended target segment routing protocol.
[0052] The extended target segment routing protocol is used to transmit data packets between device nodes. When the data packet arrives at a device node, the segment routing header of the extended target segment routing protocol is parsed, the destination address of the next-hop device node is extracted from the segment routing header, and the data packet is transmitted from the current device node to the next-hop device node according to the destination address.
[0053] The data packet processing method provided in this embodiment is that the data packet is forwarded based on the in-band traffic information in the segmented network, and the forwarding of the data packet between the device nodes is based on the segment routing protocol. By obtaining the in-band traffic information required for data packet forwarding, and filling the in-band traffic information into the extensible field in the segment routing header, a target segment routing protocol is generated, and the data packet is forwarded from the current device node to the next-hop device node according to the target segment routing protocol. Therefore, by carrying the in-band traffic information through the extensible field, it is possible to define the in-band traffic information in the segment routing header, thereby realizing the real-time detection of INT through the forwarding of data packets between device nodes, simplifying the deployment of INT detection, and ensuring the real-time detection effect of INT.
[0054] In this embodiment, a method for processing a data packet is provided, which can be used in computer devices, such as computers, servers, etc. Figure 5 is a flowchart of a method for processing a data packet according to an embodiment of the present disclosure, such as Figure 5 As shown, the process includes the following steps:
[0055] Step S201, obtaining in-band traffic information required for forwarding a data packet in a segmented network. The data packet is forwarded in the segmented network based on a segment routing protocol, and the segment routing header of the segment routing protocol includes an extensible field. For details, see Figure 3 Step S101 of the illustrated embodiment will not be described in detail here.
[0056] Step S202, filling the in-band traffic information into the extensible field to obtain an extended target segment routing protocol.
[0057] Specifically, the extensible field includes a type field, a length field, and a variable-length value field, such as Figure 6Accordingly, the above step S202 includes:
[0058] Step S2021, fill the type field with a preset type value, and fill the length field with a determined length value, wherein the length value is determined based on the data length of the value field.
[0059] The type value is used to indicate that the information carried by the extensible field is IFA information. The type value is a predefined value. After the type value is defined, fill the type value into the location of the type field, such as Figure 7 shown.
[0060] Specifically, the value of Type needs to be determined in conjunction with the provisions of RFC8754 on the value of the Type field: the highest bit (bit 0) of the Type field of the extensible field specifies whether the data of this type can be changed during the process of reaching the destination address of the data packet. Among them, the highest bit is 0, which means that the data will not be changed during the transmission to the destination address; the highest bit is 1, which means that the data will be changed during the transmission to the destination address.
[0061] Taking the header SRH of the SRv6 protocol as an example, since the IFA information needs to be added to the segment routing header hop by hop, the highest bit should be 1. The extendable field in the SRH has a total of 8 bits, and the highest bit is 1, so the value of the Type field must be ≥ 128. For example, the value here can be 253. The specific value must comply with the unified allocation of IANA (The Internet Assigned Numbers Authority) to meet the standards.
[0062] The length value is used to represent the total length of the value, that is, the length of the variable-length data field in bytes. Specifically, the value of the length field must also comply with the provisions of RFC8754, and can be determined in combination with the length of the value field occupied by the IFA information. Figure 7 As shown, after determining the total byte length of the value of the Value field, the total byte length is filled to the position where the length field is located.
[0063] Step S2022: determining field information corresponding to the in-band traffic information based on the forwarding traffic attribute of the data packet.
[0064] Forwarding traffic attributes are used to characterize the relevant features or parameters required for forwarding data packets in a segmented network. Different network protocols have corresponding in-band traffic information, and different in-band traffic information has its corresponding forwarding traffic attributes. The forwarding traffic attributes of a data packet can be obtained based on the segment routing protocol on which the forwarding data packet is based.
[0065] Specifically, the forwarding traffic attributes may include the source address and destination address of the data packet, the port number, the type of the data packet, the delay of the data packet, the packet loss rate of the data packet, the routing information of the data packet, etc.
[0066] The field information is used to characterize the parameters included in the forwarding traffic attributes. According to the parameters included in the forwarding traffic attributes, the fields corresponding to the parameters can be preset, thereby combining the forwarding traffic attributes to determine the field information required for the current in-band traffic information.
[0067] Step S2023, fill the field information into the variable-length value field.
[0068] The value field is a variable-length field. After determining the field information corresponding to the in-band traffic information, the field information is filled into the position where the value field is located, so as to carry the in-band traffic information through the extensible field of the segment routing header.
[0069] Specifically, Figure 7As shown in the figure, the field information corresponding to the in-band traffic information includes: serial number (SerialNumber), which can be used together with the device serial number (Device ID) to represent the metadata of which device. This field can directly copy the value of the remaining field segment left in the segment routing header; global name space (GlobalName Space, GNS); local name space (Local Name Space, LNS); device serial number (Device ID), with a length of 24 bits; data packet lifetime (IP TTL), with a length of 8 bits; egress port speed (EPS), with a length of 4 bits, with values of 0-10Gbps, 1-25Gbps, 2-40Gbps, 3-50Gbps, 4-100Gbps, 5-200Gbps, 6-400Gbps, 7-800Gbps; congestion status (C), with a length of 2 bits, used to indicate whether the data packet has passed congestion, and can be used together with explicit congestion notification (Explicit Congestion Notification) Notification, ENC) linkage; queue identifier (Queue ID) of the egress port, with a length of 6 bits; timestamp of received data packets (Rx TimestampSeconds), recorded in seconds; egress port number (Egress PortNumber); ingress port number (Ingress PortNumber); egress port utilization (Egress PortUtilization); ingress port utilization (Ingress PortUtilization); egress port packet count (Egress PortDrop Pkt ByteCount), with a length of 32 bits; timestamp of received data packets (Rx TimestampNano Seconds), recorded in nanoseconds; timestamp of sent data packets (Tx TimestampNano Seconds), recorded in nanoseconds; packet residence time (Residence TimeNanoSeconds); queue forwarding packet count (Queue TransmitByte Count); queue depth (Queue Depth); reserved field (Reserved).
[0070] The data packet processing method provided in this embodiment realizes the flexible definition of in-band traffic information in the segment routing header through extensible fields. For device nodes of low versions that do not support the in-band traffic information protocol, as long as the device nodes can support the segment routing protocol, the in-band traffic information can be carried, thereby improving the scalability of the segment routing protocol.
[0071] In some optional implementations, the above method further includes:
[0072] Step a1, obtaining the designated forwarding path of the data packet.
[0073] Step a2, determining the segment identifier of each device node in the specified forwarding path.
[0074] Step a3: fill the segment identifier into the segment routing header, and generate a segment identifier list field in the segment routing header.
[0075] The specified forwarding path is used to specify the device nodes that the data packet passes through during forwarding. The segment identifier is used to uniquely identify each device node. Different device nodes have different segment identifiers.
[0076] Specifically, segment identifiers are usually divided into two categories: Adjacency SID (AS) and Prefix SID (PS). AS is suitable for specifying detailed paths, while PS is suitable for load balancing and best-effort forwarding. Node SID (NS) is a special PS that is associated with a device node (such as a router) and is used to identify a specific node where a data packet should arrive.
[0077] like Figure 8 The scenario shown in the figure specifies the forwarding path through segment routing technology. In a segmented network, all routers (i.e., device nodes) are set with segment identifiers. In the network topology, the solid color link is a 100G link, and the virtual color link is a 10G link. If a specific service traffic needs to be forwarded from router A to router B, and a large bandwidth support exceeding the 100G bandwidth capacity is required, then the segment identifier list composed of NS can be used to specify the path shown by the arrow in the figure. Forwarding traffic through this path can meet this service requirement.
[0078] In the network architecture of large-scale data centers, there are a large number of links between two adjacent hierarchical devices, and the segment identifier list formed by NS cannot completely determine the port of the forwarding path. In order to construct a specified forwarding path accurate to the port level, AS (that is, the IP address of the device port, such as IPv6 address) is used to construct the segment identifier list.
[0079] The segment routing header includes a field for setting segment identifiers. After determining the segment identifiers in the specified forwarding path, each segment identifier is filled in the corresponding position in the segment routing header to obtain a segment identifier list field composed of each segment identifier. Figure 4 As shown, Segment List[0] to Segment List[n] are segment identification list fields, and the segment identification list field is constructed using a 128-bit IPv6 address to implement the construction of a data packet for specifying a path detection at a source port.
[0080] The data packet processing method provided in this embodiment fills the segment identifier of each device node in the specified forwarding path in the segment routing header to construct a segment identifier list field in the segment routing header, so that a specified forwarding path accurate to the device node port level can be constructed in the segment routing header, and a detection data packet of the specified forwarding path is constructed at the source port, thereby realizing lightweight specified path forwarding and real-time detection of the specified forwarding path.
[0081] In some optional implementations, the method further includes: compressing the segment identification list field in the segment routing header to obtain a compressed segment routing header.
[0082] Since a header that is too long will affect the forwarding efficiency of the data packet, resulting in a decrease in the forwarding efficiency of the data packet, after completing the construction of the segment identifier list field, the segment indicator list field can be compressed using a compression algorithm to reduce the length of the header.
[0083] Specifically, it is possible to detect whether there are repeated segments in the segment identification list field. If there are repeated segments, the repeated segments in the segment identification list field are compressed using a repeated segment compression method (such as G-SRv6) to reduce the length of the header. Of course, it is also possible to consider removing the repeated segments to reduce the size of the header.
[0084] As an optional implementation, an index or mapping table may be created to map the segment identifiers in the segment identifier list to smaller index values, so that only the index values are transmitted in the header instead of the complete segment identifiers. The device node receiving the data packet may restore the original segment identifier list through the index table.
[0085] For the segment routing header, an identifier (such as SRv6 uSID) identifying a specific path may be used to specify the segment identifier column of the path detection packet to ensure that the data packet is transmitted along the specified path.
[0086] It should be noted that since compression processing may have a certain impact on the processing and forwarding performance of data packets, in actual applications, the compression effect and data packet transmission performance can be weighed for testing and optimization to find the most suitable compression method and parameters.
[0087] The data packet processing method provided in this embodiment reduces the length of the segment routing header by compressing the segment identification list field in the segment routing header, thereby preventing the header from being too long and affecting the forwarding efficiency of the data packet.
[0088] Step S203: forwarding the data packet to the next-hop device node according to the extended target segment routing protocol.
[0089] Specifically, the above step S203 includes:
[0090] Step S2031, determining the destination address of the next hop device node of the data packet based on the segment identification list field in the extended target segment routing protocol.
[0091] The segment routing header of the extended target segment routing protocol carries the IFA information and segment identification list corresponding to the data packet. As mentioned above, the segment identification list field in the segment routing header is constructed based on the IP address of the device node. The forwarding parameters of the data packet can be clarified through the IFA information, and the next-hop device node of the data packet and the IP address of the next-hop device node can be clarified through the segment identification list. The IP address is the next-hop destination address of the data packet forwarding.
[0092] Step S2032: forward the data packet to the next hop device node according to the destination address.
[0093] When the destination address of the next-hop device node is determined, the next-hop device node is used as the forwarding target of the data packet, and the data packet is forwarded from the current device node to the next-hop device node according to the destination address. After the next-hop device node receives the data packet, it will again determine its corresponding next-hop device node based on the segment identifier list field, and repeat in sequence until the data packet reaches the final device node.
[0094] The data packet processing method provided by this embodiment carries both in-band traffic information and segment identification list fields in the target segment routing protocol. The port information of each device node on the data packet forwarding path can be determined through the in-band traffic information. When forwarding the data packet according to the target segment routing protocol, the destination address of the next-hop device node of the data packet can be clarified through the segment identification list field, so that the data packet is forwarded according to the forwarding path constructed by the segment identification list field, thereby constructing a port-level detection data packet at the source port, and realizing the INT capability with designated path detection in a lightweight manner.
[0095] In some optional implementations, the segment routing header further includes a remaining node field, which is used to record the number of device nodes remaining before the data packet reaches the final device node. Accordingly, the above method further includes: during the data packet forwarding process, updating the value of the remaining node field in the segment routing header, the value of the remaining node field being used to characterize the forwarding progress of the data packet.
[0096] During packet forwarding, the Remaining Nodes field in the Segment Routing header ( Figure 4The SegmentLeft shown in the figure is used to characterize the forwarding progress of the data packet. When the data packet enters the segmented network, the remaining nodes field in the segment routing header is initialized to the number of device nodes in the specified forwarding path. As the data packet is forwarded in the segmented network, each device node passed by will update the value of the remaining nodes field. For example, the value of the remaining nodes field is reduced by 1 for each device node passed.
[0097] In some optional implementations, the above method further includes:
[0098] Step b1, obtaining the value of the remaining node field.
[0099] The value of the Remaining Nodes field is used to represent the number of remaining device nodes that the data packet needs to pass through to reach the final device node. When the data packet enters the segmented network for forwarding, the value of the Remaining Nodes field is updated every time it reaches a device node. Every time a data packet reaches a device node, the value of the Remaining Nodes field is determined by parsing the content carried by the segment routing header.
[0100] Step b2: If the value of the remaining node field is the specified value, it is determined that the data packet has completed forwarding.
[0101] The specified value is a pre-set value used to indicate that the data packet has completed forwarding. Whenever a data packet arrives at a device node, the value of the remaining nodes field carried by it can be extracted from the segment routing header to determine whether the value of the remaining nodes field is the specified value. If the value of the remaining nodes field is the specified value, it can be determined that the data packet has completed forwarding.
[0102] Taking setting the specified value to 0 as an example, if the value of the remaining nodes field is greater than 0, the current device node continues to forward the data packet to the next-hop device node; if the value of the remaining nodes field is equal to 0, the current device node is the final destination of the data packet.
[0103] The data packet processing method provided in this embodiment can track the position of the data packet on the specified forwarding path by updating the value of the remaining node field, so as to determine the next forwarding operation of the data packet according to the value of the remaining node field, thereby ensuring that the data packet can be forwarded along the specified path.
[0104] In this embodiment, a data packet processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0105] This embodiment provides a data packet processing device, such as Fig. 9 As shown, including:
[0106] The acquisition module 301 is used to acquire in-band traffic information required for forwarding a data packet in a segmented network. The data packet is forwarded in the segmented network based on a segment routing protocol. The segment routing header of the segment routing protocol includes an extensible field.
[0107] The expansion module 302 is used to fill the in-band traffic information into the expandable field to obtain the expanded target segment routing protocol.
[0108] The forwarding module 303 is used to forward the data packet to the next-hop device node according to the extended target segment routing protocol.
[0109] In some optional implementations, the extensible field includes a type field, a length field, and a value field of variable length. Accordingly, the above-mentioned expansion module 302 includes:
[0110] The first filling unit is used to fill a preset type value into the type field, and fill a determined length value into the length field, where the length value is determined based on the data length of the value field.
[0111] The field determination unit is used to determine the field information corresponding to the in-band flow information based on the flow attribute of the forwarded data packet.
[0112] The second filling unit is used to fill the field information into the variable-length value field.
[0113] In some optional embodiments, the above device further includes:
[0114] The path acquisition module is used to obtain the specified forwarding path of the data packet.
[0115] The address determination module is used to determine the segment identifier of each device node in the specified forwarding path.
[0116] The segment identifier determination module is used to fill the segment identifier into the segment routing header and generate a segment identifier list field in the segment routing header.
[0117] In some optional embodiments, the above device further includes:
[0118] The compression module is used to compress the segment identification list field in the segment routing header to obtain a compressed segment routing header.
[0119] In some optional implementations, the forwarding module 303 includes:
[0120] The destination address determination unit is used to determine the destination address of the next hop device node of the data packet based on the segment identification list field in the extended target segment routing protocol.
[0121] The forwarding unit is used to forward the data packet to the next hop device node according to the destination address.
[0122] In some optional implementations, the segment routing header further includes a remaining node field. Accordingly, the apparatus further includes:
[0123] The updating module is used to update the value of the remaining node field in the segment routing header during the data packet forwarding process, and the value of the remaining node field is used to represent the forwarding progress of the data packet.
[0124] In some optional implementations, the above method further includes:
[0125] The field value acquisition module is used to obtain the values of the remaining node fields.
[0126] The forwarding determination module is used to determine that the data packet has completed forwarding if the value of the remaining node field is a specified value.
[0127] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0128] The data packet processing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0129] The data packet processing device provided in this embodiment forwards the data packet in the segmented network based on the in-band traffic information, and the forwarding of the data packet between the device nodes is based on the segment routing protocol. By obtaining the in-band traffic information required for data packet forwarding, and filling the in-band traffic information into the extensible field in the segment routing header, a target segment routing protocol is generated, and the data packet is forwarded from the current device node to the next-hop device node according to the target segment routing protocol. Therefore, by carrying the in-band traffic information through the extensible field, it is possible to define the in-band traffic information in the segment routing header, thereby realizing the real-time detection of INT through the forwarding of data packets between device nodes, simplifying the deployment of INT detection, and ensuring the real-time detection effect of INT.
[0130] The present disclosure also provides a computer device having the above Fig. 9 The data packet processing device is shown.
[0131] See also Fig.10 , Fig.10 is a schematic diagram of a computer device provided by an optional embodiment of the present disclosure, such as Fig.10 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.10 A processor 10 is taken as an example.
[0132] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0133] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0134] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0135] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0136] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0137] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0138] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0139] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for processing a data packet, characterized in that: The method comprises: Acquire in-band traffic information required for forwarding a data packet in a segmented network, wherein the data packet is forwarded in the segmented network based on a segment routing protocol, wherein a segment routing header of the segment routing protocol includes an extensible field; Filling the in-band traffic information into the extensible field to obtain an extended target segment routing protocol; The data packet is forwarded to a next-hop device node according to the extended target segment routing protocol.
2. The method according to claim 1, characterized in that The extensible field includes a type field, a length field, and a variable-length value field, and filling the in-band traffic information into the extensible field includes: Filling a preset type value into the type field, and filling a determined length value into the length field, wherein the length value is determined based on the data length of the value field; Determining field information corresponding to the in-band traffic information based on the forwarding traffic attribute of the data packet; Fill the variable-length value field with the field information.
3. The method according to claim 2, characterized in that Also includes: Obtaining a designated forwarding path for the data packet; Determining the segment identifier of each device node in the specified forwarding path; The segment identifier is filled into the segment routing header, and a segment identifier list field is generated in the segment routing header.
4. The method according to claim 3, characterized in that Also includes: The segment identification list field in the segment routing header is compressed to obtain the compressed segment routing header.
5. The method according to claim 3, characterized in that: The step of forwarding the data packet to a next-hop device node according to the extended target segment routing protocol includes: Determine the destination address of the next hop device node of the data packet based on the segment identification list field in the extended target segment routing protocol; The data packet is forwarded to the next-hop device node according to the destination address.
6. The method according to any one of claims 1 to 3, characterized in that: The segment routing header includes a remaining nodes field, and the method further includes: During the data packet forwarding process, the value of the remaining nodes field in the segment routing header is updated, and the value of the remaining nodes field is used to represent the forwarding progress of the data packet.
7. The method according to claim 6, characterized in that The method further comprises: Get the value of the remaining node field; If the value of the remaining nodes field is a specified value, it is determined that the data packet has completed forwarding.
8. A data packet processing device, characterized in that: The device comprises: an acquisition module, configured to acquire in-band traffic information required for forwarding a data packet in a segmented network, wherein the data packet is forwarded in the segmented network based on a segment routing protocol, wherein a segment routing header of the segment routing protocol includes an extensible field; An extension module, used to fill the in-band traffic information into the extensible field to obtain an extended target segment routing protocol; A forwarding module is used to forward the data packet to a next-hop device node according to the extended target segment routing protocol.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for processing a data packet according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for processing a data packet according to any one of claims 1 to 7.
11. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the method for processing a data packet according to any one of claims 1 to 7.
Citation Information
Cited By
Virtual data packet transmission method and device, equipment, storage medium and program
CN121396927A
Verification method, device and system for cross-domain segment routing
CN121750540A