Message processing method, device, system, apparatus and computer readable storage medium
By setting a target marker in the message header, a single layer of encapsulation is directly applied, solving the multi-layer encapsulation problem between CPE and AC, and improving message transmission efficiency and network transmission flexibility.
Patent Information
- Application Number
- CN202110425399.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-20
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2041-04-20
AI Technical Summary
In message transmission between CPE and AC, the transmission efficiency is low because it requires two layers of encapsulation: GRE encapsulation and CAPWAP encapsulation.
By setting a target flag in the message header to indicate that the message should be decapsulated, a single layer of encapsulation can be performed directly when the target flag is obtained, avoiding multiple layers of encapsulation.
It improves message transmission efficiency, simplifies the encapsulation process, and enhances the flexibility and efficiency of network transmission.
Smart Images

Figure CN115226154B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a message processing method, apparatus, system, device, and computer-readable storage medium. Background Technology
[0002] Customer premises equipment (CPE) is a device that can convert wired networks into wireless networks. It is widely used in various scenarios where it is inconvenient to set up wired networks, enabling multiple terminal devices to access the network wirelessly, thereby reducing the difficulty of network setup and improving the flexibility of network transformation.
[0003] When a terminal device accesses the network through a CPE, it needs to undergo network authentication, such as access authentication and application service authentication. During the network authentication process, the terminal device sends a message to the CPE, which then forwards the message to the access controller (AC), which acts as the network authentication point. The AC then performs network authentication on the terminal device based on the received message.
[0004] In related technologies, a generic routing encapsulation (GRE) tunnel is built between the CPE and AC, and then the packets are encapsulated through GRE encapsulation to achieve transparent transmission of the packets.
[0005] However, between the CPE and AC, there is also an access point (AP). The tunnel built between the AC and the AP is a control and provisioning of wireless access points (CAPWAP) protocol tunnel. Therefore, the messages transmitted between the CPE and AC need to go through two layers of encapsulation: the GRE encapsulation of the CPE and the CAPWAP encapsulation of the AP. This has a certain impact on the message transmission efficiency, resulting in lower message transmission efficiency. Summary of the Invention
[0006] This application provides a message processing method, apparatus, system, device, and computer-readable storage medium, which can improve message transmission efficiency. The technical solution provided by this application is as follows:
[0007] Firstly, a message processing method is provided, executed by an access point device (AP), the method comprising:
[0008] Receive a first message from the customer premises equipment (CPE) and obtain a second message from the first message;
[0009] If the header of the second message includes a target marker, the first original message is obtained from the second message, and the target marker indicates that the second message is decapsulated.
[0010] Send a first target message, which is obtained by encapsulating the first original message.
[0011] The solution provided in this application provides a method of setting a target flag in the header of the second message to indicate that the message is to be decapsulated. This allows the first original message to be obtained from the second message after the second message is obtained from the first message. When it is determined that the header of the second message includes the target flag, the first original message can be obtained from the second message. Then, the first original message can be directly encapsulated in one layer to obtain the first target message for transmission, without the need for multiple layers of encapsulation, thereby improving the transmission efficiency of the message.
[0012] In one possible implementation, the target tag carries a destination address field in the header, which is either a destination Internet Protocol (IP) address field or a destination Media Access Control (MAC) address field.
[0013] By making the destination IP address field and the destination MAC address field optional fields for the destination address field, two optional implementation methods are provided: the destination tag is carried in the destination address field, the destination IP address field is carried in the destination IP address field, and the destination MAC address field is carried in the destination MAC address field, thereby improving the flexibility of the packet processing process.
[0014] In one possible implementation, if the header of the second message includes a target marker, retrieving the first original message from the second message includes:
[0015] If the header of the second message includes a target marker, remove the header of the second message to obtain the first original message.
[0016] When the header of the second message includes a target marker, by removing the header of the second message, the first original message, which is the body of the second message, can be directly obtained, thus achieving the decapsulation of the second message.
[0017] In one possible implementation, obtaining the second message from the first message includes:
[0018] Remove the header of the first message to obtain the second message.
[0019] By removing the header of the first message, the original first message, which is the main body of the first message, can be obtained directly, thus achieving the decapsulation of the first message.
[0020] In one possible implementation, the first message is encapsulated using a wireless network protocol, the second message includes a Generic Routing Encapsulation (GRE) header, and the first destination message is encapsulated using the CAPWAP protocol for control and configuration of a wireless access point.
[0021] The packets are encapsulated using wireless network protocols, GRE protocols, and CAPWAP protocols to ensure that the encapsulated packets conform to the packet format transmitted between CPE and AP, as well as between AP and AC. The packets are then transmitted based on the encapsulated packets, thereby achieving transparent packet transmission.
[0022] In one possible implementation, the method further includes:
[0023] Receive a third message from the access controller AC;
[0024] Obtain the second original message from the third message;
[0025] Send a second target message, which is obtained by encapsulating a fourth message, which is obtained by encapsulating the second original message.
[0026] When a third message is received from the AC, a second original message is obtained from the third message, and the second original message is encapsulated to obtain a second target message. Then, the message is transmitted by sending the second target message.
[0027] In one possible implementation, obtaining the second original message from the third message includes:
[0028] Remove the header of the third message to obtain the second original message.
[0029] By removing the header of the third message, the second original message, which is the main body of the third message, can be obtained directly, thus achieving the decapsulation of the third message.
[0030] In one possible implementation, the third message is encapsulated using the CAPWAP protocol, the fourth message is encapsulated using the GRE protocol, and the second destination message is encapsulated using a wireless network protocol.
[0031] The packets are encapsulated using wireless network protocols, GRE protocols, and CAPWAP protocols to ensure that the encapsulated packets conform to the packet format transmitted between CPE and AP, as well as between AP and AC. The packets are then transmitted based on the encapsulated packets, thereby achieving transparent packet transmission.
[0032] Secondly, a message processing method is provided, executed by a CPE, which includes:
[0033] Receive the first raw message from the first site device;
[0034] The first original message is encapsulated to obtain a first message, which includes a second message. The header of the second message includes a target marker that indicates that the second message should be decapsulated.
[0035] Send the first message.
[0036] The solution provided in this application embodiment sets a target flag indicating that the message should be decapsulated in the header of the encapsulated message when encapsulating the first original message sent by the first site device. Then, the message is transmitted by sending the encapsulated message. When the device receiving the encapsulated message determines that the message header includes the target flag, it can decapsulate the message to obtain the first original message. The first original message can then be used for message transmission after being encapsulated by one layer, without the need for multiple layers of encapsulation, thereby improving the message transmission efficiency.
[0037] In one possible implementation, the target tag carries a destination address field in the header of the second message, which is either a destination IP address field or a destination MAC address field.
[0038] By making the destination IP address field and the destination MAC address field optional fields for the destination address field, two optional implementation methods are provided: the destination tag is carried in the destination address field, the destination IP address field is carried in the destination IP address field, and the destination MAC address field is carried in the destination MAC address field, thereby improving the flexibility of the packet processing process.
[0039] In one possible implementation, the first original message is encapsulated to obtain a first message, which includes:
[0040] An intermediate header is encapsulated for the first raw message, and the destination address field of the intermediate header carries the target tag;
[0041] Remove the destination MAC address field and the source MAC address field from the header of the intermediate message to obtain the second message;
[0042] The first message header is encapsulated in the second message to obtain the first message.
[0043] By setting the destination address field of the intermediate header to carry a target marker when encapsulating the first original message, and by first removing the destination MAC address and source MAC address fields from the intermediate header before encapsulating the first header, a network transmission protocol-compliant encapsulation method is adopted. This ensures that the encapsulated first message can be transmitted between the CPE and AP, guaranteeing normal message transmission. Furthermore, when the receiving device determines that the destination address field carries a target marker, it can directly extract the first original message from the received first message and then encapsulate it once before use in the message transmission process, eliminating the need for multiple encapsulation layers and thus improving message transmission efficiency.
[0044] In one possible implementation, the second message includes a GRE header, and the first message is encapsulated using a wireless network protocol.
[0045] The packets are encapsulated using wireless network protocols and GRE protocols to ensure that the encapsulated packets conform to the packet format transmitted between CPE and AP, and then the packets are transmitted based on the encapsulated packets, thereby achieving transparent transmission of packets.
[0046] In one possible implementation, the method further includes:
[0047] Receive the second destination message from the access point device (AP);
[0048] Obtain the second original message from the second target message, which is obtained by encapsulating the second original message twice;
[0049] Send the second original message.
[0050] By receiving the second target message from the AP, obtaining the second original message from the second target message, and then sending the second original message, the message can be transparently transmitted.
[0051] In one possible implementation, obtaining the second original message from the second target message includes:
[0052] Remove the two headers from the second target message to obtain the second original message.
[0053] Since the second target message is obtained by encapsulating the second original message twice, by removing the two message headers of the second target message, the second original message, which is the main body of the second target message, can be directly obtained, thus realizing the decapsulation of the second target message.
[0054] In one possible implementation, the two encapsulations include wireless network protocol encapsulation and GRE protocol encapsulation.
[0055] The packets are encapsulated using wireless network protocols and GRE protocols to ensure that the encapsulated packets conform to the packet format transmitted between CPE and AP, and then the packets are transmitted based on the encapsulated packets, thereby achieving transparent transmission of packets.
[0056] Thirdly, a message processing apparatus is provided for use in an access point (AP). This apparatus has the function of implementing the message processing method described in the first aspect or any possible implementation thereof. The apparatus includes at least one module for implementing the message processing method provided in the first aspect or any possible implementation thereof. Specific details of the message processing apparatus provided in the third aspect can be found in the first aspect or any possible implementation thereof, and will not be repeated here.
[0057] Fourthly, a message processing apparatus is provided for use in a CPE (Content Provider Equipment). This apparatus has the function of implementing the message processing method described in the second aspect or any possible implementation thereof. The apparatus includes at least one module for implementing the message processing method provided in the second aspect or any possible implementation thereof. Specific details of the message processing apparatus provided in the fourth aspect can be found in the second aspect or any possible implementation thereof, and will not be repeated here.
[0058] Fifthly, a message processing system is provided, comprising an access point device (AP) and a customer premises equipment (CPE). The AP is used to execute the message processing method in the first aspect or any possible implementation thereof, and the CPE is used to execute the message processing method in the second aspect or any possible implementation thereof.
[0059] In a sixth aspect, an access point device (AP) is provided, the AP including a processor and a memory, the memory storing at least one instruction which is read by the processor to cause the AP to perform the message processing method in the first aspect or any possible implementation thereof.
[0060] In a seventh aspect, a Customer Premises Equipment (CPE) is provided, the CPE including a processor and a memory, the memory storing at least one instruction which is read by the processor to cause the CPE to perform the message processing method in the second aspect or any possible implementation thereof.
[0061] Eighthly, a computer-readable storage medium is provided, the storage medium storing at least one instruction, which is read by a processor of an access point device (AP) to cause the AP to perform the message processing method in the first aspect or any possible implementation thereof; or, the instruction is read by a processor of a customer premises equipment (CPE) to cause the CPE to perform the message processing method in the second aspect or any possible implementation thereof.
[0062] Ninthly, a computer program product is provided that, when the computer program product is run on an access point device (AP), causes the access point device (AP) to perform the message processing method in the first aspect or any possible implementation thereof; or, when the computer program product is run on a customer premises equipment (CPE), causes the customer premises equipment (CPE) to perform the message processing method in the second aspect or any possible implementation thereof.
[0063] In a tenth aspect, a chip is provided, the chip including a processing circuit and an input / output interface internally connected and communicating with the processing circuit, the processing circuit and the input / output interface being respectively used to implement the message processing method in the first aspect or any possible implementation of the first aspect, or the processing circuit and the input / output interface being respectively used to implement the message processing method in the second aspect or any possible implementation of the second aspect. Attached Figure Description
[0064] Figure 1 This is a schematic diagram of the implementation environment of a message processing method provided in an embodiment of this application;
[0065] Figure 2 This is a schematic diagram of the preparatory process of a message processing method provided in an embodiment of this application;
[0066] Figure 3 This is a flowchart of a message processing method provided in an embodiment of this application;
[0067] Figure 4 This is a schematic diagram of a message format during a message processing process provided in an embodiment of this application;
[0068] Figure 5 This is a flowchart of a message processing method provided in an embodiment of this application;
[0069] Figure 6 This is a schematic diagram of a message format during a message processing process provided in an embodiment of this application;
[0070] Figure 7 This is a schematic diagram of the structure of a message processing device provided in an embodiment of this application;
[0071] Figure 8 This is a schematic diagram of the structure of a message processing device provided in an embodiment of this application;
[0072] Figure 9 This is a schematic diagram of the structure of a user premises equipment 900 provided in an embodiment of this application;
[0073] Figure 10 This is a schematic diagram of the software composition structure of a user premises device provided in an embodiment of this application;
[0074] Figure 11 This is a schematic diagram of the structure of an access point device 1110 provided in an embodiment of this application;
[0075] Figure 12 This is a schematic diagram of the software composition structure of an access point device provided in an embodiment of this application;
[0076] Figure 13 This is a schematic diagram of the structure of an access controller 1300 provided in an embodiment of this application. Detailed Implementation
[0077] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items that have substantially the same function and purpose. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor does it limit the quantity or execution order. It should also be understood that although the following description uses the terms "first," "second," etc., to describe various elements, these elements should not be limited by the terms. These terms are merely used to distinguish one element from another. For example, where possible without departing from the scope of various examples, a first original message is referred to as a second original message, and similarly, a second original message is referred to as a first original message. Both the first and second original messages are original data messages, and in some possible cases, the first and second original messages are separate and distinct original data messages.
[0078] It should also be understood that the term “if” is interpreted as meaning “when” or “upon” or “in response to determination” or “in response to detection”.
[0079] The solution provided in this application can be applied to various network scenarios, such as data center networks, campus networks, and other networks where message transmission via GRE tunnels is required, thus helping to improve message transmission efficiency. A brief introduction to GRE tunnels and other tunnels and related content mentioned in this application is given below.
[0080] Generic routing encapsulation (GRE) is a protocol used to encapsulate data packets using one routing protocol into data packets using another routing protocol, enabling these encapsulated data packets to be transmitted in the latter routing protocol. GRE is a method for establishing direct point-to-point connections on a network, aiming to simplify connections between individual networks. GRE encapsulation is applicable to various network layer protocols.
[0081] The Control and Provisioning of Wireless Access Points (CAPWAP) protocol is a general tunneling protocol used to perform basic protocol functions for message transmission between the AP and AC.
[0082] The 802.11 protocol is a universal wireless network protocol and a common standard in today's wireless local area networks (WLANs). It is a protocol typically used for wireless communication between terminals and access points (APs). Wireless network protocols also include other types of protocols, which are not limited to those described in this application.
[0083] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0084] Figure 1 This is a schematic diagram illustrating the implementation environment of a message processing method provided in an embodiment of this application. See also... Figure 1 The implementation environment includes: a first site device 101, a user premises device 102, an access point device 103, an access controller 104, and a second site device 105.
[0085] The first site device 101 is a terminal type device, such as a user equipment (UE), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent, or user device. Optionally, the access terminal is a cellular phone, cordless phone, session initiation protocol (SIP) phone, wireless local loop (WLL) station, personal digital assistant (PDA), handheld device with wireless communication capabilities, computing device or other processing device connected to a wireless modem, vehicle-mounted device, wearable device, and terminal device in future 5G networks or future evolved public land mobile networks (PLMNs), etc., which are not limited in this application embodiment. The first site device 101 communicates with the user premises equipment 102 through wired or wireless communication methods, and the specific method used is not limited in this application embodiment. The first site device 101 generates a first raw message and then sends the generated first raw message to the user premises device 102 for message transmission.
[0086] By way of example and not limitation, in other possible implementations of the embodiments of this application, the first site device 101 is a wearable device. Wearable devices, also known as wearable smart devices, are a general term for devices that are intelligently designed and developed using wearable technology, such as glasses, gloves, watches, clothing, and shoes. Wearable devices are portable devices that are worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not only hardware devices but can also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly defined, wearable smart devices include devices that are feature-rich, large in size, and can achieve complete or partial functions without relying on a smartphone, such as smartwatches or smart glasses, as well as devices that focus on a specific type of application function and require cooperation with other devices (such as smartphones), such as various smart bracelets and smart jewelry for vital sign monitoring.
[0087] Optionally, the user premises equipment 102 may be a CPE based on wireless fidelity (WiFi), or a CPE based on 4th-generation (4G) mobile communication technology, or a CPE based on 5th-generation (5G) mobile communication technology, etc., and this application embodiment does not limit this. The user premises equipment 102 communicates with the first site equipment 101 through wired or wireless communication methods, and this application embodiment does not limit the specific method used. The user premises equipment 102 also communicates with the access point equipment 103 through wireless communication. Optionally, there may be one or more user premises equipment 102, and this application embodiment does not limit the number of user premises equipment 102.
[0088] Access point device 103 can be a home wireless AP, smart wireless AP, portable wireless AP, 3rd-generation (3G) wireless AP, 4G wireless AP, 5G wireless AP, enterprise-grade wireless AP, etc., and this application embodiment does not limit the type. Access point device 103 communicates with user premises equipment 102 wirelessly and with access controller 104 via wired communication. Optionally, there may be one or more access point devices 103, and this application embodiment does not limit the number of access point devices 103.
[0089] Optionally, the access controller 104 can be a wired AC or a wireless AC, etc., and this embodiment does not limit this. The access controller 104 communicates with the access point device 103 via a wired or wireless connection, and the access controller 104 also communicates with the second site device 105 via a wired or wireless communication, and this embodiment does not limit the specific method used. Optionally, there can be one or more access controllers 104, and this embodiment does not limit the number of access controllers 104.
[0090] The second site device 105 is a server-type device, such as a single server, multiple servers, a server cluster, a distributed file system, or a virtualization center. Alternatively, the second site device 105 is a terminal-type device, such as user equipment (UE), an access terminal, a user unit, a user station, a mobile station, a mobile station, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communication device, a user agent, a user device, or a wearable device. This application embodiment does not limit the specific type of device. If the second site device 105 is a terminal-type device, the specific description of the device type of the second site device 105 is the same as the above description of the device type of the first site device 101, and will not be repeated here. The second site device 105 communicates with the access controller 104 via wired communication, and this application embodiment does not limit the specific type of device.
[0091] It should be noted that the embodiments of this application only use the first site device 101 and the second site device 105 as examples for illustration, and do not constitute a limitation on the number of the first site device 101 and the second site device 105. In more possible implementations, the number of the first site device 101 and the second site device 105 may be greater or less. The embodiments of this application do not limit the number or type of the first site device 101 and the second site device 105. Optionally, the first site device 101 and the second site device 105 may also include other functional devices to provide more comprehensive and diversified services, and the embodiments of this application do not limit this.
[0092] The above content only introduces the device types and connection methods of the various devices involved in the implementation environment. The interaction process between the various devices is described below:
[0093] (1) Forward process: First site device 101 → User premises device 102 → Access point device 103 → Access controller 104 → Second site device 105.
[0094] First site device 101 generates a first raw message and sends it to user premises device 102. User premises device 102 receives the first raw message from first site device 101, processes it to obtain a processed message, and then sends the processed message to access point device 103. Access point device 103 receives the message from user premises device 102, processes it to obtain a processed message, and then sends the processed message to access controller 104. Access controller 104 receives the message from access point device 103, processes it to obtain a first raw message, and then sends the first raw message to second site device 105. Second site device 105 receives the first raw message from access controller 104, thereby achieving message pass-through.
[0095] (2) Reverse flow: Second site device 105 → Access controller 104 → Access point device 103 → User premises device 102 → First site device 101.
[0096] The second site device 105 generates a second original message and sends it to the access controller 104. The access controller 104 receives the second original message from the second site device 105, processes it to obtain a processed message, and then sends the processed message to the access point device 103. The access point device 103 receives the message from the access controller 104, processes it to obtain a processed message, and then sends the processed message to the user premises device 102. The user premises device 102 receives the message from the access point device 103, processes it to obtain a second original message, and then sends the second original message to the first site device 101. The first site device 101 receives the second original message from the user premises device 102, thereby achieving message pass-through.
[0097] Optionally, if the second site device 105 is a terminal type device, then in more possible implementations, the second site device 105 performs data transmission and reception through the corresponding CPE and AP. The connection and interaction methods between the second site device 105 and other devices are similar to those described above and will not be repeated here.
[0098] It should be noted that before processing messages using the solution provided in this application, some preparatory work needs to be done, such as performing network access authentication for the terminal connected to the CPE, i.e., the first site device. Taking the terminal, CPE, and AP as being in the same local area network as an example, the GRE tunnel between the CPE and AC is an Ethernet-based GRE (EoGRE) tunnel. The EoGRE tunnel encapsulates Ethernet-based messages with GRE so that the encapsulated messages can be transmitted in a network with a different network layer protocol. See also Figure 2 , Figure 2 This is a schematic diagram of the preparatory process of a message processing method provided in this application embodiment. Taking the preparatory process of network access authentication performed by the site device (such as a terminal) connected to the CPE as an example, the preparatory process is mainly divided into three parts: the address acquisition process, the access authentication process, and the terminal operation process. The following describes these three parts respectively.
[0099] During the address acquisition process, relevant technical personnel (such as administrators) pre-configure the peer address (i.e., the IP address of the devices located at both ends of the GRE tunnel) in the Dynamic Host Configuration Protocol (DHCP) server. This allows the CPE to dynamically allocate an IP address and configuration information to the terminal via the DHCP server when it receives a request from the terminal. When the DHCP server dynamically allocates IP addresses and configuration information to the terminal, it passes through the AC, AP, and CPE. Communication between the AC, AP, and CPE is achieved by triggering the GRE tunnel between the CPE and AP, and the CAPWAP tunnel between the AP and AC, to transmit data packets. It should be noted that the AP has the capability to support GRE tunnel establishment and allows packets sent by terminals connected to the CPE to enter the GRE tunnel for transmission, enabling the construction of a GRE tunnel between the CPE and AP, and packet transmission through the GRE tunnel between the CPE and AC.
[0100] During the access authentication process, the terminal sends a Hypertext Transfer Protocol over Secure Socket Layer (HTTPS) request to the Access Point (AP) for network authentication. This HTTPS request includes data packets. The transmission of these data packets between the terminal and the AP involves the CPE (Client Premises Equipment). That is, the data packet transmission process between the terminal and the AP includes the transmission between the terminal and the CPE, and the transmission between the CPE and the AP. The transmission between the CPE and the AP is achieved by triggering a GRE tunnel, which then facilitates the data packet transmission. Optionally, this HTTPS request can be an authentication request, an access request, or a redirection request to a World Wide Web (WEB) server. This embodiment does not limit the specific type of request. After sending the HTTPS request to the AP, the terminal authenticates the network by interacting with the HTTPS server or the WEB server. Taking an HTTPS server as the portal server and a web server as the security policy enforcement system (SPES) server as an example, the interaction between the terminal and the portal server / SPES server goes through CPE, AP, and AC. During the interaction between CPE and AP, GRE tunneling is triggered, and then the interaction is carried out through GRE tunneling. During the interaction between AP and AC, CAPWAP tunneling is triggered, and then the interaction is carried out through CAPWAP tunneling. The interaction between AC and portal server / SPES server is based on the second version of the portal protocol standard (portal2.0). In addition, during the process of the portal server / SPES server authenticating the terminal's access, the AC and the authentication server also need to perform remote authentication dial in user service (RADIUS) authentication. After successful RADIUS authentication, the AC sends a portal 2.0 authentication response to the portal server / SPES server. Upon receiving the portal 2.0 authentication response, the portal server / SPES server sends a notification message to the terminal to confirm successful user authentication and sends a portal 2.0 authentication response confirmation to the AC.It should be noted that the AC supports user authentication / authorization after GRE tunnel decapsulation under direct forwarding / tunnel forwarding. In other words, the AC can perform access authentication for terminals based on the packets after GRE tunnel decapsulation.
[0101] During terminal operation, the terminal interacts with the controller via data packets. This interaction involves the CPE, AP, and AC. Interaction between the CPE and AP is achieved through a GRE tunnel, while interaction between the AP and AC is achieved through a CAPWAP tunnel. The AC can locally display CPE information and information about connected terminals (such as MAC addresses). When reporting to the controller / analyzer, the AC displays additional information for CPE-type terminals (such as type and connected terminals). The CPE can transmit CPE and connected terminal information to the AC via the Link Layer Discovery Protocol (LLDP) and can also report critical log information to the portal server / SPES server via the industry-standard syslog protocol.
[0102] The above process is only the basic flow of the message processing method. The specific flow of the message processing process will be introduced below. Figure 3 This is a flowchart of a message processing method provided in an embodiment of this application. Taking the forward flow of "first site device → CPE → AP → AC → second site device" as an example, a GRE tunnel is established between the CPE and AP, and a CAPWAP tunnel is established between the AP and AC. See [link to relevant documentation]. Figure 3 The method process includes:
[0103] 301. The first station device sends the first original message.
[0104] Optionally, the first original message may be of various types, such as an authentication message, an address resolution protocol (ARP) message, or other types of messages. This application embodiment does not limit this.
[0105] In one possible implementation, the first original message is a data message, which includes a destination media access control (MAC) address field, a source MAC address field, a protocol type field, a destination internet protocol (IP) address field, a source IP address field, and a data field. Optionally, the message format of the first original message may be other types, which is not limited in this embodiment.
[0106] For the transmission flow of "first site device → CPE → AP → AC → second site device", the information carried by each field of the first original message is as follows: Figure 4 , Figure 4 This is a schematic diagram of a message format in a message processing process provided in an embodiment of this application. Figure 4 Of the messages shown, message 401 is the first original message. For example... Figure 4 As shown in message 401, the information carried in the destination MAC address field of the first original message (i.e., the destination MAC address) is the MAC address of the second site device (sta2), the information carried in the source MAC address field of the first original message (i.e., the source MAC address) is the MAC address of the first site device (sta1), the information carried in the destination IP address field of the first original message (i.e., the destination IP address) is the IP address of sta2, and the information carried in the source IP address field of the first original message (i.e., the source IP address) is the IP address of sta1.
[0107] 302. The CPE receives the first raw message from the first site device.
[0108] 303. CPE is an intermediate message header for the first original message encapsulation. The intermediate message header includes a target flag that indicates that the message should be decapsulated.
[0109] For ease of explanation, the message obtained by encapsulating the first original message with an intermediate message header is denoted as message A. In one possible implementation, after receiving the first original message from the first site device, the CPE encapsulates the first original message with an intermediate message header, thus obtaining message A.
[0110] In this context, the header of message A is also the intermediate header, and the destination address field of the intermediate header is set to carry a target marker. That is, the destination address field of the intermediate header to be encapsulated is set to the target marker, and then the intermediate header with the destination address field set to the target marker is encapsulated before the first field of the first original message, thereby achieving the encapsulation of the first original message.
[0111] Optionally, the destination address field may be a destination IP address field or a destination MAC address field; this embodiment does not limit the specific type of destination address. Optionally, the target tag may be a specified IP address or a specified MAC address, or the target tag may be another type of specified tag; this embodiment does not limit the specific type of target tag. For example, the target tag may be a specified IP address 0.0.0.0.
[0112] Specifically, when encapsulating the first original message, the GRE protocol is used, and the intermediate message header is a GRE header. Correspondingly, encapsulating the first original message with an intermediate message header is equivalent to encapsulating the first original message with a GRE header, so that the message obtained after encapsulating the first original message with an intermediate message header is a GRE message.
[0113] In one possible implementation, the intermediate header includes a destination MAC address field, a source MAC address field, a protocol type field, a destination IP address field, a source IP address field, and a header type field. Optionally, the format of the intermediate header may be other types, which is not limited in this embodiment.
[0114] Still with Figure 4 The following is an example of a message format diagram for illustration. Figure 4 Of the messages shown, message 402 is the message obtained by encapsulating the first original message with an intermediate message header, which is message A. For example... Figure 4 As shown in message 402, message A is encapsulated from the first original message, and the message body of message A is the first original message. In the message header (i.e., the intermediate message header) of message A, the information carried by the destination MAC address field (i.e., the destination MAC address) is the MAC address of the AC, the information carried by the source MAC address field (i.e., the source MAC address) is the MAC address of the CPE, the information carried by the destination IP address field (i.e., the destination IP address) is the IP address of the AC, the information carried by the source IP address field (i.e., the source IP address) is the IP address of the CPE, and the information carried by the message header type field indicates that the intermediate message header is a GRE header.
[0115] 304. The CPE removes the destination MAC address field and the source MAC address field from the intermediate message header to obtain the second message.
[0116] It should be noted that removing the destination MAC address field and the source MAC address field from the intermediate packet header means removing the destination MAC address field and the source MAC address field from the packet header of packet A.
[0117] The header of the second message includes a protocol type field, a destination IP address field, a source IP address field, and a header type field. Optionally, the format of the header of the second message can be other types, which is not limited in this embodiment.
[0118] 305. CPE encapsulates the first message header into the second message to obtain the first message.
[0119] In this embodiment, a wireless network protocol is used when encapsulating the second message to obtain the first message. Optionally, the wireless network protocol is the 802.11 protocol, or it may be another protocol; this application embodiment does not limit this.
[0120] Taking the 802.11 wireless network protocol as an example, the first message is an 802.11 message, and the first message header is an 802.11 header. Accordingly, the message encapsulation process is to encapsulate the second message with an 802.11 header while encapsulating the first message header, thereby obtaining an 802.11 message, which serves as the first message.
[0121] In one possible implementation, the first header includes a receive address field, a destination address field, and a source address field. Optionally, the format of the first header may be other types, which is not limited in this embodiment.
[0122] Still with Figure 4 The following is an example of a message format diagram for illustration. Figure 4 The wireless network uses the 802.11 protocol during the message processing shown. Figure 4 Of the messages shown, message 403 is the first message. For example... Figure 4 As shown in message 403, this first message is encapsulated based on message A, which is also message 402. Compared to message A, the first message is obtained by removing the destination MAC address field and the source MAC address field from message A's GRE header; that is, it is obtained by encapsulating an 802.11 header before the first field of the second message. The 802.11 header includes a receive address field, a destination address field, and a source address field. The information carried by the receive address field (i.e., the receive address) is the MAC address of the AP, the information carried by the destination address field (i.e., the destination address) is the MAC address of the AC, and the information carried by the source address field (i.e., the source address) is the MAC address of the CPE.
[0123] 306. The CPE sends this first message.
[0124] In one possible implementation, the CPE sends the first message to the AP.
[0125] 307. The AP receives the first message from the CPE.
[0126] 308. AP obtains the second message from the first message.
[0127] In one possible implementation, after receiving the first message sent by the CPE, the AP removes the first message header to obtain the second message. This second message is the message obtained by removing the destination MAC address field and the source MAC address field from message A.
[0128] Specifically, removing the first header of the first message means removing the receive address field, destination address field, and source address field of the first message.
[0129] In one possible implementation, the process of removing the first header of the first message includes: the AP parses the first message to determine the fields corresponding to the first header in the first message (i.e., the receive address field, the destination address field, and the source address field), and then removes the fields corresponding to the first header in the first message to remove the first header of the first message.
[0130] It should be noted that when encapsulating message A to obtain the first message, the destination MAC address field and the source MAC address field in the header (i.e., the intermediate header) of message A are removed before the header encapsulation is performed. Therefore, if the first header of the first message is removed, the header of the resulting message is no longer the intermediate header, but rather the header obtained by removing the destination MAC address field and the source MAC address field from the intermediate header. In other words, the resulting message is no longer the complete message A, but rather the message obtained by removing the destination MAC address field and the source MAC address field from message A. For ease of explanation, in this embodiment, the message obtained by removing the destination MAC address field and the source MAC address field from message A is referred to as the second message. In actual implementation, the second message does not exist; it is merely an intermediate product of the AP's message processing and is not involved in actual message transmission.
[0131] 309. If the header of the second message includes a target marker, the AP obtains the first original message from the second message.
[0132] It should be noted that, since the target marker indicates that the message should be decapsulated, the target marker included in the header of the second message can instruct the AP to decapsulate the second message.
[0133] In one possible implementation, if the header of the second message includes a target tag, the AP removes the header of the second message to obtain the first original message.
[0134] Specifically, removing the header of the second message means removing the protocol type field, destination IP address field, source IP address field, and header type field of the second message.
[0135] In one possible implementation, the process of removing the header of the second message includes: the AP parses the second message to determine the fields corresponding to the header of the second message (i.e., the protocol type field, the destination IP address field, the source IP address field, and the header type field), and then removes the fields corresponding to the header of the second message to remove the header of the second message.
[0136] 310. AP encapsulates the first original message to obtain the first target message.
[0137] In one possible implementation, the AP encapsulates a header into the first original message to obtain the first target message.
[0138] Specifically, when encapsulating the first original message, the CAPWAP protocol is used to encapsulate it, thereby obtaining the first target message, which is a CAPWAP message. That is, when encapsulating the header of the first original message, a CAPWAP header is encapsulated, thereby obtaining a CAPWAP message, which serves as the first target message.
[0139] In one possible implementation, the header of the encapsulated first target message includes a header type field. Optionally, the format of the header of the first target message may be other types, which is not limited in this embodiment.
[0140] Still with Figure 4 The following is an example of a message format diagram for illustration. Figure 4 Of the messages shown, message 404 is the first destination message. For example... Figure 4 As shown in message 404, the first destination message is encapsulated from the first original message, and the message body of the first destination message is the first original message. In the message header of the first destination message, the information carried by the message header type field indicates that the message header of the first destination message is a CAPWAP header.
[0141] 311. The AP sends the first target message.
[0142] In one possible implementation, the AP sends the first destination message to the AC.
[0143] 312. The AC receives the first destination message from the AP.
[0144] 313. AC obtains the first original message from the first target message.
[0145] In one possible implementation, after the AC receives the first target message sent by the AP, it removes the header of the first target message to obtain the first original message.
[0146] This involves removing the header of the first target message, which means removing the header type field of the first target message.
[0147] In one possible implementation, the process of removing the header of the first target message includes: the AC parses the first target message to determine the field corresponding to the header of the first target message (i.e., the header type field), and then removes the field corresponding to the header of the first target message to remove the header of the first target message.
[0148] Still with Figure 4 The following is an example of a message format diagram for illustration. Figure 4 Among the various messages shown, message 405 is the first original message obtained by AC from the first target message. Message 405 and message 401 are the same message. The specific format of message 405 is described in step 301 above, and will not be repeated here.
[0149] 314. AC sends the first original message.
[0150] In one possible implementation, the AC sends the first raw message to the second station device.
[0151] 315. The second station equipment receives the first raw message from the AC.
[0152] The solution provided in this application provides a method where the CPE sets a target marker in the header of the second message to indicate that the message should be decapsulated. The CPE then sends the first message, encapsulated based on the second message, to the AP. When the AP determines that the header of the received first message includes the target marker, it can obtain the original first message initially sent by the first site device from the received first message and directly encapsulate the original first message to obtain the first target message for transmission, eliminating the need for multiple encapsulation layers and thus improving message transmission efficiency. Furthermore, the solution provided in this application provides a novel GRE tunnel construction method. By constructing a GRE tunnel between the CPE and AP, and a CAPWAP tunnel between the AP and AC, and by configuring the AP to decapsulate messages receiving a destination address field carrying a target marker, message transmission between the AP and AC only requires one layer of encapsulation through the CAPWAP tunnel, thereby improving the overall network transmission efficiency and enhancing the GRE tunneling capability of the entire system. Moreover, in related technologies, the establishment of GRE tunnels requires the consumption of the AC's tunnel table. CPEs are terminal devices, and there are usually many of them, so the overhead on the AC's tunnel table is very large, making it impossible to deploy in many scenarios. However, the solution provided in this application only creates GRE tunnels between CPEs and APs, without consuming the AC's tunnel table, thereby increasing the deployment scenarios for GRE tunnels, simplifying the initial deployment of GRE for CPEs, and reducing enterprise capital expenditure (CAPEX) costs.
[0153] The above Figure 3 The process shown is only the processing procedure corresponding to the flow of "first site device → CPE → AP → AC → second site device". The following section will discuss... Figure 3 The corresponding reverse process will be introduced. Figure 5 This is a flowchart of a message processing method provided in an embodiment of this application. Taking the reverse flow of "second site device → AC → AP → CPE → first site device" as an example, see [link to flowchart]. Figure 5 In this method, a GRE tunnel is established between the CPE and the AP, and a CAPWAP tunnel is established between the AP and the AC. The process includes:
[0154] 501. The second site device sends the second original message.
[0155] Optionally, the second original message may be of various types, such as an authentication message, an ARP message, etc., or the second original message may be of other types. This application embodiment does not limit this.
[0156] In one possible implementation, the second original message is a data message, which includes a destination MAC address field, a source MAC address field, a protocol type field, a destination IP address field, a source IP address field, and a data field. Optionally, the message format of the second original message may be other types, which is not limited in this embodiment.
[0157] For the transmission flow of "Second Site Device → AC → AP → CPE → First Site Device", the information carried by each field of the second original message is as follows: Figure 6 , Figure 6 This is a schematic diagram of a message format in a message processing process provided in an embodiment of this application. Figure 6 Of the messages shown, message 601 is the second original message. For example... Figure 6 As shown in message 601, the destination MAC address field of the second original message carries the MAC address of the first site device (sta1), the source MAC address field of the second original message carries the MAC address of the second site device (sta2), the destination IP address field of the second original message carries the IP address of sta1, and the source IP address field of the second original message carries the IP address of sta2.
[0158] 502. AC receives the second raw message from the second site device.
[0159] 503. AC encapsulates the second original message to obtain the third message.
[0160] In one possible implementation, after the AC receives the second original message sent by the second site device, it encapsulates a message header into the second original message to obtain the third message.
[0161] Specifically, when encapsulating the second original message, the CAPWAP protocol is used to encapsulate it, thereby obtaining the third message, which is a CAPWAP message. That is, when encapsulating the header of the second original message, a CAPWAP header is encapsulated within it, resulting in a CAPWAP message, which serves as the third message.
[0162] In one possible implementation, the header of the encapsulated third message includes a header type field. Optionally, the format of the header of the third message may be other types, which is not limited in this embodiment.
[0163] Still with Figure 6The following is an example of a message format diagram for illustration. Figure 6 Of the messages shown, message 602 is the third message. For example... Figure 6 As shown in message 602, the third message is encapsulated from the second original message, and the message body of the third message is the second original message. In the message header of the third message, the information carried by the message header type field indicates that the message header of the third message is a CAPWAP header.
[0164] 504. AC sends this third message.
[0165] In one possible implementation, the AC sends the third message to the AP.
[0166] 505. AP receives a third message from AC.
[0167] 506. AP obtains the second original message from the third message.
[0168] In one possible implementation, after the AC receives the third message sent by the AP, it removes the header of the third message to obtain the second original message.
[0169] This involves removing the header of the third message, specifically the header type field.
[0170] In one possible implementation, the process of removing the header of the third message includes: the AP parses the third message to determine the field corresponding to the header of the third message (i.e., the header type field), and then removes the field corresponding to the header of the third message to remove the header of the third message.
[0171] 507. AP encapsulates the second original message to obtain the fourth message.
[0172] In one possible implementation, the AP encapsulates a header into the second original message to obtain the fourth message.
[0173] Specifically, when encapsulating the second original message, the GRE protocol is used to encapsulate it, thereby obtaining the fourth message, which is a GRE message. That is, when encapsulating the header of the second original message, a GRE header is encapsulated in the second original message to obtain a GRE message, which serves as the fourth message.
[0174] In one possible implementation, the header of the encapsulated fourth message includes a destination MAC address field, a source MAC address field, a protocol type field, a destination IP address field, a source IP address field, and a header type field. Optionally, the format of the header of the fourth message can be other types, which is not limited in this embodiment.
[0175] Still with Figure 6 The following is an example of a message format diagram for illustration. Figure 6 Of the messages shown, message 603 is the fourth message. For example... Figure 6 As shown in message 603, this fourth message is encapsulated from the second original message, and the message body of this fourth message is the second original message. In the message header of this fourth message, the information carried by the destination MAC address field (i.e., the destination MAC address) is the MAC address of the CPE, the information carried by the source MAC address field (i.e., the source MAC address) is the MAC address of the AP, the information carried by the destination IP address field (i.e., the destination IP address) is the IP address of the CPE, the information carried by the source IP address field (i.e., the source IP address) is the IP address of the AP, and the information carried by the message header type field indicates that the message header of this fourth message is a GRE header.
[0176] 508. AP encapsulates the fourth message to obtain the second target message.
[0177] In one possible implementation, the AC removes the destination MAC address field and the source MAC address field from the header of the fourth message, encapsulates the header of the processed message, and obtains the second destination message.
[0178] In this embodiment, the fourth message is encapsulated using a wireless network protocol to obtain the second target message. Optionally, the wireless network protocol is 802.11, or other protocols; this embodiment does not limit the specific protocol used. Taking 802.11 as an example, the second target message is an 802.11 message. Accordingly, the encapsulation process involves first removing the destination MAC address and source MAC address fields from the header of the fourth message (i.e., the destination MAC address and source MAC address fields in the GRE header), and then encapsulating the processed message with an 802.11 header to obtain an 802.11 message, which serves as the second target message.
[0179] Still with Figure 6 The following is an example of a message format diagram for illustration. Figure 6 The wireless network uses the 802.11 protocol during the message processing shown. Figure 6 Of the messages shown, message 604 is the second destination message. For example... Figure 6 As shown in message 604, the second destination message is encapsulated based on the fourth message, i.e., message 603. Compared to the fourth message, the second destination message is obtained by removing the destination MAC address field and the source MAC address field from the GRE header of the fourth message, and then encapsulating the first field of the processed message with an 802.11 header. The 802.11 header includes a receive address field, a destination address field, and a source address field. The information carried by the receive address field (i.e., the receive address) is the MAC address of the CPE, the information carried by the destination address field (i.e., the destination address) is the MAC address of the CPE, and the information carried by the source address field (i.e., the source address) is the MAC address of the AP.
[0180] 509. AP sends the second target message.
[0181] In one possible implementation, the AP sends the second target message to the CPE.
[0182] 510. The CPE receives the second target message from the AP.
[0183] 511. The CPE obtains the second original message from the second target message, which is obtained by encapsulating the second original message twice.
[0184] The encapsulation process involves two layers: wireless network protocol encapsulation and GRE protocol encapsulation. Consequently, the second target message includes two types of headers. Therefore, the CPE needs to perform two decapsulation steps to obtain the second original message.
[0185] In one possible implementation, after receiving the second target message sent by the AP, the CPE removes the header encapsulated based on the wireless network protocol from the second target message to obtain a decapsulated message. Then, it removes the header encapsulated based on the GRE protocol from the decapsulated message to obtain the second original message. For ease of explanation, the message obtained after the first decapsulation is denoted as message B. The above process is as follows: the CPE removes the header encapsulated based on the wireless network protocol from the second target message to obtain message B, and then removes the header encapsulated based on the GRE protocol from message B to obtain the second original message. Here, message B is the message obtained by removing the destination MAC address field and the source MAC address field from the fourth message.
[0186] Specifically, removing the header of the second destination message means removing the receive address field, destination address field, and source address field. Removing the header of message B means removing the protocol type field, destination IP address field, source IP address field, and header type field of message B.
[0187] In one possible implementation, the process of removing the header of the second destination message includes: the CPE parses the second destination message to determine the fields corresponding to the header of the second destination message (i.e., the receive address field, destination address field, and source address field), and then removes the fields corresponding to the header of the second destination message to remove the header of the second destination message. The process of removing the header of message B includes: the CPE parses message B to determine the fields corresponding to the header of message B (i.e., the protocol type field, destination IP address field, source IP address field, and header type field), and then removes the fields corresponding to the header of message B to remove the header of message B.
[0188] Taking the 802.11 wireless network protocol as an example, the header of the second target message includes an 802.11 header and a GRE header. During the decapsulation process of the second target message, the CPE first removes the 802.11 header, then removes the GRE header to obtain the second original message. Therefore, the two decapsulation processes are as follows: after receiving the second target message sent by the AP, the CPE removes the 802.11 header to obtain message B, and then removes the GRE header of message B to obtain the second original message.
[0189] Still with Figure 6 The following is an example of a message format diagram for illustration. Figure 6 Among the various messages shown, message 605 is the second original message obtained by CPE from the second target message. Message 605 and message 601 are the same message. The specific format of message 605 is described in step 501 above, and will not be repeated here.
[0190] It should be noted that when encapsulating the fourth message to obtain the second target message, the destination MAC address field and the source MAC address field in the header of the fourth message are removed before the header is encapsulated. Therefore, if the header of the second target message is removed, the result is no longer the complete fourth message, but the message obtained after removing the destination MAC address field and the source MAC address field from the fourth message. For ease of explanation, in this embodiment, the message obtained after removing the destination MAC address field and the source MAC address field from the fourth message is denoted as message B. In actual implementation, message B does not exist. Message B is only an intermediate product in the AP's message processing process and will not be involved in the actual message transmission.
[0191] 512. The CPE sends the second original message.
[0192] In one possible implementation, the CPE sends the second original message to the first site device.
[0193] 513. The first site device receives the second raw message from the CPE.
[0194] The solution provided in this application embodiment encapsulates the second original message received from the second site device by the AC with a single layer of encapsulation. The resulting third message can then be used for message transmission without requiring multiple layers of encapsulation. By sending the encapsulated third message to the AP, the AP obtains the second original message from the received third message and directly encapsulates it to obtain the second target message for transmission, thereby improving message transmission efficiency. Furthermore, the solution provided in this application embodiment offers a novel GRE tunnel construction method. By constructing a GRE tunnel between the CPE and AP, and a CAPWAP tunnel between the AP and AC, message transmission between the AP and AC only requires one layer of encapsulation through the CAPWAP tunnel, thereby improving the overall network transmission efficiency and enhancing the GRE tunneling capability of the entire system. Moreover, in related technologies, the establishment of GRE tunnels requires the consumption of the AC's tunnel table. CPEs are terminal devices, and there are usually many of them, so the overhead on the AC's tunnel table is very large, making it impossible to deploy in many scenarios. However, the solution provided in this application only creates GRE tunnels between CPEs and APs, without consuming the AC's tunnel table, thereby increasing the deployment scenarios for GRE tunnels, simplifying the initial deployment of GRE for CPEs, and reducing enterprise capital expenditure (CAPEX) costs.
[0195] It should be noted that the above Figure 3 and Figure 5The process shown is based on the example of direct communication between the second site device and the access controller. In more possible implementations, the access controller and the second site device are also connected sequentially to an access point device and a user premises device corresponding to the second site device. Figure 3 The process shown involves processing the first original message after step 313, i.e., after the AC obtains the first original message, through a process similar to steps 503 to 512. This process transparently transmits the first original message to the second station device, which then executes step 314 to receive the first original message. As for... Figure 5 In the process shown, when the second site device sends the second original message in step 501, it sends the second original message to the user premises device on the second site device side. Then, through the same process as steps 302 to 313, the second original message is processed so that the access controller can obtain the second original message. Then, through steps 502 to 513, the second original message is processed to achieve transparent transmission of the second original message.
[0196] Figure 7 This is a schematic diagram of the structure of a message processing device provided in an embodiment of this application. See also... Figure 7 Applied to AC, the device includes:
[0197] The receiving module 701 is used to perform the process of receiving the first message from the CPE in step 307;
[0198] The acquisition module 702 is used to execute the process of acquiring the second message from the first message in step 308;
[0199] The acquisition module 702 is also used to perform the process in step 309 of obtaining the first original message from the second message if the message header of the second message includes a target marker;
[0200] The sending module 703 is used to perform the process of sending the first target message in step 311.
[0201] The apparatus provided in this application provides a method of setting a target flag in the header of a second message to indicate that the message is to be decapsulated. This allows the first original message to be obtained from the second message after the second message is obtained from the first message. When it is determined that the header of the second message includes the target flag, the first original message can be obtained from the second message. Then, the first original message can be directly encapsulated in one layer to obtain the first target message for transmission, without the need for multiple layers of encapsulation, thereby improving the transmission efficiency of the message.
[0202] In one possible implementation, the target tag carries a destination address field in the header, which is either a destination Internet Protocol (IP) address field or a destination Media Access Control (MAC) address field.
[0203] In one possible implementation, the acquisition module 702 is used to perform the specific process of acquiring the first original message in step 309.
[0204] In one possible implementation, the acquisition module 702 is used for the specific process of acquiring the second message in step 308.
[0205] In one possible implementation, the first message is encapsulated using a wireless network protocol, the second message includes a Generic Routing Encapsulation (GRE) header, and the first destination message is encapsulated using the CAPWAP protocol for control and configuration of a wireless access point.
[0206] In one possible implementation, the receiving module 701 is also used to perform the process of receiving the third message from the AC in step 505;
[0207] The acquisition module 702 is also used to perform the process of acquiring the second original message from the third message in step 506;
[0208] The sending module 703 is also used to perform the process of sending the second target message in step 509.
[0209] In one possible implementation, the acquisition module 702 is used to perform the specific process of acquiring the second original message in step 506.
[0210] In one possible implementation, the third message is encapsulated using the CAPWAP protocol, the fourth message is encapsulated using the GRE protocol, and the second destination message is encapsulated using a wireless network protocol.
[0211] It should be noted that the message processing device provided in the above embodiments is only illustrated by the division of the above functional modules when processing messages. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the AC can be divided into different functional modules to complete all or part of the functions described above. In addition, the message processing device and message processing method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0212] Figure 8 This is a schematic diagram of the structure of a message processing device provided in an embodiment of this application. See also... Figure 8 Applied to CPE, the device includes:
[0213] The receiving module 801 is used to perform the process of receiving the first raw message from the first site device in step 302;
[0214] The encapsulation module 802 is used to perform the process of encapsulating the first original message in steps 303 to 305 to obtain the first message;
[0215] The sending module 803 is used to perform the process of sending the first message in step 306.
[0216] The apparatus provided in this application embodiment sets a target flag indicating that the message should be decapsulated in the header of the encapsulated message when encapsulating the first original message sent by the first site device. Then, the encapsulated message is sent for message transmission. When the device receiving the encapsulated message determines that the message header includes the target flag, it can decapsulate the message to obtain the first original message. The first original message can then be used for message transmission after being encapsulated in one layer, without the need for multiple layers of encapsulation, thereby improving the message transmission efficiency.
[0217] In one possible implementation, the target tag carries a destination address field in the header of the second message, which is either a destination IP address field or a destination MAC address field.
[0218] In one possible implementation, the encapsulation module 802 is used to perform the specific process of encapsulating the first original message in steps 303 to 305.
[0219] In one possible implementation, the second message includes a GRE header, and the first message is encapsulated using the GRE protocol.
[0220] In one possible implementation, the receiving module 801 is also used to perform the process of receiving the second target message from the AP in step 510;
[0221] The device also includes:
[0222] The acquisition module is used to perform the process of acquiring the second original message from the second target message in step 511. The second target message is obtained by encapsulating the second original message twice.
[0223] The sending module 803 is also used to perform the process of sending the second original message in step 512.
[0224] In one possible implementation, the acquisition module is used to perform the specific process of acquiring the second original message in step 511.
[0225] In one possible implementation, the two encapsulations include wireless network protocol encapsulation and GRE protocol encapsulation.
[0226] It should be noted that the message processing device provided in the above embodiments is only illustrated by the division of the above functional modules when processing messages. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the CPE can be divided into different functional modules to complete all or part of the functions described above. In addition, the message processing device and message processing method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0227] In an exemplary embodiment, a message processing system is also provided, which includes a Customer Premises Equipment (CPE) and an Access Point Equipment (AP).
[0228] The access point device (AP) is used to receive a first message from a customer premises equipment (CPE), obtain a second message from the first message; if the header of the second message includes a target marker, obtain a first original message from the second message, the target marker indicating that the second message should be decapsulated; and send a first target message, the first target message being obtained by encapsulating the first original message.
[0229] In one possible implementation, the target tag carries a destination address field in the header, which is either a destination Internet Protocol (IP) address field or a destination Media Access Control (MAC) address field.
[0230] In one possible implementation, the access point device (AP) is further configured to remove the header of the second message to obtain the first original message if the header of the second message includes a target tag.
[0231] In one possible implementation, the access point device (AP) is further configured to remove the header of the first message to obtain the second message.
[0232] In one possible implementation, the first message is encapsulated using a wireless network protocol, the second message includes a Generic Routing Encapsulation (GRE) header, and the first destination message is encapsulated using the CAPWAP protocol for control and configuration of a wireless access point.
[0233] In one possible implementation, the access point device (AP) is further configured to receive a third message from the access controller (AC); obtain a second original message from the third message; and send a second target message, which is obtained by encapsulating a fourth message, which is obtained by encapsulating the second original message.
[0234] In one possible implementation, the access point device (AP) is also used to remove the header of the third message to obtain the second original message.
[0235] In one possible implementation, the third message is encapsulated using the CAPWAP protocol, the fourth message is encapsulated using the GRE protocol, and the second destination message is encapsulated using a wireless network protocol.
[0236] The Customer Premises Equipment (CPE) is used to receive a first raw message from a first site device; encapsulate the first raw message to obtain a first message, the first message including a second message, the header of the second message including a target marker indicating that the second message should be decapsulated; and send the first message.
[0237] In one possible implementation, the target tag carries a destination address field in the header of the second message, which is either a destination IP address field or a destination MAC address field.
[0238] In one possible implementation, the CPE is further configured to encapsulate the first original message with an intermediate message header, wherein the destination address field of the intermediate message header carries the target tag; remove the destination MAC address field and the source MAC address field from the intermediate message header to obtain the second message; and encapsulate the second message with the first message header to obtain the first message.
[0239] In one possible implementation, the second message includes a GRE header, and the first message is encapsulated using a wireless network protocol.
[0240] In one possible implementation, the CPE is further configured to receive a second destination message from an AP; obtain a second original message from the second destination message, the second destination message being obtained by encapsulating the second original message twice; and send the second original message.
[0241] In one possible implementation, the CPE is also used to remove the two headers of the second target message to obtain the second original message.
[0242] In one possible implementation, the two encapsulations include wireless network protocol encapsulation and GRE protocol encapsulation.
[0243] In other possible implementations, the message processing system also includes an access controller (AC), the functions of which are described above. Figure 3 and Figure 5 The corresponding implementation examples will not be described in detail here.
[0244] The structure of each device involved in this message processing system is described below:
[0245] Figure 9This is a schematic diagram of the structure of a user premises equipment 900 provided in an embodiment of this application. See also... Figure 9 The user premises equipment 900 can vary significantly due to differences in configuration or performance. In one possible implementation, the user premises equipment 900 includes one or more central processing units (CPUs) 901 and one or more memories 902. The one or more memories 902 store at least one line of program code, which is loaded and executed by the one or more processors 901 to implement the processing procedure corresponding to the CPE in the message processing methods provided in the various method embodiments described above. In more possible implementations, the user premises equipment 900 has wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. Optionally, the user premises equipment 900 includes other components for implementing device functions, which will not be elaborated here.
[0246] It should be noted that, compared to existing user premises equipment, the user premises equipment 900 provided in this application embodiment has improvements in software structure and features. See also Figure 10 , Figure 10 This is a schematic diagram of the software composition structure of a user premises equipment (MPE) 900 provided in this application embodiment. The software composition of the MPE 900 includes an IP protocol stack 1001 and a wireless network protocol stack 1002. The wireless network protocol stack 1002 is an 802.11 protocol stack; optionally, the wireless network protocol stack 1002 can be of other types, which is not limited in this application embodiment. The solution provided in this application embodiment adds a GRE protocol to the IP protocol stack 1001 and modifies the added GRE protocol so that the added GRE protocol supports setting the destination address field of the packet header as a target marker, so that the packet processing process corresponding to the CPE in the packet processing methods provided in the above-mentioned method embodiments can be implemented through the modified GRE protocol.
[0247] Figure 11 This is a structural schematic diagram of an access point device 1110 provided in an embodiment of this application. See also... Figure 11The access point device 1100 can vary considerably due to differences in configuration or performance. In one possible implementation, the access point device 1100 includes one or more central processing units (CPUs) 1101 and one or more memories 1102. The one or more memories 1102 store at least one line of program code, which is loaded and executed by the one or more processors 1101 to implement the message processing procedure corresponding to the AP in the message processing methods provided in the above-described method embodiments. In more possible implementations, the access point device 1100 has wired or wireless network interfaces and input / output interfaces for input and output. Optionally, the access point device 1100 includes other components for implementing device functions, which will not be elaborated here.
[0248] It should be noted that, compared to existing access point devices, the access point device 1100 provided in this application embodiment has improvements in software structure and features. See also Figure 12 , Figure 12 This is a schematic diagram of the software composition structure of an access point device 1000 provided in an embodiment of this application. The software composition of the access point device 1000 includes an IP protocol stack 1201 and a wireless network protocol stack 1202. The wireless network protocol stack 1202 is an 802.11 protocol stack; optionally, the wireless network protocol stack 1202 can be of other types, which is not limited in this embodiment. The solution provided in this embodiment adds a GRE protocol to the IP protocol stack 1201 and modifies the added GRE protocol so that the added GRE protocol supports decapsulation of the received packet when the destination address field of the received packet header is a target marker, removing the GRE header of the received packet. This allows the modified GRE protocol to implement the packet processing process corresponding to the AP in the packet processing methods provided in the above-mentioned method embodiments.
[0249] Figure 13 This is a schematic diagram of the structure of an access controller 1300 provided in an embodiment of this application. See also... Figure 13The access controller 1300 can vary significantly due to differences in configuration or performance. In one possible implementation, the access controller 1300 includes one or more central processing units (CPUs) 1301, one or more memories 1302, a switching network 1303, a backplane 1304, and an interface board 1305. The one or more processors 1301 are primarily used for task scheduling and communication processes based on data forwarding control, including network control plane communication and forwarding plane communication, such as data encapsulation and decapsulation, and querying traffic forwarding information. The memories 1302 are used to store and exchange various types of data or software, including user access information and forwarding device information during network communication. The switching network 1303 and interface board 1305, in cooperation with the backplane 1304, complete the message processing methods provided in the above-described embodiments to achieve network data forwarding. In other possible implementations, the access controller 1300 includes other components for implementing device functions, which will not be elaborated here.
[0250] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions that can be executed by a processor to complete the data processing method described above. For example, the computer-readable storage medium is a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc. Optionally, the computer-readable storage medium may be of other types, which are not limited in this application embodiment.
[0251] In an exemplary embodiment, a computer program product is also provided, which, when run on an access point device (AP), causes the AP to perform the above-described... Figure 3 and Figure 5 In the corresponding embodiment, the execution subject is the message processing method steps of the AP; or, when the computer program product runs on the Customer Premises Equipment (CPE), it causes the CPE to execute the above-mentioned steps. Figure 3 and Figure 5 The corresponding embodiment describes the method steps of the message processing method executed by the CPE.
[0252] In an exemplary embodiment, a chip is also provided, the chip including a processing circuit and an input / output interface internally connected and communicating with the processing circuit, the processing circuit and the input / output interface being respectively used to implement the above-described... Figure 3 and Figure 5In the corresponding embodiment, the execution subject is the AP (Access Point) and the method steps of the message processing method are implemented; or, the processing circuit and the input / output interface are respectively used to implement the above. Figure 3 and Figure 5 The corresponding embodiment describes the method steps of the message processing method executed by the CPE.
[0253] In some possible embodiments, the chip described above is implemented using the following structures: one or more field-programmable gate arrays (FPGAs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), controllers, application-specific integrated circuits (ASICs), state machines, gate logic, discrete hardware components, transistor logic devices, network processors (NPs), any other suitable circuits, or any combination of circuits capable of performing the various functions described throughout this application.
[0254] The serial numbers corresponding to the embodiments of this application are merely for description and do not represent the superiority or inferiority of the embodiments.
[0255] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0256] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A message processing method, characterized in that, Performed by the access point device (AP), the method includes: Receive a first message from the Customer Premises Equipment (CPE), the first message being encapsulated using a wireless network protocol; Remove the header of the first message to obtain the second message; If the header of the second message includes a target marker, the header of the second message is removed to obtain the first original message. The target marker indicates that the second message is decapsulated. The second message includes a Generic Routing Encapsulation (GRE) header. A first target message is sent to the access controller AC. The first target message is obtained by encapsulating the first original message. The first target message is encapsulated using the CAPWAP protocol for the control and configuration of the wireless access point.
2. The method according to claim 1, characterized in that, The target tag is carried in the destination address field in the header of the second message. The destination address field is either the destination Internet Protocol (IP) address field or the destination Media Access Control (MAC) address field.
3. The method according to claim 1 or 2, characterized in that, The method further includes: Receive a third message from the AC; Obtain the second original message from the third message; Send a second target message, which is obtained by encapsulating a fourth message, which is obtained by encapsulating the second original message.
4. The method according to claim 3, characterized in that, The third message is encapsulated using the CAPWAP protocol, the fourth message is encapsulated using the GRE protocol, and the second target message is encapsulated using the wireless network protocol.
5. A message processing method, characterized in that, Performed by the customer premises equipment (CPE), the method includes: Receive the first raw message from the first site device; An intermediate header is encapsulated for the first original message, and the destination address field of the intermediate header carries a target marker; The destination MAC address field and the source MAC address field are removed from the intermediate packet header to obtain the second packet. The header of the second packet includes the target flag, which indicates that the second packet is decapsulated. The second packet includes a Generic Routing Encapsulation (GRE) header. The second message is encapsulated with a first message header to obtain a first message, the first message including the second message, and the first message is encapsulated using a wireless network protocol; Send the first message to the access point device (AP).
6. The method according to claim 5, characterized in that, The target tag is carried in the destination address field in the header of the second message. The destination address field is either the destination IP address field or the destination MAC address field.
7. The method according to claim 5 or 6, characterized in that, The method further includes: Receive the second target message from the AP; Obtain the second original message from the second target message, wherein the second target message is obtained by encapsulating the second original message twice; Send the second original message.
8. The method according to claim 7, characterized in that, The two encapsulation processes include wireless network protocol encapsulation and GRE protocol encapsulation.
9. A message processing apparatus, characterized in that, The device is applied to an access point (AP) device and includes: The receiving module is used to receive a first message from the Customer Premises Equipment (CPE), the first message being encapsulated using a wireless network protocol. The acquisition module is used to remove the header of the first message to obtain the second message; The acquisition module is further configured to remove the header of the second message if the header of the second message includes a target marker, thereby obtaining the first original message, wherein the target marker indicates that the second message is decapsulated, and the second message includes a Generic Routing Encapsulation (GRE) header; The sending module is used to send a first target message to the access controller AC. The first target message is obtained by encapsulating the first original message and is encapsulated using the CAPWAP protocol for the control and configuration of the wireless access point.
10. The apparatus according to claim 9, characterized in that, The target tag is carried in the destination address field in the header of the second message. The destination address field is either the destination Internet Protocol (IP) address field or the destination Media Access Control (MAC) address field.
11. The apparatus according to claim 9 or 10, characterized in that, The receiving module is also configured to receive a third message from the AC; The acquisition module is further configured to acquire a second original message from the third message; The sending module is further configured to send a second target message, the second target message being obtained by encapsulating a fourth message, the fourth message being obtained by encapsulating the second original message.
12. The apparatus according to claim 11, characterized in that, The third message is encapsulated using the CAPWAP protocol, the fourth message is encapsulated using the GRE protocol, and the second target message is encapsulated using the wireless network protocol.
13. A message processing apparatus, characterized in that, The device is applied to Customer Premises Equipment (CPE) at customer premises and includes: The receiving module is used to receive the first raw message from the first site device; An encapsulation module is used to encapsulate an intermediate packet header into the first original packet, wherein the destination address field of the intermediate packet header carries a target marker; remove the destination MAC address field and the source MAC address field from the intermediate packet header to obtain a second packet, wherein the header of the second packet includes the target marker, the target marker indicating that the second packet should be decapsulated, and the second packet includes a Generic Router Encapsulation (GRE) header; and encapsulate the second packet with a first packet header to obtain a first packet, wherein the first packet includes the second packet, and the first packet is encapsulated using a wireless network protocol. The sending module is used to send the first message to the access point device (AP).
14. The apparatus according to claim 13, characterized in that, The target tag is carried in the destination address field in the header of the second message. The destination address field is either the destination IP address field or the destination MAC address field.
15. The apparatus according to claim 13 or 14, characterized in that, The receiving module is also configured to receive a second target message from the AP; The device further includes: The acquisition module is used to acquire a second original message from the second target message, wherein the second target message is obtained by encapsulating the second original message twice; The sending module is also used to send the second original message.
16. The apparatus according to claim 15, characterized in that, The two encapsulation processes include wireless network protocol encapsulation and GRE protocol encapsulation.
17. A message processing system, characterized in that, The message processing system includes an access point device (AP) and a customer premises equipment (CPE). The AP is used to perform the method as described in any one of claims 1 to 4, and the CPE is used to perform the method as described in any one of claims 5 to 8.
18. An access point device, characterized in that, The access point device includes a processor and a memory, the memory storing at least one instruction that is read by the processor to cause the access point device to perform the method as described in any one of claims 1 to 4.
19. A user premises equipment, characterized in that, The user premises equipment includes a processor and a memory, the memory storing at least one instruction that is read by the processor to cause the user premises equipment to perform the method as described in any one of claims 5 to 8.
20. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, which is read by the processor of an access point device (AP) to cause the AP to perform the method as described in any one of claims 1 to 4; or, the instruction is read by the processor of a customer premises equipment (CPE) to cause the CPE to perform the method as described in any one of claims 5 to 8.
Citation Information
Patent Citations
Packet forwarding
US20170373883A1
