Message processing method, device, electronic device and storage medium

By generating a label bitmap and searching the MPLS label forwarding table in parallel, the problem of time-consuming search in MPLS message processing is solved, and processing performance is improved.

CN119520389BActive Publication Date: 2025-10-03NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411493210.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-10-03
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

In MPLS packet processing, the MPLS label forwarding table is searched serially, which results in a long search time and affects processing performance.

Method used

Generate a label bitmap, use a parallel approach to search the preset MPLS label forwarding table, search for the target MPLS label corresponding to the bit with a value of 1 in the label bitmap, and process the search results with next-hop forwarding operations in sequence.

Benefits of technology

Parallel search shortens the processing time of MPLS packets and improves processing performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520389B_ABST
    Figure CN119520389B_ABST
Patent Text Reader

Abstract

The present application provides a message processing method, device, electronic device, and storage medium. The method is applied to a network device and includes: after receiving an MPLS message carrying an MPLS label stack including multiple MPLS labels, generating a label bitmap based on the multiple MPLS labels and a preset generation rule; for the target MPLS label corresponding to the bit with a value of 1 in the label bitmap, searching a preset MPLS label forwarding table in parallel to obtain a search result corresponding to the target MPLS label; if the search result corresponding to the target MPLS label contains a target search result indicating a next-hop forwarding operation, and the target search result is not the first search result, processing the MPLS message in sequence based on the search result located before the target search result and the target search result. The present application can improve the processing performance of MPLS messages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a message processing method, device, electronic device and storage medium. Background Art

[0002] In a network using Multiprotocol Label Switching (MPLS) technology, after receiving an MPLS packet, if the MPLS label stack carried in the MPLS packet includes multiple MPLS labels, the network device needs to search the preset MPLS label forwarding table layer by layer until the search result indicates a next-hop forwarding operation, and then perform relevant forwarding processing on the MPLS packet; or until all MPLS labels are searched but the search results do not indicate a next-hop forwarding operation, and then forward the MPLS packet according to the preset routing table.

[0003] In the above-mentioned MPLS message processing flow, since the MPLS label forwarding table is searched in a serial manner, the search takes a long time, which affects the processing performance of the MPLS message. Summary of the Invention

[0004] In order to overcome the problems existing in the related art, the present application provides a message processing method, device, electronic device and storage medium.

[0005] According to a first aspect of an embodiment of the present application, a message processing method is provided, the method being applied to a network device, the method comprising:

[0006] After receiving an MPLS packet carrying an MPLS label stack including multiple MPLS labels, generating a label bitmap based on the multiple MPLS labels and a preset generation rule, wherein the label bitmap includes bits corresponding to each layer of the MPLS labels;

[0007] For the target MPLS label corresponding to the bit with a value of 1 in the label bitmap, searching the preset MPLS label forwarding table in parallel to obtain a search result corresponding to the target MPLS label, wherein the target MPLS label is the MPLS label for which the preset MPLS label forwarding table needs to be searched;

[0008] If there is a target search result indicating a next-hop forwarding operation in the search result corresponding to the target MPLS label, and the target search result is not the first search result, the MPLS message is processed in sequence according to the search result located before the target search result and the target search result.

[0009] According to a second aspect of an embodiment of the present application, a message processing apparatus is provided, the apparatus being applied to a network device, the apparatus comprising:

[0010] a message parsing module configured to, upon receiving an MPLS message carrying an MPLS label stack including multiple MPLS labels, generate a label bitmap based on the multiple MPLS labels and a preset generation rule, wherein the label bitmap includes bits corresponding to each layer of the MPLS labels;

[0011] a forwarding module configured to search a preset MPLS label forwarding table in parallel for a target MPLS label corresponding to a bit with a value of 1 in the label bitmap, and obtain a search result corresponding to the target MPLS label, wherein the target MPLS label is an MPLS label for which the preset MPLS label forwarding table needs to be searched; and

[0012] If there is a target search result indicating a next-hop forwarding operation in the search result corresponding to the target MPLS label, and the target search result is not the first search result, the MPLS message is processed in sequence according to the search result located before the target search result and the target search result.

[0013] According to the third aspect of an embodiment of the present application, an electronic device is provided, comprising a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to implement the method steps of the above-mentioned message processing method.

[0014] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps of the above-mentioned message processing method are implemented.

[0015] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:

[0016] In an embodiment of the present application, after receiving an MPLS message carrying an MPLS label stack including multiple layers of MPLS labels, the network device no longer searches the preset MPLS forwarding table in the existing manner, but first generates a label bit map based on the multiple layers of MPLS labels and the preset generation rules; then, for the target MPLS label corresponding to the bit with a value of 1 in the label bit map, the preset MPLS label forwarding table is searched in parallel to obtain the search result corresponding to the target MPLS label; finally, when there is a target search result indicating a next-hop forwarding operation in the search result corresponding to the target MPLS label, and the target search result is not the first search result, the MPLS message is processed in sequence according to the search result located before the target search result and the target search result.

[0017] In this way, the network device can use the label bitmap to search the preset MPLS label forwarding table in parallel, which can shorten the search time and thus improve the processing performance of MPLS packets.

[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0020] Figure 1 One of the flow diagrams of a message processing method provided in an embodiment of the present application;

[0021] Figure 2 A second flow chart of a message processing method provided in an embodiment of the present application;

[0022] Figure 3 A schematic diagram of the structure of a message processing device provided in an embodiment of the present application;

[0023] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0024] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0025] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0026] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words "if" or "if" as used herein may be interpreted as "when" or "when".

[0027] Next, the embodiments of the present application are described in detail.

[0028] The present application provides a method for processing a message, which is applied to a network device, such as Figure 1 As shown, the method may include the following steps:

[0029] S11 . After receiving an MPLS message carrying an MPLS label stack including multiple MPLS labels, generate a label bitmap according to the multiple MPLS labels and a preset generation rule.

[0030] In this step, the label bitmap includes bits corresponding to each layer of MPLS label.

[0031] S12: For the target MPLS label corresponding to the bit with a value of 1 in the label bitmap, a preset MPLS label forwarding table is searched in parallel to obtain a search result corresponding to the target MPLS label.

[0032] In this step, the target MPLS label is the MPLS label for which a preset MPLS label forwarding table needs to be searched.

[0033] S13. If there is a target search result indicating a next-hop forwarding operation in the search result corresponding to the target MPLS label, and the target search result is not the first search result, the MPLS message is processed sequentially according to the search result preceding the target search result and the target search result.

[0034] In this step, when the network device executes the steps of processing the MPLS message according to the search result located in front of the target search result and the target search result in sequence, it actually processes the MPLS message according to the processing operation indicated by the search result located in front of the target search result and the next hop forwarding operation indicated by the target search result in sequence.

[0035] Specifically, in the above step S11, the network device may generate a label bitmap in the following manner:

[0036] For a first layer of MPLS labels in the multi-layer MPLS labels, determining whether the first layer of MPLS labels is a special label, wherein the special label is an MPLS label that does not require searching a preset MPLS forwarding table;

[0037] If the result of the determination is negative, the bit corresponding to the first-layer MPLS label in the current label bitmap is set to 1, the next-layer MPLS label is used as the first-layer MPLS label, and the step of determining whether the first-layer MPLS label is a special label is repeated until the next-layer MPLS label becomes the last MPLS label in the multi-layer MPLS label system.

[0038] If the result is yes, the bit corresponding to the first MPLS label in the current label bitmap is set to 0.

[0039] Continue to determine whether the first layer MPLS label is a guide label;

[0040] If the judgment result is yes, then the value of the bit corresponding to the set number of MPLS labels corresponding to the first layer of MPLS label in the current label bit map is set to 0, and the next layer of MPLS label corresponding to the last layer of MPLS label in the set number of MPLS labels is used as the first layer of MPLS label, and the step of determining whether the first layer of MPLS label is a special label is performed until the next layer of MPLS label is the last layer of MPLS labels in the multi-layer MPLS label.

[0041] If the result of the determination is negative, the next MPLS label is used as the first MPLS label, and the step of determining whether the first MPLS label is a special label is repeated until the next MPLS label becomes the last MPLS label in the multi-layer MPLS label system.

[0042] Initially, the content of the label bitmap is empty.

[0043] It should be noted that in the embodiment of the present application, once the MPLS label stack includes a guide label, it means that the guide label is followed by the set number of MPLS labels indicated by the guide label. These layers of MPLS labels are used to represent service information and there is no need to search the preset MPLS label forwarding table.

[0044] That is, if there is a bit with a value of 0 in the label bitmap generated by the network device, it means that the MPLS label corresponding to the bit with a value of 0 is an MPLS label that does not require searching the preset MPLS label forwarding table.

[0045] It should be further explained that, in the embodiment of the present application, the network device may also generate a label bit map in other ways, which are not listed here one by one.

[0046] Furthermore, in the embodiment of the present application, the network device may further perform the following operations:

[0047] If the target search result exists in the search results corresponding to the target MPLS label, and the target search result is the first search result, the MPLS message is processed according to the target search result.

[0048] In this operation flow, when the network device executes the step of processing the MPLS message according to the target search result, it actually processes the MPLS message according to the next hop forwarding operation indicated by the target search result.

[0049] Furthermore, in the embodiment of the present application, the network device may further perform the following operations:

[0050] If the target search result does not exist in the search result corresponding to the target MPLS label, the MPLS message is processed according to the preset routing table.

[0051] It should be noted that, in the embodiment of the present application, the specific processing process of the network device processing the MPLS message according to the preset routing table is the existing technology and will not be described in detail here.

[0052] The above message processing method is described in detail below with reference to specific embodiments.

[0053] Assume that in a network using MPLS technology, network device 1 receives MPLS packet 1 at time 1, and assume that MPLS packet 1 carries an MPLS label stack including four layers of MPLS labels.

[0054] The second-layer MPLS label is both a special label and a guide label, and is followed by an MPLS label. That is, both the second-layer MPLS label and the third-layer MPLS label are MPLS labels that do not require a lookup in a preset MPLS label forwarding table.

[0055] In this case, for the first layer MPLS label among the four layers of MPLS labels, the network device 1 determines whether the first layer MPLS label is a special label.

[0056] Since the first layer MPLS label is not a special label, the judgment result is no. At this time, the network device 1 sets the value of the bit corresponding to the first layer MPLS label in the initially empty label bitmap (LABEL BITMAP) to 1, for example, b'1.

[0057] For the second layer MPLS label among the four layers of MPLS labels, the network device 1 determines whether the second layer MPLS label is a special label.

[0058] Since the second-layer MPLS label is a special label, the judgment result is yes. At this time, the value of the bit corresponding to the second-layer MPLS label in the current label bitmap is set to 0, for example, b'10.

[0059] Afterwards, network device 1 continues to determine whether the second layer MPLS label is a guide label.

[0060] Since the second-layer MPLS label is a guiding label, the judgment result is yes. At this time, the value of the bit corresponding to the second-layer MPLS label (i.e., the third-layer MPLS label) corresponding to the second-layer MPLS label is set to 0 after the value of the bit corresponding to the second-layer MPLS label in the current label bit map, for example, b'100.

[0061] For the fourth layer MPLS label among the four layers of MPLS labels, the network device 1 determines whether the fourth layer MPLS label is a special label.

[0062] Since the fourth layer MPLS label is not a special label, the judgment result is no. At this time, the network device 1 sets the value of the bit corresponding to the fourth layer MPLS label in the current label bit map to 1, for example, the example is b'1001 (such as Figure 2 As shown), that is, the label bit map corresponding to the four-layer MPLS label is b'1001.

[0063] Next, for the target MPLS labels corresponding to the bits with a value of 1 in the label bitmap (i.e., the first layer MPLS label and the fourth layer MPLS label), network device 1 searches the preset MPLS label forwarding table in parallel to obtain the search results corresponding to the first layer MPLS label and the fourth layer MPLS label.

[0064] Assuming that the search result corresponding to the fourth-layer MPLS label indicates a next-hop forwarding operation, then the network device 1 determines that there is a search result indicating a next-hop forwarding operation among the search results corresponding to the first-layer MPLS label and the fourth-layer MPLS label, and this search result is not the first search result. In this case, the network device 1 processes the MPLS message 1 according to the search result corresponding to the first-layer MPLS label and the search result corresponding to the fourth-layer MPLS label in turn.

[0065] Specifically, network device 1 processes MPLS message 1 according to the processing operation indicated by the search result corresponding to the first-layer MPLS label (for example, deleting the first-layer MPLS label) to obtain MPLS message 2; network device 1 processes MPLS message 2 according to the next-hop forwarding operation indicated by the search result corresponding to the fourth-layer MPLS label.

[0066] It can be seen from the above technical solution that in the embodiment of the present application, after receiving an MPLS message carrying an MPLS label stack including multiple layers of MPLS labels, the network device no longer searches the preset MPLS forwarding table in the existing manner, but first generates a label bit map based on the multiple layers of MPLS labels and the preset generation rules; then, for the target MPLS label corresponding to the bit with a value of 1 in the label bit map, the preset MPLS label forwarding table is searched in parallel to obtain the search result corresponding to the target MPLS label; finally, when there is a target search result indicating a next-hop forwarding operation in the search result corresponding to the target MPLS label, and the target search result is not the first search result, the MPLS message is processed in sequence according to the search result located before the target search result and the target search result.

[0067] In this way, the network device can use the label bitmap to search the preset MPLS label forwarding table in parallel, which can shorten the search time and thus improve the processing performance of MPLS packets.

[0068] Based on the same inventive concept, the present application also provides a message processing device, which is applied to a network device, and its structural diagram is shown as follows: Figure 3 As shown, specifically including:

[0069] a message parsing module 31 configured to, upon receiving an MPLS message carrying an MPLS label stack including multiple MPLS labels, generate a label bitmap based on the multiple MPLS labels and a preset generation rule, wherein the label bitmap includes bits corresponding to each layer of the MPLS labels;

[0070] a forwarding module 32 configured to concurrently search a preset MPLS label forwarding table for a target MPLS label corresponding to a bit with a value of 1 in the label bitmap, and obtain a search result corresponding to the target MPLS label, wherein the target MPLS label is an MPLS label for which the preset MPLS label forwarding table needs to be searched; and

[0071] If there is a target search result indicating a next-hop forwarding operation in the search result corresponding to the target MPLS label, and the target search result is not the first search result, the MPLS message is processed in sequence according to the search result located before the target search result and the target search result.

[0072] Preferably, the message parsing module 31 is specifically used to:

[0073] determining, for a first layer of MPLS labels in the multi-layer MPLS labels, whether the first layer of MPLS labels is a special label, wherein the special label is an MPLS label that does not require searching the preset MPLS forwarding table;

[0074] If the result of the determination is negative, setting the value of the bit corresponding to the first-layer MPLS label in the current label bitmap to 1, using the next-layer MPLS label as the first-layer MPLS label, and performing the step of determining whether the first-layer MPLS label is a special label until the next-layer MPLS label is the last MPLS label in the multi-layer MPLS label.

[0075] If the judgment result is yes, setting the value of the bit corresponding to the first layer MPLS label in the current label bitmap to 0;

[0076] Continuing to determine whether the first layer MPLS label is a guiding label;

[0077] If the judgment result is yes, the value of the bit corresponding to the set number of MPLS labels corresponding to the first layer of MPLS label is set to 0 after the value of the bit corresponding to the first layer of MPLS label in the current label bit map, and the next layer of MPLS label corresponding to the last layer of MPLS label in the set number of MPLS labels is used as the first layer of MPLS label, and the step of determining whether the first layer of MPLS label is a special label is performed until the next layer of MPLS label is the last layer of MPLS label in the multiple layers of MPLS labels;

[0078] If the judgment result is no, using the next MPLS label as the first MPLS label, and performing the step of determining whether the first MPLS label is a special label until the next MPLS label is the last MPLS label in the multiple MPLS labels;

[0079] Initially, the content of the label bitmap is empty.

[0080] Preferably, the forwarding module 32 is further configured to:

[0081] If the target search result exists in the search results corresponding to the target MPLS label and the target search result is the first search result, the MPLS message is processed according to the target search result.

[0082] Preferably, the forwarding module 32 is further configured to:

[0083] If the target search result does not exist in the search result corresponding to the target MPLS label, the MPLS message is processed according to a preset routing table.

[0084] It can be seen from the above technical solution that in the embodiment of the present application, after receiving an MPLS message carrying an MPLS label stack including multiple layers of MPLS labels, the network device no longer searches the preset MPLS forwarding table in the existing manner, but first generates a label bit map based on the multiple layers of MPLS labels and the preset generation rules; then, for the target MPLS label corresponding to the bit with a value of 1 in the label bit map, the preset MPLS label forwarding table is searched in parallel to obtain the search result corresponding to the target MPLS label; finally, when there is a target search result indicating a next-hop forwarding operation in the search result corresponding to the target MPLS label, and the target search result is not the first search result, the MPLS message is processed in sequence according to the search result located before the target search result and the target search result.

[0085] In this way, the network device can use the label bitmap to search the preset MPLS label forwarding table in parallel, which can shorten the search time and thus improve the processing performance of MPLS packets.

[0086] The present application also provides an electronic device, such as Figure 4 As shown, it includes a processor 41 and a machine-readable storage medium 42, wherein the machine-readable storage medium 42 stores machine-executable instructions that can be executed by the processor 41, and the processor 41 is prompted by the machine-executable instructions to implement the steps of the above-mentioned message processing method.

[0087] The machine-readable storage medium may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Alternatively, the machine-readable storage medium may be at least one storage device located remote from the processor.

[0088] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0089] In another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned message processing method are implemented.

[0090] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A message processing method, characterized in that: The method is applied to a network device, and the method includes: After receiving an MPLS packet carrying an MPLS label stack including multiple layers of MPLS labels, generating a label bitmap according to the multiple layers of MPLS labels and a preset generation rule, wherein the label bitmap includes bits corresponding to each layer of MPLS labels; For the target MPLS label corresponding to the bit with a value of 1 in the label bitmap, searching the preset MPLS label forwarding table in parallel to obtain a search result corresponding to the target MPLS label, wherein the target MPLS label is the MPLS label for which the preset MPLS label forwarding table needs to be searched; If a target search result indicating a next-hop forwarding operation exists in the search result corresponding to the target MPLS label, and the target search result is not the first search result, processing the MPLS packet according to the search result preceding the target search result and the target search result in sequence; Generating a label bitmap according to the multi-layer MPLS label and a preset generation rule includes: determining, for a first layer of MPLS labels in the multi-layer MPLS labels, whether the first layer of MPLS labels is a special label, wherein the special label is an MPLS label that does not require searching the preset MPLS forwarding table; If the result of the determination is negative, setting the value of the bit corresponding to the first-layer MPLS label in the current label bitmap to 1, using the next-layer MPLS label as the first-layer MPLS label, and performing the step of determining whether the first-layer MPLS label is a special label until the next-layer MPLS label is the last MPLS label in the multi-layer MPLS label. If the judgment result is yes, setting the value of the bit corresponding to the first layer MPLS label in the current label bitmap to 0; Continuing to determine whether the first layer MPLS label is a guiding label; If the judgment result is yes, the value of the bit corresponding to the set number of MPLS labels corresponding to the first layer of MPLS label is set to 0 after the value of the bit corresponding to the first layer of MPLS label in the current label bit map, and the next layer of MPLS label corresponding to the last layer of MPLS label in the set number of MPLS labels is used as the first layer of MPLS label, and the step of determining whether the first layer of MPLS label is a special label is performed until the next layer of MPLS label is the last layer of MPLS label in the multiple layers of MPLS labels; If the judgment result is no, using the next MPLS label as the first MPLS label, and performing the step of determining whether the first MPLS label is a special label until the next MPLS label is the last MPLS label in the multiple MPLS labels; Initially, the content of the label bitmap is empty.

2. The method according to claim 1, characterized in that The method further comprises: If the target search result exists in the search results corresponding to the target MPLS label and the target search result is the first search result, the MPLS message is processed according to the target search result.

3. The method according to claim 1, characterized in that The method further comprises: If the target search result does not exist in the search result corresponding to the target MPLS label, the MPLS message is processed according to a preset routing table.

4. A message processing device, characterized in that: The device is applied to a network device, and includes: a message parsing module configured to, upon receiving an MPLS message carrying an MPLS label stack including multiple layers of MPLS labels, generate a label bitmap based on the multiple layers of MPLS labels and a preset generation rule, wherein the label bitmap includes bits corresponding to each layer of MPLS labels; a forwarding module configured to search a preset MPLS label forwarding table in parallel for a target MPLS label corresponding to a bit with a value of 1 in the label bitmap, and obtain a search result corresponding to the target MPLS label, wherein the target MPLS label is an MPLS label for which the preset MPLS label forwarding table needs to be searched; and If a target search result indicating a next-hop forwarding operation exists in the search result corresponding to the target MPLS label, and the target search result is not the first search result, processing the MPLS packet according to the search result preceding the target search result and the target search result in sequence; The message parsing module is specifically used to: determining, for a first layer of MPLS labels in the multi-layer MPLS labels, whether the first layer of MPLS labels is a special label, wherein the special label is an MPLS label that does not require searching the preset MPLS forwarding table; If the result of the determination is negative, setting the value of the bit corresponding to the first-layer MPLS label in the current label bitmap to 1, using the next-layer MPLS label as the first-layer MPLS label, and performing the step of determining whether the first-layer MPLS label is a special label until the next-layer MPLS label is the last MPLS label in the multi-layer MPLS label. If the judgment result is yes, setting the value of the bit corresponding to the first layer MPLS label in the current label bitmap to 0; Continuing to determine whether the first layer MPLS label is a guiding label; If the judgment result is yes, the value of the bit corresponding to the set number of MPLS labels corresponding to the first layer of MPLS label is set to 0 after the value of the bit corresponding to the first layer of MPLS label in the current label bit map, and the next layer of MPLS label corresponding to the last layer of MPLS label in the set number of MPLS labels is used as the first layer of MPLS label, and the step of determining whether the first layer of MPLS label is a special label is performed until the next layer of MPLS label is the last layer of MPLS label in the multiple layers of MPLS labels; If the judgment result is no, using the next MPLS label as the first MPLS label, and performing the step of determining whether the first MPLS label is a special label until the next MPLS label is the last MPLS label in the multiple MPLS labels; Initially, the content of the label bitmap is empty.

5. The device according to claim 4, characterized in that The forwarding module is further configured to: If the target search result exists in the search results corresponding to the target MPLS label and the target search result is the first search result, the MPLS message is processed according to the target search result.

6. The device according to claim 4, characterized in that The forwarding module is further configured to: If the target search result does not exist in the search result corresponding to the target MPLS label, the MPLS message is processed according to a preset routing table.

7. An electronic device, characterized in that: The method comprises a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to implement the method steps according to any one of claims 1 to 3.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps of any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Packet processing method, apparatus and system

    WO2018161672A1

  • Performance measurement, telemetry, and OAM in MPLS networks using entropy labels

    WO2023009314A1