WO2023024755A1 - Mpls报文的封装方法及装置、存储介质及电子装置 - Google Patents

Mpls报文的封装方法及装置、存储介质及电子装置 Download PDF

Info

Publication number
WO2023024755A1
WO2023024755A1 PCT/CN2022/106042 CN2022106042W WO2023024755A1 WO 2023024755 A1 WO2023024755 A1 WO 2023024755A1 CN 2022106042 W CN2022106042 W CN 2022106042W WO 2023024755 A1 WO2023024755 A1 WO 2023024755A1
Authority
WO
WIPO (PCT)
Prior art keywords
mpls
auxiliary data
management header
data
information
Prior art date
Application number
PCT/CN2022/106042
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 中兴通讯股份有限公司
Publication of WO2023024755A1 publication Critical patent/WO2023024755A1/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
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9057Arrangements for supporting packet reassembly or resequencing

Definitions

  • the present disclosure relates to the communication field, and in particular, relates to an MPLS packet encapsulation method and device, a storage medium, and an electronic device.
  • MPLS Multi-Protocol Labal Switching, Multi-Protocol Label Switching
  • map IP Internet Protocol, Internet Protocol
  • the edge devices in the MPLS network After receiving the data packets, the edge devices in the MPLS network analyze the contents of the data packets, select appropriate labels for these data packets, and use the labels to encapsulate the data packets and send them to the MPLS network.
  • SR Segment Routing, segment routing
  • SR-MPLS label stack
  • IPv6 IPv6 packet header
  • SRv6 Segment Routing IPv6, segment routing based on IPv6 forwarding plane carries a series of indication operations (also called segment operations) to indicate the route of data in the network for transmission.
  • G-ACH Generic Associated Channel Header
  • RFC5586 which is used for OAM (Operation Administration and Maintenance, operation, management and maintenance) business.
  • G-ACH is only used for end-to-end data carrying. Intermediate nodes do not process G-ACH and cannot be superimposed.
  • a special label needs to be carried to indicate that G-ACH will be carried later.
  • auxiliary data the service-related data or forwarding-related data carried behind the label stack are collectively referred to as auxiliary data.
  • one or more labels are generally used to indicate in the stack, no matter what kind of labels they are, they are collectively referred to as indicator labels (Indicator Label) in the embodiments of the present disclosure.
  • This type of chain analysis method is similar to the processing of IPv6 extension headers. Since the data concerned by the node cannot be directly obtained, the message processing efficiency is low, and it is also considered to be one of the defects of IPv6 extension headers.
  • the other is the method proposed by draft-bryant-mpls-aux-data-pointer.
  • the information is directly carried to indicate the offset of the extension header corresponding to the indication tag relative to the tag, as shown in Figure 1.
  • the first 20 bits of the tag carry the tag value, and the last 11 bits are used (excluding the S bit representing the tag at the bottom of the stack), among which the first 3 bits represent the offset unit, and the last 8 bits fill in the specific value of the offset.
  • one indicator label can only correspond to one stack bottom data, if the bottom of the stack carries multiple data, multiple indicator labels need to correspond one by one, which will significantly increase the label stack depth;
  • the label stack needs to be regenerated, which is a very large processing cost.
  • this solution is for label operations, if an exception or failure occurs during the process of modifying the label stack, resulting in wrong values for the label, it may cause a message Forwarding exception; third, the offset information is stored in the label stack, which is easily affected by changes in the label stack, resulting in poor scalability of the solution. For example, in scenarios such as fault protection fast rerouting (FRR) Push into the label stack corresponding to a protection path, indicating that the offset size in the label may also change accordingly.
  • FRR fault protection fast rerouting
  • the indication method of MPLS auxiliary data has high complexity and low data parsing efficiency, and no effective solution has been proposed yet.
  • the embodiments of the present disclosure provide a method and device for encapsulating MPLS messages, a storage medium and an electronic device, so as to at least solve the problems of high complexity and low efficiency in the indication mode of the MPLS label stack.
  • a method for encapsulating MPLS packets including: setting an MPLS management header in the stack bottom structure of the Multi-Protocol Label Switching MPLS label stack, wherein the MPLS management header is located at the stack bottom label After that, before the auxiliary data, the MPLS management header includes: the data type and offset length information of the auxiliary data, and the stack bottom structure includes: the MPLS management header and the auxiliary data.
  • a device for encapsulating MPLS packets including: a setting module configured to set an MPLS management header in the stack bottom structure of the MPLS label stack, wherein, the The MPLS management header is located after the bottom label of the stack and before the auxiliary data.
  • the MPLS management header includes: the data type and offset length information of the auxiliary data
  • the stack bottom structure includes: the MPLS management header and the supplementary data.
  • a computer-readable storage medium where a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute the above-mentioned MPLS packet encapsulation method.
  • an electronic device including a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the processor executes the above-mentioned MPLS through the computer program. Packet encapsulation method.
  • the embodiment of the present disclosure introduces the MPLS management header after the stack bottom label in the stack bottom structure and before the auxiliary data, and summarizes the type and offset length information of the auxiliary data in the stack bottom structure in the MPLS management header, Therefore, before reading the auxiliary data, the information of the auxiliary data of the bottom structure of the stack can be obtained, and the complexity indicated in the label stack can be reduced, so that the node can determine whether the bottom structure of the stack carries information that needs to be processed locally according to the MPLS management header.
  • Data type no need to read auxiliary data to determine whether the stack bottom structure carries the data type that needs to be processed locally, and solves the technical problem of being unable to efficiently indicate and parse data when multiple data are superimposed in the MPLS label stack bottom structure.
  • FIG. 1 is a schematic diagram of an indicator label carrying an auxiliary data offset in the related art
  • Fig. 2 is the block diagram of the hardware structure of the computer terminal of the encapsulation method of the MPLS message of the embodiment of the present disclosure
  • Fig. 3 is a flowchart (1) of an encapsulation method of an MPLS message according to an embodiment of the present disclosure
  • Fig. 4 is a schematic diagram of the location of the MPLS management header according to an embodiment of the present disclosure
  • FIG. 5 is a flow chart (2) of a method for encapsulating an MPLS message according to an embodiment of the present disclosure
  • FIG. 6 is a schematic diagram of the format of an MPLS management header basic unit according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic diagram (1) of the format of the MPLS management header according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram (1) of the storage sequence of auxiliary data information of the MPLS management header according to an embodiment of the present disclosure
  • FIG. 9 is a schematic diagram (2) of the storage sequence of auxiliary data information of the MPLS management header according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic diagram of an MPLS management header parsing process according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic diagram of a message (1) after the auxiliary data of the MPLS management header is deleted according to an embodiment of the present disclosure
  • FIG. 12 is a schematic diagram of a message (2) after the auxiliary data of the MPLS management header is deleted according to an embodiment of the present disclosure
  • FIG. 13 is a schematic diagram of a message (3) after the auxiliary data of the MPLS management header is deleted according to an embodiment of the present disclosure
  • FIG. 14 is a schematic diagram of a message after the auxiliary data of the MPLS management header is added according to an embodiment of the present disclosure
  • FIG. 15 is a schematic diagram (2) of the format of the MPLS management header according to an embodiment of the present disclosure.
  • FIG. 16 is a schematic diagram (1) of MPLS management header carrying auxiliary data according to an embodiment of the present disclosure
  • FIG. 17 is a schematic diagram (2) of MPLS management header carrying auxiliary data according to an embodiment of the present disclosure.
  • FIG. 18 is a schematic diagram of a label forwarding path according to an embodiment of the present disclosure.
  • FIG. 19 is a schematic diagram (1) of a node message according to an embodiment of the present disclosure.
  • FIG. 20 is a schematic diagram (2) of a node message according to an embodiment of the present disclosure.
  • FIG. 21 is a schematic diagram (3) of a node message according to an embodiment of the present disclosure.
  • Fig. 22 is a structural block diagram of an apparatus for encapsulating MPLS packets according to an embodiment of the present disclosure.
  • FIG. 2 is a block diagram of a hardware structure of a computer terminal according to an MPLS packet encapsulation method according to an embodiment of the present disclosure.
  • the computer terminal can include one or more (only one shown in Figure 2) processor 202 (the processor 202 can include but not limited to a microprocessor (Microprocessor Unit, MPU for short) or programmable logic device (Programmable logic device, referred to as PLD)) and a memory 204 configured to store data, in an exemplary embodiment, the above-mentioned computer terminal may also include a transmission device 206 and an input/output device 208 configured as a communication function.
  • MPU Microprocessor Unit
  • PLD programmable logic device
  • the above-mentioned computer terminal may also include a transmission device 206 and an input/output device 208 configured as a communication function.
  • the structure shown in FIG. 2 is only for illustration, and it does not limit the structure of the above computer terminal.
  • the computer terminal may also include more or less components than those shown in FIG. 2 , or have a different configuration with functions equivalent to those shown in FIG. 2 or more functions than those shown in FIG. 2 .
  • the memory 204 can be set to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the encapsulation method of MPLS packets in the embodiment of the present disclosure, and the processor 202 runs the computer program stored in the memory 204 , so as to perform various functional applications and data processing, that is, to realize the above-mentioned method.
  • the memory 204 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 204 may further include a memory that is remotely located relative to the processor 202, and these remote memories may be connected to a computer terminal through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the transmission device 206 is arranged to receive or transmit data via a network.
  • the specific example of the above-mentioned network may include a wireless network provided by the communication provider of the computer terminal.
  • the transmission device 206 includes a network interface controller (NIC for short), which can be connected to other network devices through a base station so as to communicate with the Internet.
  • the transmission device 206 may be a radio frequency (Radio Frequency, referred to as RF) module, which is configured to communicate with the Internet in a wireless manner.
  • RF radio frequency
  • Fig. 3 is the flowchart (1) of the encapsulation method of MPLS message according to the disclosed embodiment, as shown in Fig. 3, the step of this encapsulation method comprises:
  • Step S302 setting the MPLS management header in the bottom structure of the MPLS label stack.
  • the MPLS management header is located after the bottom label of the stack and before the auxiliary data
  • the MPLS management header includes: the data type and offset length information of the auxiliary data
  • the stack bottom structure includes: the MPLS management header and the auxiliary data.
  • the MPLS management header is introduced after the bottom label in the stack bottom structure and before the auxiliary data, and the type and offset length information of the auxiliary data in the stack bottom structure are summarized in the MPLS management header.
  • the bottom structure of the stack carries the data type that needs to be processed locally, according to the offset length information of the management header, it directly jumps to the auxiliary The starting position of the data processes the auxiliary data, which solves the technical problem that the data cannot be efficiently indicated and analyzed under the condition that multiple data are superimposed in the bottom structure of the MPLS label stack.
  • the execution subject of the above step S302 may be an encapsulation node, which is not limited in this embodiment of the present disclosure.
  • the MPLS management header may be parsed by a parsing node to determine whether the auxiliary data includes a target node (hereinafter may be referred to as a node for short) ) data type to be processed; in the case that the auxiliary data includes the data type to be processed by the target node, jump to the starting position of the auxiliary data according to the offset length information, wherein the offset The length information is used to indicate the data size to be offset from the current position to the starting position.
  • a parsing node to determine whether the auxiliary data includes a target node (hereinafter may be referred to as a node for short) ) data type to be processed; in the case that the auxiliary data includes the data type to be processed by the target node, jump to the starting position of the auxiliary data according to the offset length information, wherein the offset The length information is used to indicate the data size to be offset from the current position to the starting position.
  • the MPLS management header in the above step S302 includes: the length information of the auxiliary data, or the termination offset information of the auxiliary data, wherein the termination offset information and the auxiliary data The difference between the start offset information is the length information of the auxiliary data.
  • the encapsulation method of the MPLS message further includes: in an optional embodiment, the parsing node can read the indication label corresponding to the stack bottom structure to determine whether the stack bottom structure carries the supplementary data.
  • the encapsulation method of the MPLS message further includes: in an optional embodiment, the encapsulation node may implement the following solution: modifying the MPLS management header when it is detected that the auxiliary data changes The data type and offset length information of the auxiliary data included in , so that the modified data type and offset length information correspond to the changed auxiliary data.
  • the encapsulation method of the MPLS message further includes: the change of the auxiliary data includes at least one of the following: the data size of the auxiliary data changes, the auxiliary data is deleted, and new auxiliary data is inserted .
  • the MPLS management header in the above step S302 includes: one or more basic units, wherein each of the basic units includes: one or more auxiliary data information.
  • any basic unit in the MPLS management header in the above step S302 includes: Flag identification bit information indicating whether there is a subsequent basic unit.
  • the MPLS management header in step S302 includes information on the number of basic units, wherein the information on the number of basic units is used to indicate the number of basic units in the MPLS management header. If the number of basic units is smaller than the information about the number of basic units, it is determined that there are still basic units subsequently.
  • FIG. 4 is a schematic diagram of the location of the MPLS management header according to an embodiment of the present disclosure.
  • the management header i.e. the Manage Header in Fig. 4
  • the management header is located behind the label at the bottom of the stack (i.e. the Bottom of Stack in Fig. 4), and all Before the auxiliary data (that is, Ancillary Data in Figure 4).
  • the management header is used to store auxiliary data information
  • the auxiliary data is used to describe the data type of each auxiliary data carried by the stack bottom structure and information on how to read each auxiliary data.
  • the auxiliary data information needs to include at least the start offset information, and the start offset information starts from the management header, or from a certain location in the management header. From the start of the position, to reach the start position of the corresponding auxiliary data, the data size of the offset is required.
  • the management header may also include the auxiliary data length information, or include termination offset information, so that the length information of the auxiliary data can be obtained directly or indirectly from the management header.
  • the termination offset information represents starting from the management header, or starting from a certain position in the management header to reach the termination position of the corresponding auxiliary data.
  • the length information of the corresponding auxiliary data can be obtained through the difference information of the starting offset.
  • Fig. 5 is the flow chart of the encapsulation method of MPLS message according to the embodiment of the present disclosure (1) as shown in Fig. 5, the encapsulation method includes:
  • step S502 the node reads the indicator tag and perceives that the bottom structure of the stack carries auxiliary data. Since the specific data type will be specified in the management header, in the simplest case, no matter how much data is carried in the bottom structure of the stack, only one indicator label is needed to indicate that the bottom structure of the stack carries auxiliary data, and the depth of the label stack will not be significantly increased.
  • the indication label indicates in the indication label whether the data carried by the stack bottom structure needs to be processed by hop-by-hop (Hop-by-hop) or only needs to be processed by end-to-end (End-to-end). If the node is a The middle node of the path, and the indicator label indicates that the bottom structure of the stack carries end-to-end processed data, that is, the data that only needs to be processed at the end of the path, so the middle node does not need to continue to the bottom structure of the stack to read data.
  • Hop-by-hop hop-by-hop
  • End-to-end end-to-end
  • the embodiment of the present disclosure does not impose any restrictions on the storage location and reading method of the indicator label.
  • the method in draft-bryant-mpls-aux-data-pointer can be used, that is, the storage location of the indicator label is fixed. , immediately after the top label of the stack, then the node continues to read the indicator label after reading the top label; it is also possible to use the method of directly carrying the indicator label on the bottom structure of the stack, and the node directly goes to the position of the bottom structure of the stack to confirm whether There is an indicator label; the method similar to the entropy label indicator label in RFC8662 can also be used, the storage location of the indicator label is not fixed, and the node needs to scan the label stack to find the indicator label. Regardless of which way the indication label is carried, it only needs to indicate that the auxiliary data is carried behind the MPLS label stack, and any of the above ways can be used in combination with the method for parsing the management header in the embodiments of the present disclosure.
  • step S504 the node reads the MPLS management header after reaching the bottom structure of the stack, and acquires auxiliary data information.
  • the node if the node needs to read the auxiliary data after going to the bottom of the stack, it should go directly to the bottom of the stack and read the MPLS management header.
  • the management header contains all the auxiliary data information, at least including the data of the auxiliary data Type and offset length information.
  • the indicator label can be used to indicate whether the auxiliary data is hop-by-hop or end-to-end, but further, whether the node needs to process the auxiliary data of the stack bottom structure depends on the business requirements and what types of data the node pays attention to locally. data.
  • the node can obtain the data type information of the auxiliary data carried by reading the data type of the auxiliary data in the management header.
  • the data type concerned by the node is the data type to be processed by the target node.
  • step S506 the node jumps to corresponding auxiliary data processing. If there is a data type that the node pays attention to locally, go to S506 and directly jump to the beginning of the corresponding auxiliary data (equivalent to the starting position of the auxiliary data in the above embodiment) through the offset length information for processing. If there is no data type that the node cares about, the auxiliary data will not be processed, and the message can be forwarded according to the original process.
  • auxiliary data may change, or a node may insert or delete certain auxiliary data.
  • step S508 Once the above-mentioned changes occur in the auxiliary data of the stack bottom structure, go to step S508.
  • Step S508 modify the MPLS management header according to the processing result of the auxiliary data.
  • the node needs to modify the corresponding auxiliary data information in the MPLS management header.
  • this embodiment does not involve modification actions for multiple labels in the label stack because the management header is located behind the label stack.
  • the modification process is relatively simple. On the other hand, even if an error occurs during the modification of the management header, it will not affect the basic forwarding process based on the label stack. In addition, since the management header is located behind the label stack, no matter how the label stack changes, the content of the management header will not be affected.
  • the MPLS management header may be composed of one or more basic units, each of which contains one or more auxiliary data information, and the basic unit may be of an agreed fixed length.
  • the management header may also contain information indicating whether there are subsequent basic units.
  • the above indication information can be understood as Flag identification bit information indicating whether there is a subsequent basic unit.
  • a node parses a basic unit of the management header, it can judge whether there are other basic units after the basic unit according to the indication information.
  • Fig. 6 is a schematic diagram of the format of an MPLS management header basic unit according to an embodiment of the present disclosure. As shown in FIG. 6 , the basic unit has a fixed length. In this embodiment, a 32-bit basic unit is taken as an example to describe the format of the MPLS management header basic unit.
  • the F field represents a Flag flag
  • the subsequent S-Pointer field represents the starting offset information of the auxiliary data.
  • this field can directly carry the size of the offset of the specified unit, for example, if the specified unit is byte or bit, it can directly carry the number of bytes or bits; this field can also use draft-bryant-mpls
  • the method in -aux-data-pointer carries the length value and the corresponding unit information, for example, the length value is 10, and the unit is byte; or it carries the multiple information of an agreed length, for example, the agreed fixed length is 4 bytes, Then if the value of S-Pointer is 10, it means that the offset is 40 bytes. Regardless of the form, as long as the corresponding offset size can be obtained.
  • Fig. 7 is a schematic diagram (1) of the format of the MPLS management header according to an embodiment of the present disclosure. As shown in FIG. 7 , the embodiment in FIG. 7 is different from that in FIG. 6 in the way of indicating whether there is a follow-up basic unit through a Flag identification bit.
  • the number of basic units is carried in the management header. , when the number of parsed basic units is less than Basic-Num, it means that there are subsequent basic units; when the number of parsed basic units is equal to Basic-Num, it means that the last basic unit has been reached.
  • the storage order of the auxiliary data information in the management header and the order of the auxiliary data carried by the bottom structure of the stack may not be related in theory, but generally speaking, it can be stored in order or in reverse order. The way. If the basic unit of auxiliary data information is less than 32 bits, fill it with 0.
  • FIG. 8 is a schematic diagram (1) of the storage sequence of auxiliary data information of the MPLS management header according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic diagram (2) of a storage sequence of auxiliary data information of an MPLS management header according to an embodiment of the present disclosure.
  • FIG. 8 illustrates the way of sequential storage
  • FIG. 9 illustrates the way of reverse order storage.
  • the first data information in the management header corresponds to the last auxiliary data carried by the stack bottom structure
  • the second data information in the management header corresponds to the penultimate auxiliary data carried by the stack bottom structure, and so on.
  • Fig. 10 is a schematic diagram of an MPLS management header parsing process according to an embodiment of the present disclosure. As shown in Figure 10, the MPLS management header parsing process includes the following steps:
  • Step S1002 For the management header of this format, when the node parses the management header, it first reads the fixed length of the basic unit;
  • the fixed length in this embodiment is 32 bits.
  • Step S1004 Obtain the auxiliary data information in the basic unit, and determine whether there is a data type of the auxiliary data concerned in the auxiliary data information;
  • this node only pays attention to the data of type IOAM. If it finds that the basic unit contains the Type of IOAM when reading the basic unit, there is no need to continue parsing; if after reading the basic unit, the node concerned has not been found data type, execute step S1006;
  • Step S1006 judge whether the basic unit is followed by a subsequent basic unit according to the F field, if there is no subsequent basic unit, execute step S1008; end the analysis process, if there is a subsequent basic unit, execute step S1002;
  • Step S1008 End the parsing process.
  • auxiliary data By using the node to parse the management header, after obtaining the data type concerned by the node and the corresponding offset length, jump from the corresponding basic unit to the corresponding auxiliary data according to the offset length. Possible operations for auxiliary data are:
  • size modification operation modify the auxiliary data, and the data size changes
  • operation scenarios 1) and 2) there are corresponding operation scenarios 1) and 2).
  • operation scenarios 1) and 2) after the auxiliary data is processed, the management header remains unchanged.
  • operation scenario 3 if the auxiliary data is the last of all auxiliary data, the offset does not need to be changed; otherwise, for all auxiliary data after this auxiliary data, the management The offset of these auxiliary data must be modified in the header.
  • One possible way is to set the corresponding auxiliary data information to all 0s, and when the subsequent node reads the management header, it considers that there is no corresponding auxiliary data information for the auxiliary data information whose Type is 0, and continues to read the next auxiliary data information.
  • the information of the original EH1 in the management header is reset to 0.
  • the deleted auxiliary data is not the last one, the offset of the auxiliary data relative to the basic unit in the management header will change, and the node also needs to modify the offset length information in the management header accordingly.
  • Another possible way is to regenerate the management header according to the status of the auxiliary data processed by the node.
  • the stack bottom structure carries three auxiliary data EH1, EH2, EH3.
  • operation scenario 5 there is corresponding operation scenario 5).
  • the process of data insertion operation in operation scenario 5) is similar to the process of deleting auxiliary data in the above operation scenario 4). If a node inserts auxiliary data, it needs to be added in the management header. Add the corresponding auxiliary information. If the data offset changes due to the inserted data, modify the corresponding offset information in the management header. In order to minimize the impact of inserted data, it is recommended to insert in reverse order, that is, the inserted data is stored at the end of all auxiliary data, and the information of this data is stored at the front of the management header.
  • FIG. 14 is a schematic diagram of a message after adding auxiliary data of an MPLS management header according to an embodiment of the present disclosure. As shown in Figure 14, EH3 adds auxiliary data for nodes.
  • the management header may also adopt a non-fixed-length method, and the management header in this non-fixed-length method will be described with reference to FIG. 15 .
  • Figure 15 provides another possible form of the management header.
  • Figure 15 is a schematic diagram (2) of the format of the MPLS management header according to an embodiment of the present disclosure, as shown in Figure 15, in Figure 15, the following information is included:
  • Type Indicates that the segment data is an MPLS management header.
  • Length represents the total length of the MPLS management header.
  • EType represents the type of auxiliary data.
  • S-Pointer The starting offset of the auxiliary data, which can be the offset from the beginning of the management header to the beginning of the auxiliary data, or the offset from the beginning of the row of data in the management header to the beginning of the auxiliary data.
  • the management header may also include the total number of auxiliary data (E-NUM) and the total length of auxiliary data (ET-Length). The length does not include the management header, so that it is convenient to skip all auxiliary data and directly reach the Payload.
  • the node When the node processes the management header, it needs to obtain the total length of the management header according to the Length information, so as to search for the corresponding auxiliary data in subsequent offsets. Read the EType and ELength information sequentially until all the concerned auxiliary data information of this node is obtained or the management header is read.
  • auxiliary data ET-Length information when the data size of auxiliary data changes, or when auxiliary data is inserted, or when auxiliary data is deleted, the corresponding offset needs to be modified, and the Modify the total length of auxiliary data ET-Length information. After the auxiliary data is inserted or deleted, the total number of auxiliary data (E-NUM) information needs to be modified. In addition, if the size of the management header changes, the length information in the management header also needs to be modified.
  • the reading process of auxiliary data may include the following steps:
  • Step 1 when reading auxiliary data according to the start offset information, start from the corresponding position in the management header, offset the specified start offset information, and first find the beginning of the auxiliary data.
  • Step 2 and then obtain the length information of the auxiliary data by reading the self-length information contained in the auxiliary data.
  • Step 3 and then read the auxiliary data within the length range, this method is applicable to the auxiliary data that itself carries the length information; or for some specific types of auxiliary data, the length is a fixed value determined in advance, then from the auxiliary data At the beginning of the data, read the fixed-length value to obtain auxiliary data.
  • the management header may also include the length information of the auxiliary data, or include the end offset information, so that the length of the auxiliary data can be obtained directly or indirectly from the management header.
  • the end offset information represents the start from the management header, or from a certain position in the management header, to reach the end position of the corresponding auxiliary data, the data size that needs to be offset, according to the end offset and the start
  • the length information of the corresponding auxiliary data can be obtained by the difference between the offsets.
  • the auxiliary data is not required to carry its own length information.
  • FIG. 16 is a schematic diagram (1) of an MPLS management header carrying auxiliary data according to an embodiment of the present disclosure. As shown in FIG. 16 , FIG. 16 illustrates the situation where the termination offset is carried in the management header. The meanings of EType and S-Pointer are the same as above, and E-Pointer represents the termination offset.
  • FIG. 17 is a schematic diagram (2) of an MPLS management header carrying auxiliary data according to an embodiment of the present disclosure. As shown in FIG. 17 , FIG. 17 shows that the auxiliary data length information is carried in the management header. The meanings of EType and S-Pointer are the same as above, and E-Length represents the corresponding auxiliary data length information.
  • FIG. 18 is a schematic diagram of a label forwarding path according to an embodiment of the disclosure.
  • Figure 18 provides a label forwarding path (LSP, Label Switched Path) in the SR-MPLS network.
  • LSP Label Forwarding path
  • the IOAM information A, B, and E all need to be processed, the slice information A, E need to be processed, and only the flow identification information E needs to be paid attention to.
  • the fixed indicator position mode and SWAP mode in draft-bryant-mpls-aux-data-pointer-00 are used, that is, the indicator label is immediately after the top label, and after the node has processed the top label, peel off
  • the MPLS label will switch the position of the indication label with the next forwarding label to be processed, so that the next pending label is at the top, and forwarded to the next node according to the label.
  • FIG. 19 is a schematic diagram (1) of a node message according to an embodiment of the present disclosure.
  • the message sent by the H node is shown in Figure 19.
  • the label Indicator indicates that the bottom structure of the label stack carries auxiliary data, and SID (Segment Identifier, segment identifier) A, SID B, and SID E correspond to the SR- MPLS SIDs.
  • SID Segment Identifier, segment identifier
  • the IOAM data is 44 bytes, 4 bytes are added, and the slice data size remains unchanged.
  • the offset of the data after the IOAM has changed, and 4 bytes are added, and the management header needs to be modified accordingly.
  • FIG. 20 is a schematic diagram (2) of a node message according to an embodiment of the present disclosure.
  • FIG. 20 is a message sent by node A.
  • node A strips SID A, and exchanges (SWAP) the position of SID B with the Indicator; after the label stack, node A modifies the offset information of the slice and flow identifier in the management header.
  • SWAP exchanges
  • FIG. 21 is a schematic diagram (3) of a node message according to an embodiment of the present disclosure.
  • FIG. 21 is a message sent by Node B.
  • Node B receives the message, similarly, firstly, by reading the Indicator, it perceives that the bottom structure of the stack carries auxiliary data.
  • Node B pays attention to the slice information.
  • Node B finds the beginning of the slice data according to the offset, and performs corresponding processing.
  • the size of the slice data processed by node B remains unchanged, so there is no need to modify the management header.
  • the method according to the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is Better implementation.
  • the technical solution of the present disclosure can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to make a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) execute the methods of various embodiments of the present disclosure.
  • a device for encapsulating MPLS packets is also provided.
  • the device is configured to implement the above embodiments and preferred implementation modes, and what has been explained will not be repeated.
  • the term "module” may be a combination of software and/or hardware that realizes a predetermined function.
  • the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
  • Fig. 22 is a structural block diagram of an apparatus for encapsulating MPLS packets according to an embodiment of the present disclosure.
  • the encapsulation device of the MPLS message includes:
  • the setting module 220 is configured to set the MPLS management header in the stack bottom structure of the MPLS label stack, wherein the MPLS management header is located after the stack bottom label and before the auxiliary data, and the MPLS management header includes: the The data type and offset length information of the auxiliary data, the stack bottom structure includes: the MPLS management header and the auxiliary data.
  • the MPLS management header is introduced after the bottom label in the stack bottom structure and before the auxiliary data, and the type and offset length information of the auxiliary data in the stack bottom structure are summarized in the MPLS management header.
  • the bottom structure of the stack carries the data type that needs to be processed locally, according to the offset length information of the management header, it directly jumps to the auxiliary The starting position of the data processes the auxiliary data, which solves the technical problem that the data cannot be efficiently indicated and analyzed under the condition that multiple data are superimposed in the bottom structure of the MPLS label stack.
  • the MPLS management header includes: the length information of the auxiliary data, or the end offset information of the auxiliary data, wherein, the end offset information and the start offset information of the auxiliary data The difference is length information of the auxiliary data.
  • the MPLS management header includes: one or more fixed-length basic units, wherein each of the basic units includes: one or more auxiliary data information.
  • the situation that the auxiliary data changes includes at least one of the following: the data size of the auxiliary data changes, the auxiliary data is deleted, and new auxiliary data is inserted.
  • the MPLS management header includes: information on the number of basic units, wherein the information on the number of basic units is used to indicate the number of basic units in the MPLS management header, and the number of basic units that have been parsed If it is smaller than the information about the number of basic units, it is determined that there are still basic units in the future.
  • any basic unit in the MPLS management header includes: Flag identification bit information indicating whether there is a subsequent basic unit.
  • the device for encapsulating the above-mentioned MPLS message also includes:
  • the parsing module is configured to parse the MPLS management header after setting the MPLS management header in the MPLS data structure to determine whether the auxiliary data includes the data type to be processed by the target node; in the auxiliary data In the case of including the data type to be processed by the target node, jump to the start position of the auxiliary data according to the offset length information, where the offset length information is used to indicate the start position from the current position to the start position The size of the data whose position is to be offset.
  • the reading module is configured to read the indicator label corresponding to the bottom structure of the stack to determine whether the auxiliary data is carried in the bottom structure of the stack.
  • the detection module is configured to modify the data type and offset length information of the auxiliary data included in the MPLS management header when it is detected that the auxiliary data has changed, so that the modified data type and offset The length information corresponds to the changed auxiliary data.
  • the above-mentioned computer-readable storage medium may include but not limited to: U disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM) , mobile hard disk, magnetic disk or optical disk and other media that can store computer programs.
  • ROM read-only memory
  • RAM random access memory
  • mobile hard disk magnetic disk or optical disk and other media that can store computer programs.
  • Embodiments of the present disclosure also provide an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
  • the above-mentioned processor may be configured to execute the following steps through a computer program:
  • the electronic device may further include a transmission device and an input and output device, wherein the transmission device is connected to the processor, and the input and output device is connected to the processor.
  • each module or each step of the above-mentioned disclosure can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network composed of multiple computing devices In fact, they can be implemented in program code executable by a computing device, and thus, they can be stored in a storage device to be executed by a computing device, and in some cases, can be executed in an order different from that shown here. Or described steps, or they are fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation. As such, the present disclosure is not limited to any specific combination of hardware and software.

Landscapes

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

Abstract

本公开实施例提出了一种MPLS报文的封装方法,该方法包括:在多协议标签交换MPLS标签栈的栈底结构中设置MPLS管理头,其中,所述MPLS管理头位于栈底标签之后,辅助数据之前,所述MPLS管理头中包括:所述辅助数据的数据类型和偏移长度信息,所述栈底结构包括:所述MPLS管理头和所述辅助数据。采用上述技术方案,解决了相关技术中在MPLS标签栈的指示方式复杂度高,效率低等问题。

Description

MPLS报文的封装方法及装置、存储介质及电子装置
本公开要求于2021年8月23日提交中国专利局、申请号为202110971061.2、发明名称“MPLS报文的封装方法及装置、存储介质及电子装置”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开涉及通信领域,具体而言,涉及一种MPLS报文的封装方法及装置、存储介质及电子装置。
背景技术
MPLS(Multi-Protocol Labal Switching,多协议标签交换)技术的关键是引入了标签的概念,将IP(Internet Protocol,网际互联协议)地址映射为简单的具有固定长度的标签,用于不同的包转发和包交换技术。MPLS网络中的边缘设备接收到数据包后,分析数据包的内容,为这些数据包选择合适的标签,并利用该标签封装数据包发送到MPLS网络内。
SR(Segment Routing,分段路由)是一种基于源地址的路由转发的方法,通过在现有的MPLS网络的标签栈(SR-MPLS)中或者IPv6报文头中携带的段路由报文头(SRv6,Segment Routing IPv6,基于IPv6转发平面的段路由)中携带有一系列的指示操作(也称为段操作),以用于指示数据在网络中的路由进行传输。
对于某些MPLS/SR-MPLS网络中的业务来说,需要在MPLS的标签栈栈底携带辅助数据,如RFC5586中,定义的通用关联通道头(Generic Associated Channel Header,G-ACH),用于OAM(Operation Administration and Maintenance,运行、管理和维护)业务。G-ACH仅用于端到端的数据携带,中间节点不处理G-ACH,且无法叠加,在标签栈底的位置,需要携带一个特殊标签,说明随后携带G-ACH。
随着网络的演进和新型业务的发展,越来越多的业务要求在MPLS的标签栈之后携带数据,例如draft-li-mpls-enhanced-vpn-vtn-dd中要求在标签栈之后携带切片相关信息;draft-gandhi-mpls-ioam-sr中要求在标签栈之后携带IOAM数据;draft-stein-srtsn中,可能需要在栈底携带与报文转发时间戳相关的信息;此外,栈底还可能携带业务功能链(Service Function Chain,SFC)的元数据(Metadata)信息等。
本文中将携带在标签栈之后的,与业务相关的数据或者与转发相关的数据统称为辅助数据。
由于原有的MPLS架构已不能很好的满足需求,目前,已经存在一些解决方案。然而无论哪种方案都存在以下关键问题:
1)如何在标签栈中指示栈底携带数据。当前的解决方案,一般在栈中用一个或多个标签去指示,不管是何种标签,本公开实施例中一并称为指示标签(Indicator Label)。
2)栈底携带的辅助数据怎样高效解析。现有的解决方案主要有两种思路:
一种是类似于IPv6扩展头,为在MPLS标签栈之后携带的数据定义专用的扩展头。该类与IPv6扩展头处理类似的链式的解析方式,由于不能直接获取本节点关注的数据,报文处理效率较低,也被认为是IPv6扩展头的缺陷之一。
另一种是draft-bryant-mpls-aux-data-pointer提出的方式,在指示标签中,直接携带 信息指明该指示标签对应扩展头的相对于该标签的偏移量,如图1所示,标签的前20bit携带了标签值,利用后11bit(排除了代表标签位于栈底的S bit),其中前3bit代表了偏移量单位,后8bit填写偏移量的具体数值。此技术方案同样存在明显的缺陷:第一,一个指示标签只能对应一个栈底数据,如果栈底携带了多个数据,则需要多个指示标签一一对应,会显著增加标签栈深;第二,在栈底数据大小可变的情况下,指示标签中的偏移量也要跟随变化,对于MPLS来说,对于如IOAM等数据大小可能逐跳变化的场景,每个节点都需要相应的操作,需要重新生成标签栈,是非常大的处理代价,此外由于该方案是针对标签操作,如果在修改标签栈的过程中发生了异常或故障,导致标签的错误取值,则可能导致报文转发异常;第三,偏移量信息存放在标签栈中,容易受到标签栈变化的影响,导致方案的扩展性差,例如在故障保护快速重路由FRR(fast reroute)等场景下,如果在报文中压入一段保护路径对应的标签栈,指示标签中的偏移量大小也可能会随之变化。
针对相关技术,在MPLS辅助数据的指示方式复杂度高,数据解析效率低等问题,目前尚未提出有效的解决方案。
因此,有必要对相关技术予以改良以克服相关技术中的所述缺陷。
发明内容
本公开实施例提供了一种MPLS报文的封装方法及装置、存储介质及电子装置,以至少解决在MPLS标签栈的指示方式复杂度高,效率低等问题的问题。
根据本公开实施例的一方面,提供一种MPLS报文的封装方法,包括:在多协议标签交换MPLS标签栈的栈底结构中设置MPLS管理头,其中,所述MPLS管理头位于栈底标签之后,辅助数据之前,所述MPLS管理头中包括:所述辅助数据的数据类型和偏移长度信息,所述栈底结构包括:所述MPLS管理头和所述辅助数据。
根据本公开实施例的又一方面,还提供了一种MPLS报文的封装装置,包括:设置模块,设置为在多协议标签交换MPLS标签栈的栈底结构中设置MPLS管理头,其中,所述MPLS管理头位于栈底标签之后,辅助数据之前,所述MPLS管理头中包括:所述辅助数据的数据类型和偏移长度信息,所述栈底结构包括:所述MPLS管理头和所述辅助数据。
根据本公开实施例的又一方面,还提供了一种计算机可读的存储介质,该计算机可读的存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述MPLS报文的封装方法。
根据本公开实施例的又一方面,还提供了一种电子装置,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,上述处理器通过计算机程序执行上述MPLS报文的封装方法。
通过本公开,本公开实施例通过在栈底结构中的栈底标签之后,辅助数据之前引入MPLS管理头,并在MPLS管理头中汇总栈底结构中的辅助数据的类型和偏移长度信息,从而能够在读取辅助数据之前,获取栈底结构的辅助数据的信息,并减少在标签栈中指示的复杂度,从而令节点能够根据MPLS管理头来确定栈底结构是否携带了本地需要处理的数据类型,无需通过读取辅助数据确定栈底结构是否携带了本地需要处理的数据类型,解决了在MPLS标签栈底结构中多种数据叠加的情况下,无法高效指示和解析数据的技术问题。
附图说明
此处所说明的附图用来提供对本公开的进一步理解,构成本公开的一部分,本公开的示例性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。在附图中:
图1是相关技术中携带辅助数据偏移量的指示标签示意图;
图2是本公开实施例的MPLS报文的封装方法的计算机终端的硬件结构框图;
图3是根据本公开实施例的MPLS报文的封装方法的流程图(一);
图4是根据本公开实施例的MPLS管理头的位置示意图;
图5是根据本公开实施例的MPLS报文的封装方法的流程图(二);
图6是根据本公开实施例的MPLS管理头基本单元的格式的示意图;
图7是根据本公开实施例的MPLS管理头的格式的示意图(一);
图8是根据本公开实施例的MPLS管理头的辅助数据的信息的存放顺序示意图(一);
图9是根据本公开实施例的MPLS管理头的辅助数据的信息的存放顺序示意图(二);
图10是根据本公开实施例的MPLS管理头解析流程的示意图;
图11是根据本公开实施例的MPLS管理头的辅助数据删除后的报文示意图(一);
图12是根据本公开实施例的MPLS管理头的辅助数据删除后的报文示意图(二);
图13是根据本公开实施例的MPLS管理头的辅助数据删除后的报文示意图(三);
图14是根据本公开实施例的MPLS管理头的辅助数据新增后的报文示意图;
图15是根据本公开实施例的MPLS管理头的格式的示意图(二);
图16是根据本公开实施例的MPLS管理头携带辅助数据的示意图(一);
图17是根据本公开实施例的MPLS管理头携带辅助数据的示意图(二);
图18是根据本公开实施例的标签转发路径的示意图;
图19是根据本公开实施例的节点报文的示意图(一);
图20是根据本公开实施例的节点报文的示意图(二);
图21是根据本公开实施例的节点报文的示意图(三);
图22是根据本公开实施例的MPLS报文的封装装置的结构框图。
具体实施方式
为了使本技术领域的人员更好地理解本公开方案,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分的实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本公开保护的范围。
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
本公开实施例中所提供的方法实施例可以在计算机终端或者类似的运算装置中执行。以 运行在计算机终端上为例,图2是本公开实施例的MPLS报文的封装方法的计算机终端的硬件结构框图。如图2所示,计算机终端可以包括一个或多个(图2中仅示出一个)处理器202(处理器202可以包括但不限于微处理器(Microprocessor Unit,简称是MPU)或可编程逻辑器件(Programmable logic device,简称是PLD))和设置为存储数据的存储器204,在一个示例性实施例中,上述计算机终端还可以包括设置为通信功能的传输设备206以及输入输出设备208。本领域普通技术人员可以理解,图2所示的结构仅为示意,其并不对上述计算机终端的结构造成限定。例如,计算机终端还可包括比图2中所示更多或者更少的组件,或者具有与图2所示等同功能或比图2所示功能更多的不同的配置。
存储器204可设置为存储计算机程序,例如,应用软件的软件程序以及模块,如本公开实施例中的MPLS报文的封装方法对应的计算机程序,处理器202通过运行存储在存储器204内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器204可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器204可进一步包括相对于处理器202远程设置的存储器,这些远程存储器可以通过网络连接至计算机终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
传输装置206设置为经由一个网络接收或者发送数据。上述的网络具体实例可包括计算机终端的通信供应商提供的无线网络。在一个实例中,传输装置206包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置206可以为射频(Radio Frequency,简称为RF)模块,其设置为通过无线方式与互联网进行通讯。
图3是根据本公开实施例的MPLS报文的封装方法的流程图(一),如图3所示,该封装方法的步骤包括:
步骤S302,在多协议标签交换MPLS标签栈的栈底结构中设置MPLS管理头。
其中,所述MPLS管理头位于栈底标签之后,辅助数据之前,所述MPLS管理头中包括:所述辅助数据的数据类型和偏移长度信息,所述栈底结构包括:所述MPLS管理头和所述辅助数据。
本公开实施例通过在栈底结构中的栈底标签之后,辅助数据之前引入MPLS管理头,并在MPLS管理头中汇总栈底结构中的辅助数据的类型和偏移长度信息,从而能够在读取辅助数据之前,获取栈底结构的辅助数据的信息,并减少在标签栈中指示的复杂度,从而令节点能够根据MPLS管理头来确定栈底结构是否携带了本地需要处理的数据类型,无需通过读取辅助数据确定栈底结构是否携带了本地需要处理的数据类型,在确定栈底结构携带了本地需要处理的数据类型的情况下,根据管理头的偏移长度信息,直接跳转到辅助数据的起始位置对辅助数据进行处理,解决了在MPLS标签栈底结构中多种数据叠加的情况下,无法高效指示和解析数据的技术问题。
需要说明的是,上述步骤S302的执行主体可以是封装节点,本公开实施例对此不进行限定。
进一步地,在多协议标签交换MPLS数据结构中设置MPLS管理头之后,可选地,可以通过解析节点解析所述MPLS管理头,以确定所述辅助数据中是否包括目标节点(以下可以简称为节点)待处理的数据类型;在所述辅助数据中包括目标节点待处理的数据类型的情况下,根据所述偏移长度信息跳转到所述辅助数据的起始位置,其中,所述偏移长度信息用于指示从当前位置到所述起始位置待偏移的数据大小。
进一步地,上述步骤S302中的所述MPLS管理头包括:所述辅助数据的长度信息,或者所述辅助数据的终结偏移量信息,其中,所述终结偏移量信息和所述辅助数据的起始偏移量信息之差为所述辅助数据的长度信息。
进一步地,所述MPLS报文的封装方法还包括:在一个可选实施例中,可以通过解析节点读取所述栈底结构对应的指示标签,以确定所述栈底结构中是否携带所述辅助数据。
进一步地,所述MPLS报文的封装方法还包括:在一个可选实施例中,可以通过封装节点来执行以下方案:在检测到所述辅助数据发生变化的情况下,修改所述MPLS管理头中包括的所述辅助数据的数据类型和偏移长度信息,以使修改后的数据类型和偏移长度信息与变化后的辅助数据对应。
进一步地,所述MPLS报文的封装方法还包括:所述辅助数据发生变化的情况包括以下至少之一:所述辅助数据的数据大小发生变化、删除了所述辅助数据、插入新的辅助数据。
进一步地,上述步骤S302中的所述MPLS管理头包括:一个或多个基本单元,其中,每个所述基本单元中包括:一个或多个辅助数据信息。
进一步地,上述步骤S302中的所述MPLS管理头中的任一基本单元包括:指示后续是否还有基本单元的Flag标识位信息。
进一步地,上述步骤S302中的所述MPLS管理头中包括:基本单元个数信息,其中,所述基本单元个数信息用于指示所述MPLS管理头中基本单元的个数,在已经解析的基本单元的个数小于所述基本单元个数信息的情况下,确定后续还存在基本单元。
接下来结合以下实施例对MPLS报文的封装方法进行进一步说明。
实施例1
为了能够高效解析MPLS报文,本公开实施例发明实施例新引入一种数据结构,称为MPLS管理头(以下可以简称管理头)。图4是根据本公开实施例的MPLS管理头的位置示意图,如图4所示,管理头(即图4中的Manage Header)位于栈底(即图4中的Bottom of Stack)标签之后,所有的辅助数据(即图4中的Ancillary Data)之前。
需要说明的是,管理头用于存放辅助数据信息,辅助数据用于说明栈底结构携带的各个辅助数据的数据类型和如何读取到各辅助数据的信息。其中,在说明如何读取到各辅助数据的信息的过程中,辅助数据信息至少需要包含起始偏移量信息,起始偏移量信息即从管理头起始,或者从管理头的某个位置起始,达到对应辅助数据的起始位置,需要偏移的数据大小。
可选的,为了能够在不依赖辅助数据的格式的情况下(即辅助数据中可以不包含自身长度信息的情况),完全依靠管理头获取完整的辅助数据,管理头中还可以包含辅助数据的长度 信息,或者包含终结偏移量信息,从而可以从管理头中直接或者间接获取辅助数据的长度信息。其中,终结偏移量信息代表从管理头起始,或者从管理头中的某个位置起始,达到对应辅助数据的终结位置,所需要偏移的数据大小,根据终结偏移量信息与起始偏移量之差信息,可以获取相应的辅助数据的长度信息。
图5是根据本公开实施例的MPLS报文的封装方法的流程图(一)如图5所示,该封装方法包括:
步骤S502,节点读取指示标签,感知栈底结构携带辅助数据。由于管理头中会指明具体的数据类型,最简单的情况下,无论栈底结构携带多少数据,只需要一个指示标签说明栈底结构携带辅助数据即可,不会显著增加标签栈深。
此外,还可以在指示标签中说明栈底结构携带的数据是需要逐跳(Hop-by-hop)处理的数据还是只需要端到端(End-to-end)处理的数据,如果节点是一个路径的中间节点,而指示标签说明栈底结构携带的是端到端处理的数据,即只有此路径的终点才需要处理的数据,则中间节点不需继续到栈底结构读取数据。
本公开实施例不对指示标签的存放位置及读取方式作任何限制,例如,在一个实施例中,可以采用draft-bryant-mpls-aux-data-pointer中的方式,即指示标签的存放位置固定,紧跟在栈顶标签之后,那么节点在读取栈顶标签之后,继续读取指示标签;也可以使用直接在栈底结构携带指示标签的方式,由节点直接到栈底结构的位置确认是否有指示标签;也可以采用类似RFC8662中熵标签指示标签的方式,不固定指示标签的存放位置,节点需要扫描标签栈以寻找到指示标签。无论以上述何种方式携带指示标签,只需要在表明MPLS标签栈后携带辅助数据的情况下,上述任一种方式都可以与本公开实施例中的解析管理头的方法结合使用。
步骤S504,节点到栈底结构后读取MPLS管理头,获取辅助数据信息。根据指示标签的指示,如果节点需要到栈底结构后读取辅助数据,则直接到栈底标签之后,读取MPLS管理头,管理头中包含了所有辅助数据的信息,至少包括辅助数据的数据类型和偏移长度信息。
需要说明的是,指示标签可以用于说明辅助数据是逐跳还是端到端,但进一步的,具体该节点是否需要处理栈底结构的辅助数据取决于业务需求,以及节点本地具体关注哪些类型的数据。节点可以通过读取管理头中的辅助数据的数据类型,获取携带的辅助数据的数据类型信息。
需要说明的是,节点所关注的数据类型即为目标节点待处理的数据类型。
步骤S506,节点跳转到相应的辅助数据处理。如果有节点本地关注的数据类型,则进入到S506,通过偏移长度信息,直接跳转到相应的辅助数据的开头(相当于上述实施例中的辅助数据的起始位置),进行处理。如果没有节点关注的数据类型,则不处理辅助数据,按原有流程转发报文即可。
需要说明的是,由于辅助数据的长度信息可能会变化,或者节点可能会插入或者删除某个辅助数据。
一旦栈底结构的辅助数据发生了上述的变化,则进入步骤S508。
步骤S508,根据辅助数据的处理结果,修改MPLS管理头。相应的该节点需要修改MPLS管理头中相应的辅助数据信息。本实施例与draft-bryant-mpls-aux-data-pointer中修改MPLS标签栈相比,由于管理头位于标签栈之后,不涉及标签栈中对于多个标签的修改动作,一方面实现管理头的修改过程相对简单,另一方面即使修改管理头的过程中发生了错误,也不会影响基于标签栈的基本转发流程。此外,由于管理头位于标签栈之后,无论标签栈如何变化,都不会影响管理头的内容。
需要说明的是,本公开实施例中的报文格式图示仅为示例,并不限定报文各字段的大小。
实施例2
可以结合以下附图对本实施例中的MPLS管理头的可能格式,以及相应的管理头解析方式进行具体说明。
在一个实施例中,MPLS管理头可以由一个或者多个基本单元组成,每个基本单元中包含了一个或多个辅助数据信息,基本单元可以是约定好的固定长度,节点解析管理头时,每次读取固定长度。管理头中还可能包含是否还有后续基本单元的指示信息。
需要说明的是,上述指示信息可以理解为指示后续是否还有基本单元的Flag标识位信息。节点在解析管理头的某个基本单元时,可以根据该指示信息判断该基本单元后,是否还有其他基本单元。
图6是根据本公开实施例的MPLS管理头基本单元的格式的示意图。如图6所示,基本单元为固定长度,本实施例中以32bit的基本单元为例,对MPLS管理头基本单元的格式进行说明。
在图6中,F字段代表Flag标识位,可以通过Flag标识位的取值表明是否后续有基本单元。例如,可以定义在F=01的情况下,说明该基本单元后还跟随了基本单元;还可以定义在F=00的情况下,说明该基本单元后没有其他基本单元,也就是说该基本单元为管理头中的最后一个基本单元。
EType字段,代表的是管理头之后的一个辅助数据的类型。在EType=0时,代表没有相应的辅助数据。
随后的S-Pointer字段,代表的是该辅助数据的起始偏移量信息。在一个实施例中,该字段可以直接携带指定单位的偏移量的大小,例如,指定单位为字节或者比特,可以直接携带字节数或者比特数;该字段还可以采用draft-bryant-mpls-aux-data-pointer中的方式,携带长度数值及相应的单位信息,例如长度数值为10,单位为字节;或者携带某个约定长度的倍数信息,例如约定的固定长度为4字节,则如果S-Pointer取值为10,代表偏移量为40字节。不管何种形式,只要能够获取到相应的偏移量大小即可。
图7是根据本公开实施例的MPLS管理头的格式的示意图(一)。如图7所示,图7中的实施例与图6中通过Flag标识位来说明是否具有后续基本单元的方式不同。本实施例中在管理头中携带了基本单元的个数Basic-Num,节点解析管理头时,依然首先读取定长的基本单 元,然后将已经解析的基本单元个数与Basic-Num相比较,当已经解析的基本单元个数小于Basic-Num时,代表存在后续基本单元;当已经解析的基本单元个数等于Basic-Num时,代表已经到达最后一个基本单元。
由于管理头中直接携带了偏移量,管理头中辅助数据的信息的存放顺序与栈底结构携带的辅助数据的顺序,理论上可以没有关联,但一般来说,可以采用顺序存放或者逆序存放的方式。辅助数据信息的基本单元不足32bit的用0补齐。
结合图8和图9对上述顺序存放或者逆序存放的方式进行说明,图8是根据本公开实施例的MPLS管理头的辅助数据的信息的存放顺序示意图(一)。图9是根据本公开实施例的MPLS管理头的辅助数据的信息的存放顺序示意图(二)。图8示意了顺序存放的方式,图9示意了逆序存放的方式。管理头中的第一个数据信息对应了栈底结构携带的最后一个辅助数据,管理头中的第二个数据信息对应了栈底结构携带的倒数第二个辅助数据,以此类推。
图10是根据本公开实施例的MPLS管理头解析流程的示意图。如图10所示,MPLS管理头解析流程包括以下步骤:
步骤S1002:对于该种格式的管理头,节点解析管理头时,首先读取基本单元的固定长度;
需要说明的是,本实施例中的固定长度为32bit。
步骤S1004:获取基本单元中的辅助数据信息,确定辅助数据信息中是否有关注的辅助数据的数据类型;
例如本节点只关注IOAM类型的数据,如果在读取该基本单元时,发现基本单元中包含了类型IOAM的Type,则无需继续解析;如果在读取基本单元后,还未发现本节点关注的数据类型,则执行步骤S1006;
步骤S1006:根据F字段判断该基本单元后是否跟随有后续基本单元,如果没有后续基本单元,则执行步骤S1008;结束解析流程,如果有后续基本单元,则执行步骤S1002;
步骤S1008:结束解析流程。
通过使用节点解析管理头,获取本节点关注的数据类型和对应偏移长度后,根据偏移长度,从对应的基本单元跳转到相应的辅助数据。对于辅助数据可能的操作有:
操作1),内容读取操作:只对辅助数据内容进行读取,不对数据进行修改;
操作2),内容修改操作:对辅助数据的内容进行修改,但不改变数据大小;
操作3),大小修改操作:对辅助数据进行修改,数据大小发生变化;
操作4),数据删除操作:删除辅助数据;
操作5),数据插入操作:插入新的辅助数据;
针对上述操作1)和操作2),对应有操作场景1)和操作场景2),在操作场景1)和操作场景2)下,辅助数据处理完毕之后,管理头没有变化。
针对上述操作3),对应有操作场景3),在操作场景3)下,如果辅助数据为所有辅助数据中的最后一个,偏移量无需变化,否则对于该辅助数据之后的所有辅助数据,管理头中都要对这些辅助数据的偏移量进行修改。
针对上述操作4),对应有操作场景4),在操作场景4)下,在删除辅助数据后,需要删除管理头中相应的辅助数据信息。
一种可能的方式是,将相应的辅助数据信息置为全0,后续节点读取管理头时,对于Type为0的辅助数据信息,认为无对应辅助数据,继续读取下一个辅助数据信息。
接下来对删除辅助数据的报文进行进一步说明。
如图11所示,如果删除了辅助数据EH1,则管理头中将原有的EH1的信息重置为0。相应的,如果删除的辅助数据不是最后一个,则辅助数据相对于管理头中基本单元的偏移量会发生变化,节点也需要对管理头中的偏移长度信息进行相应的修改。
另一种可能的方式是,根据节点处理之后的辅助数据情况,重新生成管理头。
如图12所示,节点收到报文时,栈底结构携带了三个辅助数据EH1,EH2,EH3。
节点删除EH2后,重新生成管理头,如图13所示。
针对上述操作5),对应有操作场景5),操作场景5)的数据插入操作的过程与上述操作场景4)中的删除辅助数据的过程类似,如果节点插入辅助数据,需要在管理头中新增相应的辅助信息,如果数据偏移量因插入数据发生变化,则修改管理头中相应的偏移信息。为了使插入数据的影响最小,推荐采用逆序插入的方式,即插入的数据存放在所有辅助数据的最后,该数据的信息存放在管理头的最前。
可以结合图14理解节点插入辅助数据后的报文。图14是根据本公开实施例的MPLS管理头的辅助数据新增后的报文示意图。如图14所示,EH3为节点新增辅助数据。
管理头还可能采用非定长的方式,结合图15对这种非定长方式下的管理头进行说明。
图15提供了管理头的另一种可能形式。图15是根据本公开实施例的MPLS管理头的格式的示意图(二),如图15所示,在图15中,包括以下信息:
Type:说明该段数据为MPLS管理头。
Length:代表MPLS管理头总长度。
EType:代表辅助数据的类型。
S-Pointer:该辅助数据的起始偏移量,可以是从管理头开始到辅助数据开头的偏移量,也可以是从管理头该行数据开头算起到辅助数据开头的偏移量。
可选的,管理头还可以包含辅助数据总个数(E-NUM)和辅助数据总长度(ET-Length)信息,该长度不包含管理头,方便跳过所有辅助直接到达Payload。
节点处理管理头时,需要根据Length信息获取管理头总长度,以便后续进行偏移寻找相应的辅助数据。依次读取EType和ELength信息,直至获取本节点所有关注的辅助数据信息 或读取完毕管理头。
与前一种管理头类似,在辅助数据的数据大小发生变化的情况下,或者在插入辅助数据的情况下,或者在删除辅助数据的情况下,需要对相应的偏移量进行修改,还需要修改辅助数据总长度ET-Length信息。在插入辅助数据或者删除辅助数据后需修改辅助数据总个数(E-NUM)信息,此外如果管理头的大小发生变化,还需要修改管理头中的总长Length信息。
在一个实施例中,辅助数据的读取过程可以包括以下步骤:
步骤1,根据起始偏移量信息读取辅助数据时,从管理头中的相应位置开始,偏移指定的起始偏移量信息,首先找到辅助数据的开头。
步骤2,然后通过读取辅助数据中包含的自身长度信息,获取辅助数据的长度信息。
步骤3,然后在该长度范围内读取辅助数据,该种方式适用于自身携带了长度信息的辅助数据;或者对于某些特定类型的辅助数据,长度是事先确定的一个固定值,则从辅助数据开头,读取固定长度值,获取辅助数据。
除了携带起始偏移量外,管理头还可以包含辅助数据的长度信息,或者包含终结偏移量信息,使得可以从管理头中直接或者间接获取辅助数据长度。其中,终结偏移量信息代表从从管理头起始,或者从管理头中的某个位置起始,达到对应辅助数据的终结位置,需要偏移的数据大小,根据终结偏移量与起始偏移量之差,可以获取相应的辅助数据的长度信息。此时,对辅助数据不要求携带自身长度信息。
图16是根据本公开实施例的MPLS管理头携带辅助数据的示意图(一)。如图16所示,图16示意了在管理头中携带终结偏移量的情况。EType与S-Pointer的含义与前文相同,E-Pointer代表终结偏移量。
图17是根据本公开实施例的MPLS管理头携带辅助数据的示意图(二)。如图17所示,图17示意了在管理头中携带辅助数据长度信息。EType与S-Pointer的含义与前文相同,E-Length代表对应的辅助数据长度信息。
实施例3
图18是根据本公开实施例的标签转发路径的示意图。如图18所示,图18提供了一条SR-MPLS网络中的标签转发路径(LSP,Label Switched Path)。其中IOAM信息A、B、E都需要处理,切片信息A、E需要处理,流标识信息只有E需要关注。
本实施例中采用的是draft-bryant-mpls-aux-data-pointer-00中的固定指示标签位置方式和SWAP模式,即指示标签紧跟在最顶层标签之后,节点处理完毕顶层标签之后,剥离MPLS标签,将指示标签与下个待处理的转发标签交换位置,使下一个待处理标签位于最顶层,按该标签转发到下一个节点。
图19是根据本公开实施例的节点报文的示意图(一)。H节点发出的报文如图19所示,标签Indicator指示标签栈底结构携带了辅助数据,SID(Segment Identifier,段标识)A、SID B、SID E分别对应A、B、E节点的SR-MPLS SID。
报文到达节点A后,节点A通过读取Indicator,感知栈底结构携带了辅助数据,根据 本地配置,节点A关注的IOAM信息和切片信息。节点A首先到栈底结构读取管理头的第一个基本单元,即前32比特,获取到栈底结构携带了IOAM和切片数据及其偏移量信息。由于A已经获取本节点关注的数据信息,虽然基本单元中的F=1,也不再继续读取管理头。节点A根据偏移量,分别找到IOAM和切片数据的开头,进行相应的处理。
数据处理完毕后,IOAM数据为44字节,增加了4字节,切片数据大小不变。相应的,IOAM之后的数据的偏移量发生了变化,均新增4字节,管理头中的需要进行相应的修改。
图20是根据本公开实施例的节点报文的示意图(二)。如图20所示,图20为节点A发出的报文。在标签栈中,节点A剥去SID A,将SID B的位置与Indicator交换(SWAP);标签栈后,节点A修改管理头中的切片和流标识的偏移量信息。
图21是根据本公开实施例的节点报文的示意图(三)。如图21所示,图21为节点B发出的报文。节点B收到报文后,类似的,首先通过读取Indicator,感知栈底结构携带了辅助数据,根据本地配置,节点B关注切片信息。节点B首先到栈底结构读取管理头的第一个基本单元,即前32比特,获取到栈底结构携带了切片数据及其偏移量信息。由于B已经获取本节点关注的数据信息,虽然基本单元中的F=1,也不再继续读取管理头。节点B根据偏移量,找到切片数据的开头,进行相应的处理。
节点B处理之后的切片数据大小不变,因此不需修改管理头。
节点E收到报文后,通过读取Indicator感知栈底结构携带了数据,根据本地业务配置,IOAM、切片、流信息都需要处理,则通过到栈底结构读取管理头的第一个基本单元,即前32比特,获取到栈底结构携带了IOAM和切片数据及其偏移量信息。由于还未获取到全部本节点关注的数据信息,且基本单元中的F=1,则继续读取管理头的下一个基本单元,获取流标识数据信息。节点E根据偏移量,分别找到相应辅助数据的开头进行处理。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本公开各个实施例的方法。
在本实施例中还提供了MPLS报文的封装装置,该装置设置为实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的设备较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图22是根据本公开实施例的MPLS报文的封装装置的结构框图。如图22所示,MPLS报文的封装装置包括:
设置模块220,设置为在多协议标签交换MPLS标签栈的栈底结构中设置MPLS管理头,其中,所述MPLS管理头位于栈底标签之后,辅助数据之前,所述MPLS管理头中包括:所述辅助数据的数据类型和偏移长度信息,所述栈底结构包括:所述MPLS管理头和所述辅助数据。
本公开实施例通过在栈底结构中的栈底标签之后,辅助数据之前引入MPLS管理头,并在 MPLS管理头中汇总栈底结构中的辅助数据的类型和偏移长度信息,从而能够在读取辅助数据之前,获取栈底结构的辅助数据的信息,并减少在标签栈中指示的复杂度,从而令节点能够根据MPLS管理头来确定栈底结构是否携带了本地需要处理的数据类型,无需通过读取辅助数据确定栈底结构是否携带了本地需要处理的数据类型,在确定栈底结构携带了本地需要处理的数据类型的情况下,根据管理头的偏移长度信息,直接跳转到辅助数据的起始位置对辅助数据进行处理,解决了在MPLS标签栈底结构中多种数据叠加的情况下,无法高效指示和解析数据的技术问题。
进一步地,MPLS管理头包括:所述辅助数据的长度信息,或者所述辅助数据的终结偏移量信息,其中,所述终结偏移量信息和所述辅助数据的起始偏移量信息之差为所述辅助数据的长度信息。
进一步地,所述MPLS管理头包括:一个或多个固定长度的基本单元,其中,每个所述基本单元中包括:一个或多个辅助数据信息。
进一步地,所述辅助数据发生变化的情况包括以下至少之一:所述辅助数据的数据大小发生变化、删除了所述辅助数据、插入新的辅助数据。
进一步地,所述MPLS管理头中包括:基本单元个数信息,其中,所述基本单元个数信息用于指示所述MPLS管理头中基本单元的个数,在已经解析的基本单元的个数小于所述基本单元个数信息的情况下,确定后续还存在基本单元。
进一步地,所述MPLS管理头中的任一基本单元包括:指示后续是否还有基本单元的Flag标识位信息。
进一步地,上述MPLS报文的封装装置还包括:
解析模块,设置为在多协议标签交换MPLS数据结构中设置MPLS管理头之后,解析所述MPLS管理头,以确定所述辅助数据中是否包括目标节点待处理的数据类型;在所述辅助数据中包括目标节点待处理的数据类型的情况下,根据所述偏移长度信息跳转到所述辅助数据的起始位置,其中,所述偏移长度信息用于指示从当前位置到所述起始位置待偏移的数据大小。
读取模块,设置为读取所述栈底结构对应的指示标签,以确定所述栈底结构中是否携带所述辅助数据。
检测模块,设置为在检测到所述辅助数据发生变化的情况下,修改所述MPLS管理头中包括的所述辅助数据的数据类型和偏移长度信息,以使修改后的数据类型和偏移长度信息与变化后的辅助数据对应。
在一个示例性实施例中,上述计算机可读存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。
本实施例中的具体示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。
本公开的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:
S1,在多协议标签交换MPLS标签栈的栈底结构中设置MPLS管理头,其中,所述MPLS管理头位于栈底标签之后,辅助数据之前,所述MPLS管理头中包括:所述辅助数据的数据类型 和偏移长度信息,所述栈底结构包括:所述MPLS管理头和所述辅助数据。
在一个示例性实施例中,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。
本实施例中的具体示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。
显然,本领域的技术人员应该明白,上述的本公开的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本公开不限制于任何特定的硬件和软件结合。
以上所述仅为本公开的优选实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。

Claims (12)

  1. 一种MPLS报文的封装方法,包括:
    在多协议标签交换MPLS标签栈的栈底结构中设置MPLS管理头,其中,所述MPLS管理头位于栈底标签之后,辅助数据之前,所述MPLS管理头中包括:所述辅助数据的数据类型和偏移长度信息,所述栈底结构包括:所述MPLS管理头和所述辅助数据。
  2. 根据权利要求1所述的MPLS报文的封装方法,其中,在多协议标签交换MPLS数据结构中设置MPLS管理头之后,所述方法还包括:
    解析所述MPLS管理头,以确定所述辅助数据中是否包括目标节点待处理的数据类型;
    在所述辅助数据中包括目标节点待处理的数据类型的情况下,根据所述偏移长度信息跳转到所述辅助数据的起始位置,其中,所述偏移长度信息用于指示从当前位置到所述起始位置待偏移的数据大小。
  3. 根据权利要求2所述的MPLS报文的封装方法,其中,所述方法还包括:
    所述MPLS管理头包括:所述辅助数据的长度信息,或者所述辅助数据的终结偏移量信息,其中,所述终结偏移量信息和所述辅助数据的起始偏移量信息之差为所述辅助数据的长度信息。
  4. 根据权利要求1所述的MPLS报文的封装方法,其中,所述方法还包括:
    读取所述栈底结构对应的指示标签,以确定所述栈底结构中是否携带所述辅助数据。
  5. 根据权利要求3所述的MPLS报文的封装方法,其中,所述方法还包括:
    在检测到所述辅助数据发生变化的情况下,修改所述MPLS管理头中包括的所述辅助数据的数据类型和偏移长度信息,以使修改后的数据类型和偏移长度信息与变化后的辅助数据对应。
  6. 根据权利要求5所述的MPLS报文的封装方法,其中,所述方法还包括:
    所述辅助数据发生变化的情况包括以下至少之一:所述辅助数据的数据大小发生变化、删除了所述辅助数据、插入新的辅助数据。
  7. 根据权利要求1所述的MPLS报文的封装方法,其中,所述方法还包括:
    所述MPLS管理头包括:一个或多个基本单元,其中,每个所述基本单元中包括:一个或多个辅助数据信息。
  8. 根据权利要求7所述的MPLS报文的封装方法,其中,所述方法还包括:
    所述MPLS管理头中的任一基本单元包括:指示后续是否还有基本单元的Flag标识位信息。
  9. 根据权利要求7所述的MPLS报文的封装方法,其中,所述方法还包括:
    所述MPLS管理头中包括:基本单元个数信息,其中,所述基本单元个数信息用于指示所 述MPLS管理头中基本单元的个数,在已经解析的基本单元的个数小于所述基本单元个数信息的情况下,确定后续还存在基本单元。
  10. 一种MPLS报文的封装装置,包括:
    设置模块,设置为在多协议标签交换MPLS标签栈的栈底结构中设置MPLS管理头,其中,所述MPLS管理头位于栈底标签之后,辅助数据之前,所述MPLS管理头中包括:所述辅助数据的数据类型和偏移长度信息,所述栈底结构包括:所述MPLS管理头和所述辅助数据。
  11. 一种计算机可读的存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行所述权利要求1至9任一项中所述的方法。
  12. 一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为通过所述计算机程序执行所述权利要求1至9任一项中所述的方法。
PCT/CN2022/106042 2021-08-23 2022-07-15 Mpls报文的封装方法及装置、存储介质及电子装置 WO2023024755A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110971061.2A CN115720210A (zh) 2021-08-23 2021-08-23 Mpls报文的封装方法及装置、存储介质及电子装置
CN202110971061.2 2021-08-23

Publications (1)

Publication Number Publication Date
WO2023024755A1 true WO2023024755A1 (zh) 2023-03-02

Family

ID=85253354

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/106042 WO2023024755A1 (zh) 2021-08-23 2022-07-15 Mpls报文的封装方法及装置、存储介质及电子装置

Country Status (2)

Country Link
CN (1) CN115720210A (zh)
WO (1) WO2023024755A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100040061A1 (en) * 2007-03-14 2010-02-18 Mcguire Alan Mpls transport network scheme
CN108111416A (zh) * 2017-12-15 2018-06-01 盛科网络(苏州)有限公司 直接识别mpls内部封装报文的方法
CN108737269A (zh) * 2017-04-13 2018-11-02 中兴通讯股份有限公司 一种封装方法、装置和节点
US20200358698A1 (en) * 2018-09-05 2020-11-12 Huawei Technologies Co., Ltd. Segment routing in mpls network
US20210119914A1 (en) * 2018-06-28 2021-04-22 Huawei Technologies Co., Ltd. Device, method and system for sending or receiving packets including control information

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100040061A1 (en) * 2007-03-14 2010-02-18 Mcguire Alan Mpls transport network scheme
CN108737269A (zh) * 2017-04-13 2018-11-02 中兴通讯股份有限公司 一种封装方法、装置和节点
CN108111416A (zh) * 2017-12-15 2018-06-01 盛科网络(苏州)有限公司 直接识别mpls内部封装报文的方法
US20210119914A1 (en) * 2018-06-28 2021-04-22 Huawei Technologies Co., Ltd. Device, method and system for sending or receiving packets including control information
US20200358698A1 (en) * 2018-09-05 2020-11-12 Huawei Technologies Co., Ltd. Segment routing in mpls network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
G. MIRSKY ZTE CORP.: "BFD for Multipoint Networks over Point-to-Multi-Point MPLS LSP; draft-mirsky-mpls-p2mp-bfd-04.txt", BFD FOR MULTIPOINT NETWORKS OVER POINT-TO-MULTI-POINT MPLS LSP; DRAFT-MIRSKY-MPLS-P2MP-BFD-04.TXT; INTERNET-DRAFT: MPLS WORKING GROUP, INTERNET ENGINEERING TASK FORCE, IETF; STANDARDWORKINGDRAFT, INTERNET SOCIETY (ISOC) 4, RUE DES FALAISES CH- 1205 G, no. 04, 12 October 2018 (2018-10-12), Internet Society (ISOC) 4, rue des Falaises CH- 1205 Geneva, Switzerland , pages 1 - 6, XP015128975 *

Also Published As

Publication number Publication date
CN115720210A (zh) 2023-02-28

Similar Documents

Publication Publication Date Title
US11979322B2 (en) Method and apparatus for providing service for traffic flow
US7899048B1 (en) Method and apparatus for remotely monitoring network traffic through a generic network
US8374164B2 (en) Detection of specific BFD path failures
US7447221B2 (en) Communication apparatus
CN113839871A (zh) 一种报文转发的方法及网络设备
CN108964943B (zh) 一种实现ioam封装的方法及装置
CN112511988B (zh) 报文转发方法、设备、系统、网络设备和存储介质
CN107370654B (zh) 一种伪线数据报文的封装、解封装方法和相关装置
EP4044529A1 (en) Detnet data packet processing method and apparatus
US20230327983A1 (en) Performance measurement in a segment routing network
US20230254246A1 (en) Mechanisms for packet path tracing and per-hop delay measurement in segment routing with multiprotocol label switching (sr-mpls) networks
WO2023024755A1 (zh) Mpls报文的封装方法及装置、存储介质及电子装置
CN111277426B (zh) 一种ioam信息的处理方法和装置
CN110224916B (zh) 报文的处理方法、装置及报文的封装方法、装置和系统
CN111327445A (zh) 报文采样方法及解封装方法、节点、系统及存储介质
CN107995113B (zh) 路径建立方法及装置
WO2023093227A1 (zh) 信息的收集方法、装置、存储介质及电子装置
WO2023125563A1 (zh) 路由信息的编辑方法、装置、存储介质及电子装置
WO2022267875A1 (zh) 一种报文传输的方法及相关设备
EP4340319A1 (en) Forwarding method, forwarding system, electronic device and computer-readable storage medium
WO2024108985A1 (zh) 一种随流检测方法、电子设备和存储介质
WO2023173853A1 (zh) Bgp路由的发送方法、装置、存储介质及电子装置
WO2024045537A1 (zh) 报文传输的方法和网络设备
WO2023165244A1 (zh) 报文的发送方法、装置、存储介质及电子装置
US20240163208A1 (en) Packet processing method and apparatus, and storage medium and electronic apparatus

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: 22860101

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022860101

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2022860101

Country of ref document: EP

Effective date: 20240325