Packet forwarding method and apparatus, network device, and storage medium
By sending combined messages in a deterministic network and sharing IPv6 headers and SRH, the problem of SRv6 message headers occupying bandwidth is solved and bandwidth utilization is improved.
Patent Information
- Application Number
- PCT/CN2023/121511
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2025-04-03
AI Technical Summary
In deterministic networks, the header of SRv6 packets is long, resulting in a large amount of CSQF forwarding resources being occupied, seriously affecting bandwidth utilization.
The service message sent by the user-side device is received in the first network device and cached it in the scheduling queue corresponding to the deterministic flow. Upon reaching the scheduling cycle of the scheduling queue, a combined message is sent to the second network device, which includes an IPv6 header, a SRH, and a plurality of service messages in the scheduling queue, sharing one IPv6 header and one SRH.
It reduces the use of transmission bandwidth by IPv6 headers and SRH, and improves the bandwidth utilization of CSQF forwarding.
Smart Images

Figure CN2023121511_03042025_PF_FP_ABST
Abstract
Description
Message forwarding method, device, network equipment and storage medium Technical Field
[0001] The present application relates to the field of network communication technology, and in particular to a message forwarding method, apparatus, network equipment, and storage medium. Background Art
[0002] With the development of the industrial Internet and the metaverse, remote interactive services have put forward more stringent requirements on network latency, jitter, and packet loss. Deterministic network technology has become a wide area network solution that meets the above requirements.
[0003] A deterministic network is a network that provides deterministic service assurance capabilities for the services it carries. It can guarantee deterministic service indicators such as latency, latency jitter, and packet loss rate. Deterministic network technology is a new type of service quality (QoS) assurance technology.
[0004] Currently, deterministic networks can be implemented based on the Cyclic Specific Queuing and Forwarding (CSQF) mechanism. The Software Defined Network (SDN) controller can plan the forwarding path of deterministic service packets in the deterministic network and specify the CSQF forwarding resources of each hop network device in the deterministic network so that the network devices forward packets according to the specified CSQF forwarding resources.
[0005] In the CSQF mechanism, all messages sent in each cycle are SRv6 messages. However, due to the long header of the SRv6 message, a large amount of CSQF forwarding resources are used to forward the header of the SRv6 message, which seriously affects the bandwidth utilization of CSQF forwarding.
[0006] Summary of the Invention
[0007] The purpose of the embodiments of the present application is to provide a message forwarding method, apparatus, network device, and storage medium for improving bandwidth utilization of CSQF forwarding. The specific technical solution is as follows:
[0008] In a first aspect, an embodiment of the present application provides a message forwarding method, applied to a first network device, the method comprising:
[0009] Receive service messages sent by user-side devices;
[0010] Cache the service message in the scheduling queue corresponding to the deterministic flow to which the service message belongs;
[0011] When the scheduling period of the scheduling queue is reached, a combined message is sent to the second network device, where the combined message includes an IPv6 header, a segment routing header (SRH), and multiple service messages in the scheduling queue.
[0012] In a possible implementation, the combined message further includes an extension header, and the extension header includes the message length of each service message in the combined message.
[0013] In a possible implementation, the SRH includes a next header field, and the next header field is used to indicate that the next header after the SRH is the extended header.
[0014] In a possible implementation, the size of the combined message is smaller than or equal to a maximum transmission unit MTU.
[0015] In a possible implementation, the extended header further includes a next header field and an extended header length field;
[0016] The next header field and the extended header length field each occupy 8 bits;
[0017] Each message length included in the extended header occupies 16 bits;
[0018] When the total number of bits occupied by the next header field, the extended header field and each message length included in the extended header is not an integer multiple of 32 bits, the extended header also includes an end field, which occupies 16 bits and has a value of 0.
[0019] In a second aspect, an embodiment of the present application provides a message forwarding method, applied to a third network device, the method comprising:
[0020] receiving a combined message, the combined message including an IPv6 header, a segment routing header (SRH), and multiple service messages, where the multiple service messages belong to the same deterministic flow;
[0021] Forward the multiple service messages to the user-side device.
[0022] In a possible implementation, the combined message further includes an extension header, where the extension header includes the message length of each service message in the combined message; and after receiving the combined message, the method further includes:
[0023] Based on the message length of each service message included in the extended header, the multiple service messages are obtained from the combined message.
[0024] In a possible implementation, the SRH includes a next header field, and the next header field is used to indicate that the next header after the SRH is the extended header.
[0025] In a possible implementation, the size of the combined message is smaller than or equal to a maximum transmission unit MTU.
[0026] In a possible implementation, the extended header further includes a next header field and an extended header length field;
[0027] The next header field and the extended header length field each occupy 8 bits;
[0028] Each message length included in the extended header occupies 16 bits;
[0029] When the total number of bits occupied by the next header field, the extended header field and each message length included in the extended header is not an integer multiple of 32 bits, the extended header also includes an end field, which occupies 16 bits and has a value of 0.
[0030] In a third aspect, an embodiment of the present application provides a message forwarding device, applied to a first network device, the device comprising:
[0031] A receiving module, configured to receive service messages sent by user-side devices;
[0032] A cache module, configured to cache the service message in a scheduling queue corresponding to the deterministic flow to which the service message belongs;
[0033] A sending module is used to send a combined message to the second network device when the scheduling period of the scheduling queue is reached, where the combined message includes an IPv6 header, a segment routing header SRH and multiple service messages in the scheduling queue.
[0034] In a possible implementation, the combined message further includes an extension header, and the extension header includes the message length of each service message in the combined message.
[0035] In a possible implementation, the SRH includes a next header field, and the next header field is used to indicate that the next header after the SRH is the extended header.
[0036] In a possible implementation, the size of the combined message is smaller than or equal to a maximum transmission unit MTU.
[0037] In a possible implementation, the extended header further includes a next header field and an extended header length field;
[0038] The next header field and the extended header length field each occupy 8 bits;
[0039] Each message length included in the extended header occupies 16 bits;
[0040] When the total number of bits occupied by the next header field, the extended header field and each message length included in the extended header is not an integer multiple of 32 bits, the extended header also includes an end field, which occupies 16 bits and has a value of 0.
[0041] In a fourth aspect, an embodiment of the present application provides a message forwarding device, applied to a third network device, the device comprising:
[0042] A receiving module, configured to receive a combined message, wherein the combined message includes an IPv6 header, a segment routing header (SRH), and multiple service messages, wherein the multiple service messages belong to the same deterministic flow;
[0043] The forwarding module is used to forward the multiple service messages to the user side device.
[0044] In a possible implementation, the combined message further includes an extension header, where the extension header includes the message length of each service message in the combined message; and the apparatus further includes:
[0045] An acquisition module is used to acquire the multiple service messages from the combined message based on the message length of each service message included in the extended header.
[0046] In a possible implementation, the SRH includes a next header field, and the next header field is used to indicate that the next header after the SRH is the extended header.
[0047] In a possible implementation, the size of the combined message is smaller than or equal to a maximum transmission unit MTU.
[0048] In a possible implementation, the extended header further includes a next header field and an extended header length field;
[0049] The next header field and the extended header length field each occupy 8 bits;
[0050] Each message length included in the extended header occupies 16 bits;
[0051] When the total number of bits occupied by the next header field, the extended header field and each message length included in the extended header is not an integer multiple of 32 bits, the extended header also includes an end field, which occupies 16 bits and has a value of 0.
[0052] In a fifth aspect, an embodiment of the present application provides a network device, including:
[0053] processor;
[0054] transceiver;
[0055] A machine-readable storage medium storing machine-executable instructions capable of being executed by the processor; the machine-executable instructions prompting the processor to perform the following steps:
[0056] Receive service messages sent by user-side devices;
[0057] Cache the service message in the scheduling queue corresponding to the deterministic flow to which the service message belongs;
[0058] When the scheduling period of the scheduling queue is reached, a combined message is sent to the second network device, where the combined message includes an IPv6 header, a segment routing header (SRH), and multiple service messages in the scheduling queue.
[0059] In a possible implementation, the combined message further includes an extension header, and the extension header includes the message length of each service message in the combined message.
[0060] In a possible implementation, the SRH includes a next header field, and the next header field is used to indicate that the next header after the SRH is the extended header.
[0061] In a possible implementation, the size of the combined message is smaller than or equal to a maximum transmission unit MTU.
[0062] In a possible implementation, the extended header further includes a next header field and an extended header length field;
[0063] The next header field and the extended header length field each occupy 8 bits;
[0064] Each message length included in the extended header occupies 16 bits;
[0065] When the total number of bits occupied by the next header field, the extended header field and each message length included in the extended header is not an integer multiple of 32 bits, the extended header also includes an end field, which occupies 16 bits and has a value of 0.
[0066] In a sixth aspect, an embodiment of the present application provides a network device, including:
[0067] processor;
[0068] transceiver;
[0069] A machine-readable storage medium storing machine-executable instructions capable of being executed by the processor; the machine-executable instructions prompting the processor to perform the following steps:
[0070] receiving a combined message, the combined message including an IPv6 header, a segment routing header (SRH), and multiple service messages, where the multiple service messages belong to the same deterministic flow;
[0071] Forward the multiple service messages to the user-side device.
[0072] In a possible implementation, the combined message further includes an extension header, where the extension header includes the message length of each service message in the combined message;
[0073] The machine executable instructions further cause the processor to perform the following steps:
[0074] Based on the message length of each service message included in the extended header, the multiple service messages are obtained from the combined message.
[0075] In a possible implementation, the SRH includes a next header field, and the next header field is used to indicate that the next header after the SRH is the extended header.
[0076] In a possible implementation, the size of the combined message is smaller than or equal to a maximum transmission unit MTU.
[0077] In a possible implementation, the extended header further includes a next header field and an extended header length field;
[0078] The next header field and the extended header length field each occupy 8 bits;
[0079] Each message length included in the extended header occupies 16 bits;
[0080] When the total number of bits occupied by the next header field, the extended header field and each message length included in the extended header is not an integer multiple of 32 bits, the extended header also includes an end field, which occupies 16 bits and has a value of 0.
[0081] In a seventh aspect, an embodiment of the present application provides a machine-readable storage medium storing machine-executable instructions. When called and executed by a processor, the machine-executable instructions prompt the processor to implement the method described in the first or second aspect above.
[0082] In an eighth aspect, an embodiment of the present application provides a computer program product, which prompts the processor to implement the method described in the first or second aspect above.
[0083] Using this technical solution, the first network device can cache service packets in the scheduling queue corresponding to the deterministic flow to which the service packets belong, and when the scheduling queue reaches its scheduling period, it sends a combined packet to the second network device. The combined packet includes an IPv6 header, an SRH, and multiple service packets in the scheduling queue. This eliminates the need to encapsulate the IPv6 header and SRH for each service packet separately. Multiple service packets can share one IPv6 header and one SRH, reducing the transmission bandwidth occupied by the IPv6 header and SRH and improving bandwidth utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.
[0085] FIG1 is a schematic diagram of a deterministic flow forwarding mechanism provided in an embodiment of the present application;
[0086] FIG2 is a schematic diagram of a network architecture of a deterministic network provided in an embodiment of the present application;
[0087] FIG3 is a schematic diagram of the structure of an SRv6 message provided in an embodiment of the present application;
[0088] FIG4 is a schematic diagram of a flow chart of a message forwarding method provided in an embodiment of the present application;
[0089] FIG5 is a schematic diagram of the structure of an extended header in an SRv6 message provided in an embodiment of the present application;
[0090] FIG6 is a flow chart of another message forwarding method provided in an embodiment of the present application;
[0091] FIG7 is an exemplary schematic diagram of a process in which a PE1 device sends a combined message according to an embodiment of the present application;
[0092] FIG8 is an exemplary schematic diagram of a process in which a PE2 device receives a combined message according to an embodiment of the present application;
[0093] FIG9 is a schematic structural diagram of a message forwarding device provided in an embodiment of the present application;
[0094] FIG10 is a schematic structural diagram of another message forwarding device provided in an embodiment of the present application;
[0095] FIG11 is a schematic diagram of the structure of a network device provided in an embodiment of the present application;
[0096] FIG12 is a schematic diagram of the structure of another network device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0097] To make the objectives, technical solutions, and advantages of this application more clearly understood, the present application is further described below with reference to the accompanying drawings and examples. It is apparent that the described examples are only a portion of the embodiments of this application, and not all of them. All other embodiments derived by persons of ordinary skill in the art based on the examples in this application are intended to fall within the scope of protection of this application.
[0098] To facilitate understanding, the relevant concepts involved in the embodiments of this application are first explained.
[0099] In a deterministic network, each network device divides each period, T, into multiple, consecutive time slices of equal length. Each time slice is called a cycle. For example, T can be divided into N time slices, Cycle 1 through Cycle N, where N can be 10, 100, or 1000, depending on the actual situation.
[0100] Deterministic flows of a specific deterministic internet protocol (DIP) are forwarded only within a specified time slice. For example, deterministic flow 1 is forwarded in Cycle 1 within each cycle T, deterministic flow 2 is forwarded in Cycle 3 within each cycle T, deterministic flow 3 is forwarded in Cycle 3 within each cycle T, and so on. Because each deterministic flow corresponds to a specific time slice in each network device in the forwarding path, if the time when a message arrives at a network device is later than the sending time in the time slice of the current cycle T, the message can be forwarded in the time slice of the next cycle T. Therefore, the delay jitter of message forwarding can be limited to a delay range of 2T, that is, the jitter of the forwarding delay is bounded.
[0101] The jitter of any network device on the forwarding path of a deterministic flow does not increase the delay jitter of the network device following it. In other words, jitter is independent of the number of network devices in the forwarding path. However, increasing the number of network devices will increase the total delay of the packet on the forwarding path.
[0102] The above period T is the time slot width of the scheduling queue of the predefined deterministic flow. The delay jitter range of the entire forwarding path is 0 to 2T. For example, if T = 10us, the delay jitter is 20us in the worst case, which is independent of the forwarding path length and the number of network devices.
[0103] As shown in Figure 1, assume that X, Y, Z, and W are four consecutive network devices in the forwarding path. Each network device's cyclic forwarding period, T, consists of four cycles: 0, 1, 2, and 3. Each cycle lasts 10µs, meaning the network devices transmit packets in a 10µs cyclic pattern. After receiving a packet, each network device transmits it within the preset cycle corresponding to the deterministic flow to which it belongs. This means that each network device is preconfigured with a mapping between deterministic flows and cycles.
[0104] For example, device X sends a message in Cycle 0, and the message is transmitted on the link between device X and device Y.
[0105] After receiving the message, device Y sends the message in Cycle 2, and then the message is transmitted on the link between device Y and device Z.
[0106] After receiving the message, device Z sends the message in its own Cycle 1, and then the message is transmitted on the link between device Z and device W, and W can receive the message.
[0107] In the above process, constrained by the stable cyclic mapping relationship, once the message's sending period at X is determined, the message's receiving period at W can also be determined. The delay jitter of each deterministic flow message transmitted from X to W can be controlled within 10us.
[0108] It should be noted that the clocks of the network devices in the deterministic network can be synchronized. FIG1 exemplarily shows a situation where the clocks of the network devices are slightly different.
[0109] Figure 2 shows a schematic diagram of a deterministic network architecture, using a deterministic network between a human-machine interface (HMI) and robotic equipment as an example. This deterministic network includes service provider edge (PE) devices and P devices. The service provider (P) devices are core network devices. The HMI and robotic devices in Figure 2 are both user-side devices.
[0110] FIG2 exemplarily shows PE1 , PE2 , and P1 to P4 , but the number of devices in actual implementation is not limited thereto.
[0111] Among them, PE devices are used to implement message forwarding between user-side devices and network-side devices in a deterministic network.
[0112] The SDN controller can pre-plan the SRv6 forwarding path for the service packets from the user-side devices entering the deterministic network for the PE devices, and plan the forwarding resources for each hop network device in the forwarding path. The forwarding resources can specifically be the next hop, outbound interface and cycle, so that each network device forwards the service packets of the deterministic flow according to the specified forwarding resources.
[0113] The service message entering the deterministic network from the user-side device refers to the service message with deterministic service requirements sent by the user-side device and encapsulated through Ethernet, that is, the service message of the deterministic flow.
[0114] Deterministic flows are delay-sensitive service traffic, and non-deterministic flows are non-delay-sensitive service traffic. For example, non-deterministic flows may be flows applicable to a best effort forwarding policy.
[0115] PE devices have user-side interfaces dedicated to deterministic flows and are not used in conjunction with non-deterministic flows. If a user-side interface needs to be used for a mix of deterministic and non-deterministic flows, Time Sensitive Networking (TSN) technology can be used to separate deterministic and non-deterministic flows.
[0116] After receiving a service packet from a user-side device through a user-side interface, the PE device forwards the service packet to the next network device through the network-side interface according to the SRv6 forwarding path planned by the SDN and the specified scheduling period, allowing the service packet to be transmitted in a deterministic network. The deterministic network transmits SRv6 packets encapsulated in Ethernet with a time synchronization mechanism. In other words, after receiving a service packet from a user-side device, the PE device encapsulates the service packet into an SRv6 packet.
[0117] As shown in FIG3 , FIG3 shows the format of an SRv6 message. The SRv6 message includes a new Internet Protocol Version 6 (IPv6) basic header, an SRH, and an original message. The original message is a service message sent by a user-side device.
[0118] In the embodiments of the present application, the new IPv6 basic header is referred to as the IPv6 header. The IPv6 header includes: Version Number, Traffic Class, Flow Label, Payload Length, Next Header, Hop Limit, Source Address (SA), and Destination Address (DA). The length of the source address and destination address can both be 128 bits. The Next Header value is 43, indicating that the next header is a routing extension header.
[0119] SRH includes:
[0120] The next header (Next Hdr) is 8 bits long and is used to identify the type of the next message header.
[0121] The extended header length (Hdr Ext Len) is 8 bits long and indicates the length of the SRH header in units of 8 bytes, excluding the first 8 bytes.
[0122] Routing Type: 8 bits long, with a value of 4, indicating that the packet carries an SRH.
[0123] Segments Left (SL), 8 bits long, indicates the number of the next SID to be searched. The initial value is n-1, where n indicates the number of SIDs encapsulated in the SRH. The value of SL decreases by 1 each time an endpoint node is passed.
[0124] The last hop (Last Entry) is 8 bits long and is the number of the first SID in the SID list in the SRH, that is, the number of the SID of the last hop in the packet forwarding path.
[0125] Flags: 8 bits long, indicating flag information.
[0126] Tag, 16 bits long, is used to mark a group of messages with the same characteristics.
[0127] The Segment List is a list of SIDs, arranged in descending order of the nodes on the packet forwarding path. Segment List[0] represents the last SID on the path, Segment List[1] represents the second-to-last SID on the path, and so on. Each SID can be a 128-bit IPv6 address.
[0128] Optional Type Length Value objects (variable) are optional type length value object variables.
[0129] The original message in FIG3 is a service message sent by the user-side device.
[0130] The time synchronization mechanism of each network device in a deterministic network may use the precision time protocol (PTP), an out-of-band time synchronization network, or synchronous Ethernet.
[0131] The network-side interface of the PE device can also receive SRv6 packets forwarded by the P device, transmit the received SRv6 packets to the destination user-side interface according to the SRv6 forwarding path, and send the service packets to the user-side device through the user-side interface according to the first-come-first-out scheduling mechanism.
[0132] The P device is mainly responsible for packet forwarding between network-side devices. The inbound interface of the P device forwards SRv6 packets according to the SRv6 forwarding path of the received SRv6 packets using a pre-specified scheduling period.
[0133] In a deterministic network architecture, the packets sent by network devices in each cycle are all SRv6 packets. However, the header of SRv6 packets is relatively long. According to statistics, for 100GE bandwidth, if the CSQF forwarding mechanism is adopted, the bandwidth used to forward service packets may only account for about 80%, and the remaining 20% or so of the bandwidth is used to transmit the header of the SRv6 packet.
[0134] In order to improve bandwidth utilization, an embodiment of the present application provides a message forwarding method, which is applied to a first network device, which is a head node of an SRv6 network, for example, PE1 in Figure 2. As shown in Figure 4, the method includes:
[0135] S401: Receive a service message sent by a user-side device.
[0136] S402: Cache the service message into the scheduling queue corresponding to the deterministic flow to which the service message belongs.
[0137] After receiving the message, the first network device may determine the Cycle corresponding to the message by looking up the routing table, and then cache the message in the scheduling queue corresponding to the Cycle.
[0138] S403: When the scheduling period of the scheduling queue is reached, send a combined message to the second network device, where the combined message includes an IPv6 header, an SRH, and multiple service messages in the scheduling queue.
[0139] Each scheduling queue corresponding to the deterministic flow corresponds to a scheduling cycle, which is the time slice corresponding to the Cycle. The first network device forwards the messages buffered in each scheduling queue to the second network device according to the scheduling cycle of each scheduling queue.
[0140] In an embodiment of the present application, when a scheduling queue reaches its scheduling period, the first network device may encapsulate the messages cached in the scheduling queue into a combined message and send the combined message to the second network device. As an example, the second network device may be an intermediate node on the forwarding path of the service message, such as the P1 device in Figure 2.
[0141] Among them, each service message cached in the same scheduling queue has the same forwarding path within the SRv6 network, that is, these service messages are forwarded from the same source PE to the same destination PE. Therefore, when the SRv6 header is normally encapsulated for each service message in the scheduling queue, the SRv6 header encapsulated for each service message is the same. Therefore, in the embodiment of the present application, multiple service messages can be encapsulated into a combined message, so that multiple service messages share the IPv6 header and SRH.
[0142] Using this method, the first network device can cache service packets in the scheduling queue corresponding to the deterministic flow to which the service packets belong. When the scheduling queue reaches its scheduling period, the first network device sends a combined packet to the second network device. The combined packet includes an IPv6 header, an SRH, and multiple service packets in the scheduling queue. This eliminates the need to encapsulate the IPv6 header and SRH for each service packet separately. Multiple service packets can share a single IPv6 header and SRH, reducing the transmission bandwidth occupied by the IPv6 header and SRH and improving bandwidth utilization.
[0143] It should be noted that the size of the combined message is less than or equal to the Maximum Transmission Unit (MTU). As an example, the MTU can be 9KB. When the first network device encapsulates the service messages included in a scheduling queue into a combined message, it can encapsulate the service messages into the combined message in the order in which the service messages enter the scheduling queue. If it is determined that the combined message will exceed the MTU after encapsulating a certain service message, the encapsulation is stopped. The next combined message is constructed, and the service message and subsequent service messages in the scheduling queue are encapsulated into the next combined message.
[0144] In some embodiments of the present application, the combined message further includes an extension header, and the extension header includes the message length of each service message in the combined message.
[0145] Furthermore, the SRH includes a next header field, and the next header field is used to indicate that the next header after the SRH is the extended header.
[0146] The extensible header may be a CSQF aggregation extension header, abbreviated as CSQF_AGG. For example, the Next Header field in the SRH in FIG3 may be defined as CSQF_AGG. That is, in the embodiment of the present application, a CSQF aggregation extension header may be added to a position adjacent to the SRH.
[0147] The structure of the extended header is shown in FIG5 . The extended header includes a next header (Next Hdr) field and an extended header length (Hdr Ext Len) field. The next header field and the extended header length field each occupy 8 bits.
[0148] Each message length included in the extended header occupies 16 bits.
[0149] Each service message in the combined message is a payload, and the length of each message included in the extended header is the length of each payload. For example, Figure 3 exemplarily shows the lengths of n payloads, namely payload 1 Len (payload 1 length), payload 2 Len (payload 2 length), payload 3 Len (payload 3 length), ..., payload n Len (payload n length).
[0150] If the total number of bits occupied by the Next Header field, the Extended Header field, and the Message Length field included in the extended header is not an integer multiple of 32 bits, the extended header also includes an End field, which occupies 16 bits and has a value of 0. For example, in Figure 5, after Payload n Len, an End field with a value of 0 is also included.
[0151] It can be understood that, when the total number of bits occupied by the next header field, the extended header field, and the message length included in the extended header is an integer multiple of 32 bits, the extended header does not include the end field.
[0152] Based on the same inventive concept, the present application also provides a message forwarding method, which is applied to a third network device, which is an end node of the SRv6 network, for example, PE2 in Figure 2. As shown in Figure 6, the method includes:
[0153] S601: Receive a combined message, where the combined message includes an IPv6 header, an SRH, and multiple service messages.
[0154] Among them, multiple service packets belong to the same deterministic flow, that is, the forwarding paths of the multiple service packets in the SRv6 network are the same.
[0155] S602: Forward multiple service messages to a user-side device.
[0156] Using this method, the third network device can receive a combined message that includes an IPv6 header, an SRH, and multiple service messages. This means that multiple service messages can share a single IPv6 header and an SRH. Furthermore, the third network device can forward the multiple service messages included in the combined message to the user-side device without affecting the normal forwarding of the multiple service messages to the user-side device. This eliminates the need to add an IPv6 header and SRH to each service message separately, reducing the transmission bandwidth occupied by the IPv6 header and SRH and improving bandwidth utilization.
[0157] In this embodiment of the present application, the combined message also includes an extension header that includes the message length of each service message in the combined message. Based on this, after receiving the combined message, the third network device can obtain multiple service messages from the combined message based on the message length of each service message included in the extension header. The specific format of the extension header can be found in the relevant description of the above embodiment and will not be repeated here.
[0158] Referring to Figure 5 , the third network device can, based on payload 1Len, read the content of payload 1 Len in length from the original message portion after the extension header to obtain service message 1. It can then continue to read the content of payload 2 Len in length to obtain service message 2, and so on, until it obtains service message n.
[0159] When the third network device obtains a service message from the combined message, it may determine whether all message lengths included in the extended header have been obtained based on the value of the Hdr Ext Len field in the extended header. If the number of bits occupied by the obtained message length in the extended header reaches the value of the Hdr Ext Len field, it can be determined that all message lengths included in the extended header have been obtained. Optionally, if the end field included in the extended header is read, it can also be determined that all message lengths included in the extended header have been obtained.
[0160] The following introduces the message forwarding method provided in the embodiment of the present application with reference to a specific example. As shown in FIG7 , the PE1 device includes five scheduling queues, which are CSQF queues corresponding to Cycles 0 to 4.
[0161] Among them, assuming that when reaching Cycle 0, there are 5 service packets cached in the CSQF queue corresponding to Cycle 0, namely Packets 1-5, then the PE1 device encapsulates Packets 1-5 into combined packet 1 and sends the combined packet 1. Combined packet 1 includes an IPv6 header, SRH, CSQF aggregation extension header and payload, and the payload includes Packets 1-5.
[0162] It should be noted that since Packet 1-5 is cached in the same CSQF queue, it means that Packet 1-5 will be forwarded from the same source PE device to the same destination PE device along the same path. If the PE1 device encapsulates SRv6 headers for Packet 1-5 respectively, it is necessary to encapsulate the same SRv6 header for Packet 1-5. In the embodiment of the present application, Packet 1-5 can be encapsulated in a combined message so that Packet 1-5 shares an SRv6 header. The source IP address and destination IP address of Packet 1-5 may be different, that is, the source user-side device and the destination user-side device corresponding to Packet 1-5 may be different, but the IP address of the source user-side device and the IP address of the destination user-side device are both encapsulated in the original message (Packet 1-5), so encapsulating Packet 1-5 in a combined message will not affect the normal forwarding of Packet 1-5.
[0163] Assume that when Cycle 1 is reached, there are four service packets cached in the CSQF queue corresponding to Cycle 1, namely Packets 1-4. Then PE1 device encapsulates Packets 1-4 into combined packet 2 and sends the combined packet 2. Combined packet 2 includes an IPv6 header, SRH, CSQF aggregation extension header and payload, which includes Packets 1-4.
[0164] Assume that when Cycle 2 is reached, there are six service packets cached in the CSQF queue corresponding to Cycle 2, namely Packets 1-6. Then PE1 device encapsulates Packets 1-6 into combined packet 3 and sends the combined packet 3. Combined packet 3 includes an IPv6 header, SRH, CSQF aggregation extension header and payload, which includes Packets 1-6.
[0165] Assume that when Cycle 3 is reached, there are 7 service packets cached in the CSQF queue corresponding to Cycle 3, namely Packets 1-7. Then PE1 device encapsulates Packets 1-7 into combined packet 4 and sends the combined packet 4. Combined packet 4 includes an IPv6 header, SRH, CSQF aggregation extension header and payload, which includes Packets 1-7.
[0166] No messages are currently buffered in the CSQF queue corresponding to Cycle 4.
[0167] The above-mentioned combined messages 1-4 will be forwarded along their respective forwarding paths. In the process of forwarding the combined messages 1-4, the intermediate nodes do not need to identify the CSQF aggregation extension header in the combined messages.
[0168] Assume that combined packets 1-4 are all forwarded to PE2, as shown in FIG8 , PE2 can receive combined packets 1-4.
[0169] PE2 can obtain Packets 1-5 from combined message 1 based on the CSQF aggregation extension header in combined message 1 and put them into a receive queue.
[0170] PE2 can obtain Packets 1-4 from combined message 2 based on the CSQF aggregation extension header in combined message 2 and put them into a receive queue.
[0171] PE2 can obtain Packets 1-6 from combined message 3 based on the CSQF aggregation extension header in combined message 3 and put them into a receive queue.
[0172] PE2 can obtain Packets 1-7 from combined message 4 based on the CSQF aggregation extension header in combined message 4 and put them into a receive queue.
[0173] The PE2 device can forward each service message to the service side device based on the header of each service message.
[0174] This method can reduce the bandwidth resource occupation of the SRv6 header during CSQF forwarding and improve bandwidth utilization.
[0175] Corresponding to the above method embodiment, an embodiment of the present application further provides a message forwarding device, which is applied to a first network device. As shown in FIG9 , the device includes:
[0176] Receiving module 901, used to receive service messages sent by user-side devices;
[0177] The cache module 902 is used to cache the service message in the scheduling queue corresponding to the deterministic flow to which the service message belongs;
[0178] The sending module 903 is configured to send a combined message to the second network device when the scheduling period of the scheduling queue is reached, where the combined message includes an IPv6 header, a segment routing header (SRH), and multiple service messages in the scheduling queue.
[0179] Optionally, the combined message further includes an extension header, and the extension header includes the message length of each service message in the combined message.
[0180] Optionally, the SRH includes a next header field, and the next header field is used to indicate that the next header after the SRH is an extended header.
[0181] Optionally, the size of the combined message is smaller than or equal to the maximum transmission unit MTU.
[0182] Optionally, the extended header also includes a next header field and an extended header length field;
[0183] The Next Header field and the Extended Header Length field each occupy 8 bits;
[0184] Each message length included in the extension header occupies 16 bits;
[0185] When the total number of bits occupied by the next header field, the extended header field, and each message length included in the extended header is not an integer multiple of 32 bits, the extended header also includes an end field, which occupies 16 bits and has a value of 0.
[0186] Corresponding to the above method embodiment, the embodiment of the present application further provides a message forwarding device, which is applied to a third network device. As shown in FIG10 , the device further includes:
[0187] A receiving module 1001 is configured to receive a combined message, where the combined message includes an IPv6 header, a segment routing header (SRH), and multiple service messages, where the multiple service messages belong to the same deterministic flow;
[0188] The forwarding module 1002 is configured to forward multiple service messages to a user-side device.
[0189] Optionally, the combined message further includes an extension header, where the extension header includes the message length of each service message in the combined message; the device further includes:
[0190] The acquisition module is used to acquire multiple service messages from the combined message based on the message length of each service message included in the extended header.
[0191] Optionally, the SRH includes a next header field, and the next header field is used to indicate that the next header after the SRH is an extended header.
[0192] Optionally, the size of the combined message is smaller than or equal to the maximum transmission unit MTU.
[0193] Optionally, the extended header also includes a next header field and an extended header length field;
[0194] The Next Header field and the Extended Header Length field each occupy 8 bits;
[0195] Each message length included in the extension header occupies 16 bits;
[0196] When the total number of bits occupied by the next header field, the extended header field, and the message lengths included in the extended header is not an integer multiple of 32 bits, the extended header also includes an end field, which occupies 16 bits and has a value of 0.
[0197] Corresponding to the above method embodiment, the embodiment of the present application further provides a network device, as shown in FIG11 , the network device includes:
[0198] Processor 1101;
[0199] transceiver 1104;
[0200] A machine-readable storage medium 1102 stores machine-executable instructions that can be executed by the processor 1101; the machine-executable instructions prompt the processor 1101 to perform the following steps:
[0201] Receive service messages sent by user-side devices;
[0202] Cache the service message in the scheduling queue corresponding to the deterministic flow to which the service message belongs;
[0203] When the scheduling period of the scheduling queue is reached, a combined message is sent to the second network device, where the combined message includes an IPv6 header, a segment routing header (SRH), and multiple service messages in the scheduling queue.
[0204] Optionally, the combined message further includes an extension header, and the extension header includes the message length of each service message in the combined message.
[0205] Optionally, the SRH includes a next header field, and the next header field is used to indicate that the next header after the SRH is an extended header.
[0206] Optionally, the size of the combined message is smaller than or equal to the maximum transmission unit MTU.
[0207] Optionally, the extended header also includes a next header field and an extended header length field;
[0208] The Next Header field and the Extended Header Length field each occupy 8 bits;
[0209] Each message length included in the extension header occupies 16 bits;
[0210] When the total number of bits occupied by the next header field, the extended header field, and the message lengths included in the extended header is not an integer multiple of 32 bits, the extended header also includes an end field, which occupies 16 bits and has a value of 0.
[0211] As shown in FIG11 , the network device may further include a communication bus 1103. The processor 1101, the machine-readable storage medium 1102, and the transceiver 1104 communicate with each other via the communication bus 1103. The communication bus 1103 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 1103 may be divided into an address bus, a data bus, a control bus, and the like.
[0212] The transceiver 1104 may be a wireless communication module. Under the control of the processor 1101 , the transceiver 1104 exchanges data with other devices.
[0213] The machine-readable storage medium 1102 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Alternatively, the machine-readable storage medium 1102 may be at least one storage device located remote from the processor.
[0214] Processor 1101 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 device, discrete gate or transistor logic device, discrete hardware component.
[0215] Corresponding to the above method embodiment, an embodiment of the present application further provides a network device, as shown in FIG12 , the network device includes:
[0216] Processor 1201;
[0217] transceiver 1204;
[0218] A machine-readable storage medium 1202 stores machine-executable instructions that can be executed by the processor 1201; the machine-executable instructions prompt the processor 1201 to perform the following steps:
[0219] Receive a combined message, which includes an IPv6 header, a segment routing header (SRH), and multiple service messages, where the multiple service messages belong to the same deterministic flow;
[0220] Forward multiple service packets to user-side devices.
[0221] Optionally, the combined message further includes an extension header, where the extension header includes the message length of each service message in the combined message;
[0222] The machine executable instructions further cause the processor 1201 to perform the following steps:
[0223] Based on the message length of each service message included in the extension header, multiple service messages are obtained from the combined message.
[0224] Optionally, the SRH includes a next header field, and the next header field is used to indicate that the next header after the SRH is an extended header.
[0225] Optionally, the size of the combined message is smaller than or equal to the maximum transmission unit MTU.
[0226] Optionally, the extended header also includes a next header field and an extended header length field;
[0227] The next header field and the extended header length field each occupy 8 bits;
[0228] Each message length included in the extension header occupies 16 bits;
[0229] When the total number of bits occupied by the next header field, the extended header field, and the message lengths included in the extended header is not an integer multiple of 32 bits, the extended header also includes an end field, which occupies 16 bits and has a value of 0.
[0230] As shown in Figure 12, the network device may also include a communication bus 1203. The processor 1201, the machine-readable storage medium 1202, and the transceiver 1204 communicate with each other via the communication bus 1203. The communication bus 1203 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 1203 may be divided into an address bus, a data bus, a control bus, and the like.
[0231] The transceiver 1204 may be a wireless communication module. Under the control of the processor 1201 , the transceiver 1204 exchanges data with other devices.
[0232] The machine-readable storage medium 1202 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Alternatively, the machine-readable storage medium 1202 may be at least one storage device located remote from the processor.
[0233] The processor 1201 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may 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, or discrete hardware components.
[0234] Based on the same inventive concept, in accordance with the message forwarding method provided in the above embodiments of the present application, the present application also provides a machine-readable storage medium storing machine-executable instructions that can be executed by a processor. The processor is prompted by the machine-executable instructions to implement the steps of any of the above message forwarding methods.
[0235] 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 steps of any message forwarding method in the above embodiments.
[0236] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0237] Each embodiment in this specification is described in a related manner. Similar portions between the embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences from other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so their description is relatively simple. For related portions, refer to the description of the method embodiments.
[0238] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A message forwarding method, characterized in that: Applied to a first network device, the method comprises: Receive service messages sent by user-side equipment; Cache the service message in a scheduling queue corresponding to the deterministic flow to which the service message belongs; When the scheduling period of the scheduling queue is reached, a combined message is sent to the second network device, where the combined message includes an IPv6 header, a segment routing header SRH, and multiple service messages in the scheduling queue.
2. The method according to claim 1, characterized in that: The combined message further includes an extension header, and the extension header includes the message length of each service message in the combined message.
3. The method according to claim 2, characterized in that The SRH includes a next header field, and the next header field is used to indicate that the next header after the SRH is the extended header.
4. The method according to any one of claims 1 to 3, characterized in that: The size of the combined message is smaller than or equal to the maximum transmission unit MTU.
5. The method according to claim 2, characterized in that: The extended header also includes a next header field and an extended header length field; The next header field and the extended header length field each occupy 8 bits; Each message length included in the extended header occupies 16 bits; When the total number of bits occupied by the next header field, the extended header field and each message length included in the extended header is not an integer multiple of 32 bits, the extended header also includes an end field, which occupies 16 bits and has a value of 0.
6. A message forwarding method, characterized in that: Applied to a third network device, the method includes: receiving a combined message, wherein the combined message includes an IPv6 header, a segment routing header (SRH), and multiple service messages, and the multiple service messages belong to the same deterministic flow; Forward the multiple service messages to the user side device.
7. The method according to claim 6, characterized in that The combined message further includes an extension header, wherein the extension header includes the message length of each service message in the combined message; After receiving the combined message, the method further includes: Based on the message length of each service message included in the extended header, the multiple service messages are obtained from the combined message.
8. The method according to claim 7, characterized in that The SRH includes a next header field, and the next header field is used to indicate that the next header after the SRH is the extended header.
9. The method according to any one of claims 6 to 8, characterized in that: The size of the combined message is smaller than or equal to the maximum transmission unit MTU.
10. The method according to claim 7, characterized in that The extended header also includes a next header field and an extended header length field; The next header field and the extended header length field each occupy 8 bits; Each message length included in the extended header occupies 16 bits; When the total number of bits occupied by the next header field, the extended header field and each message length included in the extended header is not an integer multiple of 32 bits, the extended header also includes an end field, which occupies 16 bits and has a value of 0.
11. A message forwarding device, characterized in that: Applied to a first network device, the apparatus comprises: A receiving module, used to receive service messages sent by a user-side device; A cache module, used to cache the service message into a scheduling queue corresponding to the deterministic flow to which the service message belongs; A sending module is used to send a combined message to the second network device when the scheduling period of the scheduling queue is reached, wherein the combined message includes an IPv6 header, a segment routing header SRH and multiple service messages in the scheduling queue.
12. The device according to claim 11, characterized in that The combined message further includes an extension header, and the extension header includes the message length of each service message in the combined message.
13. The device according to claim 12, characterized in that The SRH includes a next header field, and the next header field is used to indicate that the next header after the SRH is the extended header.
14. The device according to any one of claims 11 to 13, characterized in that: The size of the combined message is smaller than or equal to the maximum transmission unit MTU.
15. The device according to claim 12, characterized in that The extended header also includes a next header field and an extended header length field; The next header field and the extended header length field each occupy 8 bits; Each message length included in the extended header occupies 16 bits; When the total number of bits occupied by the next header field, the extended header field and each message length included in the extended header is not an integer multiple of 32 bits, the extended header also includes an end field, which occupies 16 bits and has a value of 0.
16. A message forwarding device, characterized in that: Applied to a third network device, the apparatus comprises: A receiving module, configured to receive a combined message, wherein the combined message includes an IPv6 header, a segment routing header (SRH), and multiple service messages, and the multiple service messages belong to the same deterministic flow; The forwarding module is used to forward the multiple service messages to the user side device.
17. The device according to claim 16, characterized in that The combined message further includes an extension header, wherein the extension header includes the message length of each service message in the combined message; and the device further includes: An acquisition module is used to acquire the multiple service messages from the combined message based on the message length of each service message included in the extended header.
18. The device according to claim 17, characterized in that The SRH includes a next header field, and the next header field is used to indicate that the next header after the SRH is the extended header.
19. The device according to any one of claims 16 to 18, characterized in that: The size of the combined message is smaller than or equal to the maximum transmission unit MTU.
20. The device according to claim 17, characterized in that The extended header also includes a next header field and an extended header length field; The next header field and the extended header length field each occupy 8 bits; Each message length included in the extended header occupies 16 bits; When the total number of bits occupied by the next header field, the extended header field and each message length included in the extended header is not an integer multiple of 32 bits, the extended header also includes an end field, which occupies 16 bits and has a value of 0.
21. A network device, characterized in that: include: processor; Transceiver; A machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the machine-executable instructions prompt the processor to perform the following steps: Receive service messages sent by user-side equipment; Cache the service message in a scheduling queue corresponding to the deterministic flow to which the service message belongs; When the scheduling period of the scheduling queue is reached, a combined message is sent to the second network device, where the combined message includes an IPv6 header, a segment routing header SRH, and multiple service messages in the scheduling queue.
22. The network device according to claim 21, characterized in that: The combined message further includes an extension header, and the extension header includes the message length of each service message in the combined message.
23. The network device according to claim 22, characterized in that: The SRH includes a next header field, and the next header field is used to indicate that the next header after the SRH is the extended header.
24. The network device according to any one of claims 21 to 23, characterized in that: The size of the combined message is smaller than or equal to the maximum transmission unit MTU.
25. The network device according to claim 22, characterized in that: The extended header also includes a next header field and an extended header length field; The next header field and the extended header length field each occupy 8 bits; Each message length included in the extended header occupies 16 bits; When the total number of bits occupied by the next header field, the extended header field and each message length included in the extended header is not an integer multiple of 32 bits, the extended header also includes an end field, which occupies 16 bits and has a value of 0.
26. A network device, characterized in that: include: processor; Transceiver; A machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the machine-executable instructions prompt the processor to perform the following steps: receiving a combined message, wherein the combined message includes an IPv6 header, a segment routing header (SRH), and multiple service messages, and the multiple service messages belong to the same deterministic flow; Forward the multiple service messages to the user side device.
27. The network device according to claim 26, characterized in that: The combined message further includes an extension header, wherein the extension header includes the message length of each service message in the combined message; The machine executable instructions further cause the processor to perform the following steps: Based on the message length of each service message included in the extended header, the multiple service messages are obtained from the combined message.
28. The network device according to claim 27, characterized in that: The SRH includes a next header field, and the next header field is used to indicate that the next header after the SRH is the extended header.
29. The network device according to any one of claims 26 to 28, characterized in that: The size of the combined message is smaller than or equal to the maximum transmission unit MTU.
30. The network device according to claim 27, characterized in that: The extended header also includes a next header field and an extended header length field; The next header field and the extended header length field each occupy 8 bits; Each message length included in the extended header occupies 16 bits; When the total number of bits occupied by the next header field, the extended header field and each message length included in the extended header is not an integer multiple of 32 bits, the extended header also includes an end field, which occupies 16 bits and has a value of 0.
31. A machine-readable storage medium, characterized in that: Machine executable instructions are stored, and when called and executed by a processor, the machine executable instructions prompt the processor to implement any method described in claims 1-5 or 6-10.
32. A computer program product, characterized in that The computer program product causes the processor to implement the method of any one of claims 1-5 or 6-10.
Citation Information
Patent Citations
Message transmission method and device
CN115242728A
Business processing method, device and system
CN116264590A
Message transmission method and network equipment
CN116686272A
Efficient transmission of small packets in low power and lossy networks
US20200259592A1
Flow reliability in multi-tier deterministic networking
US20220272040A1
Cited By
Deterministic forwarding processing method and device based on IPv4 network
CN122069218A