CN114640616A - Message transmission, segment list generation and compressed segment identification acquisition method and device - Google Patents

Message transmission, segment list generation and compressed segment identification acquisition method and device Download PDF

Info

Publication number
CN114640616A
CN114640616A CN202011377914.1A CN202011377914A CN114640616A CN 114640616 A CN114640616 A CN 114640616A CN 202011377914 A CN202011377914 A CN 202011377914A CN 114640616 A CN114640616 A CN 114640616A
Authority
CN
China
Prior art keywords
length
network device
segment
compressed segment
bits
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011377914.1A
Other languages
Chinese (zh)
Inventor
平善明
薛奇
刘立杰
方晟
沈凯强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202011377914.1A priority Critical patent/CN114640616A/en
Priority to PCT/CN2021/133327 priority patent/WO2022111606A1/en
Publication of CN114640616A publication Critical patent/CN114640616A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/44Distributed routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering

Abstract

The embodiment of the application discloses a method and a device for message transmission, segment list generation and compressed segment identification acquisition, wherein a first message received by a second network device comprises a segment list corresponding to a first message forwarding path, the segment list comprises a plurality of compressed segment identifications which are sequentially arranged, and the length of each compressed segment identification is less than or equal to 128 bits. And the second network equipment reads the content to be copied from the segment list according to the coding rule. The encoding rule is a rule corresponding to the network device corresponding to the content to be copied when the content to be copied is generated. And the second network equipment updates the destination address DA in the first message by using the read content to be copied to generate a second message and forwards the second message. That is, for a plurality of compressed segment identifiers included in the segment list, the length of each compressed segment identifier does not need to be known in advance, the length of the compressed segment identifier can be known according to the coding rule corresponding to the compressed segment identifier, and then the compressed segment identifier is read from the segment list.

Description

Message transmission, segment list generation and compressed segment identification acquisition method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for packet transmission, segment list generation, and compressed segment identifier acquisition.
Background
The Segment Routing (SR) protocol is a source routing protocol, and a source node designates a path for an application packet, and converts the path into an ordered Segment list to be encapsulated in a packet header, and an intermediate node on the path only needs to forward according to the path designated in the packet header. The basic idea of SR is to divide the network into different segments (segments), and to splice these segments together to guide the packet to forward according to the specified path, specifically to use Segment Identification (SID) to identify a Segment. When the SR is deployed on the Internet Protocol Version 6 (IPv 6) data plane, it is called IPv6segment routing (SRv 6).
In the SRv6 application, the forwarding path information is carried by a Segment Routing Header (SRH) containing a segment identification list (SID list). The SID list includes a plurality of Segment Identifiers (SIDs) arranged in sequence, and each segment represents a plurality of segments, and each segment is an instruction or an instruction set for processing a packet. The SRH is encapsulated in the message, and the processing process of the message by the SR network is carried through the segment identification list in the message. SRv6 the length of each SID in the network is 128 bits (bit), and the length of SRH will be increased by 128 bits and the length of message will be increased by 128 bits when each SID is added in the SID list. On one hand, the increase of the message length will cause a large amount of network resources to be occupied in the forwarding process, resulting in low utilization rate of network link bandwidth. On the other hand, the message processing difficulty is increased due to the excessively long SRH length, which causes that the existing equipment is difficult to effectively process the SRH.
Disclosure of Invention
The embodiment of the application provides a method and a device for message transmission, segment list generation and compressed segment identification acquisition, which can solve the problem that the transmission efficiency of SRv6 messages is influenced by the overlong length of an SRH.
In a first aspect of the embodiments of the present application, a method for transmitting a packet is provided, where the method includes: a second network device receives a first message sent by the first network device, where the first message includes a segment list corresponding to a forwarding path of the first message, the segment list includes multiple compression segment identifiers arranged in sequence, and the length of each of the multiple compression segment identifiers is less than or equal to 128 bits; the second network equipment reads the content to be copied in the segment list according to an encoding rule, wherein the encoding rule is used for indicating the encoding rule corresponding to the content to be copied; the second network equipment updates the destination address DA in the first message according to the content to be copied to generate a second message; and the second network equipment sends the second message. In this implementation manner, for a plurality of compressed segment identifiers included in the segment list, the length corresponding to each compressed segment identifier does not need to be known in advance, but can be obtained according to the encoding rule corresponding to the compressed segment identifier. When the C-SIDs with different lengths are mixed and arranged in the same segment SRv6 compression sub-path, the method is compatible with the message forwarding and processing procedures in the existing SRv6 network.
In a possible implementation manner, the reading, by the second network device, of the content to be copied in the segment list according to an encoding rule includes: the second network equipment determines a starting position, wherein the starting position is used for indicating the starting position corresponding to the content to be copied; and the second network equipment determines the length of the content to be copied according to the encoding rule and the starting position. In this implementation manner, since the lengths of the compressed segment identifiers included in the segment list may be different, when the content to be copied (the next segment identifier or the next compressed segment identifier) is read from the segment list, the start position corresponding to the content to be copied is determined first, and then the length of the content to be copied is determined from the start position according to the encoding rule, that is, the content to be copied is read.
In a possible implementation manner, the determining, by the second network device, the length of the content to be copied according to the encoding rule and the starting position includes: the second network equipment acquires a first parameter set and/or a second parameter set, wherein the first parameter set comprises a first initial length and a first increment length corresponding to a node identifier in the compressed segment identifier, and the second parameter set comprises a second initial length and a second increment length corresponding to a function identifier in the compressed segment identifier; and the second network equipment determines the length of the content to be copied according to the encoding rule, the first parameter set and/or the second parameter set and the starting position. In this implementation manner, when the node identifier length and the function identifier length in the compressed segment identifier are both variable, a first initial length and a first increment length corresponding to the node identifier and a second initial length and a second increment length corresponding to the function identifier are obtained. Since the encoding rule is related to the four lengths, the second network device reads the content to be copied according to the four lengths, the encoding rule and the start position, that is, determines the length of the content to be copied.
In a possible implementation manner, the determining, by the second network device, the length of the content to be copied according to an encoding rule, the first parameter set and/or the second parameter set, and the starting position includes: the second network device reads N bits backwards from the starting position, where the first i bits of the N bits are 1 and the i +1 th bit is 0, or the first i bits of the N bits are 0 and the i +1 th bit is 1; the second network device continues to read M bits backward, where M is the first initial length + i and the first incremental length-i-1, and takes N + M bits as the length of the node identifier in the content to be copied; the second network device continues to read back P bits, where the first j bits of the P bits are 1, and the j +1 th bit is 0, or the first j bits of the P bits are 0, and the j +1 th bit is 1; after the second network device continues to read Q bits, where Q is the second initial length + j, the second incremental length-j-1 bits, and P + Q bits are used as the length of the function identifier in the content to be copied; and the second network equipment obtains the length of the content to be copied according to the length of the node identifier in the content to be copied and the length of the function identifier in the content to be copied. By the implementation manner, the compressed segment identifier generated according to the encoding rule may only include two parts, namely the node identifier and the function identifier, and does not include other information, such as the flag bit, so as to increase the compression rate of the segment identifier. Meanwhile, the compressed segment identifiers generated according to the encoding rule may be continuous, for example, taking the length of the function identifier as an example, the node identifier is 001, and the length of the function identifier is 3 bits, then the compressed segment identifiers generated according to the encoding rule may be 001000, 001001, 001010, 001011, and the like.
In a possible implementation, the first initial length and the first increment length are both multiples of 8 bits, and/or the second initial length and the second increment length are both multiples of 8 bits. In this implementation, the first initial length and the first increment length and the second initial length and the second increment length corresponding to the node identifier may be multiples of 8 bits, so that the constructed compressed segment identifier achieves 8-bit alignment. Of course, the first initial length, the first increment length, the second initial length and the second increment length can be set according to actual requirements.
In a possible implementation manner, the first packet further includes an extension pointer, where the extension pointer is used to sequentially indicate each of the plurality of compressed segment identifiers, and the determining, by the second network device, a start position includes: and the second network equipment determines the starting position of the content to be copied in the segment list according to the extended pointer. In this implementation manner, in order to facilitate subsequent reading of the compressed segment identifier or the segment identifier, the first message may further carry an extension pointer, so as to determine a starting position of the content to be copied in the segment list through the extension pointer.
In a possible implementation manner, the indicating, by the extended pointer, a start position of a compressed segment identifier corresponding to the second network device, and determining, by the second network device, a start position of the content to be copied in the segment list according to the extended pointer include: and the second network equipment updates the value of the extension pointer according to the length of the corresponding compression segment identifier of the second network equipment, so that the updated value of the extension pointer corresponds to the initial position of the content to be copied in the segment list. In this implementation, when the extended pointer indicates the starting position of the compressed segment identifier corresponding to the current network device (second network device), since the second network device may determine the length of the compressed segment identifier itself, the value of the extended pointer may be increased by the length, so that the updated value of the extended pointer corresponds to the starting position of the content to be copied in the segment list. Of course, the extended pointer may be updated at the first network device, and when the second network device receives the first packet, the extended pointer points to the starting position of the content to be copied in the segment list.
In a possible implementation manner, the updating, by the second network device, the destination address DA in the first message according to the content to be copied to generate a second message includes: and the second network equipment updates the destination address DA in the first message according to the content to be copied and the prefix corresponding to the content to be copied so as to generate a second message. In the implementation mode, after the content to be copied is determined, the prefix corresponding to the content to be copied and the content to be copied are used for updating the destination address DA in the first message, so that the second message is obtained.
In a possible implementation manner, the updating, by the second network device, the destination address DA in the first message according to the content to be copied to generate a second message includes: and the second network equipment updates the information except the prefix in the destination address DA of the first message by using the content to be copied so as to generate a second message. In this implementation manner, after the content to be copied is determined, when the prefix corresponding to the content to be copied is consistent with the prefix in the current destination address DA, the content to be copied may be directly used to update the information except the prefix in the destination address DA, so as to obtain the second message.
In a possible implementation manner, the plurality of compressed segment identifiers includes a compressed segment identifier of a first length and a compressed segment identifier of a second length, and the first length is different from the second length. In this implementation, in the multiple compression segment identifiers included in the segment list, the length of each compression segment identifier may be different, and compared with an implementation in which all the compression segment identifiers have the same length, the lengths of all the compression segment identifiers do not need to be kept consistent, and the length of a part of the compression segment identifiers may be compressed to be shorter.
In a second aspect of the embodiments of the present application, a method for packet transmission is provided, where the method includes: a first network device generates a first packet, where the first packet includes a segment list corresponding to a forwarding path of the first packet, the segment list includes multiple compressed segment identifiers arranged in sequence, a length of each compressed segment identifier in the multiple compressed segment identifiers is less than or equal to 128 bits, the multiple compressed segment identifiers include a compressed segment identifier of a first length and a compressed segment identifier of a second length, the first length is different from the second length, and each compressed segment identifier in the multiple compressed segment identifiers includes a prefix code; and the first network equipment sends the first message according to the segment list. In this implementation, after the first network device obtains the segment list, a first packet including the segment list is generated, and the first packet is sent according to the segment list.
In a possible implementation manner, each compressed segment identifier includes a variable length portion, the length of the variable length portion of the compressed segment identifier of the first length is different from the length of the variable length portion of the compressed segment identifier of the second length, the variable length portion includes the prefix code, and the length of the variable length portion is determined according to the encoding rule of the variable length portion. In this implementation, each compressed segment identification includes a variable length portion, and the lengths of the variable length portions of the compressed segment identifications of different lengths are not the same.
In a possible implementation manner, each compressed segment identifier includes a function identifier, and the function identifier is the prefix code. In this implementation, the variable length portion is a function identifier. That is, the length of the function identifier may be extended in response to the increase of the number of functions, so that when the number of functions of a certain network device is large, the function identifier may be carried by the variable-length compression segment identifier, and the capacity expansion is supported.
In a possible implementation manner, each compressed segment identifier includes a node identifier, and the node identifier is the prefix code. That is, for the increase of the number of network devices, the capacity expansion of the network may be supported by expanding the length of the node identifier, and the capacity expansion may be supported without changing the allocated node identifier.
In a possible implementation manner, the first packet further includes an extension pointer, and the extension pointer is used to sequentially indicate each of the plurality of compressed segment identifiers.
In a possible implementation manner, the compressed segment identifier of the first length and the compressed segment identifier of the second length correspond to the same prefix, respectively, or the compressed segment identifier of the first length and the compressed segment identifier of the second length correspond to different prefixes, respectively.
In a possible implementation manner, the first packet is an IPv 6-based segment routing SRv6 packet, and the segment list is located in a segment routing header SRH.
In a third aspect of the present application, a segment list generating method is provided, where the method includes: the first network equipment determines a forwarding path of a message; the first network device generates a segment list corresponding to the forwarding path, where the segment list includes multiple compressed segment identifiers arranged in sequence, a length of each compressed segment identifier in the multiple compressed segment identifiers is less than or equal to 128 bits, the multiple compressed segment identifiers include a compressed segment identifier of a first length and a compressed segment identifier of a second length, the first length is different from the second length, and each compressed segment identifier in the multiple compressed segment identifiers includes a prefix code.
In a possible implementation manner, each compressed segment identifier includes a variable length portion, the length of the variable length portion of the compressed segment identifier of the first length is different from the length of the variable length portion of the compressed segment identifier of the second length, the variable length portion includes the prefix code, and the length of the variable length portion is determined according to the encoding rule of the variable length portion.
In one possible implementation, the first network device is a controller in a network, and the method further includes: the first network device sends the segment list to an ingress device of the forwarding path.
In a possible implementation manner, the first network device is an ingress device of the forwarding path, and the method further includes: the first network equipment generates a message comprising the segment list; and the first network equipment sends a message comprising the segment list.
In a fourth aspect of the embodiments of the present application, a method for obtaining a compressed segment identifier is provided, where the method includes: a first network device obtains a compressed segment identifier of a first length, wherein the compressed segment identifier of the first length comprises a first variable length part, the first variable length part belongs to a first resource pool, and the first resource pool comprises a plurality of first variable length parts; based on the resource shortage of the first resource pool, the first network device obtaining a compressed segment identifier of a second length, the second length being greater than or equal to the first length, the compressed segment identifier of the second length comprising a second variable length part, the second variable length part belonging to a second resource pool, the second resource pool comprising a plurality of the second variable length parts; the first network device sends the compressed segment identifier of the first length and the compressed segment identifier of the second length, and the compressed segment identifier of the first length and the compressed segment identifier of the second length are used for indicating the segment executed by the first network device. In this implementation, the first network device may obtain the compressed segment identifiers with different lengths based on the shortage of the resource pool. The compressed segment identifiers with different lengths respectively comprise different variable length parts, and different resource pools can comprise a plurality of variable length parts.
In a possible implementation manner, the first length compressed segment identifier and the second length compressed segment identifier include function identifiers, the first variable length part and the second variable length part are the function identifiers, and the first resource pool and the second resource pool are resource pools corresponding to the function identifiers. In this implementation manner, in a general case, after the node identifier of the first network device is determined, the node identifier is not changed any more, and the node identifier may be changed to a function identifier, so that both the first variable-length part and the second variable-length part are function identifiers.
In one possible implementation, the method further includes: based on the insufficient resources of the nth resource pool, the first network device obtains a compressed segment identifier with a length of n +1, wherein the length of n +1 is greater than or equal to the nth length, the compressed segment identifier with the length of n +1 comprises a variable length part of n +1, the variable length part of n +1 belongs to the nth +1 resource pool, and the nth +1 resource pool comprises a plurality of variable length parts of n + 1; wherein n is a natural number greater than 1.
In one possible implementation, the (i +1) th resource pool includes an (i +1) th variable length part of a power of X of 2, where X is an initial length + i and an incremental length-i-1, and i is a positive integer greater than or equal to 0.
In a possible implementation manner, the coding rule corresponding to the ith resource pool is that the first i bits are 1, the (i +1) th bit is 0, and the subsequent (i +1) × 2 bits are 0 or 1 arbitrary values.
In a possible implementation manner, the coding rule corresponding to the ith resource pool is that the first i bits are 0, the (i +1) th bit is 1, and the subsequent (i +1) × 2 bits are 0 or 1 to take any value.
In one possible implementation, the initial length and the increment length are each multiples of 8 bits.
In a fifth aspect of the embodiments of the present application, there is provided a packet transmission apparatus, including: the device comprises a receiving unit, a processing unit and a sending unit. A receiving unit, configured to receive a first packet sent by the first network device, where the first packet includes a segment list corresponding to a forwarding path of the first packet, the segment list includes multiple compression segment identifiers arranged in sequence, and a length of each of the multiple compression segment identifiers is less than or equal to 128 bits. And the processing unit is used for reading the content to be copied in the segment list according to an encoding rule, and the encoding rule is used for indicating the encoding rule corresponding to the content to be copied. And the processing unit is further used for updating the destination address DA in the first message according to the content to be copied so as to generate a second message. And the sending unit is used for sending the second message.
In a possible implementation manner, the processing unit is specifically configured to determine a starting position, where the starting position is used to indicate a starting position corresponding to the content to be copied; and determining the length of the content to be copied according to the encoding rule and the starting position.
In a possible implementation manner, the processing unit is specifically configured to obtain a first parameter set and/or a second parameter set, where the first parameter set includes a first initial length and a first increment length corresponding to a node identifier in the compressed segment identifier, and the second parameter set includes a second initial length and a second increment length corresponding to a function identifier in the compressed segment identifier; and determining the length of the content to be copied according to an encoding rule, the first parameter set and/or the second parameter set and the starting position.
In a possible implementation manner, the processing unit is specifically configured to read N bits backward from the starting position, where i first bits of the N bits are 1, and i +1 th bits are 0, or i first bits of the N bits are 0, and i +1 th bits are 1; continuing to read back M bits, where M is the first initial length + i and the first increment length-i-1, and taking N + M bits as the length of the node identifier in the content to be copied; continuously reading P bits backwards, wherein the first j bits in the P bits are 1, the j +1 th bit is 0, or the first j bits in the P bits are 0, and the j +1 th bit is 1; reading Q bits after the operation is continued, wherein the Q is the second initial length + j and the second increment length-j-1 bits, and taking P + Q bits as the length of the function identifier in the content to be copied; and obtaining the length of the content to be copied according to the length of the node identifier in the content to be copied and the length of the function identifier in the content to be copied.
In a possible implementation, the first initial length and the first increment length are both multiples of 8 bits, and/or the second initial length and the second increment length are both multiples of 8 bits.
In a possible implementation manner, the first packet further includes an extension pointer, where the extension pointer is used to sequentially indicate each of the multiple compressed segment identifiers, and the processing unit is specifically configured to determine, according to the extension pointer, a starting position of the content to be copied in the segment list.
In a possible implementation manner, the extension pointer indicates a start position of the compressed segment identifier corresponding to the second network device, and the processing unit is specifically configured to update a value of the extension pointer according to a length of the compressed segment identifier corresponding to the second network device, so that the updated value of the extension pointer corresponds to the start position of the content to be copied in the segment list.
In a possible implementation manner, the processing unit is specifically configured to update a destination address DA in the first message according to the content to be copied and a prefix corresponding to the content to be copied, so as to generate a second message.
In a possible implementation manner, the processing unit is specifically configured to update, with the content to be copied, information, except for a prefix, in a destination address DA of the first packet, so as to generate a second packet.
In a possible implementation manner, the plurality of compressed segment identifiers include a compressed segment identifier of a first length and a compressed segment identifier of a second length, and the first length is different from the second length.
In a sixth aspect of the embodiments of the present application, there is provided a packet transmission apparatus, including: a processing unit and a transmitting unit. A processing unit, configured to generate a first packet, where the first packet includes a segment list corresponding to a forwarding path of the first packet, the segment list includes a plurality of compressed segment identifiers arranged in sequence, a length of each compressed segment identifier in the plurality of compressed segment identifiers is less than or equal to 128 bits, the plurality of compressed segment identifiers include a compressed segment identifier of a first length and a compressed segment identifier of a second length, the first length is different from the second length, and each compressed segment identifier in the plurality of compressed segment identifiers includes a prefix code. And the sending unit is used for sending the first message according to the segment list.
In a possible implementation manner, each compressed segment identifier includes a variable length portion, the length of the variable length portion of the compressed segment identifier of the first length is different from the length of the variable length portion of the compressed segment identifier of the second length, the variable length portion includes the prefix code, and the length of the variable length portion is determined according to the encoding rule of the variable length portion.
In a possible implementation manner, each compressed segment identifier includes a function identifier, and the function identifier is the prefix code.
In a possible implementation manner, each compressed segment identifier includes a node identifier, and the node identifier is the prefix code.
In a possible implementation manner, the first packet further includes an extension pointer, and the extension pointer is used to sequentially indicate each of the plurality of compressed segment identifiers.
In a possible implementation manner, the compressed segment identifier of the first length and the compressed segment identifier of the second length correspond to the same prefix, respectively, or the compressed segment identifier of the first length and the compressed segment identifier of the second length correspond to different prefixes, respectively.
In a possible implementation manner, the first packet is an IPv 6-based segment routing SRv6 packet, and the segment list is located in a segment routing header SRH.
In a seventh aspect of embodiments of the present application, there is provided a segment list generation apparatus, including: and a processing unit. And the processing unit is used for determining the forwarding path of the message. The processing unit is further configured to generate a segment list corresponding to the forwarding path, where the segment list includes a plurality of compressed segment identifiers arranged in sequence, a length of each compressed segment identifier in the plurality of compressed segment identifiers is less than or equal to 128 bits, the plurality of compressed segment identifiers include a compressed segment identifier of a first length and a compressed segment identifier of a second length, the first length is different from the second length, and each compressed segment identifier in the plurality of compressed segment identifiers includes a prefix code.
In a possible implementation manner, each compressed segment identifier includes a variable length portion, the length of the variable length portion of the compressed segment identifier of the first length is different from the length of the variable length portion of the compressed segment identifier of the second length, the variable length portion includes the prefix code, and the length of the variable length portion is determined according to the encoding rule of the variable length portion.
In one possible implementation, the apparatus is a controller in a network, and the apparatus further includes: a transmitting unit; a sending unit, configured to send the segment list to an ingress device of the forwarding path.
In a possible implementation manner, the apparatus is an ingress device of the forwarding path, and the apparatus further includes: a transmitting unit; the processing unit is further configured to generate a packet including the segment list; and the sending unit is used for sending the message comprising the segment list.
In an eighth aspect of embodiments of the present application, there is provided a compression segment identifier obtaining apparatus, including: a processing unit and a transmitting unit. A processing unit, configured to obtain a compressed segment identifier of a first length, where the compressed segment identifier of the first length includes a first variable-length portion, and the first variable-length portion belongs to a first resource pool, where the first resource pool includes a plurality of first variable-length portions. The processing unit is further configured to obtain a compressed segment identifier of a second length based on insufficient resources of the first resource pool, where the second length is greater than or equal to the first length, the compressed segment identifier of the second length includes a second variable-length portion, the second variable-length portion belongs to a second resource pool, and the second resource pool includes a plurality of second variable-length portions. A sending unit, configured to send the compressed segment identifier of the first length and the compressed segment identifier of the second length, where the compressed segment identifier of the first length and the compressed segment identifier of the second length are used to indicate the segment executed by the first network device.
In a possible implementation manner, the first length compressed segment identifier and the second length compressed segment identifier include function identifiers, the first variable length part and the second variable length part are the function identifiers, and the first resource pool and the second resource pool are resource pools corresponding to the function identifiers.
In a possible implementation manner, the processing unit is further configured to obtain a compressed segment identifier with a length of n +1 based on a resource shortage of an nth resource pool, where the length of n +1 is greater than or equal to an nth length, the compressed segment identifier with the length of n +1 includes an n +1 th variable length portion, the n +1 th variable length portion belongs to the nth +1 th resource pool, and the nth +1 th resource pool includes a plurality of the n +1 th variable length portions; wherein n is a natural number greater than 1.
In one possible implementation, the (i +1) th resource pool includes an (i +1) th variable length part of a power of X of 2, where X is an initial length + i and an incremental length-i-1, and i is a positive integer greater than or equal to 0.
In a possible implementation manner, the i-th bit is 1, the i + 1-th bit is 0, and the subsequent (i +1) × 2 bits are 0 or 1 any value.
In a possible implementation manner, the coding rule corresponding to the ith resource pool is that the first i bits are 0, the (i +1) th bit is 1, and the subsequent (i +1) × 2 bits are 0 or 1 to take any value.
In one possible implementation, the initial length and the increment length are each multiples of 8 bits.
In a ninth aspect of embodiments of the present application, a network system is provided, where the network system includes a first network device and a second network device. Wherein the first network device may perform the method of the second, third or fourth aspect; the second network device may perform the method of the first aspect.
In a tenth aspect of embodiments of the present application, there is provided a communication apparatus, including: a processor and a memory; the memory for storing instructions or computer programs; the processor is configured to execute the instructions or the computer program in the memory to cause the communication device to perform the method of the first, second, third or fourth aspect.
In an eleventh aspect of embodiments of the present application, there is provided a computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of the first, second, third or fourth aspect above.
Based on the method provided by the embodiment of the present application, the first packet received by the second network device includes a segment list corresponding to a forwarding path of the first packet, where the segment list includes multiple compressed segment identifiers that are sequentially arranged, and a length of each compressed segment identifier is less than or equal to 128 bits. And the second network equipment reads the content to be copied from the segment list according to the coding rule, wherein the network equipment corresponding to the content to be copied is the next hop network equipment. The encoding rule is a rule corresponding to the content to be copied generated by the network equipment corresponding to the content to be copied. And the second network equipment updates the destination address DA in the first message by using the read content to be copied to generate a second message and forwards the second message. That is, for a plurality of compressed segment identifiers included in the segment list, the length of each compressed segment identifier does not need to be known in advance, but the length of the compressed segment identifier can be known according to the encoding rule corresponding to the compressed segment identifier, and then the compressed segment identifier is read from the segment list. When the compressed segment identifications with different lengths are mixed and arranged in the same segment SRv6 compressed sub-path, the method is compatible with the message forwarding and processing procedures in the existing SRv6 network.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic diagram of an SRv6 message format structure according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a SID provided in the present application;
fig. 4 is a flowchart of a method for obtaining compressed segment identifiers according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a segment list structure provided in an embodiment of the present application;
fig. 6 is a schematic diagram of another SRv6 message structure provided in this embodiment;
fig. 7 is a flowchart of a message transmission method according to an embodiment of the present application;
fig. 8a is a schematic diagram of yet another SRv6 message structure provided in the embodiment of the present application;
fig. 8b is a schematic diagram of yet another SRv6 message structure provided in the embodiment of the present application;
fig. 9 is a flowchart of another message transmission method according to an embodiment of the present application;
fig. 10 is a structural diagram of a message transmission apparatus according to an embodiment of the present application;
fig. 11 is a structural diagram of another message transmission apparatus according to an embodiment of the present application;
fig. 12 is a block diagram of a segment list generation apparatus according to an embodiment of the present application;
fig. 13 is a structural diagram of an apparatus for generating a compressed segment identifier according to an embodiment of the present application;
fig. 14 is a diagram illustrating a network device structure according to an embodiment of the present application;
fig. 15 is a diagram of another network device structure according to an embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments.
In SRv6, the processing of a message may be divided into segments, each segment being a particular processing activity performed by a particular network device. The plurality of segments are respectively executed by the network equipment on the message forwarding path to form the whole message processing process. Each segment has a corresponding segment identification, i.e., SID. The SIDs are in 128-bit-length IPv6 address format, i.e. each SID is 128 bits in length. Each SID may include a location (locator) field and a function (function) field.
The content of the locator field may also be referred to as locator for short, and is an identifier assigned to a network node in the network topology, and used for identifying the network node in the network topology. Also, the SID may include two types of a node segment identity (node SID) and an adjacent segment identity (adjacent SID). The locator in the SID is used to indicate the network device that executed the segment to which the SID corresponds. For the node segment identifier, the network device executing the segment corresponding to the SID is the network node identified by the locator in the SID, and for the adjacent segment identifier, the network device executing the segment corresponding to the SID is the network node identified by the locator in the SID.
In the embodiments of the present application, a network node and a network device have the same meaning, and refer to a switch, a router, a virtual routing device, a virtual forwarding device, or other forwarding devices. The network node issues the routing information corresponding to the locator to the network through a network protocol, so that other network nodes in the network forward the data packet to the network node. The length of the locator is variable and is related to the network size. For example, when the network size is larger, the number of network nodes included in the network topology is larger, and the length of the locator is longer in order to identify the larger number of network nodes. Conversely, when the network size is smaller, the length of the locator is shorter.
The content of the function field may also be referred to as function for short, and is used to indicate an instruction or an instruction set for processing a message, which is equivalent to an operation code of a computer instruction. The instructions or sets of instructions represented by the functions, when executed on a network node, will cause the network node to perform a corresponding forwarding behavior (behavior). E.g., forwarding the packet to a specified link, or forwarding the packet by looking up a table in a specified table, etc.
Some SIDs may also include a parameter (argument) field and/or padding (padding) field after the function field. The content of the attribute field, which may be referred to as "attribute" for short, is a parameter related to the instruction or the instruction set represented by the function when executed. Such as flow information, service information, or other relevant information.
When the sum of the lengths of locator, function, and optionally, argument in the SID is still less than 128 bits, a padding field needs to be set at the end portion of the SID.
As can be seen from this, the SID is used to indicate a corresponding segment, specifically, the SID can indicate a network device executing the segment, and the SID can indicate a packet processing behavior corresponding to the segment, and optionally, the SID can also indicate a parameter involved in executing the packet processing behavior.
When several SIDs corresponding to the above-mentioned several segments are arranged in turn to form SID list, SID list can indicate the processing procedure of message. The sequence of the SIDs in the SID list is the execution sequence of the segments in the process of processing the packet. The SRH including the SID list is encapsulated in the message, so that the SRv6 network can carry the processing procedure of the message in the message and transmit the message to the network device on the message forwarding path, and the network device on the message forwarding path sequentially executes the message processing behavior related to itself.
Referring to the application scenario shown in fig. 1, the application scenario includes SRv6 network, and the SRv6 network includes network device S and network devices 1 to 5. Wherein each network device has a corresponding locator, i.e. an identification assigned to the network device in the network topology, for identifying the network device in the network topology. For example, the identifier of network device 1 is locator 1, and similarly, the identifiers of network devices 2 to 5 are locator 2 to locator 5, respectively.
The dashed line in fig. 1 shows a packet forwarding path whose head node is network device S, and then sequentially passes through network devices 1 to 5. The head node on the forwarding path may also be an ingress node of the SRv6 network, which is also referred to as an ingress device or an ingress network device. For example, the message processing procedure corresponding to the forwarding path includes 5 segments, which are the message processing behaviors executed by the network devices 1 to 5, respectively. The function corresponding to the message processing behavior on the network device 1 is function1, and similarly, the functions corresponding to the message processing behaviors on the network devices 2 to 5 are function2 to function5, respectively. For the network device 1, the locator 1 and the function1 form a SID1, that is, the SID1 is used to indicate the segment executed by the network device 1 in the message processing process, and similarly, the SID 2 to the SID5 are respectively used to indicate the segments executed by the network devices 2 to 5. SID1 to SID5 are arranged in sequence to form SID list corresponding to the message processing process. The arrangement sequence of the 5 SIDs in the SID list is the execution sequence of the corresponding 5 segments in the process of processing the packet, that is, the arrangement sequence is SID1 to SID 5.
Fig. 2 shows the messages in SRv6 network encapsulated with SID list. As shown in fig. 2, the header of the packet includes an IPv6 header and an SRH. The IPv6 Header includes a Version (Version) field, a Traffic Type (Traffic Type) field, a Flow Label (Flow Label) field, a load Length (Payload Length) field, a Next Header (Next Header) field, a Hop Limit (Hop Limit) field, a Source Address (Source Address) field, and a Destination Address (DA) field. The meaning of each field can refer to the explanation in Request for Comments (RFC) 8200. The SRH includes a Next Header (Next Header) field, a Header extension length (Hdr Ext Len) field, a Routing Type (Routing Type) field, a Segment Left (Segment Left) field, a Last index (Last Entry) field, Flags (Flags) field, a Tag (Tag) field, and a SID list. The meaning of the various fields can be explained in RFC 8754. The SL field is also called as an SL pointer, and in the process of forwarding the packet, the SL pointer sequentially points to each element in the SID list, that is, the segment [ SL ] is used to represent each element in the SID list along with the difference in value of the SL.
The SID list is composed of a plurality of elements segment list [0] to segment list [ n ] arranged in sequence, each element is a SID, and the length of each element is 128 bits. And, the SIDs in the SID list may be arranged from back to front, segment list [0] corresponding to the last executed segment, segment list [1] corresponding to the second to last executed segment, and so on. In connection with the application scenario shown in FIG. 1, the SID list includes 5 SIDs, segment list [ n ] is SID1, and segment list [0] is SID 5.
In SRv6, the SRH including the SID list may be encapsulated in a message by a head node on the forwarding path, and subsequent network devices on the message forwarding path may process the message according to the SID list. Specifically, the head node encapsulates the IPv6 packet header and the SRH outside the received data packet to form SRv6 data packet. In addition, the head node on the forwarding path may set the value of the DA field in the IPv6 header of the packet to the SID corresponding to the segment executed first in the SID list. And, the head node may also set the value of the SL field to N-1, where N is the number of SIDs included in the SID list, i.e., segment [ SL ] is the first SID in the SID list, corresponding to the first segment to be executed. Then, the head node on the forwarding path sends the message out along the forwarding path. In combination with the application scenario shown in fig. 1, the SID list is encapsulated in a message by the network device S, and the network devices 1 to 5 process the message according to the SID list in the message. And the network equipment S copies the SID1 corresponding to the first executed segment into the DA field in the header of the IPv 6. The network device S sets the value of the SL field to 4. And the network equipment S searches a local forwarding table according to the content of the DA field, namely SID1, and sends the message to the network equipment 1 according to the table searching result.
In SRv6 network, for a specific packet, the network devices on the forwarding path may be divided into a transmission node (transit node) and an end node (endpoint node). For the transit node, the SID in the DA field of the IPv6 header of the packet is not a local SID, that is, the SID in the DA field is not configured locally to indicate a segment. For the endpoint node, the SID in the DA field of the IPv6 header of the packet is a local SID, that is, the SID in the DA field is configured locally to indicate a segment.
Therefore, when the network device receives the message, it will determine whether the SID in the DA field is a local SID. When the SID in the DA field is determined to be a non-local SID, the network equipment is a transit node on a message forwarding path, the transit node does not need to analyze the content in the SRH, and only a local IPv6 routing table is searched according to the content of the DA field to forward the message. Also, the transit node may be a network device that does not support SRv 6. When the SID in the DA field is determined to be the local SID, the network device is an endpoint node on the packet forwarding path, and the endpoint node searches a Forwarding Information Base (FIB) according to the SID in the DA field, matches the local instantiation SRv6SID, and executes a packet processing behavior corresponding to the SID SRv6 in the local embodiment. And the endnode subtracts 1 from the value of the SL field in the message SRH, and copies the segment list [ SL ] to the DA field of the IPv6 header, that is, updates the content of the DA field. And continuing to forward the message according to the updated DA field.
In combination with the application scenario shown in fig. 1, the network device 1 receives the packet, determines SID1 in the DA field as the local SID, executes a packet processing action corresponding to SID1, subtracts 1 from the SL field, that is, the SL field has a value of 3, copies segment list [3], that is, SID 2, into the DA field, and sends the packet to the network device 2 according to SID 2.
After that, the steps performed by the network devices 2 to 5 are similar to the network device 1, and constitute a complete message processing procedure. It can be seen that the SID in SRv6 network has routable property, and when used in SID list, it can simplify the inter-domain path creation, and quickly establish the end-to-end path in the network. Meanwhile, the function in the SID supports the programmability, can flexibly meet the requirements of various services and network functions, and is suitable for the requirements of service and network development. However, as mentioned above, SID with 128bit length also causes problems of low bandwidth utilization of network link and high difficulty of message processing. In addition, different network devices in the network bear different network functions, the required SID spaces are different in size, and the use of a long SID for a network device with a small number of network functions wastes space; using a fixed-length SID for a network device with a large number of network functions may result in insufficient space.
The locator field in the SID may further include two parts, namely, a prefix (prefix) and a node identifier (node ID). Where prefix is typically assigned by a network operator to the subnet where the network device is located to identify the entire subnet. A subnet may also be referred to as a network segment. Prefix is the same for all SIDs across the subnet. It can be considered that all SIDs in the whole subnet constitute a SID block, then prefix is also used to identify the SID block, and thus prefix may also be called block. The node ID is used to distinguish the node within the subnet. The node IDs in the SIDs of different nodes within a subnet are different.
In the packet forwarding path, a plurality of adjacent network devices are located in the same subnet, so that the SIDs corresponding to the plurality of network devices in the SID list all carry the same prefix, resulting in repeated redundancy. The optimization is performed for the part of redundant content, so that the technical effect of reducing the length of the SID list can be achieved. Specifically, only one SID with the same prefix is carried in a packet, and different SIDs can be recovered by using the same prefix and different C-SIDs at each network device on the forwarding path. For example, prefix may be placed in the DA field of the IPv6 header of the packet by a head node on the packet forwarding path, and after an endpoint node on the packet forwarding path updates different C-SIDs to the prefix content in the DA field, a later updated C-SID overwrites a previously updated C-SID. Thus, different C-SIDs can be combined with prefix, respectively, to recover the corresponding SIDs. That is, although only the C-SID is included in the SID list, the corresponding SID is still present in the DA field. Therefore, when the network device on the forwarding path performs message processing according to the content of the DA field in the message, the content of the DA field is still the SID and is compatible with the standard SRv6 message processing mechanism.
Alternatively, the C-SID may include an alignment field that is consistent with the contents of the alignment field in the SID, and thus, the length of the alignment field is also consistent with the length of the alignment field in the SID.
When the C-SID is coded in the SID list in SRH, it needs to be coded in 128-bit alignment for the C-SID to be accurately located in order to be compatible with the standard SRH mechanism. Specifically, each 128-bit length element in the SID list may be defined as a container (container), and each container holds an integer number of C-SIDs.
In some implementations, after an integer number of C-SIDs are accommodated in container, the remaining space less than 1C-SID length is padding.
When the SID list includes a plurality of C-SIDs, the C-SIDs are sequentially arranged in at least one container in the order in the SID list.
Also, the C-SID may be mixed with the SID and arranged in a SID list. For example, when only part of the network devices in the forwarding path support the C-SID function, the SIDs corresponding to the part of the network devices that do not support the C-SID function still adopt a 128-bit format. As another example, when the forwarding path involves a Virtual Private Network (VPN), the corresponding VPN SID still adopts a 128-bit format. At this time, the SID may be accommodated in one container. An SRH including both a SID of 128 bits and a C-SID smaller than 128 bits may be referred to as a general SRH (G-SRH), and a corresponding SRv6 technology supporting the G-SRH may be referred to as a general SRv6(general SRv6, G-SRv6) technology. In addition to the 128-bit SID and the C-SID smaller than 128-bit SID, the SID list of G-SRH may also include other types of identifiers, such as MPLS label and Internet Protocol 4 (IPv 4) address. All the identifiers included in the SID list of the G-SRH, such as SID, C-SID, MPLS label, and IPv4 address, etc., can be collectively referred to as G-SID. For further description of G-SRH and G-SRv6, see draft-lc-6 man-generailized-SRH-00 entitled "Generalized Segment Routing Header" on the date of month 2 2020, draft-cl-spring-generized-SRv 6-np-01 entitled "Generalized SRv6 Network Programming" on month 3 2020, and draft-cl-spring-generized-SRv 6-for-cmpr-01 entitled "Generalized SRv6 Network Programming for SRv6 Compression" on month 5 2020, the entire contents of which are incorporated herein by reference as if fully set forth.
The packet forwarding path corresponding to the SID list in which the C-SID and the SID are arranged in a mixed manner may be referred to as a G-SRv6 path, and the G-SRv6 path may include a SRv6 sub-path and a SRv6 compression sub-path. FIG. 5 shows a schematic structure of SID list corresponding to the G-SRv6 path. The G-SRv6 path includes two segments SRv6 sub-path and two segments SRv6 compression sub-path, SRv6 sub-path 1 and SRv6 sub-path 2, SRv6 compression sub-path 1 and SRv6 compression sub-path 2, respectively. Accordingly, the SID list (abbreviated as G-SRv6 path in the figure) corresponding to the G-SRv6 path shown in fig. 5 also includes portions corresponding to two segments SRv6 sub-paths (abbreviated as SRv6 sub-path 1 and SRv6 sub-path 2 in the figure) and two segments SRv6 compression sub-paths (abbreviated as SRv6 compression sub-path 1 and SRv6 compression sub-path 2 in the figure).
In SID list, SRv6 the part corresponding to sub-path 1 is similar in structure to the part corresponding to sub-path 2 SRv6, and may include at least one SID. SRv6 the corresponding portion of compression sub-path 1 may include at least one C-SID similar in structure to the corresponding portion of compression sub-path 2 of SRv 6.
Taking SRv6 as an example, the portion corresponding to subpath 1 includes at least one container. Optionally, the first SID in this part may be stored in the SID list in the form of a complete SID, or may be stored in the SID list in the form of a C-SID. As shown in fig. 5, the first SID in this part may be stored in the SID list in the form of a complete SID, that is, the first container may include a 128-bit SID, so as to simplify the message processing process. The process for the first container will be described in detail below. Starting with the second container, each container includes the C-SID in sequence. For example, as shown in FIG. 5, the SID included in the first container may be divided into three parts, prefix1, C-SID1 and an optional attribute field or padding field. The second container includes 4C-SIDs C-SID 2 through C-SID 5. The subsequent contiiner and so on.
Optionally, in the SID list where the C-SID and the SID are mixed, multiple segments SRv6 of compression sub-paths may be included. Optionally, the multiple segment SRv6 compression sub-path is located in different subnets, that is, the SID corresponding to the node in the multiple segment SRv6 compression sub-path has different prefix. As shown in fig. 5, the G-SRv6 path also includes SRv6 compression sub-path 2. In SID list, the part corresponding to SRv6 compressed sub-path 1 has a similar structure to the part corresponding to SRv6 compressed sub-path 2, but in the part corresponding to SRv6 compressed sub-path 2, the prefix part included in the SID included in the first container is prefix2, which is different from prefix1 described above. That is, the different SRv6 compression subpaths are distinguished by whether the same prefix is included in the SID, i.e., by whether the C-SID corresponds to the same prefix. Thus, each node in the same segment SRv6 compressed sub-path belongs to the same subnet.
In conjunction with the application scenario shown in fig. 1, the forwarding path sequentially passes through the network device 1 to the network device 5. The segments performed by network device 1 through network device 4 may be represented by C-SID1 through C-SID4, respectively, each C-SID being 32 bits in length. And the segment executed by network device 5 is represented by a VPN SID of 128bit length. The message format including the SID list corresponding to the forwarding path is shown in fig. 6. The SID list includes 2 contiiners, where the first contiiner includes C-SID1 through C-SID4 and the second contiiner includes SID 5. The total length of the SID list is 32 bytes, and compared with the SID list which comprises 5 SIDs and has the length of 80 bytes, the SID list has the length greatly shortened, and the network efficiency is improved. The C-SIDs in the SID list may be arranged in a forward order, as shown in FIG. 6, or in a reverse order, as shown in FIG. 6, by replacing the arrangement from the top to the bottom in FIG. 6 with C-SIDs 4 to C-SIDs 1.
As described above, the SRH includes the SL field, and when the SRH is encapsulated in a message, the head node of the forwarding path sets the value of the SL field to N-1, where N is the number of SIDs included in the SID list. In the forwarding process of the message, the network device corresponding to each SID in the SID list of the SRH, that is, the endpoint node on the forwarding path, sequentially subtracts 1 from the value of the SL field in the SRH of the message, that is, updates the value of the SL field, and copies the segment list [ SL ] into the DA field of the IPv6 header of the message, that is, updates the content of the DA field. Thus, the contents of the SL field, which may also be referred to as a SL pointer, point to each element in the SID list in turn. The network device on the forwarding path can locate each element in the SID list according to the SL pointer, thereby finding the next SID to be processed, and updating the DA field.
When a G-SRH including a C-SID is used, each element in the SID list, i.e., each container, may accommodate multiple C-SIDs due to the shorter length of the C-SID. Alternatively, it can be considered that the elements in the SID list can be further divided into a plurality of sub-elements. Thus, for the original SL pointer, the SL pointer points to each element in the SID list in turn, and each element further includes multiple sub-elements, each sub-element cannot be precisely located by means of the SL pointer alone. If the C-SIDs are included in these sub-elements, each of the C-SIDs cannot be located accurately.
In this case, the existing SL pointer needs to be extended in order to be able to accurately locate all G-SIDs in the SID list. Specifically, two modes, namely a one-dimensional pointer and a two-dimensional pointer, can be adopted.
In the two-dimensional pointer manner, in addition to the existing SL pointer, a new pointer may be added to the packet, where the new pointer may be referred to as SI or as a compressed segment identifier residue (C-SID left, CL) pointer. At this time, the first dimension pointer, i.e. the SL pointer, is still used to indicate a certain specific element in the SID list, and the second dimension pointer, i.e. the SI, is used to further indicate a certain C-SID within the element. The C-SIDs may be arranged from front to back in an element, for example, when m C-SIDs are included in an element, the SI value corresponding to the first executed C-SID is m-1, the SI value corresponding to the last executed C-SID is 0, and so on. The value of the SI pointer is decremented by 1, then the SI is shifted to the next C-SID. Therefore, through the combination of the SL pointer and the SI, not only all elements in the SID list can be accurately positioned, but also all sub-elements in the SID list can be accurately positioned, and the segment list [ SL ] [ SI ] can be used for representing all G-SIDs in the SID list. Taking the message shown in FIG. 6 as an example, segment list [1] [3] may be used to represent C-SID1, and segment list [1] [0] may be used to represent C-SID 4.
Regarding the updating manner of the two-dimensional pointer, when the SI is shifted inside the element, in the process of updating the pointer, the SI may be decremented by 1, while the SL pointer remains unchanged, that is, the SL pointer still points to the same element, and the SI points to the next sub-element in the element; when the SI currently points to the last sub-element of the element, that is, the SI needs to move to the next element, in the process of updating the pointer, the SL pointer may be decremented by 1, and the SI is set to m-1, that is, the SL pointer points to the next element, and the SI points to the first sub-element of the next element.
The newly added second dimension pointer, i.e. SI, may be located in SRH in the message or may be located in the DA field. For example, the SI may be located at the lowest two bits in the DA field, or the lowest three bits in the DA field. For example, the least significant byte of the DA field may also be used to place SI to facilitate hardware implementation and facilitate future solution expansion.
In the one-dimensional pointer approach, the offset step of the existing SL pointer may be adjusted to form a new pointer, which may be referred to as a generalized segment identity pointer (SI) or may still be referred to as the SL pointer. The one-dimensional pointer, SI, is used to indicate a certain G-SID in the SID list. The offset step size of the existing SL pointer is the length of an element in the SID list, i.e. 128 bits, then the SL pointer points to the next element in the SID list after each offset. And the offset step size of SI is the length of the sub-element in SID list, for example, 32 bits or 16 bits, then SI points to the next sub-element in SID list after each offset. Therefore, all elements and all sub-elements in the SID list can be accurately positioned through different values of the SI, and the segment list [ SI ] can be used for representing all G-SIDs in the SID list. It should be noted that, since the offset step size of the SI is reduced, when it is required to point to the next element in the SID list, for example, when two SIDs in the SID list are adjacent, in order to point to the next SID, the SI needs to be offset by multiple steps to realize the offset by the length of one element.
The new one-dimensional pointer, i.e., SI, may be located in SRH in the message or in the DA field. For example, the SI is still located in the SL field. For example, the least significant byte of the DA field may also be used to place SI to facilitate hardware implementation and facilitate future solution expansion.
For convenience, the extended one-dimensional pointer and the extended two-dimensional pointer may be collectively referred to as an extended pointer.
The embodiment of the application provides a method for transmitting a message, which adopts a compressed segment identifier (C-SID) with the length less than 128 bits, and uses the variable length compressed C-SID on the premise of being compatible with SRH, thereby not only improving the network efficiency and reducing the message processing difficulty, but also solving the problem that the fixed length SID wastes space or the space is not large enough.
The embodiment of the application provides a format of the C-SID, as shown in FIG. 3. The prefix and possibly the attribute and/or padding fields of the locator field in the SID are omitted, and the node ID and function fields of the locator field are grouped into the C-SID. Thus, the C-SID is composed of the node ID and function fields, and may be less than 128 bits in length. Only the C-SID may be included in the SID list, thereby achieving the technical effect of reducing the length of the SID list.
Specifically, a variable length in the variable length compressed C-SID may mean that the length of the node ID is variable, and/or the length of the function ID is variable. When the length of the node ID is variable, the initial length NodeInitlen and the incremental length nodeinslen of the node ID may be set in advance. Firstly, a node ID resource pool corresponding to an initial length NodeInitlen, namely a first resource pool, is utilized to allocate a node ID for network equipment in a network. And when the resources of the node ID resource pool corresponding to the initial length NodeInitlen are insufficient, increasing the length of the node ID by NodeIncrLen to obtain a new node ID resource pool, namely a second resource pool, and continuously distributing the node ID for other network equipment in the network according to the second resource pool. By analogy, when the resource of the nth resource pool is insufficient, the nth +1 resource pool corresponding to the node ID can be continuously expanded and obtained, and the node ID is distributed to the newly added network equipment by using the resource of the nth +1 resource pool. Similarly, when the length of the function is variable, the initial length FuncIniLen and the incremental length FunIncrLen of the function may be set in advance. The method comprises the steps of firstly, utilizing a function ID resource pool corresponding to an initial length FuncIniLen, namely a first resource pool, to carry out allocation, and when the resources of the function ID resource pool corresponding to the initial length FuncIniLen are insufficient, increasing the length of a function by FuncrLen to obtain a new function ID resource pool, namely a second resource pool, so as to continuously allocate function IDs to network equipment. In this way, when the resource of the nth resource pool is insufficient, the nth +1 resource pool corresponding to the function can be extended continuously, so as to allocate the function ID for the new function of the network device by using the resource of the nth +1 resource pool. The initial length NodeInitlen and the increment length nodeinklen corresponding to the node ID, and the specific values of the initial length FuncIniLen and the increment length funncrlen corresponding to the function may be set according to the actual application situation. For example, the initial length NodeInitlen, the delta length nodeinlclen, and the initial length funcinillen and the delta length funncrlen are multiples of 8 bits, and byte alignment is achieved.
For convenience of understanding, the node ID allocation is taken as an example for description, and further, the initial length NodeInitlen is 3 bits, and the increment length nodeinrlen is 3 bits. When the number of the network devices is not more than 4, the length of the node ID is 3 bits, coding can be carried out according to the following rule under the condition, the 1 st bit can be fixed to be 0, the later 2 bits take any value to obtain a first resource pool related to the node ID, and the size of the first resource pool is 224. Such as 000, 001, 010, and 011. When the number of the network equipment exceeds 4, the first expansion can be carried out, the length of the initial node ID is 3 bits, and the length of the node ID is 6 bits when the expansion is 3 bits; the first 2 bits are fixed to be 10, the last 4 bits take values randomly to obtain a second resource pool, and the size of the second resource pool is 2216. E.g., 100000, 100001, 100010, 100011, etc., where the sum of all resource pool sizes totals 22+2420. When the number of the network equipment exceeds 20, the second expansion can be carried out, the length of the initial node ID is 3 bits, and the length of the node ID is 9 bits if the expansion is 6 bits; the first 3 bits can be fixed as 110, the last 6 bits can be arbitrarily valued to obtain a third resource pool, and the size of the third resource pool is 2664. Such as 110000000, 110000001, 110000010, 110000011, etc., the sum of all resource pool sizes totals 22+24+2684. By analogy, when the ith expansion is carried out, the length of the initial node ID is 3 bits, and when the length of the node ID is expanded by i x 3 bits, the length of the node ID is (i +1) x 3 bits; the first i +1 bits are fixed to 1 … 10 (the front is i 1 s), the last (i +1) × 2 bits take value arbitrarily to obtain the (i +1) th resource pool, and the (i +1) th resource poolThe size of the resource pool is 2(2i+2). This allows the extension to be continued, and the extended node ID and the existing node ID set are prefix codes and can coexist. The prefix code is a code having prefix code characteristics, namely a prefix code, and the prefix code characteristics are prefixes requiring that any character code in a character set is not other characters when the character set is coded. For example, the character set includes a/b/c, where a corresponds to a code of 0, b corresponds to a code of 10, and c corresponds to a code of 110, and the code corresponding to each character is not a prefix of the other two codes. Prefix codes have wide application in the field of computers. Therefore, when the ith expansion is performed, the ith expansion corresponds to the (i +1) th resource pool, and the number of resources corresponding to the (i +1) th resource pool is 2X,X=(NodeInitLen+i*NodeIncrLen-i-1)。
In addition, when the node ID is coded, the coding can be carried out according to the following rule, the 1 st bit can be fixed as 1, the later 2 bits take values at will to obtain a first resource pool, and the size of the first resource pool is 224. Such as 100, 101, 110, and 111. When the number of the network equipment exceeds 4, the first expansion can be carried out, the length of the initial node ID is 3 bits, and the length of the node ID is 6 bits when the expansion is 3 bits; the first 2 bits are fixed as 01, the last 4 bits take values at will to obtain a second resource pool, and the size of the second resource pool is 2416. E.g., 010000, 010001, 010010, 010011, etc., in which case the sum of all pool sizes totals 22+2420. When the number of the network equipment exceeds 20, the second expansion can be carried out, the length of the initial node ID is 3 bits, and the length of the node ID is 9 bits if the expansion is 6 bits; the first 3 bits can be fixed as 001, the last 6 bits can be randomly selected to obtain a third resource pool, and the size of the third resource pool is 2664. E.g., 001000000, 001000001, 001000010, 001000011, etc., the sum of all resource pool sizes amounting to 22+24+2684. By analogy, when the ith expansion is carried out, the length of the initial node ID is 3 bits, and when the length of the node ID is expanded by i x 3 bits, the length of the node ID is (i +1) x 3 bits; the first i +1 bits are fixed to 0 … 01 (the front is i 0 s), the last (i +1) × 2 bits take any value to obtain the (i +1) th resource pool, and the (i +1) th resource poolThe size of the pool is 2(2i+2). This allows the extension to be continued, and the extended node ID and the existing node ID set are prefix codes and can coexist. As can be seen from the above, when the ith expansion is performed, the size of the resource pool corresponding to the ith expansion is 2(NodeInitLen+i*NodeIncrLen-i-1)The coding space of (2).
It is understood that, when the length of the function is variable, the encoding rule corresponding to the function can be referred to the node ID encoding process. For example, the initial length FuncIniLen and the incremental length funncrlen are both 3 bits, when encoding is performed according to the first encoding rule, the 1 st bit may be fixed to 0, and the latter 2 bits take any value to obtain the first resource pool related to the function ID, where the size of the first resource pool is 224. Such as 000, 001, 010, and 011. When the number of the functions of the network equipment exceeds 4, the first expansion can be carried out, the length of the initial function ID is 3 bits, and the length of the function ID is 6 bits if the expansion is 3 bits; the first 2 bits are fixed to be 10, the last 4 bits take values at will to obtain a second resource pool, and the size of the second resource pool is 2416. E.g., 100000, 100001, 100010, 100011, etc., where the sum of all resource pool sizes totals 22+2420. When the number of the functions of the network equipment exceeds 20, the second expansion can be carried out, and the function ID length is 9 bits; the first 3 bits can be fixed as 110, the last 6 bits can take any value to obtain a third resource pool, and the size of the third resource pool is 2664. Such as 110000000, 110000001, 110000010, 110000011, etc., the sum of all resource pool sizes totals 22+24+2684. By analogy, when the ith expansion is carried out, the length of the initial function ID is 3 bits, and when the length of the function ID is expanded by i x 3 bits, the length of the function ID is (i +1) x 3 bits; the first i +1 bits are fixed to 1 … 10 (the front is i 1 s), the back (i +1) × 2 bits take any value to obtain the (i +1) th resource pool, and the size of the (i +1) th resource pool is 2(2i+2)
When coding is carried out according to the second coding rule, the 1 st bit can be fixed as 1, the later 2 bits take values at will to obtain a first resource pool, and the size of the first resource pool is 224. Such as 100, 101, 110, and 111. Function number of network equipmentWhen the quantity exceeds 4, the first expansion can be carried out, the length of the initial function ID is 3 bits, and the length of the function ID is 6 bits if the expansion is 3 bits; the first 2 bits are fixed as 01, the last 4 bits take values at will to obtain a second resource pool, and the size of the second resource pool is 2416. E.g., 010000, 010001, 010010, 010011, etc., when the sum of all pool sizes is 22+2420. When the number of the functions of the network equipment exceeds 20, the second expansion can be carried out, the length of the initial function ID is 3 bits, and the length of the function ID is 9 bits if the expansion is 6 bits; the first 3 bits can be fixed as 001, the last 6 bits can be randomly selected to obtain a third resource pool, and the size of the third resource pool is 2664. Such as 001000000, 001000001, 001000010, 001000011, etc., the sum of all resource pool sizes is 22+24+2684. By analogy, when the ith expansion is carried out, the length of the initial function ID is 3 bits, and when the length of the function ID is expanded by i x 3 bits, the length of the function ID is (i +1) x 3 bits; the first i +1 bits are fixed to be 0 … 01 (the front is i 0 s), the back (i +1) × 2 bits take any value to obtain the (i +1) th resource pool, and the size of the (i +1) th resource pool is 2(2i+2)
As can be seen from the above, the set of the expanded function ID and the existing function ID is a prefix code and can coexist. When the ith expansion is carried out, the ith expansion corresponds to an i +1 th resource pool, and the number of resources corresponding to the i +1 th resource pool is 2X,X=(FuncInitLen+i*FuncIncrLen-i-1)。
As can be seen from the above, in the same subnet, the prefix of all the SIDs is the same, but the length of the node ID in all the SIDs is not the same. With reference to the application scenario shown in fig. 1, for example, the node ID corresponding to the network device 1 is 000, the node ID corresponding to the network device 2 is 001, and the lengths are both 3 bits, but the node ID corresponding to the network device 5 is 100000 and the length is 6 bits. Optionally, the function ID field lengths in all SIDs are not all the same. For example, the function ID in one SID corresponding to the network device 1 is 000, the function ID in one SID corresponding to the network device 2 is 001, the lengths are both 3 bits, and the function ID in one SID corresponding to the network device 5 is 100000, the length is 6 bits.
It should be noted that, expansion of the node ID resource pool is usually performed by a user multiple times according to the size of the current network scale, so as to allocate a unique node ID to each network device in the network. For the expansion of function IDs, because different network devices bear different functions, some network devices bear more functions and need a larger number of function IDs, and other network devices bear fewer functions and need a smaller number of function IDs, the expansion of function IDs can be performed by each network device.
Referring to fig. 4, which is a flowchart of a method for obtaining a compressed segment identifier according to an embodiment of the present application, the method may include:
s401: the first network device obtains a compressed segment identification of a first length, the compressed segment identification of the first length comprising a first variable length portion, the first variable length portion belonging to a first resource pool, the first resource pool comprising a plurality of first variable length portions.
For any network device in the network system, for example, the network device S and the network devices 1 to 5 in the application scenario shown in fig. 1, the compression segment identifier corresponding to itself may be obtained. The compressed segment identifier includes a node ID and a function ID, and for a network device, in a normal case, after a user or a controller allocates a node ID to the network device, the node ID corresponding to the compressed segment identifier does not change, and the changed node ID is usually a function ID. That is, the first variable length part in the compressed segment identifier of the first length obtained by the first network device is the function identifier function ID, where the function ID in the compressed segment identifier of the first length belongs to a first resource pool, and the first resource pool includes a plurality of function IDs of the first variable length. For example, the first resource pool is [000, 001, 010, 011], which includes 4 first variable length function IDs, where 000 indicates function1, 001 indicates function2, 010 indicates function3, and 011 indicates function 4.
S402: based on the resource shortage of the first resource pool, the first network device obtains a compressed segment identifier of a second length, wherein the second length is greater than or equal to the first length, the compressed segment identifier of the second length comprises a second variable length part, the second variable length part belongs to a second resource pool, and the second resource pool comprises a plurality of second variable length parts.
When the function number of the first network device exceeds the number of function IDs included in the first resource pool, the function ID cannot be allocated to the newly added function by using the first resource pool, and the first network device may expand the resource pool of the function ID based on the initial length and the increment length of the function ID configured in advance, to obtain a second variable-length function ID. The first network device obtains a compressed segment identification of the second length based on the node ID and the function ID of the second variable length. The compressed segment ID of the second length includes a second variable length part, i.e., a function ID of the second variable length, and a second resource pool to which the second variable length part belongs may include a plurality of function IDs of the second variable length. For example, the second resource pool is [100000, 100001, 100010, 100011], where 100000 indicates function5, 100001 indicates function6, 100010 indicates function7, 100011 indicates function 8. Specifically, when the resources of the first resource pool are exhausted, the first network device may automatically generate the second resource pool through an Interior Gateway Protocol (IGP) and a preconfigured initial length and increment length. Meanwhile, the first network device obtains a compressed segment identifier of the second length according to the generated second resource, and issues the compressed segment identifier of the second length to the forwarding table entry.
In an actual application scenario, when the resources of the second resource pool are insufficient, the first network device may further obtain a compressed segment identifier of a third length, where the third length is greater than or equal to the second length, the compressed segment identifier of the third length includes a third variable length portion, the third variable length portion belongs to the third resource pool, and the third resource pool includes a plurality of third variable length portions. And by analogy, when the resource of the nth resource pool is insufficient, the first network device obtains the compressed segment identifier with the length of n +1, wherein the length of n +1 is greater than or equal to the length of n. The n +1 th compression section identification comprises an n +1 th variable length part, the n +1 th variable length part belongs to an n +1 th resource pool, and the n +1 th resource pool comprises a plurality of n +1 th variable length parts, wherein n is a natural number greater than 1. That is, when the number of functions corresponding to the first network device is large, the length of the function ID may be expanded multiple times to obtain compressed segment identifiers of different lengths. By the method provided by the embodiment, when the number of the functions corresponding to the network device is small, the length of the C-SID can be shortened by using a short function ID, and the use of a long SID space is avoided. When the number of functions corresponding to the network device is large, the length of the C-SID can be increased by using a long function ID, and the problem of insufficient space caused by a fixed-length SID is avoided. For the implementation of the expansion of the function ID, reference may be made to the description of the encoding rule of the function ID, and this embodiment is not described herein again.
Wherein the length of the first length C-SID and the length of the second length C-SID have a tolerance equal to the difference, i.e., the incremental length, of the second variable length section from the first variable length section. For example, the node ID has a length of 8 bits, the function ID has an initial length of 8 bits, the increment length is 8 bits, the first length C-SID has a length of 16 bits, the second length C-SID has a length of 24 bits, and the difference between the lengths is 8 bits.
S403: the first network device sends a compressed segment identifier of a first length and a compressed segment identifier of a second length, which are used to indicate segments executed by the first network device.
In this embodiment, the first network device may send the compressed segment identifier of the first length and the compressed segment identifier of the second length to other network devices according to an actual application situation. For example, information related to the compressed segment identification may be flooded out via the IGP protocol. The other network devices obtain the compressed segment identifier sent by the first network device, so as to implement a network function, for example, generate a forwarding table entry according to the compressed segment identifier sent by the first network device, or generate a segment identifier for guiding packet forwarding according to the compressed segment identifier sent by the first network device. Although the first network device sends compressed segment identifiers of different lengths, both compressed segment identifiers of different lengths are used to indicate the segment executed by the first network device. In particular, the first network device may send compressed segment identifications of different lengths depending on the function to be implemented. For example, if the function to be implemented by the first network device is function1, sending a compressed segment identifier of a first length; when the function realized by the first network device is function7, sending a compressed segment identifier with a second length; and when the function realized by the first network equipment is function 30, sending a compressed section identifier with a third length.
In some implementations, when sending the compressed segment identifier of the first length and the compressed segment identifier of the second length, the first network device may also send the synthesized locator and the initial length and the incremental length corresponding to the variable-length portion. For example, when the variable length part includes a node identifier and a function identifier, the first network device sends an initial length NodeInitlen and an incremental length nodeinlclen corresponding to the node identifier and an initial length funcinillen and an incremental length funncrlen corresponding to the function identifier. The initial length and the increment length of the node identifier and the initial length and the increment length of the function identifier may be manually configured by a user when configuring a locator, and parameters configured in the same subnet domain are the same.
In some implementations, the length of the C-SID may be 8-bit aligned, i.e., the length of the C-SID is an integer multiple of 8 bits. Preferably, the length of the C-SID may be 32 bits or 16 bits. In this case, the initial length NodeInitlen and the incremental length nodeinklen corresponding to the node ID should both be multiples of 8 bits, and/or the initial length funcinillen and the incremental length funncrlen corresponding to the function should both be multiples of 8 bits.
In order to obtain better compression effect, SRv6SID beneficial to compression can be planned in the network planning process. For example, in an SRv6SID that facilitates compression, a shorter function field may be used, as well as a shorter node ID. Preferably, in the SRv6SID advantageous to compression, prefix is 64 bits, node ID is 16 bits, and function field is 16 bits, so that the corresponding C-SID is 32 bits. Preferably, in the SRv6SID advantageous for compression, prefix is 64 bits, node ID is 8 bits, function field is 8 bits, and the remainder is padding field, so that the corresponding C-SID is 16 bits.
The embodiment of the application provides a method for forwarding a message, and relates to network equipment on a message forwarding path. In the method, a first packet received by a second network device includes a segment list corresponding to a forwarding path of the first packet, where the segment list includes a plurality of compressed segment identifiers arranged in sequence, and a length of each compressed segment identifier is less than or equal to 128 bits. And the second network equipment reads the content to be copied from the segment list according to the coding rule, wherein the network equipment corresponding to the content to be copied is the next hop network equipment. The encoding rule is a rule corresponding to the content to be copied generated by the network equipment corresponding to the content to be copied. The same subnet domain means that prefixes in the subnet domain are the same. And the second network equipment updates the destination address DA in the first message by using the read content to be copied to generate a second message and forwards the second message. That is, for a plurality of compressed segment identifiers included in the segment list, the length corresponding to each compressed segment identifier does not need to be known in advance, but can be obtained according to the encoding rule corresponding to the sub-network domain to which the compressed segment identifier belongs. When the C-SIDs with different lengths are mixed and arranged in the same segment SRv6 compression sub-path, the method is compatible with the message forwarding and processing procedures in the existing SRv6 network.
Referring to fig. 7, this figure is a flowchart of a message transmission method provided in an embodiment of the present application, where the method relates to a network device 101 and a network device 102. For example, when the packet forwarding path is shown by a dotted line in fig. 1, the network device 101 may be the network device S in the application scenario shown in fig. 1, and the network device 102 is other network devices except the head node in the packet forwarding path, for example, the network device 102 may be the network devices 1 to 5 in the application scenario shown in fig. 1. The method can comprise the following steps:
s701: network device 101 obtains a segment list of forwarding paths.
The network device 101 may be the network device S in fig. 1, and the network device S may be an ingress device of the SRv6 network. In this embodiment, the network device 101 obtains the segment list of the forwarding path, where the segment list of the forwarding path is received by the network device 101 from the controller, or the segment list of the forwarding path is generated by the network device 101. When the network device 101 generates a segment list of a forwarding path, it first determines a forwarding path corresponding to a forwarding packet, and generates a segment list according to the forwarding path.
The segment list comprises a plurality of compressed segment identifiers which are sequentially arranged, the length of each compressed segment identifier in the plurality of compressed segment identifiers is less than 128 bits, the plurality of compressed segment identifiers comprise compressed segment identifiers with a first length and compressed segment identifiers with a second length, the first length is different from the second length, and each compressed segment identifier comprises a prefix code. As can be seen from the foregoing, the compression segment identifier includes a node identifier and a function identifier, and in an application, the length of the node identifier ID and/or the function identifier function ID may be extended to satisfy the expansion of the network scale and the expansion of the number of functions corresponding to each network device. That is, each compressed segment identifier may include a variable length portion, wherein the length of the variable length portion of the compressed segment identifier of the first length is different from the length of the variable length portion of the compressed segment identifier of the second length, the variable length portion includes a prefix code, and the length of the variable length portion may be determined according to a coding rule of the variable length portion. For the encoding rule of the variable length portion, reference may be made to the description of the node ID and/or function ID encoding rule, which is not described herein again.
The variable length part may be a function identification function ID, which is a prefix code, or a node identification node ID, which is a prefix code. The variable length part in the compressed segment identifier of the first length is consistent with the identifier type corresponding to the variable length part of the compressed segment identifier of the second length, for example, both the variable length part and the identifier type are function identifiers or both node identifiers. In this embodiment, the node identifiers in the compressed segment identifiers of the first length and the compressed segment identifiers of the second length may be the same or different. When the node identifiers in the compressed segment identifiers of the first length and the second length are the same, it is indicated that the compressed segment identifiers of the first length and the compressed segment identifiers of the second length indicate segments executed by the same network device, for example, the compressed segment identifiers of the first length and the compressed segment identifiers of the second length both indicate segments executed by the network device 1. When the node identifiers of the first-length compressed segment identifier and the second-length compressed segment identifier are not the same, the first-length compressed segment identifier and the second-length compressed segment identifier respectively indicate segments executed by different network devices, for example, the first-length compressed segment identifier is used for indicating a segment executed by the network device 1, and the second-length compressed segment identifier is used for indicating a segment executed by the network device 2.
In this embodiment, the segment list may include a plurality of compressed segment identifications C-SIDs of different lengths, e.g., a first length C-SID, a second length C-SID. The prefix portion prefix corresponding to the first length C-SID and the prefix portion prefix corresponding to the second length C-SID may be the same, for example, the first length C-SID and the second length C-SID are located in the same segment SRv6 subnet. The Prefix portion Prefix corresponding to the first length C-SID and the Prefix portion Prefix corresponding to the second length C-SID may also be different, for example, the Prefix portion corresponding to the first length C-SID is Prefix1, and the Prefix portion corresponding to the second length C-SID is Prefix 2. That is, the first length C-SID and the second length C-SID are located in different SRv6 subnets, respectively.
When the message processing process includes 5 segments, if a SID with a length of 128 bits is adopted, the total length of 5 SIDs is 80 bytes, and when a C-SID is adopted, taking the C-SID with a length of 32 bits as an example, the total length of 5C-SIDs is 20 bytes, the compression effect is obvious. In order to obtain the SID list including the C-SID, the SID list including the SID may be obtained first, then the SID in the SID list including the segment identifier is compressed, and the SID in the SID list is replaced by the corresponding C-SID to obtain the SID list including the C-SID; or, the SID may be compressed first to obtain a corresponding C-SID, and then the SID list including the C-SID may be obtained according to the C-SID.
In some implementations, the segment list includes elements of length 128 bits, and the first length C-SID and the second length C-SID may be located in the same element in the segment list. In connection with the application scenario shown in fig. 1, the segment list including C-SIDs of different lengths is shown in fig. 8a, and the segments executed by network device 1-network device 4 can be identified by C-SIDs of 16 bits, i.e., C-SID 1-C-SID 4; the segment executed by the network device 5 may be represented by a C-SID of length 32 bits, i.e., C-SID 5. Only 1 container may be included in the segment list. The total length of the segment list shown in fig. 8a is reduced by 128 bits compared to the segment list shown in fig. 6. Therefore, when the SID list comprises C-SIDs with different lengths, the lengths of partial C-SIDs can be further shortened, so that the length of the whole SID list is further shortened, and the network efficiency is improved. The technical effect is more remarkable when the number of C-SIDs in the SID list is more.
S702: network device 101 generates a first packet that includes a segment list corresponding to a forwarding path of the first packet.
In this embodiment, as a head node on a packet forwarding path, after the network device 101 generates or acquires a segment List corresponding to the packet forwarding path, the segment List SID List may be encapsulated in a received data packet, so as to indicate the forwarding path of the data packet through the segment List. For example, network device 101 encapsulates the IPv6 header and SRH outside the received data packet to form SRv6 data packet. I.e. the first message is an SRv6 data message. According to the message forwarding mechanism of SRv6 network, the network device 101 obtains a segment list corresponding to the forwarding path of the first message, and encapsulates the segment list in the first message, so as to load the processing procedure for the first message in the message and transmit the processing procedure to each network device on the forwarding path of the first message, so that each network device on the forwarding path executes its own related message processing behavior in sequence after receiving the first message.
In some implementations, the first packet may further include an extension pointer to sequentially indicate each of the plurality of compressed segment identifiers and/or the segment identifier in the segment list using the extension pointer. The extended pointer may be a one-dimensional pointer or a two-dimensional pointer. Of the two-dimensional pointers, the first dimension pointer, i.e. the SL pointer, is still used to indicate a particular element in the SID list, while the second dimension pointer, i.e. the SI pointer, is used to further indicate a C-SID within the element. Among the one-dimensional pointers, the one-dimensional pointer, i.e., SI, is used to indicate a certain SID in the SID list. The extended pointer may be located in the SRH in the message or may be located in the DA field. For example, the extended pointer may be located in a specific field in the SRH. For example, the least significant byte of the DA field may also be used to place SI to facilitate hardware implementation and facilitate future solution expansion.
Wherein the extended pointer may be added to the first message by the network device 101, and an initial value of the extended pointer in the first message is set. When the extended pointer is a two-dimensional pointer, the initial value of the SL pointer is set to N-1, where N is the number of containers included in the SID list, and the SL pointer points to each container in a decreasing fashion. The initial value of SI may be set to M, which is the length of each container, i.e. 128, the SI pointer points to bits in the container in a decreasing fashion. Alternatively, the initial value of SI may be set to 0, pointing in an incremental form to a bit in the container. When the extended pointer is a one-dimensional pointer, the initial value of SI is configured to be N, where N is the total length of all G-SIDs included in the SID list. Other implementation details regarding the extended pointer are similar to those described above, and are not described herein again. The updating manner of the extended pointer will be described in detail in the subsequent step.
In some implementations, during the process of encapsulating SRv6 the data packet, the network device 101 may also place a prefix corresponding to the C-SID in the segment list in the DA field of the IPv6 header of the SRv6 data packet. Optionally, during the process of encapsulating SRv6 the datagram, network device 101 may place the first C-SID in the segment list after prefix in the DA field. In combination with the application scenario shown in fig. 1 and the message structure shown in fig. 8a, the network device S places prefix at the start of the DA field and places C-SID1 behind prefix in the DA field, so that SID1 is restored from prefix + C-SID1 in the DA field.
It should be noted that, after the network device 101 places the first G-SID in the SID list in the DA field, the value of the extension pointer may not be updated, that is, after the network device 101 places the first G-SID in the SID list in the DA field, the value of the extension pointer is still the initial value. That is, for the first packet, the G-SID in the SID list pointed to by the extended pointer is the G-SID included in the DA field. Taking the two-dimensional pointer as an example, in combination with the application scenario shown in fig. 1 and the packet structure shown in fig. 8a, the network device S places a C-SID1 in the DA field of the second packet, where the value of the SL pointer in the second packet is still 0, and the value of the SI is still 0 or 127. Wherein the value range of SI is 0-127 for indicating each bit.
In some implementations, the value of the extended pointer can be updated after network device 101 places the first G-SID in the list of segments in the DA field, i.e., the value of the extended pointer is incremented by the first G-SID length after network device 101 places the first G-SID in the list of segments in the DA field. That is, the extended pointer points to the second G-SID in the segment list.
For a conventional SRv6 network, the SID list consists of only SIDs, and during the message forwarding process, the network device subtracts 1 from the value of the SL field in the message SRH, and copies the segment list [ SL ] into the DA field of the IPv6 header, that is, updates the content of the DA field. When the SID list further includes the C-SID, in order to be compatible with the above-mentioned message forwarding process in the SRv6 network, the update mode of the DA field by the network device will change.
Optionally, the network device needs to acquire the start position of the next compressed SID, and reads the node ID and the function ID from the start position according to the encoding rule, and combines the node ID and the function ID to obtain the next compressed SID, and updates the DA field by using the compressed SID. By taking the application scenario shown in fig. 1 as an example, the initial length of the whole network configuration is 3 bits, and the increment length is 3 bits. The locator of the network device 1 is FFFF 001X:/19, wherein FFFF is a prefix part with a length of 16 bits, 001 is a node ID in binary form with a length of 3 bits, i.e. the sum of the lengths of the prefix part and the node ID is 19 bits, and X represents a placeholder of all zeros and is located after the node ID. The SID is FFFF 001001X, the SID is 128 bits, the FFFF is a prefix part, the SID is 16 bits, 001 is a node ID in binary form, the SID is 3 bits, 001 is a function ID in binary form, the SID is 3 bits, X represents a placeholder of all zeros, and the compressed SID is 001001 after the function ID. The locator of the network device 2 is FFFF 100001X:/22, where FFFF is prefix part with length of 16 bits, 100001 is node ID in binary form with length of 6 bits, i.e. the sum of the length of prefix part and node ID is 22 bits, and X represents a placeholder of all zeros, located after node ID. 100001110010011X, length of 128 bits, where FFFF is a prefix part, length of 16 bits, 100001 is a node ID in binary form, length of 6 bits, 110010011 is a function ID in binary form, length of 9 bits, X represents a placeholder for all zeros, and the compressed SID is 100001110010011 after the function ID. The DA of the packet is FFFF 001001X::20, and SID list is [ Y001001100001110010011Y ], wherein Y identifies other contents, such as SIDs corresponding to other network devices. 20 is a pointer in 16-ary form, i.e. to the 32 nd bit in an element of length 128 bits. 001001X, and at the same time, the network device 1 moves the SI pointer to the starting position 26 of the next compressed SID (SID corresponding to the network device 2) according to the length (6 bits) of the SID corresponding to the network device 1, where the 26 (16-bit format) indicates that the pointer points to the 38 th bit in an element with a length of 128 bits, and then the network device 1 reads 1 bit 1 and 1 bit 0, and then reads 3+1 × 3-1-1 bit 0001 according to the coding rule of the node ID from the position indicated by the pointer, to obtain node ID code 100001; then, according to the encoding rule of the function ID, reading 2 pieces of 1 and 1 piece of 0, continuously reading the position 3+ 2X 3-2-1 as 010011 to obtain the function ID of 110010011, combining the node ID and the function ID to obtain 100001110010011, and replacing the 100001110010011 with the DA to obtain FFFF:100001110010011X: 26.
S703: network device 101 sends the first packet according to the segment list.
In this embodiment, after the network device 101 generates the first packet, the first packet is forwarded according to the forwarding path indicated by the segment list. Specifically, the network device 101 determines the next-hop network device according to the DA field in the IPv6 header of the first packet, and then sends the first packet to the next-hop network device. With reference to the application scenario shown in fig. 1 and the packet structure shown in fig. 8a, as a head node of the forwarding path, the network device S has placed C-SID1 in prefix and SID list in a DA field of the first packet, the network device S may restore SID1 according to content prefix + C-SID1 in the DA field of the first packet, and the network device S searches for a local forwarding entry according to SID1, determines that the next-hop network device is the network device 1, and sends the first packet to the network device 1. And the endpoint node on the message forwarding path sequentially receives the messages sent by the last hop of network equipment, updates the content of the DA field according to the segment list, and forwards the messages according to the content of the DA field, so that the messages are sent out along the forwarding path corresponding to the segment list.
S704: network device 102 receives the first message.
In this embodiment, the network device 102 may receive a first packet sent by a previous-hop network device, where the network device 102 is an endpoint node except a head node on a packet forwarding path. For example, the network device 102 may be the network devices 1 to 5 in the application scenario shown in fig. 1. When the network device 102 is the network device 1 shown in fig. 1, the first message received by the network device 1 is a message sent by the network device S, that is, an SRv6 data message after the network device S encapsulates the SID list, and when the network device 102 is the network devices 2 to 5 shown in fig. 1, the first message received by the network devices 2 to 5 is a SRv6 data message updated by the previous hop network device.
S705: the network device 102 reads the content to be copied in the segment list according to the encoding rule.
In this embodiment, after receiving the first message, the network device 102 may read the content to be copied from the segment list according to the encoding rule, so as to update the destination DA in the first message by using the content to be copied and determine the next-hop network device by using the compressed segment identifier. The content to be copied is a compressed segment identifier updated to the DA field of the first packet by the network device 102.
The network device 102 reads the content to be copied from the segment list according to the encoding rule, and may perform the following two steps:
1) the network device 102 determines a start position, which is used to indicate a start position corresponding to the content to be copied.
When the extended pointer is included in the first message, the network device 102 may determine a starting position of the content to be copied in the segment list by using the extended pointer. Specifically, if the value of the extended pointer is not updated after network device 101 places the first G-SID in the SID list in the DA field, the extended pointer points to the first G-SID at this time. In this case, the network device 102 updates the value of the extension pointer according to the length of the corresponding compressed segment identifier, so that the updated value of the extension pointer corresponds to the second G-SID, that is, the starting position of the content to be copied in the segment list. It should be noted that the segment list may include compressed segment identifiers with different lengths, and the values of the updated extension pointers of the network device 102 are also different, for example, when the network device 102 is the network device 1, and the length of the corresponding compressed segment identifier is 16 bits, the extension pointer is shifted by 16 bits; when network device 102 is network device 5 and its corresponding compressed segment identifier is 32 bits in length, the extended pointer is offset by 32 bits in length.
When the extended pointer is a one-dimensional pointer or a two-dimensional pointer, the adjustment process of the value of the extended pointer is different.
When the extended pointer is the two-dimensional pointer, the adjusting process of the extended pointer comprises the following steps: the network device 102 determines the value of the SI according to the length of the corresponding compression segment identifier, so that the value of the SI is used to indicate the position of the content to be copied in the element with the length of 128 bits. Specifically, the network device 102 reads an original value of the SI in a header of the first packet, and subtracts the updated value from the original value of the SI to obtain the value of the SI. That is, the length of the SI offset corresponds to the update value, which is the length of the G-SID corresponding to the network device 102.
In some implementations, the update value may be the length of the local G-SID divided by the unit length. That is, the length corresponding to the update value is an integer multiple of the unit length, i.e., the length of the SI offset is an integer multiple of the unit length. For example, when the unit length is 16 bits, the length of the local segment identifier indication is 16 bits, and the update value is 1, and the length of the local segment identifier indication is 32 bits, and the update value is 2.
Further, the network device 102 determines the position of the content to be copied in the element with the length of 128 bits according to the value of the SI, and determines the position of the element in the SID list according to the value of the SL pointer. It is noted that in this process, the value of the SL pointer may need to be adjusted. Also, after adjusting the value of the SL pointer, it may be necessary to set the value of the SI to an initial value. For example, when the local C-SID is the last C-SID in an element, i.e., the next C-SID of the local C-SID in the SID list will be located in the next element, it is necessary to adjust the value of the SL pointer so that the SL pointer points to the next element and set the value of the SI to the initial value so that the SI points to the first bit in the next element. Alternatively, when the SI is shifted to point to the padding portion of the current element, for example, when the SI has a value of 111 to point to the 112 th bit and the remaining 16 bits of the element are all 0's, or when the SI has a value of 95 to point to the 96 th bit and the remaining 32 bits of the element are all 0's, the value of the SL pointer needs to be adjusted so that the SL pointer points to the next element.
When the extended pointer is a one-dimensional pointer, the adjustment process of the extended pointer comprises the following steps: the network device 102 determines the value of the SI according to the length indicated by the local segment identifier, so that the value of the SI is used to indicate the position of the content to be copied in the SID list. Specifically, the network device 102 reads an original value of the SI in a header of the first packet, and subtracts the updated value from the original value of the SI to obtain the value of the SI. The updated value of the SI is similar to the above description, and is not described herein again.
In some implementations, the network device 102 writes the value of the extended pointer in the first message. That is, the updated header of the first packet, that is, the header of the second packet introduced later, includes the value of the extension pointer.
If the value of the extended pointer is updated after network device 101 places the first G-SID in the segment list in the DA field, the extended pointer points to the second G-SID at this time. That is, the value of the extended pointer at this time corresponds to the starting position of the content to be copied in the segment list.
2) The network device 102 determines the length of the content to be copied according to the encoding rule and the start position.
After determining the start position, the network device 102 may determine the length of the content to be copied according to the encoding rule and the start position, that is, obtain the content to be copied.
Specifically, the network device 102 obtains a first parameter set and/or a second parameter set, where the first parameter set includes a first initial length and a first incremental length corresponding to the node identifier, and the second parameter set includes a second initial length and a second incremental length corresponding to the function identifier; the network device 102 determines the length of the content to be copied according to the encoding rule, the first parameter set and/or the second parameter set, and the start position. The first initial length and the first increment length may both be multiples of 8 bits, and/or the second initial length and the second increment length may both be multiples of 8 bits. The length of the content to be copied is related to the number i or j of times of expansion, and can be specifically determined by the following steps:
1) the network device 102 reads N bits backward from the start position, where the first i bits of the N bits are 1, the i +1 th bit is 0, or the first i bits of the N bits are 0, and the i +1 th bit is 1.
2) The second network device 102 continues to read back M bits, where M is the first initial length + i × first increment length-i-1, and takes N + M bits as the length of the node identifier in the content to be copied.
The value of i may also indicate the number of times the node identifier is extended.
3) The network device 102 continues to read back P bits, where the first j bits of the P bits are 1, and the j +1 th bit is 0, or the first j bits of the P bits are 0, and the j +1 th bit is 1.
4) The network device 102 continues to read Q bits, where Q is the second initial length + j is the second incremental length-j-1 bits, and takes P + Q bits as the length of the function identifier in the content to be copied.
The value of j may also indicate the number of times the function identifier is extended.
5) The network device 102 obtains the length of the content to be copied according to the length of the node identifier in the content to be copied and the length of the function identifier in the content to be copied.
For example, in the segment list shown in fig. 8b, the compressed segment id of the second network device is "001001", before updating the extension pointer, the extension pointer points to the first bit "0" of the compressed segment id of the second network device, and since the length of the compressed segment id of the second network device is 6, the extension pointer is shifted back by 6 bits to point to the first bit of the content to be copied. The second network device reads "10" backward from the position pointed by the extended pointer, which is a prefix portion in the node identifier correspondence code, and it can know that N ═ 2, (i +1), i ═ 1, and then it continues to read M ═ 3+ i ═ 3-i-1, (4 bits "0001"), and then reads node identifier 100001 with a length of 6 bits. The second network device continues to read bit "110" backward, which is a prefix portion in the function identifier correspondence code, and can learn that P ═ j +1 ═ 3 and j ═ 2 through the prefix portion, and then continues to read Q ═ 3+3 ═ j-1 ═ 6bit "010011" backward, and reads function identifier "110010011" with a length of 9 bits, and the obtained content to be copied is "100001110010011".
In a possible implementation manner, before obtaining the content to be copied according to the encoding rule, the network device 102 may determine whether the C-SID or the SID value in the DA field in the first message is the same as the local segment identifier SID, and if so, perform the operation of S706.
S706: the network device 102 updates the destination address DA in the first message according to the content to be copied to generate a second message.
In this embodiment, after the network device 102 obtains the content to be copied, the content of the destination address DA in the first message is updated by using the content to be copied, and the message including the updated DA is used as the second message.
In some implementations, when the prefix portion corresponding to the content to be copied is the same as the prefix portion in the current DA field, the network device 102 may directly update information, except for the prefix portion, in the DA field with the content to be copied, so as to obtain the updated DA field.
S707: network device 102 sends the second message.
In this embodiment, the network device 102 may determine the next hop network device according to the content of the DA field in the second packet, and send the second packet to the next hop network device. For example, when the network device 102 is the network device 1, prefix + C-SID 2 in the DA field of the second packet restores SID 2, and the network device 1 searches for the local forwarding table entry according to SID 2, determines that the next-hop network device is the network device 2, and sends the second packet to the network device 2. When the network device 102 is the network devices 2 to 5, the process of sending the second packet by the network device 102 according to the content of the destination address field is repeated, and so on, which is not described herein again.
In practical applications, the network device may further update the DA field by carrying, in the C-SID or SID, continuous of compression (COC) information indicating whether the C-SID is continuously aligned in the SID list. And when the C-SID in the current DA field comprises COC information, indicating that the next C-SID to be processed corresponds to the same prefix in the DA field, copying the next C-SID to be processed to the prefix in the DA field, and restoring the next SID from the next C-SID to be processed and the prefix. When the C-SID in the current DA field does not include a COC message, it indicates that a prefix change will occur. The network device copies the 128-bit SID into the DA field using standard processing. When the SID includes COC information, it indicates that the next C-SID to be processed corresponds to the same prefix as the SID, and the network device only needs to copy the next C-SID to be processed to the prefix in the DA field, and the next C-SID to be processed and the prefix restore the next SID.
Optionally, the COC information may be an attribute of SID or C-SID, also referred to as COC attribute.
For facilitating understanding of the technical solution provided by the present application example, refer to the method flowchart shown in fig. 9. The method relates to an implementation process of acquiring a segment list by a first network device, and the method can comprise the following steps:
s901: the first network equipment determines a forwarding path of the message.
S902: the first network device generates a segment list corresponding to the forwarding path.
The segment list includes a plurality of compressed segment identifiers arranged in sequence, the length of each compressed segment identifier in the plurality of compressed segment identifiers is less than or equal to 128 bits, the plurality of compressed segment identifiers include a compressed segment identifier of a first length and a compressed segment identifier of a second length, the first length is different from the second length, and each compressed segment identifier in the plurality of compressed segment identifiers includes a prefix code.
In one implementation, each compressed segment identifier includes a variable length portion, the length of the variable length portion of the compressed segment identifier of the first length is different from the length of the variable length portion of the compressed segment identifier of the second length, the variable length portion includes the prefix code, and the length of the variable length portion is determined according to the encoding rule of the variable length portion.
Specifically, the first network device may be the network device S in the embodiment corresponding to fig. 1, the network device S may be an ingress device of SRv6 network, and after generating the segment list corresponding to the forwarding path, the first network device may generate a packet including the segment list. Or, the first network device may also be a controller in the network, in which case, the first network device sends the segment list to the ingress device of the forwarding path, and the ingress device generates the first packet according to the segment list. For specific implementation of determining a forwarding path and generating a segment list by the first network device, reference may be made to the detailed description of S701, which is not described herein again in this embodiment.
Based on the foregoing method embodiments, embodiments of the present application provide a message transmission apparatus, which will be described below with reference to the accompanying drawings.
Fig. 10 is a structural diagram of a message transmission apparatus according to an embodiment of the present application, where the apparatus 1000 includes: receiving section 1001, processing section 1002, and transmitting section 1003.
A receiving unit 1001, configured to receive a first packet sent by the first network device, where the first packet includes a segment list corresponding to a forwarding path of the first packet, the segment list includes multiple compression segment identifiers arranged in sequence, and a length of each of the multiple compression segment identifiers is less than or equal to 128 bits. For the implementation of the receiving unit 1001, see the detailed description of S705.
The processing unit 1002 is configured to read, according to an encoding rule, content to be copied from the segment list, where the encoding rule is used to indicate an encoding rule corresponding to the content to be copied. See S706 for a description regarding the implementation of the processing unit 1002.
The processing unit 1002 is further configured to update a destination address DA in the first message according to the content to be copied, so as to generate a second message. For a specific implementation of the processing unit 1002, reference may be made to the related description of S707.
A sending unit 1003, configured to send the second packet. For a specific implementation of the transmitting unit 1003, reference may be made to the description of S707.
Referring to fig. 11, which is a structural diagram of another message transmission apparatus provided in this embodiment of the present application, the apparatus 1100 includes: a processing unit 1101 and a transmitting unit 1102.
A processing unit 1101, configured to generate a first packet, where the first packet includes a segment list corresponding to a forwarding path of the first packet, the segment list includes a plurality of compressed segment identifiers arranged in sequence, a length of each compressed segment identifier in the plurality of compressed segment identifiers is less than or equal to 128 bits, the plurality of compressed segment identifiers includes a compressed segment identifier of a first length and a compressed segment identifier of a second length, the first length is different from the second length, and each compressed segment identifier in the plurality of compressed segment identifiers includes a prefix code. For a specific implementation of the processing unit 1101, reference may be made to the relevant description of S703.
A sending unit 1102, configured to send the first packet according to the segment list. For a specific implementation of the sending unit 1102, reference may be made to the relevant description of S704.
Referring to fig. 12, which is a block diagram of a segment list generating apparatus according to an embodiment of the present application, the apparatus 1200 includes: a processing unit 1201.
A processing unit 1201, configured to determine a forwarding path of the packet.
The processing unit 1201 is further configured to generate a segment list corresponding to the forwarding path, where the segment list includes a plurality of compressed segment identifiers arranged in sequence, a length of each compressed segment identifier in the plurality of compressed segment identifiers is less than or equal to 128 bits, the plurality of compressed segment identifiers include a compressed segment identifier of a first length and a compressed segment identifier of a second length, the first length is different from the second length, and each compressed segment identifier in the plurality of compressed segment identifiers includes a prefix code. For a specific implementation of the processing unit 1101, reference may be made to the relevant descriptions of S701-S702.
Referring to fig. 13, which is a block diagram of a device for acquiring a compression segment identifier according to an embodiment of the present application, the device 1200 includes: a processing unit 1301 and a transmitting unit 1302.
A processing unit 1301, configured to obtain a compressed segment identifier of a first length, where the compressed segment identifier of the first length includes a first variable length portion, and the first variable length portion belongs to a first resource pool, and the first resource pool includes a plurality of first variable length portions. For specific implementation of the processing unit 1301, reference may be made to the related description of S401.
The processing unit 1301 is further configured to obtain a compressed segment identifier of a second length based on the shortage of resources in the first resource pool, where the second length is greater than or equal to the first length, the compressed segment identifier of the second length includes a second variable length portion, the second variable length portion belongs to a second resource pool, and the second resource pool includes a plurality of second variable length portions. For specific implementation of the processing unit 1301, reference may be made to the related description of S402.
A sending unit 1302, configured to send the compressed segment identifier of the first length and the compressed segment identifier of the second length, where the compressed segment identifier of the first length and the compressed segment identifier of the second length are used to indicate the segment executed by the first network device. For a specific implementation of the sending unit 1303, reference may be made to the related description of S403.
In addition, an embodiment of the present application further provides a communication system, where the system includes: a first network device and a second network device; the first network device may perform operations as described in the embodiment shown in fig. 9; the second network device may perform operations as described with reference to the second network device in the example shown in fig. 9.
Fig. 14 is a schematic structural diagram of a network device provided in an embodiment of the present application, where the network device may be, for example, a first network device or a second network device in the embodiment shown in fig. 9, or may also be implemented by devices 1000 in the embodiment shown in fig. 10, device 1100 in the embodiment shown in fig. 11, device 1200 in the embodiment shown in fig. 12, and device 1300 in the embodiment shown in fig. 13.
Referring to fig. 14, the network device 1400 includes at least a processor 1410. Network device 1400 may also include a communication interface 1420 and memory 1430. Wherein the number of the processors 1410 in the network device 1400 may be one or more, and one processor is taken as an example in fig. 14. In the embodiment of the present application, the processor 1410, the communication interface 1420 and the memory 1430 may be connected by a bus system or other means, wherein fig. 14 illustrates the connection by the bus system 1440.
The processor 1410 may be a CPU, an NP, or a combination of a CPU and an NP. The processor 1410 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
When the network device is a first network device, the processor 1410 may execute the method embodiment described above, where the first network device obtains a compressed segment identifier of a first length and a compressed segment identifier of a second length, determines a forwarding path of a packet, generates a segment list corresponding to the forwarding path, generates a first packet, and so on. When the network device is a second network device, the processor 1410 may perform related functions of reading the content to be copied in the segment list according to the encoding rule and updating the destination address DA of the first packet according to the content to be copied in the above-described method example.
Communication interface 1420 is used to receive and transmit messages, and in particular, communication interface 1420 may include a receive interface and a transmit interface. The receiving interface may be configured to receive a message, and the sending interface may be configured to send a message. The number of communication interfaces 1420 may be one or more.
The memory 1430 may include volatile memory (RAM), such as random-access memory (RAM); the memory 1430 may also include a non-volatile memory (english: non-volatile memory), such as a flash memory (english: flash memory), a hard disk (HDD) or a solid-state drive (SSD); the memory 1430 may also include a combination of the above types of memory.
Optionally, memory 1430 stores an operating system and programs, executable modules or data structures, or subsets thereof, or expanded sets thereof, wherein the programs may include various operating instructions for performing various operations. The operating system may include various system programs for implementing various basic services and for handling hardware-based tasks. The processor 1410 may read a program in the memory 1430, and implement the message transmission method, the segment list generation method, and the compressed segment identifier acquisition method provided in the embodiment of the present application.
The memory 1430 may be a storage device in the network device 1400, or may be a storage device independent of the network device 1400.
The bus system 1440 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus system 1440 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 14, but that does not indicate only one bus or one type of bus.
Fig. 15 is a schematic structural diagram of another network device 1500 provided in an embodiment of the present application, where the network device 1500 may be implemented by a first network device or a second network device in the embodiment shown in fig. 9, or may also be implemented by apparatuses 1000 in the embodiment shown in fig. 10, an apparatus 1100 in the embodiment shown in fig. 11, an apparatus 1200 in the embodiment shown in fig. 12, and an apparatus 1300 in the embodiment shown in fig. 13.
The network device 1500 includes: a main control board 1510 and an interface board 1530.
The main control board 1510 is also called a Main Processing Unit (MPU) or a route processor card (route processor card), and the main control board 1510 controls and manages each component in the network device 1500, including routing computation, device management, device maintenance, and protocol processing functions. The main control board 1510 includes: a central processor 1511 and a memory 1512.
The interface board 1530 is also referred to as a Line Processing Unit (LPU), a line card (line card), or a service board. The interface board 1530 is used to provide various service interfaces and implement packet forwarding. The service interfaces include, but are not limited to, Ethernet interfaces, such as Flexible Ethernet services interfaces (FlexE Ethernet Clients), POS (Packet over SONET/SDH) interfaces, and the like. The interface board 1530 includes: a central processor 1531, a network processor 1532, a forwarding table entry memory 1534, and a Physical Interface Card (PIC) 1533.
The central processor 1531 on the interface board 1530 is configured to control and manage the interface board 1530 and communicate with the central processor 1511 on the main control board 1510.
The network processor 1532 is configured to implement forwarding processing of the packet. The network processor 1532 may take the form of a forwarding chip. Specifically, the processing of the uplink packet includes: processing a message input interface and searching a forwarding table; and (3) downlink message processing: forwarding table lookups, and the like.
The physical interface card 1533 is used to implement the interfacing function of the physical layer, from which the original traffic enters the interface board 1530, and the processed messages are sent out from the physical interface card 1533. Physical interface card 1533 includes at least one physical interface, also known as a physical port. The physical interface card 1533 is also called a daughter card, and may be installed on the interface board 1530 and is responsible for converting the optical signal into a message, performing validity check on the message, and forwarding the message to the network processor 1532 for processing. In some embodiments, the central processor 1531 of the interface board 1503 may also perform the functions of the network processor 1532, such as implementing software forwarding based on a general purpose CPU, so that the network processor 1532 is not needed in the physical interface card 1533.
Optionally, the network device 1500 includes a plurality of interface boards, for example, the network device 1500 further includes an interface board 1540, and the interface board 1540 includes: a central processor 1541, a network processor 1542, a forwarding table entry store 1544, and a physical interface card 1543.
Optionally, network device 1500 also includes a switch board 1520. The switch board 1520 may also be called a Switch Fabric Unit (SFU). In the case of a network device having a plurality of interface boards 1530, the switch board 1520 is used to complete data exchange between the interface boards. For example, interface board 1530 and interface board 1540 can communicate through switch board 1520.
A main control board 1510 is coupled to an interface board 1530. For example. The main control board 1510, the interface board 1530, the interface board 1540, and the switch board 1520 are connected to the system backplane through a system bus to achieve intercommunication. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 1510 and the interface board 1530, and the main control board 1510 and the interface board 1530 communicate with each other through the IPC channel.
Logically, the network device 1500 includes a control plane including the main control board 1510 and the central processor 1531, and a forwarding plane including various components to perform forwarding, such as a forwarding table entry memory 1534, a physical interface card 1533, and a network processor 1532. The control plane performs functions such as a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the state of the device, and issues the generated forwarding table to the forwarding plane, and in the forwarding plane, the network processor 1532 looks up the table of the message received by the physical interface card 1533 based on the forwarding table issued by the control plane and forwards the table. The forwarding table issued by the control plane may be stored in a forwarding table entry memory 1534. In some embodiments, the control plane and the forwarding plane may be completely separate and not on the same device.
It should be understood that the transmitting unit and the receiving unit in each of the embodiments of fig. 10-13 may be different physical interface cards, e.g., receiving unit 1001 corresponding to physical interface card 1533 and transmitting unit 1003 corresponding to physical interface card 1534. Processing unit 1002 in apparatus 1000, processing unit 1101 in apparatus 1100, processing unit 1201 in apparatus 1200, processing unit 1301 in apparatus 1300, and the like may correspond to one or more of central processor 1511, central processor 1531, central processor 1541 in network device 1500.
It should be understood that the operations on the interface board 1540 in the embodiment of the present application are the same as the operations on the interface board 1530, and therefore, for brevity, the description is omitted. It should be understood that the network device 1500 of this embodiment may correspond to the first network device or the second network device in the above-mentioned respective method embodiments, and the main control board 1510, the interface board 1530 and/or the interface board 1540 in the network device 1500 may implement the functions and/or the various steps implemented by the first network device or the second network device in the above-mentioned respective method embodiments, and therefore, for brevity, no further description is provided here.
It should be understood that the main control board may have one or more blocks, and when there are more blocks, the main control board may include an active main control board and a standby main control board. The interface board may have one or more blocks, and the stronger the data processing capability of the network device, the more interface boards are provided. There may also be one or more physical interface cards on an interface board. The exchange network board may not have, or may have one or more blocks, and when there are more blocks, the load sharing redundancy backup can be realized together. Under the centralized forwarding architecture, the network device does not need a switching network board, and the interface board undertakes the processing function of the service data of the whole system. Under the distributed forwarding architecture, the network device can have at least one switching network board, and the data exchange among a plurality of interface boards is realized through the switching network board, so that the high-capacity data exchange and processing capacity is provided. Therefore, the data access and processing capabilities of network devices in a distributed architecture are greater than those of devices in a centralized architecture. Optionally, the form of the network device may also be only one board card, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the one board card, at this time, the central processing unit on the interface board and the central processing unit on the main control board may be combined into one central processing unit on the one board card to perform the function after the two are superimposed, and the data switching and processing capability of the device in this form is low (for example, network devices such as a low-end switch or a router, etc.). Which architecture is specifically adopted depends on the specific networking deployment scenario.
In some possible embodiments, the address requesting device, the relay device or the address allocating device may be implemented as a virtualized device. For example, the virtualized device may be a Virtual Machine (VM) running a program for sending messages, and the VM is deployed on a hardware device (e.g., a physical server). A virtual machine refers to a complete computer system with complete hardware system functionality, which is emulated by software, running in a completely isolated environment. The virtual machine may be configured as an address requesting device, a relay device, or an address assigning device. For example, the address requesting device, the relay device, or the address allocating device may be implemented based on a general physical server in combination with Network Function Virtualization (NFV) technology. The address requesting device, the relay device or the address allocating device is a virtual host, a virtual router or a virtual switch. Through reading the present application, a person skilled in the art may combine the NFV technology to virtually generate an address requesting device, a relay device, or an address allocating device with the above functions on a general physical server, and details are not described here.
It should be understood that the network devices in the above various product forms respectively have any functions of the address requesting device, the relay device, or the address allocating device in the above method embodiments, and details thereof are not repeated here.
The embodiment of the application also provides a chip, which comprises a processor and an interface circuit, wherein the interface circuit is used for receiving the instruction and transmitting the instruction to the processor; a processor, which may be a specific implementation form of the apparatus 1000 shown in fig. 10, for example, may be configured to execute the message transmission method described above. Wherein the processor is coupled to a memory for storing a program or instructions which, when executed by the processor, cause the system-on-chip to implement the method of any of the above method embodiments.
Optionally, the system on a chip may have one or more processors. The processor may be implemented by hardware or by software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
Optionally, the memory in the system-on-chip may also be one or more. The memory may be integrated with the processor or may be separate from the processor, which is not limited in this application. For example, the memory may be a non-transitory processor, such as a read only memory ROM, which may be integrated with the processor on the same chip or separately disposed on different chips, and the type of the memory and the arrangement of the memory and the processor are not particularly limited in this application.
The system-on-chip may be, for example, a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), a system on chip (SoC), a Central Processing Unit (CPU), a Network Processor (NP), a digital signal processing circuit (DSP), a Microcontroller (MCU), a Programmable Logic Device (PLD), or other integrated chips.
An embodiment of the present application further provides a computer-readable storage medium, which includes instructions or a computer program, and when the computer-readable storage medium runs on a computer, the computer is enabled to execute the message transmission method, the segment list generation method, and the compressed segment identifier acquisition method provided in the foregoing embodiments.
Embodiments of the present application further provide a computer program product including instructions or a computer program, which when run on a computer, causes the computer to execute the message transmission method, the segment list generation method, and the compressed segment identifier acquisition method provided in the foregoing embodiments.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is only a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, each service unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a hardware form, and can also be realized in a software service unit form.
The integrated unit, if implemented in the form of a software business unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
Those skilled in the art will recognize that, in one or more of the examples described above, the services described in this disclosure may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the services may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above embodiments are intended to explain the objects, aspects and advantages of the present invention in further detail, and it should be understood that the above embodiments are merely illustrative of the present invention.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (33)

1. A method for packet transmission, the method comprising:
a second network device receives a first message sent by the first network device, where the first message includes a segment list corresponding to a forwarding path of the first message, the segment list includes multiple compression segment identifiers arranged in sequence, and the length of each of the multiple compression segment identifiers is less than or equal to 128 bits;
the second network equipment reads the content to be copied in the segment list according to an encoding rule, wherein the encoding rule is used for indicating the encoding rule corresponding to the content to be copied;
the second network equipment updates the destination address DA in the first message according to the content to be copied so as to generate a second message;
and the second network equipment sends the second message.
2. The method according to claim 1, wherein the second network device reads the content to be copied from the segment list according to the encoding rule, and comprises:
the second network equipment determines a starting position, wherein the starting position is used for indicating the starting position corresponding to the content to be copied;
and the second network equipment determines the length of the content to be copied according to the encoding rule and the starting position.
3. The method of claim 2, wherein the second network device determines the length of the content to be copied according to the encoding rule and the starting position, and comprises:
the second network device obtains a first parameter set and/or a second parameter set, the first parameter set comprises a first initial length and a first increment length corresponding to a node identifier in the compressed segment identifier, and the second parameter set comprises a second initial length and a second increment length corresponding to a function identifier in the compressed segment identifier;
the second network device determines the length of the content to be copied according to an encoding rule, the first parameter set and/or the second parameter set and the starting position.
4. The method according to claim 3, wherein the second network device determines the length of the content to be copied according to an encoding rule, the first parameter set and/or the second parameter set, and the start position, and comprises:
the second network device reads N bits backwards from the starting position, where the first i bits of the N bits are 1 and the i +1 th bit is 0, or the first i bits of the N bits are 0 and the i +1 th bit is 1;
the second network device continues to read M bits backward, where M is the first initial length + i and the first incremental length-i-1, and takes N + M bits as the length of the node identifier in the content to be copied;
the second network device continues to read back P bits, where the first j bits of the P bits are 1, and the j +1 th bit is 0, or the first j bits of the P bits are 0, and the j +1 th bit is 1;
after the second network device continues to read Q bits, where Q is the second initial length + j, the second increment length-j-1 bits, and P + Q bits are used as the length of the function identifier in the content to be copied;
and the second network equipment obtains the length of the content to be copied according to the length of the node identifier in the content to be copied and the length of the function identifier in the content to be copied.
5. The method according to claim 3 or 4, wherein the first initial length and the first increment length are each multiples of 8 bits, and/or wherein the second initial length and the second increment length are each multiples of 8 bits.
6. The method according to any of claims 2-5, wherein the first packet further includes an extension pointer, the extension pointer is used to sequentially indicate each of the plurality of compressed segment identifiers, and the determining, by the second network device, a start position includes:
and the second network equipment determines the starting position of the content to be copied in the segment list according to the extended pointer.
7. The method of claim 6, wherein the extended pointer indicates a starting position of a corresponding compressed segment identifier of the second network device, and the second network device determines a starting position of the content to be copied in the segment list according to the extended pointer, including:
and the second network equipment updates the value of the extension pointer according to the length of the corresponding compression segment identifier of the second network equipment, so that the updated value of the extension pointer corresponds to the initial position of the content to be copied in the segment list.
8. The method according to any one of claims 1 to 7, wherein the updating, by the second network device, the destination address DA in the first message according to the content to be copied to generate a second message, includes:
and the second network equipment updates the destination address DA in the first message according to the content to be copied and the prefix corresponding to the content to be copied so as to generate a second message.
9. The method according to any one of claims 1 to 7, wherein the updating, by the second network device, the destination address DA in the first message according to the content to be copied to generate a second message, includes:
and the second network equipment updates the information except the prefix in the destination address DA of the first message by using the content to be copied so as to generate a second message.
10. The method of any of claims 1-9, wherein the plurality of compressed segment identifiers comprises a compressed segment identifier of a first length and a compressed segment identifier of a second length, and wherein the first length and the second length are different.
11. A method for packet transmission, the method comprising:
a first network device generates a first packet, where the first packet includes a segment list corresponding to a forwarding path of the first packet, the segment list includes multiple compressed segment identifiers arranged in sequence, a length of each compressed segment identifier in the multiple compressed segment identifiers is less than or equal to 128 bits, the multiple compressed segment identifiers include a compressed segment identifier of a first length and a compressed segment identifier of a second length, the first length is different from the second length, and each compressed segment identifier in the multiple compressed segment identifiers includes a prefix code;
and the first network equipment sends the first message according to the segment list.
12. The method of claim 11, wherein each compressed segment identifier comprises a variable length portion, wherein the length of the variable length portion of the compressed segment identifier of the first length is different from the length of the variable length portion of the compressed segment identifier of the second length, wherein the variable length portion comprises the prefix code, and wherein the length of the variable length portion is determined according to a coding rule of the variable length portion.
13. The method according to claim 11 or 12, wherein each compressed segment identifier comprises a function identifier, and the function identifier is the prefix code.
14. The method according to claim 11 or 12, wherein each compressed segment identifier comprises a node identifier, and wherein the node identifier is the prefix code.
15. The method according to any of claims 11-14, wherein the first packet further comprises an extension pointer for sequentially indicating each of the plurality of compressed segment identifiers.
16. The method according to any one of claims 11-15, wherein the compressed segment identifiers of the first length and the compressed segment identifiers of the second length correspond to the same prefixes, respectively, or wherein the compressed segment identifiers of the first length and the compressed segment identifiers of the second length correspond to different prefixes, respectively.
17. The method according to any of claims 11-16, wherein the first packet is an IPv 6-based segment routing SRv6 packet, and wherein the segment list is located in a segment routing header SRH.
18. A method of segment list generation, the method comprising:
the first network equipment determines a forwarding path of a message;
the first network device generates a segment list corresponding to the forwarding path, where the segment list includes multiple compressed segment identifiers arranged in sequence, a length of each compressed segment identifier in the multiple compressed segment identifiers is less than or equal to 128 bits, the multiple compressed segment identifiers include a compressed segment identifier of a first length and a compressed segment identifier of a second length, the first length is different from the second length, and each compressed segment identifier in the multiple compressed segment identifiers includes a prefix code.
19. The method of claim 18, wherein each compressed segment identifier comprises a variable length portion, wherein the length of the variable length portion of the compressed segment identifier of the first length is different from the length of the variable length portion of the compressed segment identifier of the second length, wherein the variable length portion comprises the prefix code, and wherein the length of the variable length portion is determined according to a coding rule of the variable length portion.
20. The method of claim 18 or 19, wherein the first network device is a controller in a network, the method further comprising:
the first network device sends the segment list to an ingress device of the forwarding path.
21. The method of claim 18 or 19, wherein the first network device is an ingress device of the forwarding path, the method further comprising:
the first network equipment generates a message comprising the segment list;
and the first network equipment sends a message comprising the segment list.
22. A method for obtaining compressed segment identifiers, the method comprising:
a first network device obtains a compressed segment identifier of a first length, wherein the compressed segment identifier of the first length comprises a first variable length part, the first variable length part belongs to a first resource pool, and the first resource pool comprises a plurality of first variable length parts;
based on the resource shortage of the first resource pool, the first network device obtaining a compressed segment identifier of a second length, the second length being greater than or equal to the first length, the compressed segment identifier of the second length comprising a second variable length part, the second variable length part belonging to a second resource pool, the second resource pool comprising a plurality of the second variable length parts;
the first network device sends the compressed segment identifier of the first length and the compressed segment identifier of the second length, and the compressed segment identifier of the first length and the compressed segment identifier of the second length are used for indicating the segment executed by the first network device.
23. The method of claim 22, wherein the first length compressed segment identifier and the second length compressed segment identifier comprise function identifiers, wherein the first variable length part and the second variable length part are the function identifiers, and wherein the first resource pool and the second resource pool are resource pools corresponding to the function identifiers.
24. The method of claim 22 or 23, further comprising:
based on the insufficient resources of the nth resource pool, the first network device obtains a compressed segment identifier with a length of n +1, wherein the length of n +1 is greater than or equal to the nth length, the compressed segment identifier with the length of n +1 comprises a variable length part of n +1, the variable length part of n +1 belongs to the nth +1 resource pool, and the nth +1 resource pool comprises a plurality of variable length parts of n + 1; wherein n is a natural number greater than 1.
25. The method according to any of claims 22-24, wherein the (i +1) th resource pool comprises an (i +1) th variable length part with a power of X of 2, wherein X is the initial length + i X the incremental length-i-1, and wherein i is a positive integer greater than or equal to 0.
26. The method according to claim 25, wherein the i-th resource pool corresponds to an encoding rule that the first i bits are 1, the i +1 th bits are 0, and the subsequent (i +1) × 2 bits are 0 or 1.
27. The method according to claim 25, wherein the i-th resource pool corresponds to an encoding rule that the first i bits are 0, the i +1 th bits are 1, and the subsequent (i +1) × 2 bits are 0 or 1.
28. The method of any one of claims 25-27, wherein the initial length and the delta length are each multiples of 8 bits.
29. A message transmission apparatus, the apparatus comprising:
a receiving unit, configured to receive a first packet sent by the first network device, where the first packet includes a segment list corresponding to a forwarding path of the first packet, the segment list includes multiple compression segment identifiers arranged in sequence, and a length of each of the multiple compression segment identifiers is less than or equal to 128 bits;
the processing unit is used for reading the content to be copied in the segment list according to an encoding rule, and the encoding rule is used for indicating the encoding rule corresponding to the content to be copied;
the processing unit is further configured to update a destination address DA in the first message according to the content to be copied to generate a second message;
and the sending unit is used for sending the second message.
30. A message transmission apparatus, the apparatus comprising:
a processing unit, configured to generate a first packet, where the first packet includes a segment list corresponding to a forwarding path of the first packet, the segment list includes multiple compressed segment identifiers arranged in sequence, a length of each compressed segment identifier in the multiple compressed segment identifiers is less than or equal to 128 bits, the multiple compressed segment identifiers include a compressed segment identifier of a first length and a compressed segment identifier of a second length, the first length is different from the second length, and each compressed segment identifier in the multiple compressed segment identifiers includes a prefix code;
and the sending unit is used for sending the first message according to the segment list.
31. An apparatus for generating a segment list, the apparatus comprising:
the processing unit is used for determining a forwarding path of the message;
the processing unit is further configured to generate a segment list corresponding to the forwarding path, where the segment list includes a plurality of compressed segment identifiers arranged in sequence, a length of each compressed segment identifier in the plurality of compressed segment identifiers is less than or equal to 128 bits, the plurality of compressed segment identifiers include a compressed segment identifier of a first length and a compressed segment identifier of a second length, the first length is different from the second length, and each compressed segment identifier in the plurality of compressed segment identifiers includes a prefix code.
32. A compressed segment identification acquisition apparatus, the apparatus comprising:
a processing unit, configured to obtain a compressed segment identifier of a first length, where the compressed segment identifier of the first length includes a first variable-length portion, and the first variable-length portion belongs to a first resource pool, where the first resource pool includes a plurality of first variable-length portions;
the processing unit is further configured to obtain a compressed segment identifier of a second length based on insufficient resources of the first resource pool, where the second length is greater than or equal to the first length, the compressed segment identifier of the second length includes a second variable-length portion, the second variable-length portion belongs to a second resource pool, and the second resource pool includes a plurality of second variable-length portions;
a sending unit, configured to send the compressed segment identifier of the first length and the compressed segment identifier of the second length, where the compressed segment identifier of the first length and the compressed segment identifier of the second length are used to indicate the segment executed by the first network device.
33. A communication system, the system comprising: a first network device and a second network device;
wherein the first network device is configured to perform the method of any of claims 11-28;
the second network device configured to perform the method of any of claims 1-10.
CN202011377914.1A 2020-11-30 2020-11-30 Message transmission, segment list generation and compressed segment identification acquisition method and device Pending CN114640616A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011377914.1A CN114640616A (en) 2020-11-30 2020-11-30 Message transmission, segment list generation and compressed segment identification acquisition method and device
PCT/CN2021/133327 WO2022111606A1 (en) 2020-11-30 2021-11-26 Message transmission method, segment list generation method, compressed segment identifier acquisition method, and apparatuses

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011377914.1A CN114640616A (en) 2020-11-30 2020-11-30 Message transmission, segment list generation and compressed segment identification acquisition method and device

Publications (1)

Publication Number Publication Date
CN114640616A true CN114640616A (en) 2022-06-17

Family

ID=81755318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011377914.1A Pending CN114640616A (en) 2020-11-30 2020-11-30 Message transmission, segment list generation and compressed segment identification acquisition method and device

Country Status (2)

Country Link
CN (1) CN114640616A (en)
WO (1) WO2022111606A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116192968A (en) * 2023-01-10 2023-05-30 广东云下汇金科技有限公司 IPv6 message data processing method and communication method based on SRv6
WO2024000136A1 (en) * 2022-06-28 2024-01-04 新华三技术有限公司 Message sending
WO2024027194A1 (en) * 2022-08-03 2024-02-08 华为技术有限公司 Message forwarding method, device and system, and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115499358A (en) * 2022-09-14 2022-12-20 中国电信股份有限公司 SRv6-TE message forwarding method and forwarding equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4191979A1 (en) * 2017-07-14 2023-06-07 Huawei Technologies Co., Ltd. A method for establishing segment routing for ipv6 tunnel
CN111917640B (en) * 2019-05-09 2023-06-06 华为技术有限公司 SRv6 network segment list generation method, message forwarding method, device and system
CN111628995B (en) * 2020-05-26 2023-06-16 新华三信息安全技术有限公司 SRv-based SID compression method, SRv-based SID compression device, SRv-based SID compression equipment and storage medium
CN113824638A (en) * 2020-06-18 2021-12-21 华为技术有限公司 Method, equipment and system for forwarding message

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024000136A1 (en) * 2022-06-28 2024-01-04 新华三技术有限公司 Message sending
WO2024027194A1 (en) * 2022-08-03 2024-02-08 华为技术有限公司 Message forwarding method, device and system, and storage medium
CN116192968A (en) * 2023-01-10 2023-05-30 广东云下汇金科技有限公司 IPv6 message data processing method and communication method based on SRv6

Also Published As

Publication number Publication date
WO2022111606A1 (en) 2022-06-02

Similar Documents

Publication Publication Date Title
CN114640616A (en) Message transmission, segment list generation and compressed segment identification acquisition method and device
CN113132201B (en) Communication method and device between VPCs
CN108293019B (en) Flow table processing method and device
CN113132229B (en) Segment identifier determination method and device
EP4009596A1 (en) Message forwarding method, device, and system in sr network
CN109728962B (en) Method and equipment for sending message
CN113824638A (en) Method, equipment and system for forwarding message
CN112583745A (en) Method, equipment and system for forwarding message in SR network
CN112448888A (en) Method, equipment and system for forwarding message in SR network
JP7448597B2 (en) Message generation method and device and message processing method and device
CN113973082A (en) Message processing method and network equipment
CN114650255B (en) Message processing method and network equipment
US20230327986A1 (en) Route Advertisement Method, Apparatus, and System
CN115242698A (en) Message forwarding method, device, network equipment and storage medium
CN112532563B (en) Message sending method and device
EP4254834A1 (en) Message transmission method and apparatus, and device, storage medium and system
CN114301839B (en) Multicast message transmission method and device
CN112019653B (en) Access switch, IP address deployment method, device and readable storage medium
CN104702505A (en) Message transmission method and node
CN115499366A (en) Message transmission method and device
CN114338518A (en) Route processing method and network equipment
CN116527642A (en) Message processing method and related equipment
CN114629834B (en) Communication method and device
CN116800662A (en) Message processing method, device, equipment and storage medium
CN116137632A (en) Message processing method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination