Message processing method and device, network equipment and storage medium
By combining IP packets in the satellite Internet and using a SRv6 header for encapsulation and forwarding, the problem of low bandwidth utilization caused by segment routing header insertion is solved, the utilization and economics of bandwidth resources are improved, and the operation is reduced cost.
Patent Information
- Application Number
- CN202310644814.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-01
- Publication Date
- 2024-12-03
AI Technical Summary
In the inter-star link and satellite-ground link of the satellite Internet, the insertion of SRv6's segment routing header results in low bandwidth utilization, affecting the economics of resources and operating costs.
By receiving IP packets and combining them with cached IP packets when the preset combination conditions are met, and sharing an SRv6 header for encapsulation and forwarding, the resource overhead of segment routing headers is reduced and bandwidth utilization is improved.
It improves the utilization rate and economy of bandwidth resources, reduces operating costs, and meets the delay requirements of different business scenarios.
Smart Images

Figure CN119071207A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a message processing method, apparatus, network equipment and storage medium. Background Art
[0002] In the satellite Internet inter-satellite links and satellite-to-ground links, SRv6 (Segment Routing Internet Protocol Version 6) is usually used to encapsulate and forward IP (Internet Protocol) messages in order to ensure the deterministic transmission capacity of each segment network. SRv6 provides unique advantages in mechanism, but in actual applications, due to the insertion of SRH (Segment Routing Header), additional resource overhead is caused, resulting in low bandwidth utilization, affecting the economy of bandwidth resources and operating costs. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a message processing method, apparatus, network device and storage medium to improve bandwidth utilization, improve the economy of bandwidth resources and reduce the operating cost of bandwidth resources. The specific technical solution is as follows:
[0004] In a first aspect, an embodiment of the present application provides a message processing method, the method comprising:
[0005] Receive a first IP message;
[0006] When the first IP packet meets a preset combination condition, combining the first IP packet with the cached IP packet;
[0007] The combined message is encapsulated in SRv6 and then forwarded.
[0008] In some embodiments, the preset combination condition includes at least one of the following:
[0009] The data stream to which the first IP packet belongs is a data stream with low delay sensitivity;
[0010] The data flow to which the first IP message belongs is a data flow of a preset service type of a preset user.
[0011] In some embodiments, the method further comprises:
[0012] When the first IP packet does not meet the preset combination condition, the first IP packet is encapsulated in SRv6 and then forwarded.
[0013] In some embodiments, when the first IP message meets a preset combination condition, the method further includes:
[0014] If the packet length of the first IP packet is less than or equal to the first preset packet length, combining the first IP packet and the cached IP packet;
[0015] The combined message is encapsulated in SRv6 and then forwarded;
[0016] Clear the cached IP packets.
[0017] In some embodiments, when the packet length of the first IP message is less than or equal to the first preset packet length, the method further includes:
[0018] If the first IP packet and the cached IP packet have the same attribute, the total packet length of the first IP packet and the cached IP packet is less than or equal to MTU (Maximum Transmission Unit), and the total packet length of the first IP packet and the cached IP packet is greater than or equal to a second preset packet length, combining the first IP packet and the cached IP packet;
[0019] The combined message is encapsulated in SRv6 and then forwarded;
[0020] Clear the cached IP packets.
[0021] In some embodiments, when the packet length of the first IP message is less than or equal to the first preset packet length, the method further includes:
[0022] If the first IP message and the cached IP message have the same attribute, and the total packet length of the first IP message and the cached IP message is greater than the MTU, combining the cached IP message;
[0023] The combined message is encapsulated in SRv6 and then forwarded;
[0024] Clear cached IP packets;
[0025] After clearing the cached IP packets, the first IP packet is cached.
[0026] In some embodiments, when the packet length of the first IP message is less than or equal to the first preset packet length, the method further includes:
[0027] If the first IP message and the cached IP message have the same attribute, and the total packet length of the first IP message and the cached IP message is less than the second preset packet length, the first IP message is cached after the cached IP message.
[0028] In some embodiments, when the packet length of the first IP message is less than or equal to the first preset packet length, the method further includes:
[0029] If the attributes of the first IP packet and the cached IP packet are different, caching the first IP packet;
[0030] Start the timer.
[0031] In some embodiments, the method further comprises:
[0032] When the timer times out, combining the cached IP packets corresponding to the timer;
[0033] The combined message is encapsulated in SRv6 and then forwarded;
[0034] Clear the cached IP packets corresponding to the timer.
[0035] In some embodiments, when the packet length of the first IP message is greater than the first preset packet length, the method further includes:
[0036] If the first IP message and the cached IP message have the same attribute, and the total packet length of the first IP message and the cached IP message is greater than the MTU, combining the cached IP message;
[0037] The combined message is encapsulated in SRv6 and then forwarded;
[0038] Clear cached IP packets;
[0039] The first IP message is encapsulated in SRv6 and then forwarded.
[0040] In some embodiments, when the packet length of the first IP message is greater than the first preset packet length, the method further includes:
[0041] If the first IP packet and the cached IP packet have the same attribute, and the total packet length of the first IP packet and the cached IP packet is less than or equal to the MTU, combining the first IP packet and the cached IP packet;
[0042] The combined message is encapsulated in SRv6 and then forwarded;
[0043] Clear the cached IP packets.
[0044] In some embodiments, when the packet length of the first IP message is greater than the first preset packet length, the method further includes:
[0045] If the attributes of the first IP packet and the cached IP packet are different, the first IP packet is encapsulated in SRv6 and then forwarded.
[0046] In some embodiments, the attribute includes at least one of the following:
[0047] Next hop device, downstream preset hop device, destination address, SRH, and the data flow to which the IP packet belongs.
[0048] In some embodiments, the SRv6 header of the message after SRv6 encapsulation includes a first IPv6 header, an SRH, and a second IPv6 header;
[0049] The first IPv6 header includes a destination address and a source address;
[0050] The second IPv6 header includes a pointer field;
[0051] The pointer field is used to fill a pointer, the pointer indicates the starting position of the packet header of the IP message, and the pointer corresponds to the IP message one by one;
[0052] The second IPv6 header is located between the SRH and the load; or, the second IPv6 header is located between the first IPv6 header and the SRH.
[0053] In some embodiments, the second IPv6 header further includes: a header indication field, a header length field, a pointer number field, and a reserved extension field;
[0054] The header indication field indicates that the second IPv6 header is a header including a pointer;
[0055] The header length field indicates the length of the second IPv6 header;
[0056] The pointer number field indicates the number of pointers included in the second IPv6 header;
[0057] The reserved extension field is a reserved extensible field.
[0058] In some embodiments, the method further comprises:
[0059] Receive SRv6 packets;
[0060] Stripping the SRv6 header of the SRv6 message to obtain multiple IP messages;
[0061] Forward each IP message according to the destination address of each IP message obtained.
[0062] In a second aspect, an embodiment of the present application provides a message processing device, the device comprising:
[0063] A first receiving module, used for receiving a first IP message;
[0064] A combining module, used for combining the first IP packet and the cached IP packet when the first IP packet meets a preset combination condition;
[0065] The first forwarding module is used to perform SRv6 encapsulation on the combined message and then forward it.
[0066] In some embodiments, the preset combination condition includes at least one of the following:
[0067] The data stream to which the first IP packet belongs is a data stream with low delay sensitivity;
[0068] The data flow to which the first IP message belongs is a data flow of a preset service type of a preset user.
[0069] In some embodiments, the combined module is further used to:
[0070] When the first IP packet does not meet the preset combination condition, the first IP packet is encapsulated in SRv6 and then forwarded.
[0071] In some embodiments, the combined module is further used to:
[0072] When the first IP message meets the preset combination condition, if the packet length of the first IP message is less than or equal to the first preset packet length, combining the first IP message and the cached IP message;
[0073] The combined message is encapsulated in SRv6 and then forwarded;
[0074] Clear the cached IP packets.
[0075] In some embodiments, the combined module is further used to:
[0076] When the packet length of the first IP packet is less than or equal to the first preset packet length, if the first IP packet and the cached IP packet have the same attribute, the total packet length of the first IP packet and the cached IP packet is less than or equal to the MTU, and the total packet length of the first IP packet and the cached IP packet is greater than or equal to the second preset packet length, then combine the first IP packet and the cached IP packet;
[0077] The combined message is encapsulated in SRv6 and then forwarded;
[0078] Clear the cached IP packets.
[0079] In some embodiments, the combined module is further used to:
[0080] When the packet length of the first IP packet is less than or equal to the first preset packet length, if the first IP packet and the cached IP packet have the same attribute, and the total packet length of the first IP packet and the cached IP packet is greater than the MTU, then combine the cached IP packets;
[0081] The combined message is encapsulated in SRv6 and then forwarded;
[0082] Clear cached IP packets;
[0083] After clearing the cached IP packets, the first IP packet is cached.
[0084] In some embodiments, the combined module is further used to:
[0085] When the packet length of the first IP message is less than or equal to the first preset packet length, if the first IP message and the cached IP message have the same attributes, and the total packet length of the first IP message and the cached IP message is less than the second preset packet length, then the first IP message is cached after the cached IP message.
[0086] In some embodiments, the combined module is further used to:
[0087] When the packet length of the first IP packet is less than or equal to the first preset packet length, if the attributes of the first IP packet and the cached IP packet are different, cache the first IP packet;
[0088] Start the timer.
[0089] In some embodiments, the combined module is further used to:
[0090] When the timer times out, combining the cached IP packets corresponding to the timer;
[0091] The combined message is encapsulated in SRv6 and then forwarded;
[0092] Clear the cached IP packets corresponding to the timer.
[0093] In some embodiments, the combined module is further used to:
[0094] When the packet length of the first IP packet is greater than the first preset packet length, if the first IP packet and the cached IP packet have the same attribute, and the total packet length of the first IP packet and the cached IP packet is greater than the MTU, combining the cached IP packets;
[0095] The combined message is encapsulated in SRv6 and then forwarded;
[0096] Clear cached IP packets;
[0097] The first IP message is encapsulated in SRv6 and then forwarded.
[0098] In some embodiments, the combined module is further used to:
[0099] When the packet length of the first IP packet is greater than the first preset packet length, if the first IP packet and the cached IP packet have the same attribute, and the total packet length of the first IP packet and the cached IP packet is less than or equal to the MTU, then combining the first IP packet and the cached IP packet;
[0100] The combined message is encapsulated in SRv6 and then forwarded;
[0101] Clear the cached IP packets.
[0102] In some embodiments, the combined module is further used to:
[0103] When the packet length of the first IP packet is greater than the first preset packet length, if the first IP packet and the cached IP packet have different attributes, the first IP packet is forwarded after SRv6 encapsulation.
[0104] In some embodiments, the attribute includes at least one of the following:
[0105] Next hop device, downstream preset hop device, destination address, SRH, and the data flow to which the IP packet belongs.
[0106] In some embodiments, the SRv6 header of the message after SRv6 encapsulation includes a first IPv6 header, an SRH, and a second IPv6 header;
[0107] The first IPv6 header includes a destination address and a source address;
[0108] The second IPv6 header includes a pointer field;
[0109] The pointer field is used to fill a pointer, the pointer indicates the starting position of the packet header of the IP message, and the pointer corresponds to the IP message one by one;
[0110] The second IPv6 header is located between the SRH and the load; or, the second IPv6 header is located between the first IPv6 header and the SRH.
[0111] In some embodiments, the second IPv6 header further includes: a header indication field, a header length field, a pointer number field, and a reserved extension field;
[0112] The header indication field indicates that the second IPv6 header is a header including a pointer;
[0113] The header length field indicates the length of the second IPv6 header;
[0114] The pointer number field indicates the number of pointers included in the second IPv6 header;
[0115] The reserved extension field is a reserved extensible field.
[0116] In some embodiments, the apparatus further comprises:
[0117] A second receiving module, used to receive an SRv6 message;
[0118] A stripping module, used for stripping the SRv6 header of the SRv6 message to obtain multiple IP messages;
[0119] The second forwarding module is used to forward each IP message according to the obtained destination address of each IP message.
[0120] In a third aspect, an embodiment of the present application provides a network device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0121] Memory, used to store computer programs;
[0122] The processor is used to implement the method steps described in the first aspect when executing the program stored in the memory.
[0123] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in the first aspect are implemented.
[0124] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method steps described in the first aspect above.
[0125] Beneficial effects of the embodiments of the present application:
[0126] In the technical solution provided by the embodiment of the present application, when the first IP message meets the preset combination condition, the first IP message and the cached IP message are combined, and an SRv6 header is encapsulated for the combined message, that is, multiple IP messages share one SRv6 header, which reduces the resource overhead of the SRv6 header when transmitting these multiple IP messages. In addition, SRv6 encapsulation is performed on multiple IP message combinations, so that the load of the encapsulated message (that is, multiple IP messages) accounts for an increased proportion of the entire message, and more valid data can be transmitted during the forwarding process of the message, thereby improving the bandwidth utilization rate when using SRv6 for message processing, improving the economy of bandwidth resources, and reducing the operating cost of bandwidth resources.
[0127] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0128] 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, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0129] Figure 1 A schematic diagram of the structure of an SRv6 message;
[0130] Figure 2 A first flow chart of the message processing method provided in the embodiment of the present application;
[0131] Figure 3 A schematic diagram of the structure of an SRv6 message provided in an embodiment of the present application;
[0132] Figure 4 A second flow chart of the message processing method provided in the embodiment of the present application;
[0133] Figure 5 A schematic diagram of the structure of a message processing system provided in an embodiment of the present application;
[0134] Figure 6 A third flow chart of the message processing method provided in the embodiment of the present application;
[0135] Figure 7 Based on the embodiments of the present application Figure 6 A partial flow chart of a message processing method;
[0136] Figure 8 A schematic diagram of the structure of a message processing device provided in an embodiment of the present application;
[0137] Fig. 9 A schematic diagram of the structure of a network device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0138] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.
[0139] For ease of understanding, relevant concepts involved in the embodiments of the present application are explained.
[0140] 1. Introduction to SRv6.
[0141] SRv6 implements network traffic carrying based on the definition of RFC (Request For Comments) 8402 / RFC 8754. The basic implementation principle of SRv6 is to insert a routing extension header, namely SRH, into the IPv6 packet header to implement traffic forwarding on a specified path. There is a segment list (Segment List) in the SRH. Each entry in the segment list corresponds to a router, and the SRv6 path information is stored in the segment list. The SID (Segment Identifier) of the routers that the forwarding path passes through is pre-encapsulated in the segment list, and the router forwards the message according to the SID in the segment list.
[0142] When the router forwards the message, it uses the SID in the segment list to replace the destination IPv6 address in the IPv6 basic header for table lookup and forwarding. Figure 1 The figure shows a schematic diagram of the structure of an SRv6 message. The SRv6 message includes an IPv6 basic header, an SRH, and a message payload. The IPv6 basic header and the SRH constitute the SRv6 header of the SRv6 message. The message payload is the load of the SRv6 message and stores the valid data in the SRv6 message. Figure 1 In the figure, the numbers 0, 7, 15, 23, and 31 above the message indicate the bit positions.
[0143] The basic IPv6 header includes: Version (Version, Ver), Traffic Class, Flow Label, Payload Length, Next Header, Hop Limit, Source IPv6 Address, Destination IPv6 Address. The Version value is 6, indicating that the message is processed based on the 6th version of the Internet Protocol; the Next Header value is 43, indicating that the next header is a routing extension header.
[0144] SRH includes: Next Header, SRH Length (Hdr Ext Len), Routing Type, Segments Left (SL), Last Entry, Flags, Tag, Segment List, Optional Type Length Value objects (variable). The SIDs in the segment list are arranged in the order of the routers on the packet forwarding path from far to near. For example, Segment List [0] represents the last SID of the forwarding path, corresponding to the IPv6 address of the last router, Segment List [n] represents the first SID of the forwarding path, corresponding to the IPv6 address of the first router, and so on. n represents the number of all routers in the forwarding path, and the length of the IPv6 address is 128 bits.
[0145] As a new type of IP network technology, SRv6 has end-to-end path programmability. Building a cloud-network converged bearer solution based on SRv6 has natural advantages over traditional IP network technology in terms of end-to-end network configuration, routing and service transmission.
[0146] 2. SRv6 bandwidth utilization.
[0147] SRv6 provides unique advantages in terms of mechanism, but in practical applications, the insertion of SRH leads to a certain degree of reduction in bandwidth utilization. The specific reasons are as follows:
[0148] Even if only an empty SRH is inserted, there is an additional overhead of 32 bytes (128*2 bits). If a segment list containing 4 IPv6 addresses is inserted in the SRH, the total overhead will be 32+64 (128*4 bits)=96 bytes. Add the 64 bytes occupied by the IPv6 basic header, and the total length of the entire header will reach 160 bytes.
[0149] If such a packet header (i.e., IPv6 basic header and SRH) is used to carry a 64-byte packet, the bandwidth utilization is 64÷(160+64)×100%=28.57% (retain two decimal places), which is about 30%, and the bandwidth utilization is very low.
[0150] This defect of SRv6 is particularly prominent in satellite communication scenarios where bandwidth resources are precious. In space-based scenarios, whether it is inter-satellite links or satellite-to-ground transmission, the bandwidth utilization of IP packets has a direct impact on the economy of precious bandwidth resources in space-based cloud networks. At the same time, the bandwidth utilization of ground-based network IP packets is also closely related to the final operating costs.
[0151] In order to improve bandwidth utilization, improve the economy of bandwidth resources, and reduce the operating cost of bandwidth resources, the embodiment of the present application provides a message processing method, which can be applied to network devices such as routers and switches for message forwarding processing. For the convenience of explanation, the following description is based on the router as the execution subject, which does not play a limiting role. When the first IP message meets the preset combination condition, the router combines the first IP message and the cached IP message, and encapsulates an SRv6 header for the combined message, that is, multiple IP messages share one SRv6 header, which reduces the resource overhead of the SRv6 header when transmitting these multiple IP messages. In addition, SRv6 encapsulation is performed on multiple IP message combinations, so that the load of the encapsulated message (i.e., multiple IP messages) increases the proportion of the entire message, and more valid data can be transmitted during the forwarding process of the message, thereby improving the bandwidth utilization when using SRv6 for message processing, improving the economy of bandwidth resources, and reducing the operating cost of bandwidth resources.
[0152] The message processing method provided in the embodiment of the present application is described in detail below through specific examples.
[0153] See also Figure 2 , is a first flow chart of a message processing method provided in an embodiment of the present application, and the method may include the following steps:
[0154] Step S21, receiving a first IP message.
[0155] In the embodiment of the present application, the router receives an IP message sent by other devices, and the first IP message is any IP message received by the router. The first IP message can be an IPv4 message or an IPv6 message, which is not limited.
[0156] Step S22: When the first IP packet meets a preset combination condition, the first IP packet is combined with the cached IP packet.
[0157] In an embodiment of the present application, the router can cache IP packets that meet the preset combination conditions but do not meet the forwarding conditions. The preset combination conditions can be set according to actual needs. For example, the preset combination conditions may include at least one of the following: the data stream to which the first IP packet belongs is a data stream with low delay sensitivity; the data stream to which the first IP packet belongs is a data stream of a preset service type of a preset user. The specific content will be described in detail later and will not be introduced in detail here. The forwarding conditions can be set according to actual needs. For example, the forwarding conditions can be that the packet length of multiple IP packets is greater than the preset packet length threshold, or the packet length of the newly received IP packet is greater than the specified packet length, etc. There is no limitation on this.
[0158] The cached IP message may include one or more IP messages, or may be empty, that is, it does not include any IP message. After receiving the first IP message, when the first IP message meets the preset combination condition, the router obtains multiple IP messages that meet the forwarding condition according to the newly received first IP message and the cached IP message, and the message obtained by the combination can be referred to as a combined message for the convenience of subsequent description. In the embodiment of the present application, if the router cannot obtain multiple IP messages that meet the forwarding condition according to the newly received first IP message and the cached IP message, the first IP message can be cached. The combination of multiple IP messages here means that multiple IP messages are arranged in sequence, and a preset content of a specified length can be set between two adjacent IP messages to distinguish different IP messages. When combining multiple IP messages, they can be arranged in the order of the reception time of the IP messages, or in the order of the packet length of the IP messages from large to small, or in other ways, which are not limited.
[0159] In the embodiment of the present application, in order to further improve the bandwidth utilization, multiple IP packets in the combined packet may meet the condition of the same attribute. The attribute of the IP packet may include at least one of the following: next hop device, downstream preset hop device, destination address, SRH, and data stream to which the IP packet belongs. For example, if the attribute includes the data stream to which the IP packet belongs, then the multiple IP packets in the combined packet belong to the same data stream.
[0160] Step S23: perform SRv6 encapsulation on the combined message and then forward it.
[0161] After combining multiple IP messages, the router performs SRv6 encapsulation on the combined message, encapsulates the combined message with an SRv6 header, and obtains an encapsulated message, which is an SRv6 message. For the sake of distinction and understanding, the encapsulated message obtained here is referred to as the first SRv6 message. The router forwards the first SRv6 message to the next-hop device.
[0162] In the embodiment of the present application, the SRv6 header of the first SRv6 message can be determined according to the SRHs corresponding to the multiple IP messages included in the combined message. For example, the router obtains the same elements included in the segment list in the SRHs corresponding to the multiple IP messages included in the combined message, constructs a new segment list from these elements, and then constructs the required SRH to obtain the required SRv6 header. The SRv6 header of the first SRv6 message can also be the SRv6 header corresponding to any one of the IP messages included in the combined message.
[0163] In the technical solution provided by the embodiment of the present application, when the first IP message meets the preset combination condition, the first IP message and the cached IP message are combined, and an SRv6 header is encapsulated for the combined message, that is, multiple IP messages share one SRv6 header, which reduces the resource overhead of the SRv6 header when transmitting these multiple IP messages. In addition, SRv6 encapsulation is performed on multiple IP message combinations, so that the load of the encapsulated message (that is, multiple IP messages) accounts for an increased proportion of the entire message, and more valid data can be transmitted during the forwarding process of the message, thereby improving the bandwidth utilization rate when using SRv6 for message processing, improving the economy of bandwidth resources, and reducing the operating cost of bandwidth resources.
[0164] In some embodiments, the SRv6 header of the first SRv6 packet includes a first IPv6 header, an SRH, and a second IPv6 header.
[0165] The first IPv6 header includes the destination address and the source address, which is the IPv6 basic header in the above-mentioned related concepts. The structure of the first IPv6 header and SRH included in the SRv6 header of the first SRv6 message can be found in the above Figure 1 This section describes the IPv6 basic header and SRH.
[0166] The second IPv6 header includes a pointer field for filling a pointer, the pointer indicates the starting position of the packet header of the IP message, and the pointer corresponds to the IP message one by one.
[0167] In some embodiments, the second IPv6 header may further include: a header indication field, a header length field, a pointer number field, and a reserved extension field. The header indication field indicates that the second IPv6 header is a header including a pointer; the header length field indicates the length of the second IPv6 header; the pointer number field indicates the number of pointers included in the second IPv6 header; and the reserved field is a reserved extensible field.
[0168] Among them, when the SRv6 header of the first SRv6 message includes the second IPv6 header, it means that the payload of the first SRv6 message is a combined message, that is, the payload includes multiple IP messages. The number of multiple IP messages in the payload and the starting position of the header of each IP message are obtained through the pointer number field and the pointer field in the second IPv6 header. The starting position of the header of each IP message can be represented by the byte of the header in the payload, or by the relative position relative to other IP messages. In the case where there is only one IP message in the payload, the second IPv6 header is not included in the SRv6 message.
[0169] The second IPv6 header may be located between the SRH and the payload. The second IPv6 header may also be located between the first IPv6 header and the SRH.
[0170] See also Figure 3 , is a structural diagram of an SRv6 message provided in an embodiment of the present application, taking the second IPv6 header located between the SRH and the load as an example. Figure 3 In the figure, the numbers 0, 7, 15, 23, and 31 above the message indicate the bit positions.
[0171] The SRv6 message includes a first IPv6 header, an SRH, a second IPv6 header, and a payload. The first IPv6 header, the SRH, and the second IPv6 header form an SRv6 header, the first IPv6 header is an IPv6 basic header, and the payload is a combined message. For specific fields in the first IPv6 header and the SRH, refer to the description of the IPv6 basic header and the SRH in the above-mentioned related concepts.
[0172] The second IPv6 header includes:
[0173] Next Header, 8 bits in length, is used to identify the type of the next message header. The Next Header field is the Header Indication field.
[0174] Header Length: 8 bits long, indicating the length of the second IPv6 header. The Header Length field is the header length field.
[0175] Pointer Quantity: 8 bits in length, indicating the number of pointers included in the second IPv6 header.
[0176] Reserved, with a length of 8 bits, indicates an extensible field reserved in the second IPv6 header. The reserved field is a reserved extension field.
[0177] Pointer indicates the starting position of the header of each IP message in the payload. It corresponds to the IP message one by one and is arranged in the order of the IP messages in the payload from front to back. That is, Pointer 0 indicates the starting position of the header of the first IP message in the payload, Pointer 1 indicates the starting position of the header of the second IP message in the payload, and so on. The length of each pointer is 16 bits.
[0178] Multiple IP packets, i.e., payloads, constitute a combined packet. The payload is located after the second IPv6 header and is arranged in the order of the IP packets from front to back, i.e., IP Packet 0 is the first IP packet, IPPacket 1 is the second IP packet, and so on. The length of the payload is the total packet length of the combined packet.
[0179] In the technical solution provided by the embodiment of the present application, the IPv6 protocol is extended, and the SRv6 header for encapsulating IP messages is improved, so that the router can carry multiple IP messages through the improved SRv6 header, and indicate the number of multiple IP messages in the combined message and their positions in the load, so as to realize SRv6 encapsulation of multiple IP messages together and forward them to the corresponding router together. At the same time, the SRv6 header also includes a pointer indicating the starting position of the packet header of each IP message, so that the router can determine the position of each IP message, decapsulate the encapsulated combined message into multiple IP messages, and ensure the accurate forwarding of IP messages.
[0180] In some embodiments, the preset combination condition includes at least one of the following: Condition 1, the data flow to which the first IP packet belongs is a data flow with low delay sensitivity; Condition 2, the data flow to which the first IP packet belongs is a data flow of a preset service type of a preset user. The preset service type of the preset user can be set according to actual needs. For example, the preset service type of the preset user can include ordinary services of high-level users who pay special fees, and all services of low-level users who do not pay special fees.
[0181] In an embodiment of the present application, when the preset combination conditions include condition 1, the router only performs cache combination processing on IP packets of data streams with low delay sensitivity, that is, only performs cache combination processing on IP packets of data streams that do not require low delay. If the data stream to which the first IP packet belongs is a data stream with low delay sensitivity, the first IP packet can be cached in the router or combined with other cached IP packets, etc. Among them, data streams with low delay sensitivity include data streams of delay-insensitive services such as smart cities, security inspections and security, etc., and data streams with high delay sensitivity include data streams of delay-sensitive services such as real-time monitoring and autonomous driving, etc.
[0182] When the preset combination conditions include condition 2, after receiving the first IP message, the router can perform traffic analysis on the first IP message to obtain the user type and service type of the data flow to which the first IP message belongs. The user type can be distinguished according to the user level, the type of service purchased by the user, etc., and whether to cache and combine the first IP message is determined according to the user type and service type. For example, if the data flow to which the first IP message belongs is a data flow of ordinary business of a high-level user who pays a special fee, or the data flow to which the first IP message belongs is a data flow of ordinary business / core business of a low-level user who does not pay a special fee, the router can cache the first IP message or combine it with other cached IP messages, etc. If the data flow to which the first IP message belongs is a data flow of the core business of a high-level user who pays a special fee, the router directly encapsulates the first IP message in SRv6 and then forwards it.
[0183] In the embodiment of the present application, multiple conditions can be selected to form a preset combination condition according to actual needs. When the preset combination condition includes multiple conditions, if the first IP message meets all the conditions included in the preset combination condition, the router can cache the first IP message or combine it with other cached IP messages. When the first IP message does not meet any of the conditions included in the preset combination condition, the router can directly perform SRv6 encapsulation on the first IP message and then forward it.
[0184] The preset combination conditions include condition 1 and condition 2 as an example for explanation. For IP packets of data flows with high delay sensitivity, after receiving the IP packets, the router does not cache the IP packets, but immediately performs SRv6 encapsulation on the IP packets and then forwards them; for IP packets of data flows that do not belong to the preset service type of the preset user, after receiving the IP packets, the router does not cache the IP packets, but immediately performs SRv6 encapsulation on the IP packets and then forwards them; for IP packets of data flows with low delay sensitivity and belonging to the preset service type of the preset user, after receiving the IP packets, the router combines the IP packets with the cached IP packets, and then performs SRv6 encapsulation on the combined packets and then forwards them.
[0185] In the technical solution provided by the embodiment of the present application, the router determines whether the first IP message meets the preset combination condition according to the delay requirement, user type and service type of the data flow to which the first IP message belongs. The router only caches and combines the IP messages that meet the preset combination condition, and for the IP messages that do not meet the preset combination condition, the router directly performs SRv6 encapsulation on the message and then forwards it, so that the message can reach the next hop router as quickly as possible, while improving bandwidth utilization and meeting the delay requirements of different users in different service scenarios.
[0186] In an embodiment of the present application, when the first IP message meets the preset combination condition, in order to facilitate the control of the combination of messages, the router can perform different processing on the first IP message according to the packet length of the first IP message after receiving the first IP message, which can specifically include the following two situations.
[0187] Case 1: the packet length of the first IP message is less than or equal to the first preset packet length.
[0188] In case 1, the packet length of the first IP message is relatively small, indicating that the bandwidth utilization of directly encapsulating the first IP message with SRv6 is not within an acceptable range. The first preset packet length can be set according to actual needs. In this case, the router combines the first IP message with the cached IP message, performs SRv6 encapsulation on the combined message and then forwards it, clears the cached IP message, so as to combine the first IP message with other IP messages for forwarding, thereby improving bandwidth utilization.
[0189] In some embodiments, in order to further improve bandwidth utilization and avoid message disorder, in case 1, the router can detect whether the attributes of the first IP message are the same as any cached IP message, which can be specifically divided into the following two cases.
[0190] In case a, the first IP packet has the same attribute as any cached IP packet.
[0191] In case a, the router may perform different processing according to the total packet length of the first IP packet and the cached IP packets, which may be specifically divided into the following two cases.
[0192] In case a1, the total packet length of the first IP packet and the cached IP packets is greater than the MTU.
[0193] In case a1, the cached IP packets are combined, the combined packets are encapsulated with SRv6 and then forwarded, and the cached IP packets are cleared. That is, when it is detected that the total packet length of the first IP packet and the cached IP packets is greater than the MTU, the total packet length exceeds the maximum transmission unit that can be transmitted, the router combines the cached IP packets to obtain a combined packet, performs SRv6 encapsulation on the combined packet, obtains the first SRv6 packet, and forwards the first SRv6 packet. At the same time, the router clears the cached IP packets, and after clearing the cached IP packets, caches the first IP packet, so as to combine the first IP packet with other IP packets for forwarding.
[0194] In case a2, the total packet length of the first IP packet and the cached IP packet is less than or equal to the MTU. The router combines the first IP packet and the cached IP packet, performs SRv6 encapsulation on the combined packet and forwards it, and clears the cached IP packet; or, caches the first IP packet after the cached IP packet.
[0195] In some embodiments, in order to reduce the delay of message transmission while improving bandwidth utilization, the router may set a second preset packet length, which is the minimum length value that can meet the bandwidth utilization requirement.
[0196] If the total packet length of the first IP message and the cached IP message is greater than or equal to the second preset packet length, the first IP message and the cached IP message meet the minimum requirement of bandwidth utilization, the router combines the first IP message and the cached IP message, performs SRv6 encapsulation on the combined message and then forwards it, and clears the cached IP message; if the total packet length of the first IP message and the cached IP message is less than the second preset packet length, the first IP message and the cached IP message do not meet the minimum requirement of bandwidth utilization, and the router caches the first IP message after the cached IP message.
[0197] In the embodiment of the present application, when the router determines that the packet length of the first IP message is less than or equal to the first preset packet length (case 1), the first IP message can be cached, that is, the first IP message is cached after the cached IP message. When a new IP message is received, if the total packet length of the new IP message with a packet length less than or equal to the first preset packet length and the cached IP message is less than or equal to the MTU, the new IP message continues to be cached until the total packet length of the new IP message with a packet length less than or equal to the first preset packet length and the cached IP message is greater than the MTU. At this time, the router combines the cached IP messages, performs SRv6 encapsulation on the combined messages, and then forwards them; clears the cached IP messages; after clearing the cached IP messages, caches the latest IP messages.
[0198] In some embodiments, when the router determines that the packet length of the first IP packet is less than or equal to the first preset packet length (case 1), if the total number of the first IP packet and the cached IP packets is greater than the preset number, the router combines the first IP packet and the cached IP packet, performs SRv6 encapsulation on the combined packet and forwards it, and clears the cached IP packet.
[0199] In case b, the attributes of the first IP packet and the cached IP packet are different.
[0200] In case b, the first IP message and each cached IP message have different attributes, and the router caches the first IP message. In addition, in order to meet the delay requirement of message forwarding, the router starts a timer to ensure the delay requirement of IP message forwarding.
[0201] In an embodiment of the present application, the router can set a timer for each cached IP message. For example, the router caches the IP message, configures and starts a corresponding timer for the IP message. The duration set by the timer meets the delay requirement of the data flow to which the IP message belongs. The router can also set a timer for the earliest cached IP message. For example, when a cache queue is emptied and the first IP message is cached, the router configures and starts a corresponding timer for the IP message, and when the IP message is cached in the cache queue later, the timer is no longer configured.
[0202] In some embodiments, when the timer times out, the router combines the cached IP packets corresponding to the timer, performs SRv6 encapsulation on the combined packets, and then forwards them; and clears the cached IP packets corresponding to the timer.
[0203] In the embodiment of the present application, when the timer corresponding to any cached IP message times out, the router processes the cached IP message corresponding to the timer that has timed out, combines the corresponding cached multiple IP messages to obtain a combined message, and forwards it after SRv6 encapsulation. By setting a timer for the cached IP message, it is possible to prevent the IP message from being cached in the router for too long, causing data transmission lag and excessive transmission delay.
[0204] Case 2: The packet length of the first IP message is greater than the first preset packet length.
[0205] In case 2, the packet length of the first IP message is relatively large, indicating that the bandwidth utilization of directly encapsulating the first IP message with SRv6 is within an acceptable range. In this case, the router can directly encapsulate the first IP message with SRv6 and then forward it to meet the requirement of forwarding the first IP message as soon as possible. The router can also directly combine the first IP message with the cached IP message, and then encapsulate the combined message with SRv6 and then forward it to meet the requirement of improving bandwidth utilization.
[0206] In some embodiments, in order to further improve bandwidth utilization and avoid message disorder, in situation 2, the router can also detect whether the attributes of the first IP message are the same as any cached IP message, which can be specifically divided into the following two situations.
[0207] In case a, the first IP packet has the same attribute as any cached IP packet.
[0208] In case a, the router may perform different processing according to the total packet length of the first IP packet and the cached IP packets, which may be specifically divided into the following two cases.
[0209] In case a1, the total packet length of the first IP message and the cached IP message is greater than the MTU. The router combines the cached IP messages, performs SRv6 encapsulation on the combined message and then forwards it, and the cached IP message is cleared. After clearing the cached IP message, the router performs SRv6 encapsulation on the first IP message and then forwards it. That is, before the router performs SRv6 encapsulation on the first IP message and then forwards it, it first performs SRv6 encapsulation on the cached IP message and then forwards it, so as to ensure the forwarding order of the messages with the same attributes when the router forwards them, and avoid message disorder.
[0210] In case a2, the total packet length of the first IP packet and the cached IP packet is less than or equal to the MTU. The router combines the first IP packet and the cached IP packet, performs SRv6 encapsulation on the combined packet, and then forwards it, clearing the cached IP packet.
[0211] In case b, the attributes of the first IP packet and the cached IP packet are different.
[0212] In case b, the attributes of the first IP packet and each cached IP packet are different, and the router directly performs SRv6 encapsulation on the first IP packet and then forwards it.
[0213] In the embodiment of the present application, the attribute of the IP message may include at least one of the following: a next hop device, a downstream preset hop device, a destination address, an SRH, and a data stream to which the IP message belongs. For example, the attribute includes a next hop device. If the next hop device of the first IP message is the same as the next hop device of the cached IP message, then the attribute of the first IP message is the same as the attribute of the cached IP message.
[0214] In addition, in order to improve the efficiency of message processing and facilitate message combination and encapsulation, the router can cache IP messages according to the attributes of the IP messages.
[0215] For example, if the attribute includes SRH, the router can cache IP packets according to SRH, that is, cache IP packets to the cache queue pointed to by the corresponding SRH. For another example, if the attribute includes the next-hop device, the router can cache IP packets according to the next-hop device, that is, cache IP packets to the cache queue pointed to by the corresponding next-hop device. Among them, the SRH corresponding to the IP packet can be understood as the SRH that the IP packet should be encapsulated, and the next-hop device corresponding to the IP packet can be understood as the next-hop device when the router forwards the IP packet.
[0216] In the embodiment of the present application, when the router performs different processing according to the packet length of the first IP message, the cached IP message has the same attributes as the first IP message and the multiple IP messages in the combined message, such as the above-mentioned next hop device, downstream preset hop device, destination address, SRH, and one or more attributes in the data stream to which the IP message belongs. For example, if the attribute includes the destination address, the cached IP message, the first IP message, and the multiple IP messages in the combined message have the same destination address.
[0217] In some embodiments, Figure 4 , which is a second flow chart of the message processing method provided in an embodiment of the present application.
[0218] Step S41, receiving an SRv6 message.
[0219] In the embodiment of the present application, the router can Figure 2 The packet processing method shown in the figure obtains the SRv6 packet and sends the SRv6 packet to other routers; other routers can also use the above method to Figure 2 The message processing method shown obtains an SRv6 message and sends the SRv6 message to the router. The router receives the SRv6 message sent by other routers. For the convenience of distinction and understanding, the message received here is referred to as the second SRv6 message. The second SRv6 message includes an SRv6 header and a payload. When the payload of the second SRv6 message includes an IP message, the SRv6 header is referred to as Figure 1 As shown; when the payload of the second SRv6 message includes multiple IP messages, the SRv6 header is shown in Figure 3 shown.
[0220] Step S42: strip the SRv6 header of the SRv6 message to obtain multiple IP messages.
[0221] In the embodiment of the present application, when the second SRv6 message is a message obtained by combining and encapsulating multiple IP messages, the payload of the second SRv6 message includes multiple IP messages. The router strips off the SRv6 header of the second SRv6 message. After the router strips off the SRv6 header, multiple IP messages are obtained. In the embodiment of the present application, the router can Figure 3 The pointer in the SRv6 header shown identifies and splits the payload of the second SRv6 message to obtain multiple IP messages.
[0222] Step S43: forward each IP message according to the obtained destination address of each IP message.
[0223] In the embodiment of the present application, after obtaining multiple IP messages, the router forwards each IP message to the destination address of the IP message.
[0224] In the technical solution provided in the embodiment of the present application, when the router cannot continue to forward multiple IP messages in the combined message together, it supports decapsulation of the second SRv6 message, stripping off the SRv6 header encapsulated in the second SRv6 message, and obtaining multiple IP messages, so that the router can forward the multiple IP messages separately, thereby improving network reliability and the flexibility of the message processing method.
[0225] In some embodiments, Figure 5 , which is a structural diagram of the message processing system provided in an embodiment of the present application.
[0226] The SRv6 segment routing bearer inlet (router) performs traffic identification on multiple received IP packets to distinguish the latency requirements of the data flows to which they belong. The SRv6 segment routing bearer inlet performs cache management on IP packets of data flows with low latency sensitivity, and carries and encapsulates multiple IP packets, that is, combines multiple IP packets, and performs SRv6 encapsulation before forwarding. For specific processing methods, see the description of the above-mentioned packet processing method and related parts. The SRv6 segment routing bearer inlet directly performs SRv6 encapsulation before forwarding IP packets of data flows with high latency sensitivity.
[0227] The SRv6 segment routing bearer egress (router) performs traffic identification on the SRv6 message to distinguish the SRv6 message forwarded by combined encapsulation and the SRv6 message forwarded by direct encapsulation. The SRv6 segment routing bearer egress decapsulates the SRv6 message containing multiple IP messages (SRv6 message forwarded by combined encapsulation) and performs subsequent processing on the obtained multiple IP messages. For the specific processing method, see the above Figure 4 The SRv6 segment routing bearer egress directly decapsulates the directly forwarded SRv6 message and then forwards it.
[0228] See also Figure 6, which is a third flow chart of the message processing method provided in the embodiment of the present application. The data flow to which the attribute belongs to the IP message is taken as an example for explanation. The cached IP message (i.e., cached IP message) described below represents the IP message cached in the cache queue indicated by the SRH corresponding to the first IP message.
[0229] Step S61: The router receives a first IP message and determines a service type of the first IP message.
[0230] The router receives the first IP message, performs traffic identification on the first IP message, and determines the service type to which the first IP message belongs.
[0231] Step S62: The router determines whether the delay sensitivity is low and whether it is a preset service type.
[0232] In the embodiment of the present application, the router determines whether the data stream to which the first IP message belongs is a data stream with low delay sensitivity, and determines whether the service type of the first IP message is a preset service type of a preset user. If not, that is, the data stream to which the first IP message belongs is a data stream with high delay sensitivity, or the data stream to which the first IP message belongs is not a data stream of the preset service type of the preset user, then step S63 is executed; if yes, that is, the data stream to which the first IP message belongs is a data stream with low delay sensitivity, and the data stream to which the first IP message belongs is a data stream of the preset service type of the preset user, then step S64 is executed.
[0233] Step S63: The router performs SRv6 encapsulation and forwards the packet.
[0234] After executing step S62, if the router determines that the data flow to which the first IP message belongs is a data flow with high delay sensitivity, step S63 is executed to perform SRv6 encapsulation on the first IP message and then forward it.
[0235] Step S64: The router determines whether the first IP message needs to be combined.
[0236] After executing step S62, if the router determines that the data stream to which the first IP message belongs is a data stream with low delay sensitivity, step S64 is executed to determine whether the first IP message needs to be combined according to the packet length of the first IP message. When the packet length of the first IP message is greater than or equal to the first preset packet length, the first IP message does not need to be combined, and step S65 is executed; when the packet length of the first IP message is less than the first preset packet length, the first IP message needs to be combined, and step S611 is executed.
[0237] Step S65: The router determines whether there is an IP message of the same data stream.
[0238] The router determines whether there is an IP message of the same data stream, that is, whether there is an IP message belonging to the data stream to which the first IP message belongs in the cached IP message (that is, the cached IP message), and whether the attributes of the first IP message are the same as those of any cached IP message. If not, that is, there is no IP message belonging to the data stream to which the first IP message belongs in the cached IP message, and the attributes of the first IP message and each cached IP message are different, then the router returns to node B and continues to execute step S63, performing SRv6 encapsulation on the first IP message and forwarding it; if yes, that is, there is an IP message belonging to the data stream to which the first IP message belongs in the cached IP message, and the attributes of the first IP message and any cached IP message are the same, then execute step S66.
[0239] Step S66: The router determines whether the combination of the first IP message and the cached IP message exceeds the MTU.
[0240] The router determines whether the combination of the first IP message and the cached IP message exceeds the MTU, that is, determines whether the total packet length of the first IP message and the cached IP message is greater than the MTU. If not, that is, the total packet length of the first IP message and the cached IP message is less than or equal to the MTU, then execute step S67; if yes, that is, the total packet length of the first IP message and the cached IP message is greater than the MTU, then execute step S68.
[0241] Step S67: The router combines the first IP message and the cached IP message to obtain a combined message.
[0242] The router combines the first IP message and the cached IP message to obtain a combined message, returns to node B, and continues to execute step S63 to perform SRv6 encapsulation on the combined message and then forward it.
[0243] Step S68: The router combines the cached IP messages to obtain a combined message, and performs SRv6 encapsulation on the combined message before forwarding it.
[0244] Step S69: the router clears the cached IP messages, that is, clears the corresponding cache queue.
[0245] In step S610, the router performs SRv6 encapsulation on the first IP message and forwards it, and returns it to node A, and then continues to execute step S61.
[0246] Step S611: The router determines whether there is an IP message of the same data flow.
[0247] In the embodiment of the present application, please refer to the relevant description of the above step S65 for details. If not, then execute step S612; if so, then execute step S614.
[0248] Step S612: The router adds the first IP message to the cache queue.
[0249] In step S613, the router starts the timer and returns to node A to continue executing step S61.
[0250] The duration of the timer is less than or equal to the delay requirement of the data flow to which the first IP packet belongs.
[0251] Step S614: The router determines whether the combination of the first IP message and the cached IP message exceeds the MTU.
[0252] In the embodiment of the present application, please refer to the relevant description of the above step S66 for details. If yes, then execute step S615; if no, then execute step S617.
[0253] Step S615: The router combines the cached IP messages to obtain a combined message, and performs SRv6 encapsulation on the combined message before forwarding it.
[0254] Step S616: The router clears the cached IP message.
[0255] After executing step S616, the router returns to node D and continues to execute step S612.
[0256] Step S617: The router determines whether the combination of the first IP message and the cached IP message reaches a threshold.
[0257] In the embodiment of the present application, the router determines whether the combination of the first IP message and the cached IP message reaches the threshold, that is, determines whether the total packet length of the first IP message and the cached IP message is greater than or equal to the second preset packet length. If yes, it returns to node C and continues to execute step S67; if not, it executes step S618.
[0258] Step S618: The router adds the first IP packet to the end of the cache queue.
[0259] In the embodiment of the present application, the router adds the first IP message to the end of the cached IP message, returns to node A, and continues to execute step S61.
[0260] The above steps S61 to S618 can be found in Figure 1-Figure 5 Description of the message processing method and related parts.
[0261] See also Figure 7 , which is based on the embodiment of the present application Figure 6 A partial flowchart of a message processing method.
[0262] Step S71: The router confirms that the timer has timed out.
[0263] In the embodiment of the present application, when the router determines that any timer has timed out, step S72 to step S73 are executed. For the configuration of the timer, refer to the description of step S613 above.
[0264] Step S72: The router combines the cached IP messages to obtain a combined message, and performs SRv6 encapsulation on the combined message before forwarding it.
[0265] Step S73: The router clears the cached IP message and returns to node A.
[0266] For the above steps S71 to S73, reference may be made to the description of the above-mentioned message processing method of the timer and related parts.
[0267] By applying the technical solution provided in the embodiments of the present application, in application scenarios where bandwidth resources are precious, such as satellite Internet, based on the judgment of user level and service type, SRv6 encapsulation and forwarding are performed for data streams with low delay sensitivity using a multi-message combination method, thereby solving the problem of low bandwidth utilization caused by sending IP messages with short packet lengths separately. Under the premise of ensuring the differentiated carrying capacity of the network, the SRv6 bearer bandwidth utilization can be effectively improved within an adjustable delay range and packet length range.
[0268] By applying the technical solution provided in the embodiment of the present application, the SRv6 header does not need to be compressed, the corresponding requirements for traditional operation and maintenance facilities will not be increased, and the message processing overhead is relatively small. In addition, in the embodiment of the present application, by setting the attributes of the IP message, such as the destination address, SRH, the data stream to which the IP message belongs, etc., only the edge routers at both ends need to be operated, and each hop router does not need to be involved. It is only necessary to enable the corresponding function on the edge router, which is more compatible with traditional operation and maintenance facilities.
[0269] Cloud network services mainly include cloud-in services, cloud-edge services, and edge-edge services. Due to the different quality assurance requirements of various services, the bearer network needs to provide differentiated bearer capabilities. The technical solution provided in the embodiment of the present application combines and transmits multiple messages for service messages with low delay sensitivity on the premise of ensuring the delay requirements of services with high delay sensitivity, thereby improving the utilization efficiency of network transmission bandwidth, which can better improve the carrying capacity of cloud-network integration and meet the carrying requirements of various types of cloud network services, especially in intersatellite link scenarios with limited bandwidth resources, and has good application prospects and commercial value.
[0270] Corresponding to the above-mentioned message processing method, the embodiment of the present application also provides a message processing device, such as Figure 8 FIG. 1 is a schematic diagram of a structure of a message processing device provided in an embodiment of the present application, and the device includes:
[0271] A first receiving module 81, configured to receive a first IP message;
[0272] A combining module 82, configured to combine the first IP packet with the cached IP packet when the first IP packet meets a preset combining condition;
[0273] The first forwarding module 83 is used to perform SRv6 encapsulation on the combined message and then forward it.
[0274] In some embodiments, the preset combination condition includes at least one of the following:
[0275] The data stream to which the first IP packet belongs is a data stream with low delay sensitivity;
[0276] The data flow to which the first IP message belongs is a data flow of a preset service type of a preset user.
[0277] In some embodiments, the combination module 82 is further configured to:
[0278] When the first IP packet does not meet the preset combination condition, the first IP packet is encapsulated in SRv6 and then forwarded.
[0279] In some embodiments, the combination module 82 is further configured to:
[0280] When the first IP message meets the preset combination condition, if the packet length of the first IP message is less than or equal to the first preset packet length, combining the first IP message and the cached IP message;
[0281] The combined message is encapsulated in SRv6 and then forwarded;
[0282] Clear the cached IP packets.
[0283] In some embodiments, the combination module 82 is further used to:
[0284] When the packet length of the first IP packet is less than or equal to the first preset packet length, if the first IP packet and the cached IP packet have the same attribute, the total packet length of the first IP packet and the cached IP packet is less than or equal to the MTU, and the total packet length of the first IP packet and the cached IP packet is greater than or equal to the second preset packet length, then combine the first IP packet and the cached IP packet;
[0285] The combined message is encapsulated in SRv6 and then forwarded;
[0286] Clear the cached IP packets.
[0287] In some embodiments, the combination module 82 is further configured to:
[0288] When the packet length of the first IP packet is less than or equal to the first preset packet length, if the first IP packet and the cached IP packet have the same attribute, and the total packet length of the first IP packet and the cached IP packet is greater than the MTU, then combine the cached IP packets;
[0289] The combined message is encapsulated in SRv6 and then forwarded;
[0290] Clear cached IP packets;
[0291] After clearing the cached IP packets, the first IP packet is cached.
[0292] In some embodiments, the combination module 82 is further configured to:
[0293] When the packet length of the first IP message is less than or equal to the first preset packet length, if the first IP message and the cached IP message have the same attributes, and the total packet length of the first IP message and the cached IP message is less than the second preset packet length, then the first IP message is cached after the cached IP message.
[0294] In some embodiments, the combination module 82 is further configured to:
[0295] When the packet length of the first IP packet is less than or equal to the first preset packet length, if the attributes of the first IP packet and the cached IP packet are different, cache the first IP packet;
[0296] Start the timer.
[0297] In some embodiments, the combination module 82 is further configured to:
[0298] When the timer times out, combining the cached IP packets corresponding to the timer;
[0299] The combined message is encapsulated in SRv6 and then forwarded;
[0300] Clear the cached IP packets corresponding to the timer.
[0301] In some embodiments, the combination module 82 is further configured to:
[0302] When the packet length of the first IP packet is greater than the first preset packet length, if the first IP packet and the cached IP packet have the same attribute, and the total packet length of the first IP packet and the cached IP packet is greater than the MTU, combining the cached IP packets;
[0303] The combined message is encapsulated in SRv6 and then forwarded;
[0304] Clear cached IP packets;
[0305] The first IP message is encapsulated in SRv6 and then forwarded.
[0306] In some embodiments, the combination module 82 is further configured to:
[0307] When the packet length of the first IP packet is greater than the first preset packet length, if the first IP packet and the cached IP packet have the same attribute, and the total packet length of the first IP packet and the cached IP packet is less than or equal to the MTU, then combining the first IP packet and the cached IP packet;
[0308] The combined message is encapsulated in SRv6 and then forwarded;
[0309] Clear the cached IP packets.
[0310] In some embodiments, the combination module 82 is further configured to:
[0311] When the packet length of the first IP packet is greater than the first preset packet length, if the first IP packet and the cached IP packet have different attributes, the first IP packet is forwarded after SRv6 encapsulation.
[0312] In some embodiments, the attribute includes at least one of the following:
[0313] Next hop device, downstream preset hop device, destination address, SRH, and the data flow to which the IP packet belongs.
[0314] In some embodiments, the SRv6 header of the message after SRv6 encapsulation includes a first IPv6 header, an SRH, and a second IPv6 header;
[0315] The first IPv6 header includes a destination address and a source address;
[0316] The second IPv6 header includes a pointer field;
[0317] The pointer field is used to fill a pointer, the pointer indicates the starting position of the packet header of the IP message, and the pointer corresponds to the IP message one by one;
[0318] The second IPv6 header is located between the SRH and the load; or, the second IPv6 header is located between the first IPv6 header and the SRH.
[0319] In some embodiments, the second IPv6 header further includes: a header indication field, a header length field, a pointer number field, and a reserved extension field;
[0320] The header indication field indicates that the second IPv6 header is a header including a pointer;
[0321] The header length field indicates the length of the second IPv6 header;
[0322] The pointer number field indicates the number of pointers included in the second IPv6 header;
[0323] The reserved extension field is a reserved extensible field.
[0324] In some embodiments, the apparatus further comprises:
[0325] A second receiving module, used to receive an SRv6 message;
[0326] A stripping module, used for stripping the SRv6 header of the SRv6 message to obtain multiple IP messages;
[0327] The second forwarding module is used to forward each IP message according to the obtained destination address of each IP message.
[0328] In the technical solution provided by the embodiment of the present application, when the first IP message meets the preset combination condition, the first IP message and the cached IP message are combined, and an SRv6 header is encapsulated for the combined message, that is, multiple IP messages share one SRv6 header, which reduces the resource overhead of the SRv6 header when transmitting these multiple IP messages. In addition, SRv6 encapsulation is performed on multiple IP message combinations, so that the load of the encapsulated message (that is, multiple IP messages) accounts for an increased proportion of the entire message, and more valid data can be transmitted during the forwarding process of the message, thereby improving the bandwidth utilization rate when using SRv6 for message processing, improving the economy of bandwidth resources, and reducing the operating cost of bandwidth resources.
[0329] The present application also provides a network device, such as the above router, Fig. 9 As shown, it includes a processor 91, a communication interface 92, a memory 93 and a communication bus 94, wherein the processor 91, the communication interface 92, and the memory 93 communicate with each other through the communication bus 94.
[0330] Memory 93, used for storing computer programs;
[0331] The processor 91 is used to execute the program stored in the memory 93 to achieve the above Figure 1-Figure 7 The steps of the message processing method are shown.
[0332] The communication bus mentioned in the above network device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0333] The communication interface is used for communication between the above network devices and other devices.
[0334] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0335] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0336] In another embodiment provided in the present application, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the above-mentioned Figure 1-Figure 7 The steps of the message processing method are shown.
[0337] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the above Figure 1-Figure 7 The steps of the message processing method are shown.
[0338] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0339] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0340] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, network device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0341] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A message processing method, characterized in that: The method comprises: Receive a first IP message; When the first IP packet meets a preset combination condition, combining the first IP packet with the cached IP packet; The combined message is encapsulated in SRv6 and then forwarded.
2. The method according to claim 1, characterized in that The preset combination condition includes at least one of the following: The data stream to which the first IP packet belongs is a data stream with low delay sensitivity; The data flow to which the first IP message belongs is a data flow of a preset service type of a preset user.
3. The method according to claim 2, characterized in that The method further comprises: When the first IP packet does not meet the preset combination condition, the first IP packet is encapsulated in SRv6 and then forwarded.
4. The method according to claim 1, characterized in that: When the first IP message meets the preset combination condition, the method further includes: If the packet length of the first IP packet is less than or equal to the first preset packet length, combining the first IP packet and the cached IP packet; The combined message is encapsulated in SRv6 and then forwarded; Clear the cached IP packets.
5. The method according to claim 4, characterized in that When the packet length of the first IP message is less than or equal to the first preset packet length, the method further includes: If the first IP packet and the cached IP packet have the same attributes, the total packet length of the first IP packet and the cached IP packet is less than or equal to the maximum transmission unit MTU, and the total packet length of the first IP packet and the cached IP packet is greater than or equal to the second preset packet length, then combine the first IP packet and the cached IP packet; The combined message is encapsulated in SRv6 and then forwarded; Clear the cached IP packets.
6. The method according to claim 4, characterized in that When the packet length of the first IP message is less than or equal to the first preset packet length, the method further includes: If the first IP message and the cached IP message have the same attribute, and the total packet length of the first IP message and the cached IP message is greater than the MTU, combining the cached IP message; The combined message is encapsulated in SRv6 and then forwarded; Clear cached IP packets; After clearing the cached IP packets, the first IP packet is cached.
7. The method according to claim 4, characterized in that When the packet length of the first IP message is less than or equal to the first preset packet length, the method further includes: If the first IP message and the cached IP message have the same attribute, and the total packet length of the first IP message and the cached IP message is less than the second preset packet length, the first IP message is cached after the cached IP message.
8. The method according to claim 4, characterized in that When the packet length of the first IP message is less than or equal to the first preset packet length, the method further includes: If the attributes of the first IP packet and the cached IP packet are different, caching the first IP packet; Start the timer.
9. The method according to claim 8, characterized in that The method further comprises: When the timer times out, combining the cached IP packets corresponding to the timer; The combined message is encapsulated in SRv6 and then forwarded; Clear the cached IP packets corresponding to the timer.
10. The method according to claim 4, characterized in that When the packet length of the first IP message is greater than the first preset packet length, the method further includes: If the first IP message and the cached IP message have the same attribute, and the total packet length of the first IP message and the cached IP message is greater than the MTU, combining the cached IP message; The combined message is encapsulated in SRv6 and then forwarded; Clear cached IP packets; The first IP message is encapsulated in SRv6 and then forwarded.
11. The method according to claim 4, characterized in that When the packet length of the first IP message is greater than the first preset packet length, the method further includes: If the first IP packet and the cached IP packet have the same attribute, and the total packet length of the first IP packet and the cached IP packet is less than or equal to the MTU, combining the first IP packet and the cached IP packet; The combined message is encapsulated in SRv6 and then forwarded; Clear the cached IP packets.
12. The method according to claim 4, characterized in that When the packet length of the first IP message is greater than the first preset packet length, the method further includes: If the attributes of the first IP packet and the cached IP packet are different, the first IP packet is encapsulated in SRv6 and then forwarded.
13. The method according to any one of claims 5 to 12, characterized in that: The attributes include at least one of the following: Next hop device, downstream preset hop device, destination address, segment routing header SRH, and the data stream to which the IP packet belongs.
14. The method according to any one of claims 1 to 12, characterized in that: The SRv6 header of the message after SRv6 encapsulation includes a first IPv6 header, an SRH, and a second IPv6 header; The first IPv6 header includes a destination address and a source address; The second IPv6 header includes a pointer field; The pointer field is used to fill a pointer, the pointer indicates the starting position of the packet header of the IP message, and the pointer corresponds to the IP message one by one; The second IPv6 header is located between the SRH and the load; or, the second IPv6 header is located between the first IPv6 header and the SRH.
15. The method according to claim 14, characterized in that The second IPv6 header also includes: a header indication field, a header length field, a pointer number field, and a reserved extension field; The header indication field indicates that the second IPv6 header is a header including a pointer; The header length field indicates the length of the second IPv6 header; The pointer number field indicates the number of pointers included in the second IPv6 header; The reserved extension field is a reserved extensible field.
16. The method according to any one of claims 1 to 12, characterized in that: The method further comprises: Receive SRv6 packets; Stripping the SRv6 header of the SRv6 message to obtain multiple IP messages; Forward each IP message according to the destination address of each IP message obtained.
17. A message processing device, characterized in that: The device comprises: A first receiving module, used for receiving a first IP message; A combining module, used for combining the first IP packet and the cached IP packet when the first IP packet meets a preset combination condition; The first forwarding module is used to perform SRv6 encapsulation on the combined message and then forward it.
18. A network device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1-16 when executing a program stored in a memory.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 16 are implemented.
