WO2024000136A1 - 报文发送 - Google Patents

报文发送 Download PDF

Info

Publication number
WO2024000136A1
WO2024000136A1 PCT/CN2022/101719 CN2022101719W WO2024000136A1 WO 2024000136 A1 WO2024000136 A1 WO 2024000136A1 CN 2022101719 W CN2022101719 W CN 2022101719W WO 2024000136 A1 WO2024000136 A1 WO 2024000136A1
Authority
WO
WIPO (PCT)
Prior art keywords
sid
field
container
type
compression
Prior art date
Application number
PCT/CN2022/101719
Other languages
English (en)
French (fr)
Inventor
林长望
李�昊
Original Assignee
新华三技术有限公司
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 新华三技术有限公司 filed Critical 新华三技术有限公司
Priority to PCT/CN2022/101719 priority Critical patent/WO2024000136A1/zh
Priority to CN202280001935.4A priority patent/CN117643037A/zh
Publication of WO2024000136A1 publication Critical patent/WO2024000136A1/zh

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
    • 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

Definitions

  • This application relates to the field of communication technology, and in particular to message sending.
  • SRH Segment Routing Header
  • SRH includes a segment list (Segment List).
  • SID Segment Routing Header
  • the length of each SID is 128 bits.
  • the segment ID (SID) carried in SRH can be compressed. Since the SID in an SRv6 domain is usually allocated from the same address block, each SID included in the segment list has a common block. , and the optional execution parameters (Arguments, Args) part included in the SID are usually 0, so these common parts can be compressed. And the changing parts of each SID, that is, the node ID and function ID parts, can be defined as compressed segment identifiers (Compressed-SID, C-SID). Then use the 128bit position occupied by a Segment in the original segment list to carry multiple C-SIDs, that is, the 128bit position occupied by a Segment can be used as a C-SID container (Compressed-SID container).
  • NEXT-C-SID Flavor or REPLACE-C- SID flavor means that the next SID in SRH is C-SID. If a node recognizes that the next SID in the SRH is a C-SID, it can obtain a complete SID based on Block, Args and the next C-SID, and then use the complete SID as the destination address of the IPv6 header.
  • a packet capture tool In an SRv6 network that uses the above compression scheme, if a network failure occurs and needs to be rectified, a packet capture tool will be used to capture the packets. However, because the SRH does not include the flavor of each SID, the length of the C-SID, and the length of the block, the packet capture tool cannot restore the complete segment list based on the SRH, making it impossible to troubleshoot network faults.
  • the purpose of the embodiments of this application is to send messages to solve the problem that the packet capture tool cannot restore a complete segment list based on SRH, and thus cannot troubleshoot network faults.
  • the specific technical solutions are as follows:
  • embodiments of the present application provide a message sending method, which is applied to network equipment.
  • the method includes:
  • the second message includes a segment routing header SRH and the first message.
  • the SRH includes multiple compressed segment identification C-SID containers and segment description information.
  • the segment description information includes Block length, C-SID length, and compression type of C-SID carried by each C-SID container.
  • the segment description information includes container description information of each C-SID container, and each container description information includes a first field, a second field and a third field;
  • the value of the first field is used to indicate the compression type of the C-SID carried by the C-SID container
  • the value of the second field is used to indicate the C-SID length
  • the value of the third field is used to indicate the Block length or the number of C-SIDs included in the C-SID container;
  • the third field When the third field is used to represent the Block length included in the C-SID container, the third field includes multiple values, and each value is used to represent a specified Block length.
  • the first field includes four values, and the four values respectively represent the first compression type, the second compression type, the third compression type and the fourth compression type:
  • the first compression type is uncompressed
  • the second compression type is NEXT-C-SID type compression
  • the third compression type is the starting SID of the compression path of the REPLACE-C-SID type
  • the fourth compression type is a REPLACE-C-SID type or a non-starting SID of a mixed type compression path;
  • the mixed type is a mixed type of the NEXT-C-SID type and the REPLACE-C-SID type, and the starting SID is the complete SID of the first device on the compression path.
  • the value of the second field is the first value, it indicates that the length of the C-SID is 16 bits;
  • the value of the second field is the second value, it indicates that the length of the C-SID is 32 bits.
  • the third field is used to represent the Block length included in the C-SID container;
  • the third field is used to indicate the number of C-SIDs included in the C-SID container.
  • each container description information occupies a length of 1 byte, 2 bits of the container description information carry the first field, 1 bit carries the second field, and 3 bits carry the second field. bits carry the third field, and 2 bits are reserved fields.
  • the SRH includes an extended TLV structure, and the extended TLV structure carries the segment description information.
  • inventions of the present application provide a message sending device, which is applied to network equipment.
  • the device includes:
  • the receiving module is used to receive the first message
  • a sending module configured to send a second message.
  • the second message includes a segment routing header SRH and the first message.
  • the SRH includes a plurality of compressed segment identification C-SID containers and segment description information, so The segment description information includes the Block length, the C-SID length, and the compression type of the C-SID carried by each C-SID container.
  • the segment description information includes container description information of each C-SID container, and each container description information includes a first field, a second field and a third field;
  • the value of the first field is used to indicate the compression type of the C-SID carried by the C-SID container
  • the value of the second field is used to indicate the C-SID length
  • the value of the third field is used to indicate the Block length or the number of C-SIDs included in the C-SID container;
  • the third field When the third field is used to represent the Block length included in the C-SID container, the third field includes multiple values, and each value is used to represent a specified Block length.
  • the first field includes four values, and the four values respectively represent the first compression type, the second compression type, the third compression type and the fourth compression type:
  • the first compression type is uncompressed
  • the second compression type is NEXT-C-SID type compression
  • the third compression type is the starting SID of the compression path of the REPLACE-C-SID type
  • the fourth compression type is a REPLACE-C-SID type or a non-starting SID of a mixed type compression path;
  • the mixed type is a mixed type of the NEXT-C-SID type and the REPLACE-C-SID type, and the starting SID is the complete SID of the first device on the compression path.
  • the value of the second field is the first value, it indicates that the length of the C-SID is 16 bits;
  • the value of the second field is the second value, it indicates that the length of the C-SID is 32 bits.
  • the third field is used to indicate the Block length included in the C-SID container
  • the third field is used to indicate the number of C-SIDs included in the C-SID container.
  • each container description information occupies a length of 1 byte, 2 bits of the container description information carry the first field, 1 bit carries the second field, and 3 bits carry the second field. bits carry the third field, and 2 bits are reserved fields.
  • the SRH includes an extended TLV structure, and the extended TLV structure carries the segment description information.
  • embodiments of the present application provide a network device, where the network device includes:
  • a machine-readable storage medium that stores machine-executable instructions that can be executed by the processor; the machine-executable instructions cause the processor to perform the following steps:
  • a second message is sent through the transceiver.
  • the second message includes a segment routing header SRH and the first message.
  • the SRH includes a plurality of compressed segment identification C-SID containers and segment description information.
  • the segment description information includes the Block length, the C-SID length, and the compression type of the C-SID carried by each C-SID container.
  • the segment description information includes container description information of each C-SID container, and each container description information includes a first field, a second field and a third field;
  • the value of the first field is used to indicate the compression type of the C-SID carried by the C-SID container
  • the value of the second field is used to indicate the C-SID length
  • the value of the third field is used to indicate the Block length or the number of C-SIDs included in the C-SID container;
  • the third field When the third field is used to represent the Block length included in the C-SID container, the third field includes multiple values, and each value is used to represent a specified Block length.
  • the first field includes four values, and the four values respectively represent the first compression type, the second compression type, the third compression type and the fourth compression type:
  • the first compression type is uncompressed
  • the second compression type is NEXT-C-SID type compression
  • the third compression type is the starting SID of the compression path of the REPLACE-C-SID type
  • the fourth compression type is a REPLACE-C-SID type or a non-starting SID of a mixed type compression path;
  • the mixed type is a mixed type of the NEXT-C-SID type and the REPLACE-C-SID type, and the starting SID is the complete SID of the first device on the compression path.
  • the value of the second field is the first value, it indicates that the length of the C-SID is 16 bits;
  • the value of the second field is the second value, it indicates that the length of the C-SID is 32 bits.
  • the third field is used to indicate the Block length included in the C-SID container
  • the third field is used to indicate the number of C-SIDs included in the C-SID container.
  • each container description information occupies a length of 1 byte, 2 bits of the container description information carry the first field, 1 bit carries the second field, and 3 bits carry the second field. bits carry the third field, and 2 bits are reserved fields.
  • the SRH includes an extended TLV structure, and the extended TLV structure carries the segment description information.
  • embodiments of the present application provide a machine-readable storage medium that stores machine-executable instructions. When called and executed by a processor, the machine-executable instructions prompt the processor to: implement the first step above. method steps described in this aspect.
  • embodiments of the present application provide a computer program product, which causes the processor to: implement the method steps described in the first aspect.
  • the network device can send a second message including the SRH and the first message.
  • the SRH includes multiple C-SIDs and segment description information, because the segment description information includes the common Block length.
  • the compression type of the C-SID carried by each C-SID container so the packet capture tool can obtain the information required to restore each SID in the segment list from SRH, and then restore the complete segment list based on SRH, and Conduct network troubleshooting.
  • Figure 1 is an IPv6 message format provided by an embodiment of the present application.
  • FIG. 2a is a schematic structural diagram of an SID provided by an embodiment of the present application.
  • Figure 2b is a schematic structural diagram of a Locator provided by an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of another SID provided by an embodiment of the present application.
  • Figure 4a is a schematic diagram of Next-C-SID type C-SID compression provided by an embodiment of the present application.
  • Figure 4b is a schematic diagram of another Next-C-SID type C-SID compression provided by the embodiment of the present application.
  • Figure 4c is a schematic diagram of another Next-C-SID type C-SID compression provided by the embodiment of the present application.
  • Figure 5a is a schematic diagram of a REPLACE-C-SID type C-SID compression provided by the embodiment of the present application;
  • Figure 5b is a schematic diagram of another REPLACE-C-SID type C-SID compression provided by the embodiment of the present application.
  • Figure 5c is a schematic diagram of another REPLACE-C-SID type C-SID compression provided by the embodiment of the present application.
  • Figure 5d is another IPv6 message format provided by the embodiment of the present application.
  • Figure 6 is a schematic diagram of a hybrid type of C-SID compression provided by an embodiment of the present application.
  • Figure 7 is a schematic flowchart of a message sending method provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a TLV carrying segment description information provided by an embodiment of the present application.
  • Figure 9 is a schematic structural diagram of container description information provided by an embodiment of the present application.
  • Figure 10 is a schematic structural diagram of a message sending device provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • SRv6 is a source routing technology.
  • the head node of the SRv6 network can add SRH encapsulation to the traffic and guide the traffic to be forwarded according to the prescribed path through the Segment List in the SRH header.
  • FIG. 1 shows the format of an IPv6 message in an SRv6 network.
  • an IPv6 message mainly consists of an IPv6 header, SRH and payload.
  • the IPv6 header includes:
  • Version number (Version), the length is 4 bits, indicating the version of the IP protocol.
  • Payload length (Payload Length) the length is 16 bits, indicating the sum of the IPv6 extension header and application data length, excluding the fixed header length.
  • Next Header 8 bits in length, used to identify the type of next header. When the value is 43, it indicates that the next header is SRH.
  • Hop limit (Hoplimit) the length is 8 bits.
  • Source Address (Source Address), the length is 128 bits, the source IP address.
  • Destination Address length 128 bits, destination IP address.
  • SRH includes:
  • Next Header (Next Header), with a length of 8 bits, is used to identify the type of the next header.
  • SRH length (Hdr Ext Len) the length is 8 bits, indicating the length of the SRH header in 8 bytes, excluding the first 8 bytes.
  • Routing Type the length is 8 bits, and the value is 4, which means it carries SRH.
  • Segment index (Segments Left, SL), with a length of 8 bits, is the number of the next segment list to be processed.
  • Last Entry the length is 8 bits, and the value is the number of the first SID of the actual forwarding path of the packet in the SRH header.
  • Flags 8 bits in length, are flag information.
  • Tag bit 16 bits in length, is used to mark a group of packets with the same characteristics.
  • Segment List is a SID list, arranged in order from far to near nodes on the message forwarding path, that is, Segment List[0] represents the last SID of the path, and Segment List[1] represents the penultimate SID of the path. Two SIDs, and so on. Each SID can be a 128bits IPv6 address.
  • Optional Type Length Values are extension fields that carry variable data, such as encryption and authentication information.
  • the SID shown in Figure 1 is an uncompressed IPv6 address with a length of 128 bits, occupying 4 bytes of space.
  • SRv6 When SRv6 is used in a best effort (Best Effort, BE) scenario or a traffic engineering (Traffic Engineering, TE) scenario , the number of hops in the forwarding path is less than 5, and the length of the SRH is controllable. However, if it is applied in TE or service chain scenarios of large-scale networks, the number of hops in the forwarding path will be very large.
  • the SRH includes a large number of 128-bit IPv6 addresses, which may cause the following problems: high overhead, low carrying efficiency; too long Segmet list causes difficulties for hardware forwarding.
  • the hardware forwarding layer cannot read the complete Segmet list at one time and needs to read it multiple times, which reduces the forwarding efficiency; and the length of the message may exceed the MTU, and the head node needs to fragment the message for transmission, resulting in The performance of the head node decreases.
  • Figure 2a is a schematic diagram of the composition of SID.
  • SID mainly consists of the following three parts:
  • Locator the identifier of the network node indicated by this SID.
  • Arguments are optional execution parameters, usually 0.
  • the Locator in Figure 2a can be further subdivided into B and N;
  • B represents SRv6 SID Block, which is generally a subnet segment allocated by the network operator and can also be represented by Prefix (prefix);
  • N is the node ID (Node ID) that distinguishes nodes within the subnet. From the SRv6 packet header format definition, it can be seen that the largest part of the packet header is the Segment list. When the number of table entries remains unchanged, SRv6 header compression is actually compression of a single SID.
  • the SIDs included in the same SID list are usually allocated from an address block and have the same prefix. Therefore, the Prefix in each SID in the same SID list is the same, that is, each SID in the same SID list has the same prefix.
  • the current compression method for SID mainly defines the N and Function parts as C-SID.
  • C-SID includes the variable parts Node ID and Func-ID in the above SID;
  • C-SID Common Prefix Spliced with possible padding, a complete 128-bit SID can be obtained; the original SID length is 128 bits, and the compressed C-SID length is less than 128 bits, so one Segment position in the SRH Segment List can accommodate multiple A C-SID, the location of a Segment can be called a C-SID container (Compressed-SID container), and a C-SID container can accommodate multiple C-SIDs.
  • C-SID container Compressed-SID container
  • the length of a C-SID container is 128 bits and can accommodate a complete SRv6 SID or multiple C-SIDs.
  • NEXT-C-SID type
  • REPLACE-C-SID type
  • REPLACE-C-SID type
  • REPLACE-C-SID type
  • REPLACE-C-SID type
  • REPLACE-C-SID type
  • REPLACE-C-SID type
  • REPLACE-C-SID type of SRv6 SID
  • NEXT-C-SID NEXT-C-SID
  • REPLACE-C-SID additional behaviors
  • SRv6 SID two flavors (additional behaviors) of SRv6 SID are also defined, namely NEXT-C-SID and REPLACE-C-SID. If the locally configured flavor is NEXT-C-SID, it represents the next one in the Segment List.
  • the SID of the node is NEXT-C-SID type compression; if the locally configured flavor is REPLACE-C-SID, it means that the SID of the next node in the Segment List is REPLACE-C-SID type compression.
  • Figure 4a is an exemplary schematic diagram of a C-SID container of the Next-C-SID type.
  • a C-SID container can accommodate one 32-bit Block and six 16-bit C-SIDs.
  • the content carried by a C-SID container can be regarded as a complete IPv6 address.
  • the C-SID after the block is used as the currently effective C-SID, and the remaining C-SIDs are used as Arguments of the IPv6 address.
  • node indicated by node 2 After the node indicated by node 2 receives the message, it will also perform a shift operation on the C-SID container according to the NEXT-C-SID Flavor configured on the control plane, fill the lowest 16 bits with 0, and then replace the C-SID container with The content carried is copied to the destination address of the message and forwarding continues.
  • Figure 5a is an exemplary schematic diagram of a C-SID container of the REPLACE-C-SID type.
  • the REPLACE-C-SID type compression path requires a 128-bit SRv6 SID as the boot SID, which carries the Common Prefix of the compression path.
  • the subsequent SIDs on this compression path are all C-SIDs.
  • the last row (Common Prefix, C-SID1 and 0) in Figure 5a is the boot SID.
  • C-SID2-SID7 of subsequent compression paths share the Common Prefix of the boot SID.
  • the compression path in the embodiment of this application refers to a path composed of consecutive SIDs with the same prefix included in a Segment List.
  • the forwarding path indicated by the Segment List is equivalent to a compression path; if the forwarding path indicated by a Segment List is SID1 to SID20, SID1 to SID6 have the same prefix. SID8 to SID20 have the same prefix, then SID1 to SID6 are one compression path; SID8 to SID20 are another compression path; SID7 is not on any compression path. That is, a forwarding path includes two compression paths and SID7.
  • the REPLACE-C-SID type When the forwarding path is not equal to the compression path, the REPLACE-C-SID type also supports hybrid scenarios.
  • the next SID after the end of a compression path can be an uncompressed SID.
  • the uncompressed SID can be a common SID or a boot SID of the next compression path.
  • the subsequent parts of the boot SID are multiple C-SIDs of the next compression path.
  • the common SID and the SID and C-SID in the compression path can coexist in the same SRH to achieve a mixed effect.
  • the Common Prefix of each compression path may be different.
  • the data side (i.e. forwarding side) of the node needs to identify the start and end of a compression path from the Segment List. You can use REPLACE-C-SID flavor to identify whether the next SID in the Segment List is C-SID.
  • REPLACE-C-SID32 and REPLACE-C-SID16 are defined respectively to distinguish the length of C-SID.
  • the first SID at the beginning of the compression path is a complete 128-bit SID, consisting of Common Prefix, C-SID1 and Arg, occupying a C-SID container.
  • REPLACE-C-SID flavor is configured in node 1 indicated by this SID, and the SID after this SID in the Segment List is identified as C-SID.
  • the nodes indicated by C-SID2 to C-SIDn-1 need to be configured with REPLACE-C-SID flavor to identify the next SID as C-SID.
  • the node indicated by C-SIDn is not configured with REPLACE-C-SID flavor, which is used to identify that the node indicated by C-SIDn is the last node on the compression path, and the next SID is an uncompressed SID.
  • next SID of C-SIDn in the Segment List is the boot SID
  • the node indicated by the boot SID needs to be configured with REPLACE-C-SID flavor
  • the next SID of C-SIDn is an ordinary SID
  • the node indicated by the ordinary SID There is no need to configure REPLACE-C-SID flavor.
  • SI SID Index
  • SI occupies the lowest bit of the Arguments after the C-SID in the destination address of the IPv6 header.
  • SI is the lowest 2 bits of 128bit SID.
  • the value of the SI field indicates the position of the C-SID in the C-SID container.
  • the length of the C-SID is 32 bits and a container can accommodate 4 C-SIDs.
  • the value of the SI field can be 0 to 3, corresponding to A C-SID.
  • Figure 5d is an IPv6 message format provided by an embodiment of the present application, in which the destination address in the IPv6 header consists of Common Prefix, 32bitC-SID, 0 field and SI field.
  • SRH's Segment List includes multiple C-SIDs with a length of 32 bits.
  • the SI value is 0.
  • SI is not 0, it means that the next C-SID needs to be read in the C-SID container indicated by the current SL, so SI needs to be decremented by 1. Update the read C-SID to the destination address.
  • the SI value is 2.
  • C-SIDs in multiple C-SID containers share a Block, as shown in Figure 6.
  • the Block is 32 bits and each C-SID is 16 bits.
  • a C-SID container can accommodate 8 C-SIDs or 1 Block and 6 C-SIDs.
  • the C-SIDs in Figure 6 share a Block.
  • the compressed SRH and the segment list encapsulated in it need to be used with the corresponding flavor, but the flavor is only configured in the control plane of each node, and the flavor is not carried in SRH.
  • Wireshark is a network packet analysis software.
  • each intermediate node in the SRv6 network will forward the message according to the forwarding path indicated by the Segment List of the SRH of the message. If the Segment List carries an uncompressed SID, when there is a fault in the forwarding path node, if the upstream node of the faulty node finds that the next node is no longer reachable, it only needs to decrement the SL by 1 to obtain a segment after the faulty node. In this way, the faulty node can be skipped and the message can be sent directly to the faulty node. The next node of the node implements the intermediate node protection mechanism.
  • the upstream node of the faulty node needs to know the flavor configured in the faulty node in order to obtain the next segment of the faulty node from SRH, but the upstream node of the faulty node cannot obtain the configuration of the faulty node. flavor, so the complete SID of a node after the failed node cannot be restored, which will lead to the inability to implement the intermediate node protection scheme.
  • embodiments of the present application provide a message sending method, which is applied to network equipment. As shown in Figure 7, the method includes:
  • the second message includes SRH and the first message.
  • SRH includes multiple C-SID containers and segment description information.
  • the segment description information includes Block length, C-SID length and each C-SID.
  • the device that receives the second message can restore the SID of each network device on the forwarding path from the C-SID container based on the segment description information.
  • the device that receives the second message may be a device on the forwarding path, or may be a device that can capture the second message.
  • the device on the forwarding path can use the segment description information carried by the SRH to recover the SID of the next node on the forwarding path, thereby forwarding the second message to the next node.
  • the device on the forwarding path receives the second message, if it determines that the next node is a faulty node, it can recover the SID of the next node of the faulty node through the segment description information carried by the SRH, thereby skipping the faulty node.
  • the second message is directly forwarded to the next node of the failed node to implement the intermediate node protection mechanism.
  • the packet capture tool can restore the complete Segment List based on the segment description information, so as to conduct network troubleshooting based on the complete Segment List.
  • the SRH of the second message can carry segment description information, and the segment description information carries information used to restore the compressed SID to the complete SID.
  • the device that receives the second message can even have no SID configured. flavor, the complete segment list carried by the SRH may also be restored based on the segment description information carried in the second message.
  • the packet capture tool After obtaining the second message, the segment description information in the SRH can be obtained, and according to the Block length, C-SID length and the compression type of the C-SID carried by each C-SID container, each segment description information is The C-SID in the C-SID container is restored to a complete SID, and a complete segment list can be obtained, which solves the problem of being unable to troubleshoot network problems because the complete segment list cannot be restored.
  • the first network device in the embodiment of this application can be a head node, and the head node can be configured in advance through the command line or Netconf. Furthermore, when the head node encapsulates SRH for a packet, if the segment list corresponding to the SRv6 policy includes a compression path, The head node encapsulates segment description information in SRH to describe the structure of each segment.
  • the SRH includes an extended Type-Length-Value (TLV) structure, and the extended TLV structure carries segment description information.
  • TLV Type-Length-Value
  • the SRH may include multiple C-SID containers, and accordingly, the segment description information may include container description information for each C-SID container.
  • Figure 8 is a schematic structural diagram of an extended TLV provided by an embodiment of the present application.
  • Type is a TLV type, indicating that the TLV is a TLV (segment list description TLV) used to carry segment description information. The specific value needs to be applied for from the Internet Assigned Numbers Authority (IANA).
  • IANA Internet Assigned Numbers Authority
  • Length indicates the length of the TLV data field, counted in bytes.
  • Des0-DesN in Figure 8 are N container description information included in the segment description information. Each container description information occupies 1 byte.
  • Des0-DesN are respectively the container description information of the C-SID container at the corresponding position in the SRH segment list.
  • Des0 is the container description information of the last C-SID container on the forwarding path indicated by the segment list.
  • DesN is the first C-SID container on the forwarding path.
  • the extended TLV used to carry segment description information requires 4-byte alignment. If the number of C-SID containers in the segment list of the SRH that actually needs to be described does not meet the alignment conditions, Padding TLVs can be used for alignment.
  • the above segment description information includes container description information of each C-SID container, and each container description information includes a first field, a second field and a third field.
  • Each container description information occupies a length of 1 byte. 2 bits of the container description information carry the first field, 1 bit carries the second field, 3 bits carry the third field, and 2 bits are reserved fields.
  • Figure 9 is a schematic diagram of the container description information of the C-SID container provided by the embodiment of the present application, that is, a schematic diagram of a Des in Figure 8.
  • T is the first field
  • L is the second field
  • BL/Count is the third field
  • R is a reserved field.
  • the value of the first field is used to indicate the compression type of the C-SID carried by the C-SID container;
  • the value of the second field is used to indicate the C-SID length
  • the value of the third field is used to indicate the Block length or the number of C-SIDs included in the C-SID container;
  • the third field When the third field is used to represent the Block length included in the C-SID container, the third field includes multiple values, and each value is used to represent a specified Block length.
  • the above-mentioned first field includes four values, and the four values respectively represent the first compression type, the second compression type, the third compression type and the fourth compression type:
  • the first compression type is uncompressed. Uncompressed means that the container contains a complete 128-bit SID.
  • the second compression type is NEXT-C-SID type compression.
  • the third compression type is the starting SID of the compression path of the REPLACE-C-SID type.
  • the starting SID is the complete SID of the first device on the compression path.
  • the fourth compression type is the non-starting SID of the compression path of REPLACE-C-SID type or mixed type.
  • the non-starting SID is the C-SID of other devices on the compression path except the first device.
  • the mixed type is a mixed type of NEXT-C-SID type and REPLACE-C-SID type.
  • the forwarding path of the second message may span multiple network segments. Therefore, when compressing the SID in the segment list, it will be compressed segmentally, and continuous segments on the forwarding path can be compressed.
  • the path indicated by the SID with a common prefix is used as a compression path, and the forwarding path indicated by the segment list may include multiple compression paths.
  • the four values included in the first field (T) can be 00, 01, 10 and 11.
  • the value of the T segment of the container description information corresponding to the C-SID container shown in Figure 4a is 01, indicating that the compression type of the C-SID container is the NEXT-C-SID type. of compression.
  • the value of the T field in the container description information of the C-SID container to which C-SID1 belongs is 10, indicating that the compression type of the container to which C-SID1 belongs is the starting SID of the compression path of the REPLACE-C-SID type.
  • the value of the T field in the container description information of the C-SID containers to which C-SID2 to C-SID5 belongs is 11, indicating that the compression type of the C-SID container is: REPLACE-C-SID. Start SID.
  • the value of the T field in the container description information of the C-SID containers to which C-SID1 to C-SID6 belongs is 11, indicating that the compression type of the C-SID container is: a non-starting SID of a mixed type compression path.
  • the network device that receives the second message can obtain the compression type of each C-SID through the value of the first field.
  • the second field (L) may include two values.
  • the value of the second field is the first value, it indicates that the length of the C-SID is 16 bits; when the value of the second field is the second value , indicating that the length of the C-SID is 32 bits.
  • the first value can be 0 and the second value can be 1.
  • the network device that receives the second message can determine the length of the C-SID based on the value of the second field, and recover the complete SID based on the length of the C-SID.
  • the first field and the second field can be used together.
  • the third field is used to represent the Block included in the C-SID container. Length (Block Length, BL).
  • the third field can be used to represent the length of the Block included in the C-SID container.
  • the value of the first field of the container description information of the C-SID container shown in Figure 4a is 01
  • the compression type of the C-SID container is the second compression type, that is, the C-SID container carries The starting SID of the compression path.
  • the third field of the container description information indicates the Block length of the starting SID in the C-SID container.
  • the third field When the third field is used to represent the Block length included in the C-SID container, the third field includes multiple values, and each value is used to represent a specified Block length.
  • the third field can have seven values, namely 000, 001, 010, 011, 100, 110 and 111.
  • the Block length is 64 bits.
  • the Block length is 72 bits.
  • the Block length is 80 bits.
  • the value of the third field can be set according to the actually used Block length, and is not limited to the seven values mentioned above. For example, five values can also be set according to actual needs, and this embodiment of the present application does not limit this.
  • the compression type represented by the first field is the fourth compression type
  • the third field is used to represent the number of C-SIDs included in the C-SID container.
  • the compression type of the C-SID container shown in Figure 5a is: the non-starting SID of the compression path of REPLACE-C-SID, then the Count field of the container description information of the C-SID container is used to represent
  • the C-SID container includes 4 C-SIDs.
  • the network device that receives the second message can use the length of the C-SID represented by the second field and the length of the Block represented by the third field. As well as the non-zero field length of the Argument field, the number of C-SIDs included in the C-SID container is calculated.
  • the compression type of the C-SID container shown in Figure 4b is: NEXT-C-SID type compression.
  • the network device that receives the second message can directly determine that there is only one C-SID.
  • the container description information does not need to carry the number of C-SIDs, so the 3-5 bits of the container description information do not conflict with each other and can be shared by the BL field and the count field. , which can reduce the occupation of the SRH field.
  • the network device that receives the second message can determine the length of the Block or the number of C-SIDs based on the value of the third field.
  • embodiments of the present application also provide a message sending device, which is applied to network equipment.
  • the device includes:
  • the sending module 1002 is used to send the second message.
  • the second message includes the segment routing header SRH and the first message.
  • the SRH includes multiple compressed segment identification C-SID containers and segment description information.
  • the segment description information includes the Block length. , C-SID length and the compression type of C-SID carried by each C-SID container.
  • the segment description information includes container description information of each C-SID container, and each container description information includes a first field, a second field and a third field;
  • the value of the first field is used to indicate the compression type of the C-SID carried by the C-SID container;
  • the value of the second field is used to indicate the C-SID length
  • the value of the third field is used to indicate the Block length or the number of C-SIDs included in the C-SID container;
  • the third field When the third field is used to represent the Block length included in the C-SID container, the third field includes multiple values, and each value is used to represent a specified Block length.
  • the first field includes four values, which respectively represent the first compression type, the second compression type, the third compression type and the fourth compression type:
  • the first compression type is uncompressed
  • the second compression type is NEXT-C-SID type compression
  • the third compression type is the starting SID of the compression path of the REPLACE-C-SID type
  • the fourth compression type is the non-starting SID of the compression path of REPLACE-C-SID type or mixed type;
  • the mixed type is a mixed type of NEXT-C-SID type and REPLACE-C-SID type, and the starting SID is the complete SID of the first device on the compression path.
  • the value of the second field is the first value, it indicates that the length of the C-SID is 16 bits;
  • the value of the second field is the second value, it indicates that the length of the C-SID is 32 bits.
  • the third field is used to indicate the Block length included in the C-SID container
  • the third field is used to represent the number of C-SIDs included in the C-SID container.
  • each container description information occupies a length of 1 byte. 2 bits of the container description information carry the first field, 1 bit carries the second field, 3 bits carry the third field, and 2 bits are reserved. field.
  • the SRH includes an extended TLV structure that carries segment description information.
  • An embodiment of the present application also provides a network device.
  • the network device includes:
  • transceiver 1104
  • Machine-readable storage medium 1102. stores machine-executable instructions that can be executed by the processor; the machine-executable instructions cause the processor 1101 to perform the following steps:
  • the second message is sent through the transceiver 1104.
  • the second message includes the segment routing header SRH and the first message.
  • the SRH includes multiple compressed segment identifiers C-SID containers and segment description information.
  • the segment description information includes Block length, C -SID length and compression type of C-SID carried by each C-SID container.
  • the segment description information includes container description information of each C-SID container, and each container description information includes a first field, a second field and a third field;
  • the value of the first field is used to indicate the compression type of the C-SID carried by the C-SID container;
  • the value of the second field is used to indicate the C-SID length
  • the value of the third field is used to indicate the Block length or the number of C-SIDs included in the C-SID container;
  • the third field When the third field is used to represent the Block length included in the C-SID container, the third field includes multiple values, and each value is used to represent a specified Block length.
  • the first field includes four values, which respectively represent the first compression type, the second compression type, the third compression type and the fourth compression type:
  • the first compression type is uncompressed
  • the second compression type is NEXT-C-SID type compression
  • the third compression type is the starting SID of the compression path of the REPLACE-C-SID type
  • the fourth compression type is the non-starting SID of the compression path of REPLACE-C-SID type or mixed type;
  • the mixed type is a mixed type of NEXT-C-SID type and REPLACE-C-SID type, and the starting SID is the complete SID of the first device on the compression path.
  • the value of the second field is the first value, it indicates that the length of the C-SID is 16 bits;
  • the value of the second field is the second value, it indicates that the length of the C-SID is 32 bits.
  • the third field is used to indicate the Block length included in the C-SID container
  • the third field is used to represent the number of C-SIDs included in the C-SID container.
  • each container description information occupies a length of 1 byte. 2 bits of the container description information carry the first field, 1 bit carries the second field, 3 bits carry the third field, and 2 bits are reserved. field.
  • the SRH includes an extended TLV structure that carries segment description information.
  • the network device may also include a communication bus 1103.
  • the processor 1101, the machine-readable storage medium 1102 and the transceiver 1104 complete mutual communication through the communication bus 1103.
  • the communication bus 1103 can be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard structure. (Extended Industry Standard Architecture, EISA) bus, etc.
  • PCI peripheral component interconnect standard
  • EISA Extended Industry Standard Architecture
  • the communication bus 1103 can be divided into an address bus, a data bus, a control bus, etc.
  • the transceiver 1104 may be a wireless communication module. Under the control of the processor 1101, the transceiver 1104 performs data interaction with other devices.
  • the machine-readable storage medium 1102 may include random access memory (Random Access Memory, RAM) or non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory.
  • RAM Random Access Memory
  • NVM Non-Volatile Memory
  • the machine-readable storage medium 1102 may also be at least one storage device located remotely from the aforementioned processor.
  • the processor 1101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processing, DSP) or an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • CPU central processing unit
  • NP Network Processor
  • DSP Digital Signal Processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the embodiments of the present application also provide a machine-readable storage medium.
  • the machine-readable storage medium stores machine-executable information that can be executed by the processor. instruction.
  • the processor is caused by machine-executable instructions to implement the steps of any of the above message sending methods.
  • a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform the steps of any message sending method in the above embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请提供报文发送,涉及通信技术领域,本申请方案包括:接收第一报文;发送第二报文,第二报文包括分段路由头SRH和第一报文,SRH包括多个压缩段标识C-SID容器和段描述信息,段描述信息包括Block长度、C-SID长度以及每个C-SID容器承载的C-SID的压缩类型。可以实现离线还原完整的段列表。

Description

报文发送 技术领域
本申请涉及通信技术领域,尤其涉及报文发送。
背景技术
在互联网协议第6版段路由(Segment Routing Internet Protocol Version 6,SRv6)网络中,头节点在接收到业务报文后,可在业务报文的外层封装分段路由头(Segment Routing Header,SRH)。SRH中包括段列表(Segment List),段列表中包括的每个段(Segment)为转发路径中一个节点的SID,每个SID的长度是128bit。
目前为了降低SRH的开销,可以压缩SRH中携带的段标识(Segment ID,SID),由于一个SRv6域中的SID通常是从同一个地址块中分配的,所以段列表包括的各SID具有公共Block,并且SID包括的可选执行参数(Arguments,Args)部分通常是0,所以可以对这些公共的部分进行压缩。并且可以将各SID中会发生变化的部分,即将节点ID和功能ID部分定义为压缩段标识(Compressed-SID,C-SID)。然后利用原有段列表中一个Segment占用的128bit位置承载多个C-SID,即可以将一个Segment占用的128bit位置作为一个C-SID容器(Compressed-SID container)。
为了支持SRH使用C-SID,还需为转发路径上的各节点在控制面配置附加行为(通常称为flavor),比如若为一个节点配置的flavor为NEXT-C-SID Flavor或者REPLACE-C-SID flavor,则代表SRH中的下一个SID为C-SID。如果一个节点识别到SRH中下一个SID为C-SID,则可基于Block、Args和下一个C-SID得到一个完整的SID,进而将该完整的SID作为IPv6头的目的地址。
在采用了上述压缩方案的SRv6网络中,如果发生网络故障需要排查,会采用抓包工具进行抓包。但因SRH中不包括各SID的flavor、C-SID的长度和block的长度,导致抓包工具无法基于SRH还原出完整的段列表,进而无法进行网络故障的排查。
发明内容
本申请实施例的目的在于报文发送,以解决抓包工具无法基于SRH还原出完整的段列表,进而无法进行网络故障的排查的问题,具体技术方案如下:
第一方面,本申请实施例提供了一种报文发送方法,应用于网络设备,所述方法包括:
接收第一报文;
发送第二报文,所述第二报文包括分段路由头SRH和所述第一报文,所述SRH包括多个压缩段标识C-SID容器和段描述信息,所述段描述信息包括Block长度、C-SID长度以及每个C-SID容器承载的C-SID的压缩类型。
在一种可能的实现方式中,所述段描述信息包括每个C-SID容器的容器描述信息,每个容器描述信息包括第一字段、第二字段和第三字段;
其中,所述第一字段的值用于表示C-SID容器承载的C-SID的压缩类型;
所述第二字段的值用于表示C-SID长度;
所述第三字段的值用于表示C-SID容器中包括的Block长度或者C-SID数量;
当所述第三字段用于表示C-SID容器中包括的Block长度时,所述第三字段包括多种取值,每种取值用于表示一种指定的Block长度。
在一种可能的实现方式中,
所述第一字段包括四种取值,所述四种取值分别表示第一压缩类型、第二压缩类型、第三压缩类型和第四压缩类型:
所述第一压缩类型为未压缩;
所述第二压缩类型为NEXT-C-SID类型的压缩;
所述第三压缩类型为REPLACE-C-SID类型的压缩路径的起始SID;
所述第四压缩类型为REPLACE-C-SID类型或混合类型的压缩路径的非起始SID;
其中,所述混合类型为所述NEXT-C-SID类型和所述REPLACE-C-SID类型的混合类型,所述起始SID为压缩路径上第一个设备的完整SID。
在一种可能的实现方式中,
当所述第二字段的取值为第一值时,指示C-SID的长度为16比特;
当所述第二字段的取值为第二值时,指示C-SID的长度为32比特。
在一种可能的实现方式中,
当所述第一字段的值表示所述第二压缩类型或所述第三压缩类型时,所述第三字段用于表示C-SID容器中包括的Block长度;
当所述第一字段的值表示所述第四压缩类型时,所述第三字段用于表示C-SID容器中包括的C-SID数量。
在一种可能的实现方式中,每个容器描述信息占用的长度为1字节,所述容器描述信息的2个比特承载所述第一字段,1个比特承载所述第二字段,3个比特承载所述第三字段,2个比特为保留字段。
在一种可能的实现方式中,所述SRH包括扩展TLV结构,所述扩展TLV结构承载所述段描述信息。
第二方面,本申请实施例提供了一种报文发送装置,应用于网络设备,所述装置包括:
接收模块,用于接收第一报文;
发送模块,用于发送第二报文,所述第二报文包括分段路由头SRH和所述第一报文,所述SRH包括多个压缩段标识C-SID容器和段描述信息,所述段描述信息包括Block长度、C-SID长度以及每个C-SID容器承载的C-SID的压缩类型。
在一种可能的实现方式中,所述段描述信息包括每个C-SID容器的容器描述信息,每个容器描述信息包括第一字段、第二字段和第三字段;
其中,所述第一字段的值用于表示C-SID容器承载的C-SID的压缩类型;
所述第二字段的值用于表示C-SID长度;
所述第三字段的值用于表示C-SID容器中包括的Block长度或者C-SID数量;
当所述第三字段用于表示C-SID容器中包括的Block长度时,所述第三字段包括多种 取值,每种取值用于表示一种指定的Block长度。
在一种可能的实现方式中,
所述第一字段包括四种取值,所述四种取值分别表示第一压缩类型、第二压缩类型、第三压缩类型和第四压缩类型:
所述第一压缩类型为未压缩;
所述第二压缩类型为NEXT-C-SID类型的压缩;
所述第三压缩类型为REPLACE-C-SID类型的压缩路径的起始SID;
所述第四压缩类型为REPLACE-C-SID类型或混合类型的压缩路径的非起始SID;
其中,所述混合类型为所述NEXT-C-SID类型和所述REPLACE-C-SID类型的混合类型,所述起始SID为压缩路径上第一个设备的完整SID。
在一种可能的实现方式中,
当所述第二字段的取值为第一值时,指示C-SID的长度为16比特;
当所述第二字段的取值为第二值时,指示C-SID的长度为32比特。
在一种可能的实现方式中,
当所述第一字段的值表示所述第二压缩类型或所述第三压缩类型时,所述第三字段用于表示C-SID容器中包括的Block长度;
当所述第一字段的值表示所述第四压缩类型时,所述第三字段用于表示C-SID容器中包括的C-SID数量。
在一种可能的实现方式中,每个容器描述信息占用的长度为1字节,所述容器描述信息的2个比特承载所述第一字段,1个比特承载所述第二字段,3个比特承载所述第三字段,2个比特为保留字段。
在一种可能的实现方式中,所述SRH包括扩展TLV结构,所述扩展TLV结构承载所述段描述信息。
第三方面,本申请实施例提供了一种网络设备,所述网络设备包括:
处理器;
收发器;
机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令;所述机器可执行指令促使所述处理器执行以下步骤:
通过所述收发器接收第一报文;
通过所述收发器发送第二报文,所述第二报文包括分段路由头SRH和所述第一报文,所述SRH包括多个压缩段标识C-SID容器和段描述信息,所述段描述信息包括Block长度、C-SID长度以及每个C-SID容器承载的C-SID的压缩类型。
在一种可能的实现方式中,所述段描述信息包括每个C-SID容器的容器描述信息,每个容器描述信息包括第一字段、第二字段和第三字段;
其中,所述第一字段的值用于表示C-SID容器承载的C-SID的压缩类型;
所述第二字段的值用于表示C-SID长度;
所述第三字段的值用于表示C-SID容器中包括的Block长度或者C-SID数量;
当所述第三字段用于表示C-SID容器中包括的Block长度时,所述第三字段包括多种取值,每种取值用于表示一种指定的Block长度。
在一种可能的实现方式中,
所述第一字段包括四种取值,所述四种取值分别表示第一压缩类型、第二压缩类型、第三压缩类型和第四压缩类型:
所述第一压缩类型为未压缩;
所述第二压缩类型为NEXT-C-SID类型的压缩;
所述第三压缩类型为REPLACE-C-SID类型的压缩路径的起始SID;
所述第四压缩类型为REPLACE-C-SID类型或混合类型的压缩路径的非起始SID;
其中,所述混合类型为所述NEXT-C-SID类型和所述REPLACE-C-SID类型的混合类型,所述起始SID为压缩路径上第一个设备的完整SID。
在一种可能的实现方式中,
当所述第二字段的取值为第一值时,指示C-SID的长度为16比特;
当所述第二字段的取值为第二值时,指示C-SID的长度为32比特。
在一种可能的实现方式中,
当所述第一字段的值表示所述第二压缩类型或所述第三压缩类型时,所述第三字段用于表示C-SID容器中包括的Block长度;
当所述第一字段的值表示所述第四压缩类型时,所述第三字段用于表示C-SID容器中包括的C-SID数量。
在一种可能的实现方式中,每个容器描述信息占用的长度为1字节,所述容器描述信息的2个比特承载所述第一字段,1个比特承载所述第二字段,3个比特承载所述第三字段,2个比特为保留字段。
在一种可能的实现方式中,所述SRH包括扩展TLV结构,所述扩展TLV结构承载所述段描述信息。
第四方面,本申请实施例提供了一种机器可读存储介质,存储有机器可执行指令,在被处理器调用和执行时,所述机器可执行指令促使所述处理器:实现上述第一方面所述的方法步骤。
第五方面,本申请实施例提供了一种计算机程序产品,所述计算机程序产品促使所述处理器:实现上述第一方面所述的方法步骤。
采用上述技术方案,网络设备接收第一报文后,可以发送包括SRH和第一报文的第二报文,该SRH包括多个C-SID和段描述信息,因段描述信息包括公共Block长度以及每个C-SID容器承载的C-SID的压缩类型,所以抓包工具可以从SRH中获取到还原段列表中每个SID所需的信息,进而可以基于SRH还原出完整的段列表,并进行网络故障的排查。
附图说明
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实 施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种IPv6报文格式;
图2a为本申请实施例提供的一种SID结构示意图;
图2b为本申请实施例提供的一种Locator结构示意图;
图3为本申请实施例提供的另一种SID结构示意图;
图4a为本申请实施例提供的一种Next-C-SID类型的C-SID压缩示意图;
图4b为本申请实施例提供的另一种Next-C-SID类型的C-SID压缩示意图;
图4c为本申请实施例提供的另一种Next-C-SID类型的C-SID压缩示意图;
图5a为本申请实施例提供的一种REPLACE-C-SID类型的C-SID压缩示意图;
图5b为本申请实施例提供的另一种REPLACE-C-SID类型的C-SID压缩示意图;
图5c为本申请实施例提供的另一种REPLACE-C-SID类型的C-SID压缩示意图;
图5d为本申请实施例提供的另一种IPv6报文格式;
图6为本申请实施例提供的一种混合类型的C-SID压缩示意图;
图7为本申请实施例提供的一种报文发送方法的流程示意图;
图8为本申请实施例提供的一种承载段描述信息的TLV结构示意图;
图9为本申请实施例提供的一种容器描述信息的结构示意图;
图10为本申请实施例提供的一种报文发送装置的结构示意图;
图11为本申请实施例提供的一种电子设备的结构示意图。
具体实施方式
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为方便描述,对下面对本申请实施例涉及到的相关概念进行解释说明。
SRv6是一种源路由技术,SRv6网络的头节点可以为流量增加SRH封装,通过SRH头中的Segment List引导流量按照规定的路径转发。
图1为SRv6网络中IPv6报文的格式,如图1所示,IPv6报文主要由IPv6头、SRH和有效载荷(Payload)组成。
其中,IPv6头包括:
版本号(Version),长度为4bits,表示IP协议的版本。
通信类型(TrafficClass),长度为8bits,指示数据流通信类型或优先级。
流标签(Flow Label),长度为20bits。
有效载荷长度(Payload Length),长度为16bits,指示IPv6扩展头部和应用程序数据长度之和,不包括固定头部长度。
下一个报头(Next Header),长度为8bits,用于标识下一个报头的类型。取值为43时,表示下一个报头为SRH。
跳数限制(Hoplimit),长度为8bits。
源地址(Source Address),长度为128bits,源端IP地址。
目的地址(Destination Address),长度为128bits,目的端IP地址。
SRH包括:
下一个报头(Next Header),长度为8bits,用于标识下一个报文头的类型。
SRH长度(Hdr Ext Len),长度为8bits,表示以8个字节为单位的SRH头的长度,不包括第一个8个字节。
路由类型(Routing Type),长度为8bits,取值为4,表示携带的是SRH。
段索引(Segments Left,SL),长度为8bits,为下一个要处理的段列表的编号。
最后一跳(Last Entry),长度为8bits,取值为SRH头中报文实际转发路径的第一个SID的编号。
标志位(Flags),长度为8bits,为标志位信息。
标记位(Tag),长度为16bits,用于标记具有相同特性的一组报文。
段列表(Segment List),为SID列表,按照报文转发路径上节点从远到近的顺序进行排列,即Segment List[0]表示路径的最后一个SID,Segment List[1]表示路径的倒数第二个SID,以此类推。每个SID均可以为一个128bits的IPv6地址。
可选类型长度值(Optional Type Length Values,Optional TLVs),为扩展字段,携带可变数据,例如,加密和认证信息等。
图1示出的SID是未压缩的长度为128bits的IPv6地址,占用4个字节的空间,在SRv6应用于尽力而为(Best Effort,BE)场景或流量工程(Traffic Engineering,TE)场景时,转发路径的跳数小于5跳,SRH的长度可控。但如果应用在大规模网络的TE或服务链场景下,转发路径的跳数会很大,SRH中包括大量128bits的IPv6地址,可能会带来以下问题:开销高,承载效率低;过长的Segmet list为硬件转发造成困难,硬件转发层一次无法取读完整的Segmet list,需要多次读取,降低了转发效率;且报文长度可能超过MTU,头节点需对报文分片传输,导致头节点性能下降。
随着网络业务的不断发展和丰富,未来SID的数目会逐渐增加,SRv6头的开销会成为SRv6部署的挑战。为了解决这个问题,对SID压缩处理成为一个必然选择。
如图2a所示,图2a为SID的组成示意图。SID主要由以下三个部分组成:
Locator,为该SID指示的网络节点的标识。
Function,指示网络节点的转发动作。
Arguments,为可选执行参数,通常为0。
其中,如图2b所示,图2a中的Locator可以进一步被细分为B和N;B表示SRv6 SID Block,一般为网络运营商分配的子网网段,也可以用Prefix(前缀)表示;N是在子网内区分节点的节点标识(Node ID)。从SRv6的报文头格式定义可知,报文头占比的最大部分就是Segment list。在表项个数不变的情况下,SRv6的头压缩实际就是对单个SID的压缩。
在SRv6网络中,同一SID列表包括的SID通常是从一个地址块中分配出来的,拥有 相同的前缀,所以同一SID列表中的各SID中的Prefix相同的,即同一SID列表中的各SID都拥有相同的公共前缀(Common Prefix);SID的Argument部分通常为0,所以SID中变化的部分只有N和Function部分,其余部分是相同的。
如图3所示,目前对SID的压缩方式主要是将N和Function部分定义为C-SID,C-SID包括上述SID中的可变部分Node ID和Func-ID;将C-SID、Common Prefix和可能的填充(Padding)拼接即可得到完整的128bits的SID;原有的SID长度为128bits,压缩后的C-SID长度小于128bits,所以SRH的Segment List中的一个Segment的位置,可以容纳多个C-SID,一个Segment的位置可以称为一个C-SID容器(Compressed-SID container),一个C-SID容器可以容纳多个C-SID。
一个C-SID容器的长度是128bit,可以容纳一个完整的SRv6 SID,或者可以容纳多个C-SID。
目前,存在三种对Segment List的压缩类型,分别为NEXT-C-SID类型、REPLACE-C-SID类型以及NEXT-C-SID和REPLACE-C-SID混合类型。相应地,还定义了两种SRv6 SID的Flavor(附加行为),分别为NEXT-C-SID和REPLACE-C-SID,若本地配置的flavor为NEXT-C-SID,则代表Segment List中下一节点的SID为NEXT-C-SID类型的压缩;若本地配置的flavor为REPLACE-C-SID,则代表Segment List中下一节点的SID为REPLACE-C-SID类型的压缩。
以下对三种压缩类型分别进行介绍。
1、Next-C-SID
如图4a所示,图4a为Next-C-SID类型的一个C-SID容器的示例性示意图。图4a中,一个C-SID容器可以容纳1个32bit的Block和6个16bit的C-SID。可以将一个C-SID容器承载的内容看作一个完整的IPv6地址,Block之后的一个C-SID作为当前生效的C-SID,其余C-SID作为IPv6地址的Argument。
图4a中,报文在转发到C-SID1指示的节点1时,节点1确定本地配置的Flavor为NEXT-C-SID Flavor,并且目的地址的Argument字段不全为零,则将Argument字段左移一个C-SID长度,并将最低的16bit填充为0。此时C-SID容器承载的内容如图4b所示,当前生效的C-SID为C-SID2,节点1会将SL指示的C-SID容器承载的内容复制到报文的IPv6头的目的地址中,并将报文转发到C-SID2指示的节点2。
节点2指示的节点接收到报文后,也将根据控制面配置的NEXT-C-SID Flavor,对C-SID容器进行移位操作,并将最低的16bit填充为0,再将C-SID容器承载的内容复制到报文的目的地址,继续进行转发。
当报文被转发到C-SID6对应的节点6时,该C-SID容器承载的内容以及报文IPv6头中的目的地址如图4c所示,此时Argument字段均为0,则节点6需要将SRH中SL减1,并按照SL-1指示的Segment进行转发。
2、REPLACE-C-SID
如图5a所示,图5a为REPLACE-C-SID类型的一个C-SID容器的示例性示意图。REPLACE-C-SID类型的压缩路径需要一个128bit的SRv6 SID作为引导SID,携带该段压 缩路径的Common Prefix。该压缩路径上的后续SID均为C-SID,图5a中最后一行(Common Prefix、C-SID1和0)为引导SID,后续压缩路径的C-SID2—SID7共用引导SID的Common Prefix。
需要说明的是,一个Segment List包括的所有SID可能具有相同的前缀,但是也可能是一部分SID具有相同的一个前缀,另一部分SID具有相同的另一个前缀,还可能有SID的前缀与该Segment List其他SID的前缀均不相同。本申请实施例中的压缩路径是指一个Segment List中包括的连续的,且具有相同前缀的SID组成的路径。
例如,若一个Segment List包括的所有SID具有相同的前缀,则该Segment List指示的转发路径等同于一个压缩路径;若一个Segment List指示的转发路径为SID1至SID20,其中,SID1至SID6具有相同的前缀。SID8至SID20具有相同的前缀,则SID1至SID6为一个压缩路径;SID8至SID20为另一个压缩路径;SID7不在任何一个压缩路径上。即一个转发路径包括两个压缩路径和SID7。
在转发路径不等同于压缩路径的情况下,REPLACE-C-SID类型还支持混编场景,一个压缩路径结束后的下一个SID,可以是未压缩的SID。
未压缩的SID可以是普通SID,也可以是下一段压缩路径的引导SID,该引导SID的后续部分为下一段压缩路径的多个C-SID。也就是说,在同一SRH中可以同时存在普通SID和压缩路径中的SID和C-SID,达到混编效果。
在混编场景和存在多段压缩路径的纯压缩场景下,各段压缩路径的Common Prefix可能不相同,节点的数据面(即转发面)需要从Segment List中识别出一段压缩路径的开始和结束。可以通过REPLACE-C-SID flavor标识Segment List中下一个SID是否为C-SID。
针对C-SID可以是32bit和16bit两种场景,分别定义了REPLACE-C-SID32和REPLACE-C-SID16来区分C-SID的长度。
如图5b所示,压缩路径开始的第一个SID为一个完整128bits的SID,由Common Prefix、C-SID1和Arg组成,占用一个C-SID容器。该SID指示的节点1中配置了REPLACE-C-SID flavor,标识Segment List中该SID之后的一个SID为C-SID。C-SID2至C-SIDn-1指示的节点都需要配置REPLACE-C-SID flavor,标识下一SID为C-SID。C-SIDn指示的节点未被配置REPLACE-C-SID flavor,用于标识C-SIDn指示的节点是该压缩路径上的最后一个节点,下一SID是未压缩的SID。
如果Segment List中C-SIDn的下一SID是引导SID,则该引导SID指示的节点需要配置REPLACE-C-SID flavor;如果C-SIDn的下一SID是普通SID,则该普通SID指示的节点无需配置REPLACE-C-SID flavor。
数据面处理报文时,可以通过SRH中SL的取值来定位下一个SID的位置。但是压缩路径中,通过SL只能定位到C-SID所在的C-SID容器,还需进一步定位C-SID在C-SID容器中的位置。因此新定义一了个SID索引(SID Index,SI)字段,如图5c所示,SI占用IPv6头的目的地址中的C-SID之后的Arguments的最低位。在32bits C-SID压缩中,SI为128bit SID的最低2bit。SI字段的取值指示C-SID在C-SID容器中的位置,例如,C-SID长度为32bits,一个container可以容纳4个C-SID,则SI字段取值可以为0到3,分别对 应一个C-SID。
如图5d所示,图5d为本申请实施例提供的一种IPv6报文格式,其中,IPv6头中目的地址由Common Prefix、32bitC-SID、0字段和SI字段组成。SRH的Segment List包括多个长度为32bit的C-SID。
SL=2指示的C-SID容器包括C-SID0、C-SID1、C-SID2和C-SID3四个C-SID。
SL=1指示的C-SID容器包括C-SID0、C-SID1和C-SID2三个C-SID,由于未占满128bit,所以还包括填充(Padding)字段。
SL=0指示一个未压缩的SID。
图5d中的其他部分与图1一致,可以参考图1的描述,此处不再赘述。
节点接收到图5d所示的报文时,根据本地配置的REPLACE-C-SID flavor,先从目的地址中获取SI的取值,如果SI为0,则说明该节点是当前SL指示的C-SID容器内的最后一个C-SID,需要读取下一个C-SID容器,因此将SL减1,并将SI初始化为3,读取下一C-SID容器内SI=3指示的C-SID。
例如,报文被转发到SL=2内的C-SID0指示的节点时,SI取值为0,此时C-SID0指示的节点需要将SL值减1,SI值初始化为3,即取读SL=1内的C-SID2;将C-SID2更新到目的地址的32bitC-SID中,得到SL=1内的C-SID2指示的节点的地址,进而,将报文转发到该节点。
如果SI不为0,说明需要在当前SL指示的C-SID容器内读取下一个C-SID,因此需要将SI减1。将读取到的C-SID更新到目的地址中。
例如,报文被转发到SL=2内的C-SID2指示的节点时,此时SI取值为2,C-SID2指示的节点需要将SI减1,取读SL=2内的C-SID1,将C-SID1更新到目的地址中的32bitC-SID中,得到SL=2内的C-SID1指示的节点的地址,进而,将报文转发到该节点。
3、NEXT-C-SID和REPLACE-C-SID混合类型
多个C-SID容器内的C-SID共用一个Block,如图6所示,Block为32bit,每一C-SID为16bit。一个C-SID容器可以容纳8个C-SID或者容纳1个Block和6个C-SID,图6中的C-SID共用一个Block。
可以理解的是,经过压缩处理的SRH,以及封装在其中的segment list,需要配合对应的flavor来使用,但是flavor只被配置在各节点的控制面中,SRH中不携带flavor。
在采用上述压缩方案的SRv6网络中,如果网络发生故障,需要采用wireshark等工具抓取报文排查故障路径时,抓包工具无法根据抓取到报文中的SRH来确定转发路径。因为wireshark无法知道SRH中每段压缩路径的Block的长度,每个节点配置的flavor,因此对于压缩后的SRH,现有抓包工具无法离线还原包含完整SID的segment list。Wireshark是一个网络封包分析软件。
在另一实施场景下,SRv6网络中的各个中间节点会根据报文的SRH的Segment List指示的转发路径转发报文,如果Segment List中携带的是未压缩的SID,则当转发路径中存在故障节点时,故障节点的上游节点如果发现下一节点已经不可达,只需将SL再减1,就可以获得故障节点之后的一个segment,也就可以跳过故障节点,直接将报文发送到故 障节点的下一节点,即实现中间节点保护机制。
但如果Segment List携带有C-SID,故障节点的上游节点需要知道故障节点中配置的flavor,才能从SRH中获取到故障节点的下一个segment,但故障节点的上游节点无法获取到故障节点中配置的flavor,所以无法恢复出故障节点之后的一个节点的完整SID,将导致中间节点保护方案无法实施。
为了解决上述技术问题,本申请实施例提供了一种报文发送方法,应用于网络设备,如图7所示,该方法包括:
S701、接收第一报文。
S702、发送第二报文,第二报文包括SRH和第一报文,SRH包括多个C-SID容器和段描述信息,段描述信息包括Block长度、C-SID长度以及每个C-SID容器承载的C-SID的压缩类型。
其中,网络设备发送第二报文,可以使得接收到第二报文的设备根据段描述信息,从C-SID容器中还原出转发路径上各网络设备的SID。
其中,接收到第二报文的设备可以为转发路径上的设备,也可以为可以抓取到第二报文的设备。
转发路径上的设备接收到第二报文后,可以使用SRH携带的段描述信息恢复出转发路径上的下一节点的SID,从而向下一节点转发第二报文。
或者,转发路径上的设备接收到第二报文后,如果确定下一节点为故障节点,则可通过SRH携带的段描述信息恢复出故障节点的下一节点的SID,从而跳过故障节点,直接向故障节点的下一节点转发第二报文,实现中间节点保护机制。
或者,抓包工具在抓取到第二报文后,可以基于段描述信息还原出完整的Segment List,从而基于完整的Segment List进行网络故障排查。
也就是说,第二报文的SRH中可以携带段描述信息,段描述信息中携带用于将压缩SID还原为完整SID的信息,如此,使得接收到第二报文的设备即使未配置SID的flavor,也可以基于第二报文中携带的段描述信息恢复出SRH携带的完整的段列表。
采用本申请实施例,由于第二报文的SRH中包括段描述信息,段描述信息包括Block长度、C-SID长度以及每个C-SID容器承载的C-SID的压缩类型,所以抓包工具获取第二报文后,可获取到SRH中的段描述信息,并根据段描述信息中的Block长度、C-SID长度以及每个C-SID容器承载的C-SID的压缩类型,将每一C-SID容器中的C-SID还原成完整的SID,进而可以得到完整的段列表,解决了因无法还原出完整的段列表而无法进行网络故障排查的问题。
本申请实施例中的第一网络设备可以为头节点,可以预先通过命令行或者Netconf对头节点进行配置,进而,头节点在为报文封装SRH时,如果SRv6策略对应的段列表包括压缩路径,则头节点在SRH中封装段描述信息,以描述每个segment的结构。
在本申请实施例中,SRH包括扩展类型-长度-值(Type-Length-Value,TLV)结构,扩展TLV结构承载段描述信息。
可以理解的是,SRH中可以包括多个C-SID容器,相应地,段描述信息可以包括每个C-SID容器的容器描述信息。
如图8所示,图8为本申请实施例提供的扩展TLV结构示意图。
图8中,Type为TLV类型,标识该TLV为用于承载段描述信息的TLV(segment list Description TLV),具体数值需要从互联网数字分配机构(The Internet Assigned Numbers Authority,IANA)申请。
Length表示TLV的数据域长度,按字节计数。
Value部分用于承载段描述信息,图8中的Des0-DesN为段描述信息包括的N个容器描述信息,每个容器描述信息占用1字节。
Des0-DesN分别为SRH段列表中对应位置C-SID容器的容器描述信息,Des0为段列表指示的转发路径上最后一个C-SID容器的容器描述信息,相应地,DesN为转发路径上第一个C-SID容器的容器描述信息。
其中,用于承载段描述信息的扩展TLV要求4字节对齐,如果实际需要描述的SRH的段列表中的C-SID容器个数不满足对齐条件,则可使用Padding TLVs对齐。
上述段描述信息包括每个C-SID容器的容器描述信息,每个容器描述信息包括第一字段、第二字段和第三字段。每个容器描述信息占用的长度为1字节,容器描述信息的2个比特承载第一字段,1个比特承载第二字段,3个比特承载第三字段,2个比特为保留字段。
如图9所示,图9为本申请实施例提供的C-SID容器的容器描述信息的示意图,即图8中一个Des的示意图。图9中,T为第一字段,L为第二字段,BL/Count为第三字段,R为保留字段。
其中,第一字段的值用于表示C-SID容器承载的C-SID的压缩类型;
第二字段的值用于表示C-SID长度;
第三字段的值用于表示C-SID容器中包括的Block长度或者C-SID数量;
当第三字段用于表示C-SID容器中包括的Block长度时,第三字段包括多种取值,每种取值用于表示一种指定的Block长度。
下面对每一容器描述信息中的第一字段,第二字段和第三字段的具体取值进行介绍。
上述第一字段包括四种取值,四种取值分别表示第一压缩类型、第二压缩类型、第三压缩类型和第四压缩类型:
第一压缩类型为未压缩。未压缩表示该容器中的包含的是一个完整的128bit的SID。
第二压缩类型为NEXT-C-SID类型的压缩。
第三压缩类型为REPLACE-C-SID类型的压缩路径的起始SID。起始SID为压缩路径上第一个设备的完整SID。
第四压缩类型为REPLACE-C-SID类型或混合类型的压缩路径的非起始SID。非起始SID为压缩路径上除第一个设备之外的其他设备的C-SID。
其中,混合类型为NEXT-C-SID类型和REPLACE-C-SID类型的混合类型。
结合上述实施例中对REPLACE-C-SID的介绍,第二报文的转发路径可能会跨越多个网段,所以在压缩段列表中的SID时,会分段压缩,可以将转发路径上连续的且具有公共 前缀的SID指示的路径作为一段压缩路径,段列表指示的转发路径可能会包括多段压缩路径。
第一字段(T)包括的四种取值可以为00、01、10和11。
第一字段取值为00时,表示第一压缩类型:未压缩。
第一字段取值为01时,表示第二压缩类型:NEXT-C-SID类型的压缩。
第一字段取值为10时,表示第三压缩类型:REPLACE-C-SID类型的压缩路径的起始SID。
第一字段取值为11时,表示第四压缩类型:REPLACE-C-SID类型或混合类型的压缩路径的非起始SID。
以图4a、图5a和图6为例,图4a示出的C-SID容器对应的容器描述信息的T段的值为01,表示该C-SID容器的压缩类型为NEXT-C-SID类型的压缩。
图5a中C-SID1所属的C-SID容器的容器描述信息的T字段的值为10,表示C-SID1所属容器的压缩类型为REPLACE-C-SID类型的压缩路径的起始SID。
图5a中C-SID2至C-SID5所属的C-SID容器的容器描述信息的T字段的值为11,表示该C-SID容器的压缩类型为:REPLACE-C-SID的压缩路径的非起始SID。
图6中C-SID1至C-SID6所属的C-SID容器的容器描述信息的T字段的值为11,表示该C-SID容器的压缩类型为:混合类型的压缩路径的非起始SID。
如此,可以使得接收到第二报文的网络设备通过第一字段的取值,获取每一C-SID的压缩类型。
另外,第二字段(L)可以包括两种取值,当第二字段的取值为第一值时,指示C-SID的长度为16比特;当第二字段的取值为第二值时,指示C-SID的长度为32比特。
例如,第一值可以为0,第二值可以为1。
如此,可以使得接收到第二报文的网络设备,可以根据第二字段的取值确定C-SID的长度,并根据C-SID的长度恢复出完整SID。
在本申请实施例中,第一字段和第二字段可以配合使用,当第一字段的值表示第二压缩类型或第三压缩类型时,第三字段用于表示C-SID容器中包括的Block长度(Block Length,BL)。
即,如果图9的T字段取值为01或10,则图9中3-5bit用作BL字段。
可以理解的是,因上述第二压缩类型和第三压缩类型的C-SID容器中均包括Block,所以第三字段可用于表示C-SID容器中包括的Block长度。
以图4a为例,图4a示出的C-SID容器的容器描述信息的第一字段取值为01,该C-SID容器的压缩类型为第二压缩类型,即该C-SID容器中携带压缩路径的起始SID,该容器描述信息的第三字段表示该C-SID容器中起始SID的Block长度。
当第三字段用于表示C-SID容器中包括的Block长度时,第三字段包括多种取值,每种取值用于表示一种指定的Block长度。
例如,目前Block的长度有7种,相应地,第三字段可以有七种取值,分别为000、001、010、011、100、110和111。
当BL取值为000时,表示Block长度为16比特。
当BL取值为001时,表示Block长度为32比特。
当BL取值为010时,表示Block长度为48比特。
当BL取值为011时,表示Block长度为56比特。
当BL取值为100时,表示Block长度为64比特。
当BL取值为110时,表示Block长度为72比特。
当BL取值为111时,表示Block长度为80比特。
需要说明的是,第三字段的取值可根据实际使用的Block长度设置,不限于上述七种取值,比如也可按照实际需要设置5种取值,对此本申请实施例不作限制。
另外,当第一字段表示的压缩类型为第四压缩类型时,第三字段用于表示C-SID容器中包括的C-SID数量。
即,当T字段取值为11时,C-SID容器中均为C-SID,图9中3-5bit用作Count字段,表示C-SID容器中包括的C-SID数量。
以图5a为例,图5a示出的C-SID容器的压缩类型为:REPLACE-C-SID的压缩路径的非起始SID,则该C-SID容器的容器描述信息的Count字段用于表示该C-SID容器中包括4个C-SID。
需要说明的是,当第一字段取值为01,表示第二压缩类型时,接收第二报文的网络设备可以根据第二字段表示的C-SID的长度、第三字段表示的Block的长度以及Argument字段的非零字段长度,计算出C-SID容器包括的C-SID的数量。
以图4b为例,图4b示出的C-SID容器的压缩类型为:NEXT-C-SID类型的压缩,C-SID长度为16bit,Block长度32bbit,则可确定Argument字段的总长度为:128bit-16bit-32bit=80bit。设备可识别出图4b中Argument字段的低位连续置0的字段长度为16bit。进而计算出Argument字段中非零字段长度为80bit-16bit=64bit,进而计算出Argument字段中包括64/16=4个C-SID,再加上当前生效的C-SID,即该C-SID容器中包括5个C-SID。
当第一字段取值为10,即表示第三压缩类型:REPLACE-C-SID类型的压缩路径的起始SID时,接收第二报文的网络设备可以直接确定C-SID数量只有1个。
所以,当容器描述信息的T字段取值为01或者10时,容器描述信息均不需要携带C-SID的个数,所以容器描述信息的3-5bit互不冲突,可由BL字段和count字段共用,如此可以减少对SRH字段的占用。
如此,接收到第二报文的网络设备可以根据第三字段的取值,确定Block的长度,或者C-SID的数量。
基于相同的发明构思,本申请实施例还提供了一种报文发送装置,应用于网络设备,如图10所示,该装置包括:
接收模块1001,用于接收第一报文;
发送模块1002,用于发送第二报文,第二报文包括分段路由头SRH和第一报文,SRH 包括多个压缩段标识C-SID容器和段描述信息,段描述信息包括Block长度、C-SID长度以及每个C-SID容器承载的C-SID的压缩类型。
可选的,段描述信息包括每个C-SID容器的容器描述信息,每个容器描述信息包括第一字段、第二字段和第三字段;
其中,第一字段的值用于表示C-SID容器承载的C-SID的压缩类型;
第二字段的值用于表示C-SID长度;
第三字段的值用于表示C-SID容器中包括的Block长度或者C-SID数量;
当第三字段用于表示C-SID容器中包括的Block长度时,第三字段包括多种取值,每种取值用于表示一种指定的Block长度。
可选的,
第一字段包括四种取值,四种取值分别表示第一压缩类型、第二压缩类型、第三压缩类型和第四压缩类型:
第一压缩类型为未压缩;
第二压缩类型为NEXT-C-SID类型的压缩;
第三压缩类型为REPLACE-C-SID类型的压缩路径的起始SID;
第四压缩类型为REPLACE-C-SID类型或混合类型的压缩路径的非起始SID;
其中,混合类型为NEXT-C-SID类型和REPLACE-C-SID类型的混合类型,起始SID为压缩路径上第一个设备的完整SID。
可选的,
当第二字段的取值为第一值时,指示C-SID的长度为16比特;
当第二字段的取值为第二值时,指示C-SID的长度为32比特。
可选的,
当第一字段的值表示第二压缩类型或第三压缩类型时,第三字段用于表示C-SID容器中包括的Block长度;
当第一字段的值表示第四压缩类型时,第三字段用于表示C-SID容器中包括的C-SID数量。
可选的,每个容器描述信息占用的长度为1字节,容器描述信息的2个比特承载第一字段,1个比特承载第二字段,3个比特承载第三字段,2个比特为保留字段。
可选的,SRH包括扩展TLV结构,扩展TLV结构承载段描述信息。
本申请实施例还提供了一种网络设备,如图11所示,该网络设备包括:
处理器1101;
收发器1104;
机器可读存储介质1102,机器可读存储介质存储有能够被处理器执行的机器可执行指令;机器可执行指令促使处理器1101执行以下步骤:
通过收发器1104接收第一报文;
通过收发器1104发送第二报文,第二报文包括分段路由头SRH和第一报文,SRH包括多个压缩段标识C-SID容器和段描述信息,段描述信息包括Block长度、C-SID长度以 及每个C-SID容器承载的C-SID的压缩类型。
可选的,段描述信息包括每个C-SID容器的容器描述信息,每个容器描述信息包括第一字段、第二字段和第三字段;
其中,第一字段的值用于表示C-SID容器承载的C-SID的压缩类型;
第二字段的值用于表示C-SID长度;
第三字段的值用于表示C-SID容器中包括的Block长度或者C-SID数量;
当第三字段用于表示C-SID容器中包括的Block长度时,第三字段包括多种取值,每种取值用于表示一种指定的Block长度。
可选的,
第一字段包括四种取值,四种取值分别表示第一压缩类型、第二压缩类型、第三压缩类型和第四压缩类型:
第一压缩类型为未压缩;
第二压缩类型为NEXT-C-SID类型的压缩;
第三压缩类型为REPLACE-C-SID类型的压缩路径的起始SID;
第四压缩类型为REPLACE-C-SID类型或混合类型的压缩路径的非起始SID;
其中,混合类型为NEXT-C-SID类型和REPLACE-C-SID类型的混合类型,起始SID为压缩路径上第一个设备的完整SID。
可选的,
当第二字段的取值为第一值时,指示C-SID的长度为16比特;
当第二字段的取值为第二值时,指示C-SID的长度为32比特。
可选的,
当第一字段的值表示第二压缩类型或第三压缩类型时,第三字段用于表示C-SID容器中包括的Block长度;
当第一字段的值表示第四压缩类型时,第三字段用于表示C-SID容器中包括的C-SID数量。
可选的,每个容器描述信息占用的长度为1字节,容器描述信息的2个比特承载第一字段,1个比特承载第二字段,3个比特承载第三字段,2个比特为保留字段。
可选的,SRH包括扩展TLV结构,扩展TLV结构承载段描述信息。
如图11所示,网络设备还可以包括通信总线1103。处理器1101、机器可读存储介质1102及收发器1104之间通过通信总线1103完成相互间的通信,通信总线1103可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线1103可以分为地址总线、数据总线、控制总线等。
收发器1104可以为无线通信模块,收发器1104在处理器1101的控制下,与其他设备进行数据交互。
机器可读存储介质1102可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。 另外,机器可读存储介质1102还可以是至少一个位于远离前述处理器的存储装置。
处理器1101可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
基于同一种发明构思,根据上述本申请实施例提供的报文发送方法,本申请实施例还提供了一种机器可读存储介质,机器可读存储介质存储有能够被处理器执行的机器可执行指令。处理器被机器可执行指令促使实现上述任一报文发送方法的步骤。
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一报文发送方法的步骤。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (23)

  1. 一种报文发送方法,其特征在于,应用于网络设备,所述方法包括:
    接收第一报文;
    发送第二报文,所述第二报文包括分段路由头SRH和所述第一报文,所述SRH包括多个压缩段标识C-SID容器和段描述信息,所述段描述信息包括Block长度、C-SID长度以及每个C-SID容器承载的C-SID的压缩类型。
  2. 根据权利要求1所述的方法,其特征在于,所述段描述信息包括每个C-SID容器的容器描述信息,每个容器描述信息包括第一字段、第二字段和第三字段;
    其中,所述第一字段的值用于表示C-SID容器承载的C-SID的压缩类型;
    所述第二字段的值用于表示C-SID长度;
    所述第三字段的值用于表示C-SID容器中包括的Block长度或者C-SID数量;
    当所述第三字段用于表示C-SID容器中包括的Block长度时,所述第三字段包括多种取值,每种取值用于表示一种指定的Block长度。
  3. 根据权利要求2所述的方法,其特征在于,
    所述第一字段包括四种取值,所述四种取值分别表示第一压缩类型、第二压缩类型、第三压缩类型和第四压缩类型:
    所述第一压缩类型为未压缩;
    所述第二压缩类型为NEXT-C-SID类型的压缩;
    所述第三压缩类型为REPLACE-C-SID类型的压缩路径的起始SID;
    所述第四压缩类型为REPLACE-C-SID类型或混合类型的压缩路径的非起始SID;
    其中,所述混合类型为所述NEXT-C-SID类型和所述REPLACE-C-SID类型的混合类型,所述起始SID为压缩路径上第一个设备的完整SID。
  4. 根据权利要求2所述的方法,其特征在于,
    当所述第二字段的取值为第一值时,指示C-SID的长度为16比特;
    当所述第二字段的取值为第二值时,指示C-SID的长度为32比特。
  5. 根据权利要求3所述的方法,其特征在于,
    当所述第一字段的值表示所述第二压缩类型或所述第三压缩类型时,所述第三字段用于表示C-SID容器中包括的Block长度;
    当所述第一字段的值表示所述第四压缩类型时,所述第三字段用于表示C-SID容器中包括的C-SID数量。
  6. 根据权利要求2所述的方法,其特征在于,每个容器描述信息占用的长度为1字节,所述容器描述信息的2个比特承载所述第一字段,1个比特承载所述第二字段,3个比特承载所述第三字段,2个比特为保留字段。
  7. 根据权利要求1所述的方法,其特征在于,所述SRH包括扩展TLV结构,所述扩展TLV结构承载所述段描述信息。
  8. 一种报文发送装置,其特征在于,应用于网络设备,所述装置包括:
    接收模块,用于接收第一报文;
    发送模块,用于发送第二报文,所述第二报文包括分段路由头SRH和所述第一报文,所述SRH包括多个压缩段标识C-SID容器和段描述信息,所述段描述信息包括Block长度、C-SID长度以及每个C-SID容器承载的C-SID的压缩类型。
  9. 根据权利要求8所述的装置,其特征在于,所述段描述信息包括每个C-SID容器的容器描述信息,每个容器描述信息包括第一字段、第二字段和第三字段;
    其中,所述第一字段的值用于表示C-SID容器承载的C-SID的压缩类型;
    所述第二字段的值用于表示C-SID长度;
    所述第三字段的值用于表示C-SID容器中包括的Block长度或者C-SID数量;
    当所述第三字段用于表示C-SID容器中包括的Block长度时,所述第三字段包括多种取值,每种取值用于表示一种指定的Block长度。
  10. 根据权利要求9所述的装置,其特征在于,
    所述第一字段包括四种取值,所述四种取值分别表示第一压缩类型、第二压缩类型、第三压缩类型和第四压缩类型:
    所述第一压缩类型为未压缩;
    所述第二压缩类型为NEXT-C-SID类型的压缩;
    所述第三压缩类型为REPLACE-C-SID类型的压缩路径的起始SID;
    所述第四压缩类型为REPLACE-C-SID类型或混合类型的压缩路径的非起始SID;
    其中,所述混合类型为所述NEXT-C-SID类型和所述REPLACE-C-SID类型的混合类型,所述起始SID为所述压缩路径上第一个设备的完整SID。
  11. 根据权利要求9所述的装置,其特征在于,
    当所述第二字段的取值为第一值时,指示C-SID的长度为16比特;
    当所述第二字段的取值为第二值时,指示C-SID的长度为32比特。
  12. 根据权利要求10所述的装置,其特征在于,
    当所述第一字段的值表示所述第二压缩类型或所述第三压缩类型时,所述第三字段用于表示C-SID容器中包括的Block长度;
    当所述第一字段的值表示所述第四压缩类型时,所述第三字段用于表示C-SID容器中包括的C-SID数量。
  13. 根据权利要求9所述的装置,其特征在于,每个容器描述信息占用的长度为1字节,所述容器描述信息的2个比特承载所述第一字段,1个比特承载所述第二字段,3个比特承载所述第三字段,2个比特为保留字段。
  14. 根据权利要求8所述的装置,其特征在于,所述SRH包括扩展TLV结构,所述扩展TLV结构承载所述段描述信息。
  15. 一种网络设备,其特征在于,所述网络设备包括:
    处理器;
    收发器;
    机器可读存储介质,所述机器可读存储介质存储有能够被所述处理器执行的机器可执行指令;所述机器可执行指令促使所述处理器执行以下步骤:
    通过所述收发器接收第一报文;
    通过所述收发器发送第二报文,所述第二报文包括分段路由头SRH和所述第一报文,所述SRH包括多个压缩段标识C-SID容器和段描述信息,所述段描述信息包括Block长度、C-SID长度以及每个C-SID容器承载的C-SID的压缩类型。
  16. 根据权利要求15所述的网络设备,其特征在于,所述段描述信息包括每个C-SID容器的容器描述信息,每个容器描述信息包括第一字段、第二字段和第三字段;
    其中,所述第一字段的值用于表示C-SID容器承载的C-SID的压缩类型;
    所述第二字段的值用于表示C-SID长度;
    所述第三字段的值用于表示C-SID容器中包括的Block长度或者C-SID数量;
    当所述第三字段用于表示C-SID容器中包括的Block长度时,所述第三字段包括多种取值,每种取值用于表示一种指定的Block长度。
  17. 根据权利要求16所述的网络设备,其特征在于,
    所述第一字段包括四种取值,所述四种取值分别表示第一压缩类型、第二压缩类型、第三压缩类型和第四压缩类型:
    所述第一压缩类型为未压缩;
    所述第二压缩类型为NEXT-C-SID类型的压缩;
    所述第三压缩类型为REPLACE-C-SID类型的压缩路径的起始SID;
    所述第四压缩类型为REPLACE-C-SID类型或混合类型的压缩路径的非起始SID;
    其中,所述混合类型为所述NEXT-C-SID类型和所述REPLACE-C-SID类型的混合类型,所述起始SID为压缩路径上第一个设备的完整SID。
  18. 根据权利要求16所述的网络设备,其特征在于,
    当所述第二字段的取值为第一值时,指示C-SID的长度为16比特;
    当所述第二字段的取值为第二值时,指示C-SID的长度为32比特。
  19. 根据权利要求17所述的网络设备,其特征在于,
    当所述第一字段的值表示所述第二压缩类型或所述第三压缩类型时,所述第三字段用于表示C-SID容器中包括的Block长度;
    当所述第一字段的值表示所述第四压缩类型时,所述第三字段用于表示C-SID容器中包括的C-SID数量。
  20. 根据权利要求16所述的网络设备,其特征在于,每个容器描述信息占用的长度为1字节,所述容器描述信息的2个比特承载所述第一字段,1个比特承载所述第二字段,3个比特承载所述第三字段,2个比特为保留字段。
  21. 根据权利要求15所述的网络设备,其特征在于,所述SRH包括扩展TLV结构,所述扩展TLV结构承载所述段描述信息。
  22. 一种机器可读存储介质,其特征在于,存储有机器可执行指令,在被处理器调用和执行时,所述机器可执行指令促使所述处理器:实现权利要求1-7任一所述的方法步骤。
  23. 一种计算机程序产品,其特征在于,所述计算机程序产品促使所述处理器:实现权利要求1-7任一所述的方法步骤。
PCT/CN2022/101719 2022-06-28 2022-06-28 报文发送 WO2024000136A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2022/101719 WO2024000136A1 (zh) 2022-06-28 2022-06-28 报文发送
CN202280001935.4A CN117643037A (zh) 2022-06-28 2022-06-28 报文发送

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/101719 WO2024000136A1 (zh) 2022-06-28 2022-06-28 报文发送

Publications (1)

Publication Number Publication Date
WO2024000136A1 true WO2024000136A1 (zh) 2024-01-04

Family

ID=89383683

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/101719 WO2024000136A1 (zh) 2022-06-28 2022-06-28 报文发送

Country Status (2)

Country Link
CN (1) CN117643037A (zh)
WO (1) WO2024000136A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113067825A (zh) * 2021-03-24 2021-07-02 网经科技(苏州)有限公司 基于srv6网络协议进行多端点数据备份的方法
CN113726654A (zh) * 2021-08-13 2021-11-30 新华三信息安全技术有限公司 Srv6协议的报文转发方法、装置、电子设备及介质
CN113824638A (zh) * 2020-06-18 2021-12-21 华为技术有限公司 一种转发报文的方法、设备和系统
CN114640616A (zh) * 2020-11-30 2022-06-17 华为技术有限公司 一种报文传输、段列表生成、压缩段标识获取方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113824638A (zh) * 2020-06-18 2021-12-21 华为技术有限公司 一种转发报文的方法、设备和系统
CN114640616A (zh) * 2020-11-30 2022-06-17 华为技术有限公司 一种报文传输、段列表生成、压缩段标识获取方法及装置
CN113067825A (zh) * 2021-03-24 2021-07-02 网经科技(苏州)有限公司 基于srv6网络协议进行多端点数据备份的方法
CN113726654A (zh) * 2021-08-13 2021-11-30 新华三信息安全技术有限公司 Srv6协议的报文转发方法、装置、电子设备及介质

Also Published As

Publication number Publication date
CN117643037A (zh) 2024-03-01

Similar Documents

Publication Publication Date Title
US11979322B2 (en) Method and apparatus for providing service for traffic flow
WO2022078509A1 (zh) IPv6报文的扩展头封装方法及装置
JP7208386B2 (ja) パケット転送方法、パケット送信装置、およびパケット受信装置
EP3738277B1 (en) Segment routing network processing of packets
US11658847B2 (en) Packet communications providing packet processing efficiencies in a network including using a segment routing and tunnel exchange
US11349754B2 (en) Packet processing method and apparatus
CN111988266B (zh) 一种处理报文的方法
EP4207685A1 (en) Message header processing method and apparatus, storage medium and electronic device
US20090135833A1 (en) Ingress node and egress node with improved packet transfer rate on multi-protocol label switching (MPLS) network, and method of improving packet transfer rate in MPLS network system
CN112491706A (zh) 数据报文的处理方法及装置、存储介质、电子装置
US20230327983A1 (en) Performance measurement in a segment routing network
WO2024000136A1 (zh) 报文发送
WO2024000137A1 (zh) 报文处理
WO2023078144A1 (zh) 报文处理方法、装置及系统
WO2024041064A1 (zh) Quic报文的传输方法及相关设备
WO2024086991A1 (zh) 一种节点保护方法、装置、电子设备及介质
EP4319096A1 (en) Packet transmission method and related device
WO2022237563A1 (zh) 数据转发方法、装置、存储介质和电子装置
WO2024098244A1 (zh) 一种节点保护方法、装置、电子设备及介质
WO2023240438A1 (zh) 报文处理
WO2022199365A1 (zh) 信息处理方法、设备和存储介质
JP7293728B2 (ja) パケットカプセル化方法およびパケットカプセル化装置
EP3863237B1 (en) Packet forwarding method, packet transmission device, and packet reception device
WO2023165244A1 (zh) 报文的发送方法、装置、存储介质及电子装置
WO2024124260A2 (en) Ipv6 domain level segment routing using srh

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22948259

Country of ref document: EP

Kind code of ref document: A1