Data packet transmission method based on hybrid label protocol stack, gateway equipment and data packet transmission system based on hybrid label protocol stack

By encapsulating multiple protocol tags in a single data packet and generating hybrid control headers, the limitations of data transmission and path control in the existing technology are solved, and efficient and flexible data transmission and network resource utilization are achieved.

CN119728811AActive Publication Date: 2025-03-28PENG CHENG LAB
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411308657.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-03-28
Estimated Expiration
2044-09-19

AI Technical Summary

Technical Problem

The prior art has limitations when dealing with tags in different network domains, making it difficult to achieve efficient data transmission and flexible path control across network technology domains.

Method used

Using a packet transmission method based on a hybrid tag protocol stack, multiple protocol tags are encapsulated in a single data packet, and by generating multiple protocol tags and a hybrid control header, inserting them into the packet structure of the data packet to be transmitted, target data packets are generated, and recovered and forwarded according to the control flag in the second gateway device.

Benefits of technology

It realizes efficient data transmission and flexible path control across different network technology domains, dynamically adapts to changes in the network environment, improves data transmission efficiency and network resource utilization, and enhances the network's adaptability and fault recovery capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728811A_ABST
    Figure CN119728811A_ABST
Patent Text Reader

Abstract

The invention discloses a data packet transmission method based on a hybrid label protocol stack, gateway equipment, a system and a storage medium, the data packet transmission method based on the hybrid label protocol stack is applied to first gateway equipment, and the method comprises the following steps: when a label packaging type corresponding to a to-be-transmitted data packet is a hybrid packaging type, sending the to-be-transmitted data packet to the first gateway equipment; generating a plurality of protocol labels and a hybrid control header, and inserting a message structure of the data packet to generate a target data packet; and transmitting the target data packet to a second gateway device, wherein the second gateway device is used for recovering the target data packet and forwarding the recovered data packet to the terminal device. By means of the mode, multiple protocol labels are packaged in a single data packet, efficient data transmission and flexible path control across different network technical domains are achieved, meanwhile, changes of the network environment can be dynamically adapted, the data transmission efficiency and the utilization rate of network resources are improved, and the self-adaptive capacity and the fault recovery capacity of the network are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a data packet transmission method based on a hybrid label protocol stack, a gateway device, and a data packet transmission system based on a hybrid label protocol stack. Background Art

[0002] In the field of modern network communications, the efficiency and flexibility of data transmission are key indicators for measuring network performance. Currently, the widely used technologies include traditional routing technology, MPLS (Multi-Protocol Label Switching) technology, and SRv6 (Segment Routing over IPv6) technology. Each technology has its own unique advantages, but they also face many limitations and challenges. Traditional routing technology encounters the increase of path complexity in large-scale network environments. As the scale of the network expands, the number of routing table entries grows rapidly, which increases the processing burden of network devices. In addition, traditional routing technology has weak adaptability in dynamic network state changes, fast link fault recovery, and network congestion control, which affects the network service quality. Although MPLS technology can provide fast and efficient forwarding capabilities and support priority management and path control of multiple transmission protocols, its flexibility in fast fault recovery and dynamic service quality adjustment still needs to be improved. SRv6 technology uses the high scalability and low-latency transmission characteristics of IPv6 (Internet Protocol version 6) address space to make up for its shortcomings in dynamic path control, but it also brings complexity in implementation and maintenance. With the rapid growth of IPv6 networks, the evolution of IPv4 networks to IPv6 networks has become an important issue. In the process of network evolution from IPv4 (Internet Protocol version 4) to IPv6, various transition solutions have been proposed to carry IPv4 network service traffic, such as tunnel technology and dual stack technology. However, these solutions still face many technical challenges in the implementation process, including the compatibility of network devices, the complexity of path selection, and the efficient use of network resources.

[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of this application is to provide a data packet transmission method based on a hybrid label protocol stack, a gateway device and a data packet transmission system based on a hybrid label protocol stack, aiming to solve the technical problem of the limitations of network transmission technology in the prior art when processing labels in different network domains.

[0005] To achieve the above object, the present application proposes a data packet transmission method based on a hybrid label protocol stack, the method is applied to a first gateway device, and the data packet transmission method based on the hybrid label protocol stack includes:

[0006] When the label encapsulation type corresponding to the data packet to be transmitted is a mixed encapsulation type, generating multiple protocol labels and a mixed control header;

[0007] Inserting each protocol label and the hybrid control header into the message structure of the data packet to be transmitted to generate a target data packet;

[0008] The target data packet is transmitted to a second gateway device, which is used to restore the target data packet according to a control flag and forward the restored data packet to be transmitted to a terminal device, wherein the control flag is determined according to a mixed control header in the target data packet.

[0009] In one embodiment, the step of inserting each protocol label and the hybrid control header into the message structure of the data packet to be transmitted to generate the target data packet includes:

[0010] Determine an initial Ethernet header and a location of the initial Ethernet header according to the message structure of the data packet to be transmitted;

[0011] Determining a label insertion position according to the position of the initial Ethernet header;

[0012] Inserting each protocol label and the hybrid control header into the message structure of the data packet to be transmitted according to the label insertion position to obtain a first data packet;

[0013] Setting the Ethernet type value in the initial Ethernet header according to the hybrid encapsulation type to obtain a target Ethernet header;

[0014] A target data packet is generated according to the target Ethernet header and the first data packet.

[0015] In one embodiment, the step of transmitting the target data packet to the second gateway device includes:

[0016] The target data packet is sent to an intermediate gateway device, and the intermediate gateway device is used to transmit the target data packet to a second gateway device according to forwarding decision information, wherein the forwarding decision information is obtained after the intermediate gateway device parses the target protocol label, and the target protocol label is determined by the intermediate gateway device according to the label indication field in the hybrid control header, and the hybrid control header is located in the target data packet.

[0017] In one embodiment, when the label encapsulation type corresponding to the data packet to be transmitted is a hybrid encapsulation type, before the step of encapsulating the MLPS label and the second protocol label, the step further includes:

[0018] When the original data packet is obtained, the original data packet is initialized to obtain the data packet to be transmitted;

[0019] The label encapsulation type corresponding to the data packet to be transmitted is determined according to the destination address of the data packet to be transmitted.

[0020] In addition, to achieve the above purpose, the present application proposes a data packet transmission method based on a hybrid label protocol stack, which is applied to a second gateway device. The data packet transmission method based on a hybrid label protocol stack includes:

[0021] When receiving a target data packet transmitted by a first gateway device, determining a data packet type of the target data packet according to a target Ethernet header of the target data packet, the target data packet is generated by the first gateway device inserting multiple protocol labels and a hybrid control header into a message structure of a data packet to be transmitted, and the hybrid control header and each protocol label are generated when a label encapsulation type corresponding to the data packet to be transmitted is a hybrid encapsulation type;

[0022] When the data packet type is a mixed label data packet, recovering the target data packet according to the mixed control header of the target data packet to obtain the data packet to be transmitted;

[0023] The data packet to be transmitted is sent to the terminal device.

[0024] In one embodiment, the step of recovering the target data packet according to the hybrid control header of the target data packet to obtain the data packet to be transmitted includes:

[0025] Extracting information from the mixed control header of the target data packet to obtain a control flag;

[0026] Determine the protocol tag to be removed according to the control flag;

[0027] The protocol label to be removed in the target data packet is removed to obtain a data packet to be transmitted.

[0028] In addition, to achieve the above object, the present application also proposes a first gateway device, the first gateway device comprising:

[0029] A generating module, used for generating a plurality of protocol labels and a mixed control header when the label encapsulation type corresponding to the data packet to be transmitted is a mixed encapsulation type;

[0030] An insertion module, used for inserting each protocol label and the hybrid control header into the message structure of the data packet to be transmitted to generate a target data packet;

[0031] A transmission module is used to transmit the target data packet to a second gateway device, and the second gateway device is used to recover the target data packet according to a control flag and forward the recovered data packet to be transmitted to a terminal device, wherein the control flag is determined according to a mixed control header in the target data packet.

[0032] In addition, to achieve the above object, the present application also proposes a second gateway device, the second gateway device comprising:

[0033] a processing module, configured to determine, upon receiving a target data packet transmitted by a first gateway device, a data packet type of the target data packet according to a target Ethernet header of the target data packet, wherein the target data packet is generated by the first gateway device inserting a plurality of protocol labels and a hybrid control header into a message structure of a data packet to be transmitted, and the hybrid control header and each protocol label are generated when a label encapsulation type corresponding to the data packet to be transmitted is a hybrid encapsulation type;

[0034] A recovery module, used for recovering the target data packet according to the hybrid control header of the target data packet to obtain the data packet to be transmitted when the data packet type is a hybrid label data packet;

[0035] The sending module is used to send the data packet to be transmitted to the terminal device.

[0036] In addition, to achieve the above objectives, the present application also proposes a data packet transmission system based on a hybrid label protocol stack, and the data packet transmission system based on the hybrid label protocol stack includes the first gateway device and the second gateway device as described above.

[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, on which a data packet transmission program based on a hybrid label protocol stack is stored. When the data packet transmission program based on the hybrid label protocol stack is executed by a processor, the data packet transmission method based on the hybrid label protocol stack as described above is implemented.

[0038] The present application provides a data packet transmission method based on a hybrid label protocol stack. The data packet transmission method based on a hybrid label protocol stack of the present application is applied to a first gateway device, and the method includes: when the label encapsulation type corresponding to the data packet to be transmitted is a hybrid encapsulation type, generating multiple protocol labels and hybrid control headers; inserting each protocol label and the hybrid control header into the message structure of the data packet to be transmitted to generate a target data packet; transmitting the target data packet to a second gateway device, the second gateway device is used to restore the target data packet according to a control flag and forward the restored data packet to be transmitted to a terminal device, and the control flag is determined according to the hybrid control header in the target data packet. Through the above method, multiple protocol labels are encapsulated in a single data packet, which realizes efficient data transmission and flexible path control across different network technology domains, and can dynamically adapt to changes in the network environment, improve data transmission efficiency and network resource utilization, and enhance the network's adaptability and fault recovery capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0041] Figure 1 A flow chart of a method for transmitting a data packet based on a hybrid label protocol stack according to an embodiment of the present invention;

[0042] Figure 2 A schematic diagram of the structure of a hybrid label protocol stack for a data packet transmission method based on a hybrid label protocol stack provided in Example 1 of the present application;

[0043] Figure 3 A flow chart of a method for transmitting a data packet based on a hybrid label protocol stack according to the second embodiment of the present invention;

[0044] Figure 4 A brief flowchart of a method for transmitting data packets based on a hybrid label protocol stack provided in Example 2 of the present application;

[0045] Figure 5 A schematic diagram of the encapsulation mechanism flow of the data packet transmission method based on the hybrid label protocol stack provided in the second embodiment of the present application;

[0046] Figure 6A schematic diagram of a processing mechanism flow of a data packet transmission method based on a hybrid label protocol stack provided in Example 2 of the present application;

[0047] Figure 7 A schematic diagram of the decapsulation mechanism flow of the data packet transmission method based on the hybrid label protocol stack provided in the second embodiment of the present application;

[0048] Figure 8 This is a schematic diagram of the module structure of the first gateway device in an embodiment of the present application;

[0049] Fig. 9 This is a schematic diagram of the module structure of the second gateway device in the embodiment of the present application;

[0050] Fig.10 This is a schematic diagram of the device structure of a data packet transmission system based on a hybrid label protocol stack according to an embodiment of the present application.

[0051] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0052] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0053] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0054] The main solution of the embodiment of the present application is: when the label encapsulation type corresponding to the data packet to be transmitted is a hybrid encapsulation type, multiple protocol labels and hybrid control headers are generated; each protocol label and the hybrid control header are inserted into the message structure of the data packet to be transmitted to generate a target data packet; the target data packet is transmitted to a second gateway device, and the second gateway device is used to restore the target data packet according to a control flag and forward the restored data packet to be transmitted to a terminal device, and the control flag is determined according to the hybrid control header in the target data packet.

[0055] Currently, widely used network transmission technologies include traditional routing technology, MPLS (Multi-Protocol Label Switching) technology, and SRv6 (Segment Routing over IPv6) technology. Each technology has its own unique advantages, but they also face many limitations and challenges. Traditional routing technology encounters the increase of path complexity in large-scale network environments. As the scale of the network expands, the number of routing table entries increases rapidly, which increases the processing burden of network devices. In addition, traditional routing technology has weak adaptability in dynamic network state changes, fast link fault recovery, and network congestion control, which affects the network service quality. Although MPLS technology can provide fast and efficient forwarding capabilities and support priority management and path control of multiple transmission protocols, its flexibility in fast fault recovery and dynamic service quality adjustment still needs to be improved. SRv6 technology uses the high scalability and low-latency transmission characteristics of IPv6 (Internet Protocol version 6) address space to make up for its shortcomings in dynamic path control, but it also brings complexity in implementation and maintenance. With the rapid growth of IPv6 networks, the evolution of IPv4 networks to IPv6 networks has become an important issue. In the process of network evolution from IPv4 (Internet Protocol version 4) to IPv6, various transition solutions have been proposed to carry IPv4 network service traffic, such as tunnel technology and dual stack technology. However, these solutions still face many technical challenges in the implementation process, including the compatibility of network devices, the complexity of path selection, and the efficient use of network resources.

[0056] This application achieves efficient data transmission and flexible path control across different network technology domains by encapsulating multiple protocol labels in a single data packet. At the same time, it can dynamically adapt to changes in the network environment, improve data transmission efficiency and utilization of network resources, and enhance the network's adaptability and fault recovery capabilities.

[0057] Based on this, the embodiment of the present application provides a data packet transmission method based on a hybrid label protocol stack, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the method for transmitting data packets based on a hybrid label protocol stack of the present application.

[0058] In this embodiment, the data packet transmission method based on the hybrid label protocol stack is applied to a first gateway device, and the method includes steps S10 to S30:

[0059] Step S10: When the label encapsulation type corresponding to the data packet to be transmitted is a hybrid encapsulation type, a plurality of protocol labels and a hybrid control header are generated.

[0060] The data packet transmission system based on the hybrid label protocol stack of this embodiment includes a first gateway device, a second gateway device and an intermediate gateway device. The first gateway device in the data packet transmission system based on the hybrid label protocol stack is used to encapsulate the original data packet; the intermediate gateway device is a gateway device located on the transmission path between the first gateway device and the second gateway device, and is used to forward the encapsulated data packet sent by the first gateway device, so that the encapsulated data packet reaches the second gateway device. In this embodiment, there can be one or more intermediate gateway devices, and the specific number is set according to actual needs; the second gateway device is used to restore the encapsulated data packet, obtain the original data packet, and forward the original data packet to the target host. In this embodiment, the gateway device can be an edge router or an edge gateway, or other devices that can perform network transmission. The gateway device can support multiple network domains. The first gateway device, the intermediate gateway device and the second gateway device can support different network domains respectively, or they can support the same network domain. This embodiment does not limit this.

[0061] It can be understood that the data packet to be transmitted refers to the original data packet that has been initialized. When the original data packet needs to be transmitted from the first gateway device to the second gateway device, the original data packet is first initialized through the first gateway device. The original data packet contains an Ethernet header, an IP header, and a payload. The IP header contains information for routing and transmission control. The Ethernet header contains the destination MAC address, the source MAC address, and the Ethernet type field (EtherType). When the data packet only contains an MPLS label, the EtherType field is set to a standard MPLS type value, such as 0x8847; when the data packet contains both MPLS and SRv6 labels, the EtherType field is set to a special type value, such as 0x88D7, to distinguish such data packets; when the data packet only contains an SRv6 label, the EtherType field is set to a standard MPLS type value, such as 0x86dd.

[0062] In a specific implementation, the data packet to be transmitted can contain multiple protocol labels at the same time, such as SR-MPLS labels and SRv6 labels. The above method allows data packets to be seamlessly transmitted in different types of networks, achieving efficient path control and flexible traffic management.

[0063] It should be noted that the label encapsulation type of the data packet to be transmitted can be determined according to the destination address of the data packet to be transmitted. The label encapsulation type includes but is not limited to a single encapsulation type and a mixed encapsulation type. The single encapsulation type includes but is not limited to an MLPS label encapsulation type and an SRv6 label encapsulation type, etc., which can be set according to the specific protocol type label. In this embodiment, when the label encapsulation type is an MPLS label encapsulation type, it means that the data packet only contains an MPLS label; when the label encapsulation type is an SRv6 label encapsulation type, it means that the data packet only contains an SRv6 label; the mixed encapsulation type means that the data packet contains both MPLS and SRv6 labels. In addition, the mixed encapsulation type can also encapsulate other types of labels at the same time, and this embodiment does not limit this.

[0064] It can be understood that in this embodiment, the MPLS label stack includes one or more MPLS labels. The traditional MPLS label is designed to support fast label switching technology. Each label consists of a fixed-length field, usually 20 bits, including a label value, a 3-bit traffic category field, a 1-bit bottom label indicator, and an 8-bit time survival value. If the data packet contains an SRv6 label, an IPv6 header is attached after the MPLS label stack. The IPv6 header includes the source IPv6 address, the destination IPv6 address, and the next header field (Next Header), wherein the Next Header field indicates the subsequent SRv6 extension header (ie). The segment routing function is implemented by utilizing the extensibility of the IPv6 address. Each SRv6 segment is represented by a 128-bit IPv6 address, which can support complex path control and policy routing. The segment routing extension includes a segment list and a segment routing label, which are used to indicate the forwarding path of the data packet in the SRv6 network.

[0065] It can be understood that when the label encapsulation type corresponding to the data packet to be transmitted is a hybrid encapsulation type, multiple protocol labels and hybrid control headers under different protocol types are generated. In this embodiment, the hybrid control header is used to indicate the label type and other control information of the data packet. This header structure can be between the network layer (L3) and the data link layer (L2), or as part of the IPv6 extension header. The hybrid control header contains the following fields: Next Label Type: used to indicate the label type to be parsed by the data packet, for example, 0 for MPLS and 1 for SRv6; Control Flags: used for other control information, such as label stripping and priority; Reserved: used for message header extension. In this embodiment, the protocol labels under multiple different protocol types include but are not limited to MPLS labels and SRv6 labels, but in this embodiment, under the hybrid encapsulation type, the labels under the two protocol types of encapsulation MPLS labels and SRv6 labels are used as examples for explanation.

[0066] In a specific implementation, in the encapsulation mechanism of this embodiment, the original data packet includes an Ethernet header, an IP header, and a payload. When the label encapsulation type is an MPLS label encapsulation type, it means that only an MPLS label is encapsulated at this time. At this time, an MPLS label is generated and inserted between the Ethernet header and the IP header, and the EtherType in the Ethernet header is set to a standard MPLS type value, such as 0x8847. At this time, the message structure of the data packet becomes an Ethernet header, an MPLS label stack, an IP header, and a payload.

[0067] In a feasible implementation manner, before step S10, steps A11 to A13 may be included:

[0068] Step A11, when the original data packet is obtained, the original data packet is initialized to obtain a data packet to be transmitted.

[0069] Step A12: determining the label encapsulation type corresponding to the data packet to be transmitted according to the destination address of the data packet to be transmitted.

[0070] It should be noted that after the first gateway device obtains the original data packet, the original data packet is initialized to obtain the initialized original data packet. The label encapsulation type of the data packet to be transmitted can be determined according to the destination address of the data packet to be transmitted. In this embodiment, the destination address can be determined according to the Ethernet header of the data packet to be transmitted; the label encapsulation type includes a mixed encapsulation type and a single encapsulation type, and the single encapsulation type can be divided into a first label encapsulation type, a second label encapsulation type, etc. according to the specific protocol label.

[0071] Step S20: insert each protocol label and the hybrid control header into the message structure of the data packet to be transmitted to generate a target data packet.

[0072] It should be noted that, in this embodiment, protocol labels under multiple different protocol types and hybrid control headers are inserted into the message structure of the data packet to be transmitted, so as to obtain a target data packet containing hybrid labels and hybrid control information.

[0073] In a feasible implementation manner, the step S20 may include steps B11 to B15:

[0074] Step B11, determining an initial Ethernet header and a location of the initial Ethernet header according to the message structure of the data packet to be transmitted.

[0075] Step B12: determining the label insertion position according to the position of the initial Ethernet header.

[0076] Step B13: insert each protocol label and the hybrid control header into the message structure of the data packet to be transmitted according to the label insertion position to obtain a first data packet.

[0077] Step B14: setting the Ethernet type value in the initial Ethernet header according to the mixed encapsulation type to obtain a target Ethernet header.

[0078] Step B15: Generate a target data packet according to the target Ethernet header and the first data packet.

[0079] It should be noted that the Ethernet type field (EtherType) in the initial Ethernet header is not set according to the label encapsulation type. At this time, the location of the initial Ethernet header is obtained to determine the insertion positions of the protocol labels under multiple different protocol types and the hybrid control header. In this embodiment, the label insertion position includes the insertion position of each protocol label and the insertion position of the hybrid control header.

[0080] It can be understood that in this embodiment, the insertion position of the hybrid control header is located after the Ethernet header, the MLPS label is located after the hybrid control header, and the SRv6 label is attached after the MLPS label, thereby obtaining a first data packet into which the MLPS label, the SRv6 label and the hybrid control header are inserted. At the same time, in order to distinguish the hybrid label data packet, the Ethernet type value corresponding to the Ethernet type field in the initial Ethernet header is set to the value corresponding to the hybrid encapsulation type, such as 0x88D7, thereby obtaining the target Ethernet header. In this embodiment, the initial Ethernet header in the first data packet is replaced by the target Ethernet header to obtain the target data packet. The message structure of the target data packet is as follows: Figure 2As shown, it includes an Ethernet header, a hybrid control header, an MLPS label stack, an IPv6 header, an SRv6 extension header, and a payload.

[0081] Step S30: transmitting the target data packet to a second gateway device, wherein the second gateway device is used to recover the target data packet and forward the recovered data packet to be transmitted to a terminal device.

[0082] It should be noted that the first gateway device forwards the target data packet to the intermediate gateway device according to the hybrid control header in the target data packet, and the intermediate gateway device forwards the target data packet to the next network node according to the hybrid control header in the target data packet until it reaches the second gateway device.

[0083] It is understandable that when the target data packet enters a network domain that no longer requires SRv6 processing, the second gateway device removes the SRv6 label. The second gateway device determines the label that needs to be removed based on the control_flags field of the hybrid control header. At this time, the message structure of the target data packet becomes an Ethernet header, an MPLS label stack, an IP header, and a payload. When the target data packet is about to reach the destination or enters a network segment that no longer requires MPLS processing, the second gateway device removes the MPLS label. The second gateway device determines whether the label needs to be removed based on the BOS (Bottom of Stack flag) flag of the label stack. Finally, the message structure is restored to an Ethernet header, an IP header, and a payload. At the final second gateway device, all attached labels are removed and the data packet to be transmitted is restored. The second gateway device parses the IP header, extracts information such as the source IP address and the destination IP address, and forwards it to the final target terminal device.

[0084] In a feasible implementation, the step S30 may include step C11: sending the target data packet to an intermediate gateway device, the intermediate gateway device being used to transmit the target data packet to a second gateway device according to forwarding decision information, the forwarding decision information being obtained by the intermediate gateway device after parsing the target protocol label, the target protocol label being determined by the intermediate gateway device based on a label indication field in a hybrid control header, and the hybrid control header being located in the target data packet.

[0085] It should be noted that the first gateway device sends the target data packet to the intermediate gateway device, and the intermediate gateway device first parses the Ethernet header in the target data packet and identifies the type of the target data packet through EtherType. If EtherType is a special value corresponding to the hybrid encapsulation type, such as 0x88D7, the intermediate gateway device parses the hybrid control header. According to the next_label_type field in the hybrid control header, it is determined whether to parse the MPLS label or the SRv6 label. The intermediate gateway device parses the target protocol label and obtains the forwarding decision information, and makes a forwarding decision based on the forwarding decision information to forward the data packet to the next hop. At each network node, the above parsing and forwarding process is repeated until the target data packet (that is, the data packet) arrives at the second gateway device. In this embodiment, when the target protocol label is an MLPS label, the forwarding decision information includes a label value and a BOS flag; when the target protocol label is an SRv6 label, the forwarding decision information refers to the segment routing information in the SRv6 label. The target protocol label is the protocol label that the intermediate gateway device is about to parse; the label indication field refers to the next_label_type field in the hybrid control header.

[0086] It can be understood that if the label indication field is 0, the intermediate gateway device extracts the MPLS label and forwards based on the forwarding decision information including the label value and the bottom of the stack flag BOS; if the label indication field is 1, the intermediate gateway device extracts the SRv6 label and makes forwarding decisions based on the segment routing information in the SRv6 label.

[0087] In the specific implementation, if the type of the target data packet is an MPLS label data packet, the intermediate gateway device extracts the MPLS label and makes a forwarding decision based on the label value and the bottom of the stack flag (BOS); if the type of the target data packet is an SRv6 label data packet, the intermediate gateway device extracts the SRv6 label and makes a forwarding decision based on the segment routing information in the SRv6 label until the data packet reaches the second gateway device.

[0088] This embodiment provides a data packet transmission method based on a hybrid label protocol stack. The data packet transmission method based on a hybrid label protocol stack of this embodiment is applied to a first gateway device. The data packet transmission method based on a hybrid label protocol stack includes: when the label encapsulation type corresponding to the data packet to be transmitted is a hybrid encapsulation type, generating multiple protocol labels and hybrid control headers; inserting each protocol label and the hybrid control header into the message structure of the data packet to be transmitted to generate a target data packet; transmitting the target data packet to a second gateway device, the second gateway device is used to restore the target data packet according to a control flag and forward the restored data packet to be transmitted to a terminal device, and the control flag is determined according to the hybrid control header in the target data packet. Through the above method, multiple protocol labels are encapsulated in a single data packet, which realizes efficient data transmission and flexible path control across different network technology domains, and can dynamically adapt to changes in the network environment, improve data transmission efficiency and network resource utilization, and enhance the network's adaptability and fault recovery capabilities.

[0089] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 In this embodiment, the data packet transmission method based on the hybrid label protocol stack is applied to the second gateway device, and the method includes steps S21 to S23:

[0090] Step S21, when receiving a target data packet transmitted by the first gateway device, determine the data packet type of the target data packet according to the target Ethernet header of the target data packet, the target data packet is generated by the first gateway device inserting multiple protocol labels and a hybrid control header into the message structure of the data packet to be transmitted, and the hybrid control header and each protocol label are generated when the label encapsulation type corresponding to the data packet to be transmitted is a hybrid encapsulation type.

[0091] It should be noted that when the second gateway device receives the target data packet transmitted by the first gateway device, it obtains the Ethernet type field of the target Ethernet header in the target data packet, and determines the data packet type of the target data packet based on the Ethernet type value in the Ethernet type field. For example, when the Ethernet type value is 0x8847, the data packet type is an MLPS label data packet; when the Ethernet type value is x88D7, the data packet type is a mixed label data packet; when the Ethernet type value is 0x86dd, the data packet type is an SRv6 label data packet. The above values ​​and types are only examples for easy understanding, and the values ​​and types can also be set according to actual needs.

[0092] It can be understood that after obtaining the original data packet, the first gateway device initializes the original data packet, and then determines the corresponding label encapsulation type based on the destination address of the data packet to be transmitted. When the label encapsulation type of the data packet to be transmitted is a mixed encapsulation type, multiple protocol labels and mixed control headers are generated and encapsulated to obtain the target data packet.

[0093] Step S22, when the data packet type is a mixed label data packet, the target data packet is restored according to the mixed control header of the target data packet to obtain the data packet to be transmitted.

[0094] It should be noted that when the data packet type is a mixed label data packet, it means that the target data packet contains protocol labels under multiple protocol types. At this time, the second gateway device determines the label that needs to be removed based on the control_flags field of the mixed control header. At this time, the message structure of the target data packet becomes an Ethernet header, an MPLS label stack, an IP header, and a payload. When the target data packet is about to reach the destination or enters a network segment that no longer requires MPLS processing, the second gateway device removes the MPLS label. The second gateway device determines whether the label needs to be removed based on the BOS (Bottom of Stack flag) flag of the label stack. Finally, the message structure is restored to an Ethernet header, an IP header, and a payload to obtain a data packet to be transmitted.

[0095] In a feasible implementation manner, the step S22 may include steps D11 to D13:

[0096] Step D11, extracting information from the hybrid control header of the target data packet to obtain a control flag.

[0097] Step D12: determining the protocol tag to be removed according to the control flag.

[0098] Step D13, removing the protocol label to be removed from the target data packet to obtain the data packet to be transmitted.

[0099] It should be noted that the second gateway device extracts information from the hybrid control header, obtains the control flag, determines the protocol tag to be removed, and decapsulates the protocol tag to be removed. After the removal is completed, the next protocol tag to be removed is determined according to the control flag, and decapsulated, and the protocol tags under each protocol type are decapsulated layer by layer to finally obtain the data packet to be transmitted. In this embodiment, the control flag refers to the control_flags field of the hybrid control header.

[0100] It can be understood that when the data packet type is an MPLS label data packet, the second gateway device decapsulates the MPLS label; if the data packet type is an SRv6 label data packet, the second gateway device decapsulates the SRv6 header and SID, and restores it to an IPv6 data message, thereby obtaining the data packet to be transmitted.

[0101] Step S23, sending the data packet to be transmitted to the terminal device.

[0102] It should be noted that the second gateway device removes all attached labels, recovers the data packet to be transmitted, parses the IP header of the data packet to be transmitted, extracts information such as the source IP address and destination IP address, and forwards the data packet to the final terminal device (ie, the target host).

[0103] This embodiment provides a data packet transmission method based on a hybrid label protocol stack. The data packet transmission method based on a hybrid label protocol stack of this embodiment is applied to a second gateway device. The data packet transmission method based on a hybrid label protocol stack includes: when receiving a target data packet transmitted by a first gateway device, determining the data packet type of the target data packet according to the target Ethernet header of the target data packet, the target data packet is generated by the first gateway device inserting multiple protocol labels and a hybrid control header into the message structure of the data packet to be transmitted, and the hybrid control header and each protocol label are generated when the label encapsulation type corresponding to the data packet to be transmitted is a hybrid encapsulation type; when the data packet type is a hybrid label data packet, recovering the target data packet according to the hybrid control header of the target data packet to obtain the data packet to be transmitted; sending the data packet to be transmitted to the terminal device. Through the above method, multiple protocol labels are encapsulated in a single data packet, achieving efficient data transmission and flexible path control across different network technology domains, and can dynamically adapt to changes in the network environment, improve data transmission efficiency and network resource utilization, and enhance the network's self-adaptation and fault recovery capabilities.

[0104] For example, in order to help understand the implementation process of the data packet transmission method based on the hybrid label protocol stack obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 4 , Figure 4 A brief flow chart of a data packet transmission method based on a hybrid label protocol stack is provided, specifically:

[0105] In this embodiment, if Figure 5As shown in the figure, in the encapsulation mechanism: the initial message contains an Ethernet header, an IP header, and a payload. When the network device decides to encapsulate an MPLS label, it first generates an MPLS label and inserts it between the Ethernet header and the IP header. The EtherType is set to the standard MPLS type value (for example, 0x8847). At this point, the structure of the data message becomes an Ethernet header, an MPLS label stack, an IP header, and a payload. If the data message needs to be transmitted in an SRv6 network segment, an SRv6 label is attached after the MPLS label. In order to distinguish this mixed label data message, the EtherType field is set to a special value (for example, 0x88D7). The encapsulated data message structure includes an Ethernet header, a mixed control header, an MPLS label stack, an IPv6 header (including an SRv6 extension header), and a payload.

[0106] like Figure 6 As shown in the figure, in the processing mechanism: when the data packet enters the intermediate network device, the device first parses the Ethernet header and identifies the type of the data packet through EtherType. If EtherType is a special value (0x88D7), the device parses the hybrid control information header. According to the next_label_type field in the hybrid control information header, it determines whether to parse the MPLS label or the SRv6 label. The device extracts the parsed label information and makes a forwarding decision based on the label to forward the data packet to the next hop. At each network node, the above parsing and forwarding process is repeated until the data packet reaches the destination network device.

[0107] like Figure 7 As shown in the figure, in the decapsulation mechanism: when the data packet enters the network domain that no longer requires SRv6 processing, the device removes the SRv6 label. The device determines the label to be removed based on the control_flags field in the hybrid control information header. At this point, the data packet structure becomes an Ethernet header, an MPLS label stack, an IP header, and a payload. When the data packet is about to reach the destination or enters a network segment that no longer requires MPLS processing, the device removes the MPLS label. The device determines whether the label needs to be removed based on the BOS flag of the label stack. Finally, the data packet structure is restored to an Ethernet header, an IP header, and a payload. At the final destination device, all attached labels are removed to restore the original data packet. The device parses the IP header, extracts information such as the source IP address and the destination IP address, and forwards it to the final destination terminal.

[0108] The implementation steps of this embodiment are as follows: 1. According to the transmission path and requirements of the data packet, determine whether it is necessary to encapsulate an MPLS label, an SRv6 label, or a mixture of the two. 2. If it is necessary to encapsulate an MPLS label, generate an MPLS label and insert it between the Ethernet header and the IP header, and set EtherType to the standard MPLS type value (for example, 0x8847). If it is not necessary to encapsulate an MPLS label, determine whether it is necessary to encapsulate an SRv6 label. 3. If it is necessary to encapsulate an SRv6 label, encapsulate the SRv6 label directly after the Ethernet header, and set EtherType to the type value of IPv6 (0x86DD). If the data packet needs to be transmitted in the SRv6 network segment and has been encapsulated with an MPLS label, attach an SRv6 label after the MPLS label, and set EtherType to a special value (for example, 0x88D7). At the same time, add a corresponding control field to the hybrid control information header for subsequent parsing and forwarding decisions. 4. Perform corresponding processing and forwarding according to the encapsulated label information. The network device parses the Ethernet header, identifies the data packet type through the Ethernet type value, parses the corresponding MPLS or SRv6 label, and performs path selection and forwarding.

[0109] For ease of understanding, a process in which a data packet needs to go from network A (supporting SR-MPLS) to destination C via network B (supporting SRv6) is now described in more detail: Step S201: Initialize a data packet, including an Ethernet header, an IP header, and a payload. Step S202: Determine whether to encapsulate a hybrid label. If yes, execute step s202(a); if not, execute step s202(b); Step S202(a): Insert a hybrid control information header, set next_label_type and other control information, set EtherType to 0x88D7, and encapsulate MPLS and SRv6 labels; Step S202(b): Encapsulate an MPLS or SRv6 label, and set EtherType according to the label type; Step S203: After receiving the data packet, the network device first parses the Ethernet header and checks the EtherType; Step S204: Enter the corresponding parsing state according to the EtherType value. If EtherType is 0x88D7, execute step S204(a); if EtherType is 0x8847, execute step S204(b); if EtherType is 0x86DD, execute step S204(c). Step S204(a): Based on the next_label_type field in the hybrid control information header, the device decides to parse the MPLS label or the SRv6 label. If next_label_type is 0, execute step S204(b); if next_label_type is 1, execute step S204(c). Step S204(b): The device extracts the MPLS label and makes a forwarding decision based on the label value and the bottom of the stack (BOS). Step S204(c): The device extracts the SRv6 label and makes a forwarding decision based on the segment routing information in the SRv6 label. Step S205: At each network node, repeat the parsing and forwarding process in steps S203 to S204 until the data packet reaches the target network device. Step S206: When the data packet arrives at the destination device, the device first identifies the data packet type based on the Ethernet type value. If it is a mixed label data packet, execute step S206(a); if it is an MPLS label data packet, execute step S206(b); if it is an SRv6 label data packet, execute step S206(c). Step S206(a): According to the instructions in the mixed control information header, decapsulate the MPLS label and SRv6 label layer by layer, and finally restore it to the original data packet. Step S206(b): The device decapsulates the MPLS label. Step S206(c): The device decapsulates the SRv6 header and SID and restores it to an IPv6 data message. Step S207: The original data packet is forwarded to the destination host.

[0110] Through the method of this embodiment, the efficiency and flexibility of network data transmission are significantly improved, and seamless transmission and flexible routing control across multiple network technology domains are achieved. The hybrid label protocol stack achieves seamless transmission in different network technology domains by encapsulating MPLS and SRv6 labels in a single data packet. The method of this embodiment allows data packets to be efficiently forwarded in a network domain that supports IPv4, while utilizing the flexible path control capability of SRv6 in an IPv6 network domain. This flexibility significantly improves the overall transmission efficiency of the network and the accuracy of path selection. At the same time, different Ethernet type values ​​are used to distinguish the label types contained in the data packet, so that network devices can quickly identify and process different types of data packets. The introduction of the hybrid control header further enhances the flexibility and efficiency of data packet processing. The hybrid control header contains fields such as the next label type and control flag, which can indicate the label type and other control information contained in the data packet. When the data packet is generated, the corresponding MPLS label is generated and encapsulated into the data packet according to the routing policy and service quality requirements. If the data packet needs to pass through the SRv6 network domain, the SRv6 label is attached after the MPLS label. By combining the use of MPLS and SRv6 labels, the method of this embodiment achieves more efficient path selection and traffic management, significantly improving the network's service quality and data transmission reliability.

[0111] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the data packet transmission method based on the hybrid label protocol stack of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0112] This application also provides a gateway device, please refer to Figure 8 , the first gateway device includes:

[0113] The generating module 10 is used to generate a plurality of protocol labels and a hybrid control header when the label encapsulation type corresponding to the data packet to be transmitted is a hybrid encapsulation type.

[0114] The inserting module 20 is used to insert each protocol label and the hybrid control header into the message structure of the data packet to be transmitted to generate a target data packet.

[0115] The transmission module 30 is used to transmit the target data packet to a second gateway device, and the second gateway device is used to restore the target data packet and forward the restored data packet to be transmitted to the terminal device.

[0116] Optionally, the insertion module 20 is further used for:

[0117] Determine an initial Ethernet header and the location of the initial Ethernet header according to the message structure of the data packet to be transmitted; determine a label insertion position according to the location of the initial Ethernet header; insert each protocol label and the hybrid control header into the message structure of the data packet to be transmitted according to the label insertion position to obtain a first data packet; set the Ethernet type value in the initial Ethernet header according to the hybrid encapsulation type to obtain a target Ethernet header; generate a target data packet according to the target Ethernet header and the first data packet.

[0118] Optionally, the transmission module 30 is further used for:

[0119] The target data packet is sent to an intermediate gateway device, and the intermediate gateway device is used to transmit the target data packet to a second gateway device according to forwarding decision information, wherein the forwarding decision information is obtained after the intermediate gateway device parses the target protocol label, and the target protocol label is determined by the intermediate gateway device according to the label indication field in the hybrid control header, and the hybrid control header is located in the target data packet.

[0120] Optionally, the generating module 10 is further used for:

[0121] When the original data packet is acquired, the original data packet is initialized to obtain the data packet to be transmitted; and the label encapsulation type corresponding to the data packet to be transmitted is determined according to the destination address of the data packet to be transmitted.

[0122] The first gateway device provided by the present application adopts the data packet transmission method based on the hybrid label protocol stack in the above embodiment, which can solve the technical problem of the limitations of the network transmission technology in the prior art when processing labels in different network domains. Compared with the prior art, the beneficial effects of the first gateway device provided by the present application are the same as the beneficial effects of the data packet transmission method based on the hybrid label protocol stack provided in the above embodiment, and the other technical features in the first gateway device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0123] This application also provides a second gateway device, please refer to Fig. 9 , the second gateway device includes:

[0124] The processing module 40 is used to determine the data packet type of the target data packet according to the target Ethernet header of the target data packet when receiving the target data packet transmitted by the first gateway device. The target data packet is generated by the first gateway device inserting multiple protocol labels and a hybrid control header into the message structure of the data packet to be transmitted, and the hybrid control header and each protocol label are generated when the label encapsulation type corresponding to the data packet to be transmitted is a hybrid encapsulation type.

[0125] The recovery module 50 is used to recover the target data packet according to the hybrid control header of the target data packet to obtain the data packet to be transmitted when the data packet type is a hybrid label data packet.

[0126] The sending module 60 is used to send the data packet to be transmitted to the terminal device.

[0127] Optionally, the recovery module 50 is further used to extract information from the mixed control header of the target data packet to obtain a control flag; determine the protocol label to be removed according to the control flag; remove the protocol label to be removed from the target data packet to obtain a data packet to be transmitted.

[0128] The second gateway device provided by the present application adopts the data packet transmission method based on the hybrid label protocol stack in the above embodiment, which can solve the technical problem of the limitations of the network transmission technology in the prior art when processing labels in different network domains. Compared with the prior art, the beneficial effects of the second gateway device provided by the present application are the same as the beneficial effects of the data packet transmission method based on the hybrid label protocol stack provided in the above embodiment, and the other technical features in the second gateway device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0129] This application provides a data packet transmission system based on a hybrid label protocol stack, please refer to Fig.10 The data packet transmission system based on the hybrid label protocol stack includes: a first gateway device and a second gateway device.

[0130] The data packet transmission system based on the hybrid label protocol stack provided by the present application adopts the data packet transmission method based on the hybrid label protocol stack in the above-mentioned embodiment, which can solve the technical problem of the limitations of the network transmission technology in the prior art when processing labels in different network domains. Compared with the prior art, the beneficial effects of the data packet transmission system based on the hybrid label protocol stack provided by the present application are the same as the beneficial effects of the data packet transmission method based on the hybrid label protocol stack provided by the above-mentioned embodiment, and the other technical features of the data packet transmission system based on the hybrid label protocol stack are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.

[0131] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A data packet transmission method based on a hybrid label protocol stack, characterized in that: The data packet transmission method based on the hybrid label protocol stack is applied to a first gateway device, and the method includes: When the label encapsulation type corresponding to the data packet to be transmitted is a mixed encapsulation type, generating multiple protocol labels and a mixed control header; Inserting each protocol label and the hybrid control header into the message structure of the data packet to be transmitted to generate a target data packet; The target data packet is transmitted to a second gateway device, which is used to restore the target data packet according to a control flag and forward the restored data packet to be transmitted to a terminal device, wherein the control flag is determined according to a mixed control header in the target data packet.

2. The method according to claim 1, characterized in that The step of inserting each protocol label and the hybrid control header into the message structure of the data packet to be transmitted to generate a target data packet comprises: Determine an initial Ethernet header and a location of the initial Ethernet header according to the message structure of the data packet to be transmitted; Determining a label insertion position according to the position of the initial Ethernet header; Inserting each protocol label and the hybrid control header into the message structure of the data packet to be transmitted according to the label insertion position to obtain a first data packet; Setting the Ethernet type value in the initial Ethernet header according to the hybrid encapsulation type to obtain a target Ethernet header; A target data packet is generated according to the target Ethernet header and the first data packet.

3. The method according to claim 1, characterized in that The step of transmitting the target data packet to the second gateway device comprises: The target data packet is sent to an intermediate gateway device, and the intermediate gateway device is used to transmit the target data packet to a second gateway device according to forwarding decision information, wherein the forwarding decision information is obtained after the intermediate gateway device parses the target protocol label, and the target protocol label is determined by the intermediate gateway device according to the label indication field in the hybrid control header, and the hybrid control header is located in the target data packet.

4. The method according to any one of claims 1 to 3, characterized in that When the label encapsulation type corresponding to the data packet to be transmitted is a hybrid encapsulation type, before the step of encapsulating the MLPS label and the second protocol label, the method further includes: When the original data packet is obtained, the original data packet is initialized to obtain the data packet to be transmitted; The label encapsulation type corresponding to the data packet to be transmitted is determined according to the destination address of the data packet to be transmitted.

5. A data packet transmission method based on a hybrid label protocol stack, characterized in that: The data packet transmission method based on the hybrid label protocol stack is applied to a second gateway device, and the method includes: When receiving a target data packet transmitted by a first gateway device, determining a data packet type of the target data packet according to a target Ethernet header of the target data packet, the target data packet is generated by the first gateway device inserting multiple protocol labels and a hybrid control header into a message structure of a data packet to be transmitted, and the hybrid control header and each protocol label are generated when a label encapsulation type corresponding to the data packet to be transmitted is a hybrid encapsulation type; When the data packet type is a mixed label data packet, recovering the target data packet according to the mixed control header of the target data packet to obtain the data packet to be transmitted; The data packet to be transmitted is sent to the terminal device.

6. The method according to claim 5, characterized in that The step of recovering the target data packet according to the hybrid control header of the target data packet to obtain the data packet to be transmitted comprises: Extracting information from the mixed control header of the target data packet to obtain a control flag; Determine the protocol tag to be removed according to the control flag; The protocol label to be removed in the target data packet is removed to obtain a data packet to be transmitted.

7. A first gateway device, characterized in that: The first gateway device comprises: A generating module, used for generating a plurality of protocol labels and a mixed control header when the label encapsulation type corresponding to the data packet to be transmitted is a mixed encapsulation type; An insertion module, used for inserting each protocol label and the hybrid control header into the message structure of the data packet to be transmitted to generate a target data packet; A transmission module is used to transmit the target data packet to a second gateway device, and the second gateway device is used to recover the target data packet according to a control flag and forward the recovered data packet to be transmitted to a terminal device, wherein the control flag is determined according to a mixed control header in the target data packet.

8. A second gateway device, characterized in that: The second gateway device comprises: a processing module, configured to determine, upon receiving a target data packet transmitted by a first gateway device, a data packet type of the target data packet according to a target Ethernet header of the target data packet, wherein the target data packet is generated by the first gateway device inserting a plurality of protocol labels and a hybrid control header into a message structure of a data packet to be transmitted, and the hybrid control header and each protocol label are generated when a label encapsulation type corresponding to the data packet to be transmitted is a hybrid encapsulation type; A recovery module, used for recovering the target data packet according to the hybrid control header of the target data packet to obtain the data packet to be transmitted when the data packet type is a hybrid label data packet; The sending module is used to send the data packet to be transmitted to the terminal device.

9. A data packet transmission system based on a hybrid label protocol stack, characterized in that: The data packet transmission system based on the hybrid label protocol stack includes the first gateway device as described in claim 7 and the second gateway device as described in claim 8.

10. A storage medium, characterized in that: The storage medium stores a data packet transmission program based on a hybrid label protocol stack, and when the data packet transmission program based on a hybrid label protocol stack is executed by a processor, the data packet transmission method based on a hybrid label protocol stack as described in any one of claims 1 to 4 or 5 to 6 is implemented.

Citation Information

Patent Citations

  • Data transmission method, source PE (Provider Edge router), object PE and data transmission system

    CN102904814A

  • Data routing method and device, electronic equipment and storage medium

    CN116566894A

  • Route generation method, data message forwarding method and device

    CN116781618A

  • IPv6 micro sensing routing appliance protocol stack system structure and implementing method

    CN1794732A

  • Method of controlling processes in networks with one or more terminals from a central node

    DE19908685A1