Message decapsulation processing method and device

By introducing a pre-diversion mechanism in the GRE tunnel endpoint device, the qualified messages are directly decapsulated, which solves the problem of low decapsulation performance of the GRE tunnel endpoint device and improves processing efficiency and performance.

CN116567112BActive Publication Date: 2025-10-03CHINA MOBILE COMM LTD RES INST +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210099854.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-27
Publication Date
2025-10-03
Estimated Expiration
2042-01-27

AI Technical Summary

Technical Problem

Existing GRE tunnel endpoint devices have low performance when decapsulating packets, resulting in long processing paths and high performance consumption.

Method used

By judging whether the target message meets the pre-diversion conditions, if so, it will be directly decapsulated to avoid forwarding table search and use the pre-diversion function for fast forwarding.

Benefits of technology

Improves the performance of GRE tunnel decapsulation and reduces processing delay and resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116567112B_ABST
    Figure CN116567112B_ABST
Patent Text Reader

Abstract

This application discloses a message decapsulation processing method and apparatus, relating to the field of message transmission technology. The message decapsulation processing method comprises: obtaining a target message; determining whether the target message meets a pre-diversion condition; and, if the target message meets the pre-diversion condition, performing decapsulation processing on the target message. This solution improves decapsulation performance by directly decapsulating the target message when the target message meets the pre-diversion condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of message transmission technology, and in particular relates to a message decapsulation processing method and device. Background Art

[0002] When decapsulating tunnel packets at the Generic Routing Encapsulation (GRE) tunnel endpoint (tunnel encapsulation and de-tunneling) devices, the packets must go through several stages: Ethernet layer processing, Internet Protocol (IP) layer processing, and tunnel module processing. This results in a long forwarding path and significant performance degradation. During GRE decapsulation, the Ethernet layer passes the packet to the IP layer. The IP layer searches the forwarding table for the corresponding tunnel based on the destination IP address in the tunnel's outer layer. The packet is then passed to the tunnel module for decapsulation.

[0003] This method has the problem of low decapsulation performance. Summary of the Invention

[0004] The embodiments of the present application provide a message decapsulation processing method and apparatus, which can solve the problem of low decapsulation performance in existing decapsulation processing methods.

[0005] In order to solve the above technical problems, the present invention provides a method for decapsulating a message, including:

[0006] Get the target message;

[0007] Determining whether the target message meets the pre-diversion condition;

[0008] If the target message meets the pre-diversion condition, the target message is decapsulated.

[0009] Optionally, determining whether the target message meets a pre-diversion condition includes:

[0010] Obtaining the protocol type of the Ethernet header corresponding to the target message;

[0011] If the protocol type is a preset type, determining whether the pre-distribution function is enabled;

[0012] If the pre-diversion function is turned on, the target message is matched with the preset message characteristics;

[0013] If the target message matches the preset message feature, it is determined that the target message meets the pre-diversion condition.

[0014] Optionally, after determining whether the pre-distribution function is enabled if the protocol type is a preset type, the method further includes:

[0015] If the pre-distribution function is not enabled, it is determined that the target message does not meet the pre-distribution condition.

[0016] Optionally, after matching the target message with a preset message feature if the pre-diversion function is enabled, the method further includes:

[0017] If the target message does not match the preset message feature, it is determined that the target message does not meet the pre-diversion condition.

[0018] Optionally, after determining whether the target message meets the pre-diversion condition, the method further includes:

[0019] If the target message does not meet the pre-diversion condition, searching the forwarding table for the outbound interface corresponding to the target message;

[0020] If the outgoing interface corresponding to the target message is a tunnel interface, the target message is decapsulated.

[0021] Optionally, obtaining the target message includes:

[0022] Perform media access control MAC address check on received data packets;

[0023] If the MAC address corresponding to the data message is the first MAC address, the Ethernet header of the data message is stripped to obtain the target message.

[0024] The present application also provides a packet decapsulation processing device, including:

[0025] An acquisition module is used to obtain target messages;

[0026] A judgment module, configured to judge whether the target message satisfies a pre-diversion condition;

[0027] The processing module is used to decapsulate the target message if the target message meets the pre-diversion condition.

[0028] The embodiment of the present application also provides a message decapsulation processing device, including a transceiver and a processor;

[0029] The processor is configured to:

[0030] Get the target message;

[0031] Determining whether the target message meets the pre-diversion condition;

[0032] If the target message meets the pre-diversion condition, the target message is decapsulated.

[0033] An embodiment of the present application also provides a message decapsulation processing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the above-mentioned message decapsulation processing method are implemented.

[0034] An embodiment of the present application also provides a readable storage medium having a computer program stored thereon, which implements the steps in the above method when executed by a processor.

[0035] The beneficial effects of this application are:

[0036] The above solution can improve the decapsulation performance by directly decapsulating the target message when the target message meets the pre-diversion condition. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 This is a flow chart of a message decapsulation processing method according to an embodiment of the present application;

[0038] Figure 2 This is a diagram of the GRE decapsulation and forwarding process;

[0039] Figure 3 This is a module diagram of a message decapsulation processing device according to an embodiment of the present application;

[0040] Figure 4 A structural diagram showing a message decapsulation processing device according to an embodiment of the present application. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0042] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.

[0043] It is worth noting that the technology described in the embodiments of the present application is not limited to the Long Term Evolution (LTE) / LTE-Advanced (LTE-A) system, but can also be used in other wireless communication systems, such as Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Frequency Division Multiple Access (FDMA), Orthogonal Frequency Division Multiple Access (OFDMA), Single-carrier Frequency Division Multiple Access (SC-FDMA) and other systems. The terms "system" and "network" in the embodiments of the present application are often used interchangeably, and the described technology can be used for the systems and radio technologies mentioned above as well as for other systems and radio technologies. The following description describes a New Radio (NR) system for example purposes, and NR terminology is used in most of the following description, but these technologies can also be applied to applications other than NR system applications, such as 6th Generation (6G) communication systems.

[0044] The following describes in detail the message decapsulation processing method and device provided by the embodiments of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0045] like Figure 1 As shown, at least one embodiment of the present application provides a message decapsulation processing method, which is applied to a message decapsulation processing device, including:

[0046] Step 101, obtaining a target message;

[0047] It should be noted that the target message refers to the message obtained after being processed by the Ethernet layer.

[0048] Step 102, determining whether the target message meets the pre-diversion condition;

[0049] It should be noted that the pre-diversion condition can be regarded as a fast forwarding condition, that is, only the target message that meets the fast forwarding condition will be directly decapsulated; the so-called fast forwarding means omitting the process of forwarding table search.

[0050] Step 103: If the target message meets the pre-diversion condition, decapsulate the target message;

[0051] It should be noted that if the target message meets the pre-diversion conditions, it means that the target message can be quickly forwarded (that is, the target message can be directly decapsulated). In other words, at this time, there is no need to perform the operation of determining the tunnel interface information by searching the forwarding table entries (because the amount of data in the forwarding table entries is large, resulting in a large processing delay). Instead, the tunnel processing function (which can be understood as a tunnel module) that matches the target message directly searches for the tunnel information (it should be noted that the tunnel processing function can perform relevant processing on messages belonging to the same flow based on the tunnel information, such as speed limit processing, etc.), and decapsulates the target message, strips off the GRE (Generic Routing Encapsulation) header, and then processes the message in the outgoing direction (that is, finds the corresponding outgoing interface on this device according to the target address of the message). By quickly forwarding the message based on the preset diversion conditions, the decapsulation performance can be improved.

[0052] Optionally, in at least one embodiment of the present application, step 101 may be implemented as follows:

[0053] Step 1011, performing a Media Access Control (MAC) address check on the received data message;

[0054] Step 1012: If the MAC address corresponding to the data message is the first MAC address, the Ethernet header of the data message is stripped to obtain the target message.

[0055] It should be noted that the data message refers to any message received by the device (i.e., the message forwarding device). The first MAC address refers to the MAC address that matches the device receiving the data message. That is, when the device receives a message, the physical layer of the device first needs to perform a MAC address check on the message (it should be noted that the implementation method of the MAC address check here is: determine the corresponding MAC address based on the target IP address of the received data message, and then compare the MAC address with the MAC address of the device to determine whether the MAC address is the MAC address of the device). Only when it is determined that the message belongs to the device, the Ethernet layer of the device will strip the Ethernet header of the message to obtain the target message, and then decide what kind of processing to perform on the target message based on the protocol type of the Ethernet header corresponding to the target message.

[0056] It should be noted that by performing MAC address checking, the accuracy of received data packets can be guaranteed, and the problem of processing packets that do not belong to the device and causing waste of resource overhead can be avoided.

[0057] Optionally, in at least one embodiment, the specific implementation of step 102 is:

[0058] Step 1021, obtaining the protocol type of the Ethernet header corresponding to the target message;

[0059] It should be noted that the main method for obtaining the protocol type is to strip the Ethernet header of the data message and determine the protocol type based on the stripped Ethernet header.

[0060] Step 1022: If the protocol type is a preset type, determine whether the pre-distribution function is enabled;

[0061] It should be noted that the preset type may be manually set by an administrator and stored in the device. For example, the preset type may be an IP type (eg, IPv4 and / or IPv6).

[0062] It should be noted that the preset diversion function can be manually turned on or off by the administrator, or it can automatically set a no-fast-forwarding mark when there are features such as packet monitoring at the IP layer that are not allowed to be skipped, that is, turn off the pre-diversion function. The device can directly know whether the pre-diversion function is turned on. It is similar to a switch. For example, when the switch is in the on state, the pre-diversion function is turned on, and when the switch is in the off state, the pre-diversion function is turned off.

[0063] It should be noted that by first determining the protocol type of the target message, whether the pre-diversion function is enabled is judged only for the target message of the preset type, thereby ensuring the accuracy of the judgment as much as possible and reducing resource overhead.

[0064] Step 1023: If the pre-diversion function is enabled, the target message is matched with a preset message feature;

[0065] It should be noted that the specific implementation method of the matching here is: comparing the preset message feature with the target message. If the preset message feature is included in the target message, it is considered that the target message matches the preset message feature; otherwise, it is considered that there is no match.

[0066] It should be noted here that when the pre-diversion function is not enabled, it is determined that the target message does not meet the pre-diversion condition.

[0067] It should be noted that the message feature matching is performed only when the pre-diversion function is enabled, thereby avoiding the problem of affecting the system function caused by starting the message feature matching process when the pre-diversion function is not enabled.

[0068] It should be noted that the preset message feature refers to a message feature corresponding to a specific message set for filtering specific messages. The preset message feature may be automatically generated based on a message input by an administrator, that is, the preset message feature is pre-set.

[0069] Step 1024: If the target message matches the preset message feature, it is determined that the target message meets the pre-diversion condition;

[0070] It should also be noted that if the target message does not match the preset message feature, it is determined that the target message does not meet the pre-diversion condition.

[0071] It should be further noted that if the target message does not meet the pre-diversion condition, the outbound interface corresponding to the target message is searched in the forwarding table;

[0072] If the outgoing interface corresponding to the target message is a tunnel interface, the target message is decapsulated; further, if the outgoing interface corresponding to the target message is not a tunnel interface, the target message is sent to the module corresponding to the outgoing interface.

[0073] It should be noted that what is stored in the forwarding table entry is the identifier of the message and the outgoing interface information corresponding to each message.

[0074] That is to say, when the target message does not meet the pre-diversion condition, it means that the target message cannot be forwarded quickly, that is, the target message cannot be directly decapsulated by the tunnel module that matches the target message. At this time, it is necessary to perform an operation of determining the tunnel interface information by searching the forwarding table. If the outgoing interface corresponding to the target message indicated by the tunnel interface information is the tunnel interface, the tunnel module that matches the target message needs to search the tunnel information and decapsulate the target message, strip off the GRE (Generic Routing Encapsulation) header, and process the message in the outgoing direction after stripping. The so-called outgoing direction processing refers to searching the forwarding table for the message with the GRE header stripped, and determining the next hop and outgoing interface information of the message based on the search result, and then handing the message over to the Ethernet layer for processing. The Ethernet layer searches for neighbor information, adds the Ethernet header, and then hands the message over to the physical layer for processing. After the physical layer receives the message reported to the Ethernet layer, it sends the message to the physical network card.

[0075] The following describes the specific application process of at least one embodiment of the present application by taking the decapsulation processing of a GRE message by a network device as an example.

[0076] First of all, it should be noted that the network equipment in this process has a tunnel module (which realizes the tunnel processing function of GRE encapsulation and GRE decapsulation of messages), a pre-diversion processing module (which realizes the judgment of whether to pre-divert messages) and multiple protocol modules (used to process messages of different protocol types).

[0077] The GRE message forwarding process is divided into two parts: the first part is the pre-diversion setting, and the second part is the message encapsulation and forwarding. Specifically:

[0078] Part 1: Pre-diversion settings

[0079] When establishing a GRE tunnel, set tunnel message characteristics and the corresponding tunnel module. (Note that different types of messages correspond to different tunnel modules.) If the tunnel module has reassembly capabilities, you can set fragmented message characteristics. Otherwise, set characteristics to exclude situations that cannot be handled, such as fragmented messages, to ensure process integrity.

[0080] If the IP layer of the network device has features that cannot be skipped, such as packet monitoring, it is necessary to set a flag that does not allow fast forwarding for the pre-distribution module;

[0081] The second part, message forwarding, such as Figure 2 As shown, the specific process is:

[0082] Step S201: After receiving the message, the physical layer checks the MAC address. If it is the local MAC, the message is sent to the Ethernet layer for processing.

[0083] Step S202: The Ethernet layer strips the Ethernet header of the message and sends the message to each protocol module according to the message protocol type. When the protocol type in the Ethernet header is IP type (IPv4 or IPv6), the message is sent to the pre-diversion processing module for processing;

[0084] Step S203: The pre-distribution processing module determines whether the fast forwarding flag is on (i.e., whether the pre-distribution function is enabled). If the pre-distribution function is not enabled, the message is sent to the IP module for processing. If the pre-distribution function is enabled, message feature matching continues.

[0085] Step S204: If the message matches the tunnel message feature set in the first part, the message is sent to the corresponding tunnel module;

[0086] Step S205: If the message does not match the tunnel message characteristics set in the first part, the message is sent to the IP module for processing;

[0087] Step S206, (the processing of the message successfully diverted by the pre-diversion system will be skipped) the IP module searches the forwarding table to determine the tunnel interface information;

[0088] Step S207: When the outgoing interface of the forwarding entry is a tunnel interface, the message is handed over to the tunnel module corresponding to the message for processing;

[0089] Step S208: After receiving the message, the tunnel module searches for tunnel information;

[0090] Step S209: perform GRE decapsulation processing, remove the GRE header, and then perform outbound processing on the message.

[0091] Step S210, IP outbound processing searches for forwarding entries;

[0092] Step S211: After determining the next hop and outbound interface information of the message based on the search result, the message is handed over to the Ethernet layer for processing;

[0093] Step S212: The Ethernet layer searches for neighbor information, adds an Ethernet header, and then passes the message to the physical layer for processing.

[0094] After the physical layer receives the message from the Ethernet layer, it sends the message to the physical network card.

[0095] In summary, at least one embodiment of the present application subdivides device application scenarios and messages. In scenarios where GRE decapsulation performance is more concerned, messages are pre-diverted according to pre-set rules before searching for routing table entries at the IP layer. Messages that hit the rules are quickly forwarded, and messages that can skip the IP layer search for routing table entries are identified and quickly forwarded. By bypassing key performance consumption points, the performance of GRE tunnel decapsulation is improved, thereby improving the performance of software forwarding.

[0096] like Figure 3 As shown, at least one embodiment of the present application further provides a message decapsulation processing device 300, including:

[0097] Acquisition module 301, used to acquire target message;

[0098] A judgment module 302 is used to judge whether the target message meets the pre-diversion condition;

[0099] The first processing module 303 is configured to decapsulate the target message if the target message meets the pre-diversion condition.

[0100] Optionally, the judgment module 302 includes:

[0101] A first acquiring unit, configured to acquire a protocol type of an Ethernet header corresponding to the target message;

[0102] a judging unit, configured to judge whether a pre-distribution function is enabled if the protocol type is a preset type;

[0103] a matching unit, configured to match the target message with a preset message feature if the pre-diversion function is enabled;

[0104] The first determining unit is configured to determine that the target message satisfies a pre-diversion condition if the target message matches the preset message feature.

[0105] Optionally, after the determining unit determines whether the pre-diversion function is enabled, the method further includes:

[0106] The second determining unit is configured to determine that the target message does not meet the pre-diversion condition if the pre-diversion function is not enabled.

[0107] Optionally, after the matching unit matches the target message with a preset message feature, the method further includes:

[0108] The third determining unit is configured to determine that the target message does not meet the pre-diversion condition if the target message does not match the preset message feature.

[0109] Optionally, after the judging module 302 judges whether the target message meets the pre-diversion condition, the method further includes:

[0110] A search module, configured to search the forwarding table for an outbound interface corresponding to the target message if the target message does not meet the pre-diversion condition;

[0111] The second processing module is configured to decapsulate the target message if the outgoing interface corresponding to the target message is a tunnel interface.

[0112] Optionally, the acquisition module 301 includes:

[0113] A detection unit, configured to perform a media access control MAC address check on a received data message;

[0114] The second acquiring unit is configured to strip the Ethernet header of the data message to acquire a target message if the MAC address corresponding to the data message is the first MAC address.

[0115] It should be noted that the device provided in at least one embodiment of the present application is a device capable of executing the above-mentioned message decapsulation processing method, then all embodiments of the above-mentioned message decapsulation processing method are applicable to the device and can achieve the same or similar beneficial effects.

[0116] At least one embodiment of the present application further provides a message decapsulation processing device, comprising a transceiver and a processor;

[0117] The processor is configured to:

[0118] Get the target message;

[0119] Determining whether the target message meets the pre-diversion condition;

[0120] If the target message meets the pre-diversion condition, the target message is decapsulated.

[0121] Optionally, the processor is configured to:

[0122] Obtaining the protocol type of the Ethernet header corresponding to the target message;

[0123] If the protocol type is a preset type, determining whether the pre-distribution function is enabled;

[0124] If the pre-diversion function is turned on, the target message is matched with the preset message characteristics;

[0125] If the target message matches the preset message feature, it is determined that the target message meets the pre-diversion condition.

[0126] Optionally, the processor is further configured to:

[0127] If the pre-distribution function is not enabled, it is determined that the target message does not meet the pre-distribution condition.

[0128] Optionally, the processor is further configured to:

[0129] If the target message does not match the preset message feature, it is determined that the target message does not meet the pre-diversion condition.

[0130] Optionally, the processor is further configured to:

[0131] If the target message does not meet the pre-diversion condition, searching the forwarding table for the outbound interface corresponding to the target message;

[0132] If the outgoing interface corresponding to the target message is a tunnel interface, the target message is decapsulated.

[0133] Optionally, the processor is configured to:

[0134] Perform media access control MAC address check on received data packets;

[0135] If the MAC address corresponding to the data message is the first MAC address, the Ethernet header of the data message is stripped to obtain the target message.

[0136] like Figure 4 As shown, an embodiment of the present invention further provides a message decapsulation processing device, including a processor 400, a transceiver 410, a memory 420, and a program stored in the memory 420 and executable on the processor 400; wherein the transceiver 410 is connected to the processor 400 and the memory 420 via a bus interface, wherein the processor 400 is configured to read the program in the memory and execute the following process:

[0137] Get the target message;

[0138] Determining whether the target message meets the pre-diversion condition;

[0139] If the target message meets the pre-diversion condition, the target message is decapsulated.

[0140] The transceiver 410 is configured to receive and send data under the control of the processor 400 .

[0141] Among them, Figure 4 In the embodiment of the present invention, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits such as one or more processors represented by processor 400 and memory represented by memory 420. The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be further described herein. The bus interface provides an interface. The transceiver 410 can be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices over a transmission medium, such as a wireless channel, a wired channel, an optical cable, and the like.

[0142] The processor 400 is responsible for managing the bus architecture and general processing, and the memory 420 can store data used by the processor 400 when performing operations.

[0143] Optionally, the processor 400 may be a CPU (central processing unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or a CPLD (Complex Programmable Logic Device), and the processor may also adopt a multi-core architecture.

[0144] The processor calls the computer program stored in the memory to execute any of the methods provided in the embodiments of the present application according to the obtained executable instructions. The processor and the memory can also be arranged physically separately.

[0145] Furthermore, when the processor 400 executes the program, the following steps are implemented:

[0146] Obtaining the protocol type of the Ethernet header corresponding to the target message;

[0147] If the protocol type is a preset type, determining whether the pre-distribution function is enabled;

[0148] If the pre-diversion function is turned on, the target message is matched with the preset message characteristics;

[0149] If the target message matches the preset message feature, it is determined that the target message meets the pre-diversion condition.

[0150] Furthermore, when the processor 400 executes the program, the following steps are also implemented:

[0151] If the pre-distribution function is not enabled, it is determined that the target message does not meet the pre-distribution condition.

[0152] Furthermore, when the processor 400 executes the program, the following steps are also implemented:

[0153] If the target message does not match the preset message feature, it is determined that the target message does not meet the pre-diversion condition.

[0154] Furthermore, when the processor 400 executes the program, the following steps are also implemented:

[0155] If the target message does not meet the pre-diversion condition, searching the forwarding table for the outbound interface corresponding to the target message;

[0156] If the outgoing interface corresponding to the target message is a tunnel interface, the target message is decapsulated.

[0157] Furthermore, when the processor 400 executes the program, the following steps are implemented:

[0158] Perform media access control MAC address check on received data packets;

[0159] If the MAC address corresponding to the data message is the first MAC address, the Ethernet header of the data message is stripped to obtain the target message.

[0160] At least one embodiment of the present application also provides a message decapsulation processing device, including a memory, a processor, and a computer program stored on the memory and runnable on the processor. When the processor executes the program, the various processes in the message decapsulation processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they will not be described here.

[0161] It can be understood that the above-mentioned message decapsulation processing device is located in a network device (for example, a forwarding device).

[0162] At least one embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the program implements the various processes in the above-described packet decapsulation processing method embodiment and can achieve the same technical effect. To avoid repetition, the details are not described here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0163] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0164] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0165] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.

Claims

1. A message decapsulation processing method, characterized in that: include: Get the target message; Determining whether the target message meets the pre-diversion condition; If the target message meets the pre-diversion condition, decapsulate the target message; The determining whether the target message meets the pre-diversion condition includes: Obtaining the protocol type of the Ethernet header corresponding to the target message; If the protocol type is a preset type, determining whether the pre-distribution function is enabled; If the pre-diversion function is turned on, the target message is matched with the preset message characteristics; If the target message matches the preset message feature, it is determined that the target message meets the pre-diversion condition.

2. The method according to claim 1, characterized in that After determining whether the pre-distribution function is enabled if the protocol type is a preset type, the method further includes: If the pre-distribution function is not enabled, it is determined that the target message does not meet the pre-distribution condition.

3. The method according to claim 1, characterized in that If the pre-diversion function is enabled, after matching the target message with a preset message feature, the method further includes: If the target message does not match the preset message feature, it is determined that the target message does not meet the pre-diversion condition.

4. The method according to any one of claims 1 to 3, characterized in that After determining whether the target message meets the pre-diversion condition, the method further includes: If the target message does not meet the pre-diversion condition, searching the forwarding table for the outbound interface corresponding to the target message; If the outgoing interface corresponding to the target message is a tunnel interface, the target message is decapsulated.

5. The method according to claim 1, wherein The acquiring of the target message includes: Perform media access control MAC address check on received data packets; If the MAC address corresponding to the data message is the first MAC address, the Ethernet header of the data message is stripped to obtain the target message.

6. A message decapsulation processing device, characterized in that: include: An acquisition module is used to obtain target messages; A judgment module, configured to judge whether the target message satisfies a pre-diversion condition; A processing module, configured to decapsulate the target message if the target message meets the pre-diversion condition; The judgment module includes: A first acquiring unit, configured to acquire a protocol type of an Ethernet header corresponding to the target message; a judging unit, configured to judge whether a pre-distribution function is enabled if the protocol type is a preset type; a matching unit, configured to match the target message with a preset message feature if the pre-diversion function is enabled; The first determining unit is configured to determine that the target message satisfies a pre-diversion condition if the target message matches the preset message feature.

7. A message decapsulation processing device, characterized in that: including a transceiver and a processor; The processor is configured to: Get the target message; Determining whether the target message meets the pre-diversion condition; If the target message meets the pre-diversion condition, decapsulate the target message; The processor is further configured to: Obtaining the protocol type of the Ethernet header corresponding to the target message; If the protocol type is a preset type, determining whether the pre-distribution function is enabled; If the pre-diversion function is turned on, the target message is matched with the preset message characteristics; If the target message matches the preset message feature, it is determined that the target message meets the pre-diversion condition.

8. A message decapsulation processing device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the message decapsulation processing method according to any one of claims 1 to 5 are implemented.

9. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Rapid forwarding method for network forwarding device

    CN101938415A