Message forwarding method and device, wireless controller and storage medium

CN117425130BActive Publication Date: 2026-10-27MAIPU COMM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311616518.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-29
Publication Date
2026-10-27
Estimated Expiration
2043-11-29

AI Technical Summary

Technical Problem

当发往STA的业务中存在大量的多播/广播报文时,若同一个广播域存在数量众多(例如上千台)的AP,则AC需要向同一广播域中所有AP发送业务报文的副本,这对AC带来了极大的报文处理压力

Benefits of technology

[0038]相比于现有技术,本发明实施例提供的报文转发方法、装置、无线控制器和存储介质,该方法根据接收到的业务报文中的虚拟局域网标识和多播映射表,确定业务报文对应的单播隧道集合;根据单播隧道集合中的单播隧道信息确定有效单播隧道数量和无效单播隧道数量;根据有效单播隧道数量和无效单播隧道数量将业务报文通过单播隧道和/或多播隧道转发到多播组内的无线接入点。从而实现多播隧道与单播隧道转发业务报文的自动切换,有效提高报文转发时环境兼容性。使用多播隧道转发多播业务报文时,无需为多播组中每个无线接入点复制业务报文,而是为每个多播组复制封装一份多播报文,在保证报文转发质量的同时,尽可能减少无线控制器转发资源的消耗和业务负载,同时提高报文转发效率和网络转发吞吐量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117425130B_ABST
    Figure CN117425130B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a message forwarding method and device, a wireless controller and a storage medium, and relate to the technical field of communication equipment. The method determines a unicast tunnel set corresponding to a service message according to a virtual local area network identifier and a multicast mapping table in the received service message; determines the number of valid unicast tunnels and the number of invalid unicast tunnels according to unicast tunnel information in the unicast tunnel set; and forwards the service message to a wireless access point in a multicast group through a unicast tunnel and / or a multicast tunnel according to the number of valid unicast tunnels and the number of invalid unicast tunnels. Thus, automatic switching of the multicast tunnel and the unicast tunnel for forwarding the service message is realized, and the environmental compatibility during message forwarding is effectively improved. While ensuring the quality of message forwarding, the consumption of forwarding resources and the service load of the wireless controller are reduced as much as possible, and the message forwarding efficiency and the network forwarding throughput are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication equipment technology, and more specifically, to a message forwarding method, apparatus, wireless controller, and storage medium. Background Technology

[0002] When a WLAN (Wireless Local Area Network) is deployed using an AC (Wireless Access Point Controller) and AP (Wireless Access Point), it typically uses two forwarding modes to forward service packets: direct forwarding and tunnel forwarding. In tunnel forwarding mode, the AC can perform functions such as monitoring and billing of wireless services.

[0003] When using tunnel forwarding mode, the service packets of STA (Station, wireless terminal) will be encapsulated / decapsulated and forwarded by AC. The service packets are encapsulated according to the CAPWAP (Control And Provisioning of Wireless Access Points Protocol) protocol format, and unicast tunnels are used to forward the encapsulated packets between AC and AP.

[0004] In this process, downlink service packets destined for STAs are encapsulated in CAPWAP by the AC before being sent to the AP. The AP then decapsulates the received CAPWAP packets, performs protocol transformation, and sends them to the STA. When there are a large number of multicast / broadcast packets in the services sent to the STA, if there are numerous APs (e.g., thousands) in the same broadcast domain, the AC needs to send copies of the service packets to all APs in the same broadcast domain, which puts a huge burden on the AC's packet processing capabilities. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide a message forwarding method, apparatus, wireless controller and storage medium that can reduce forwarding resource consumption and service load, thereby improving service message forwarding efficiency and throughput.

[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of the present invention are as follows:

[0007] In a first aspect, the present invention provides a message forwarding method applied to a wireless controller, the wireless controller being communicatively connected to multiple wireless access points; the wireless controller stores a multicast mapping table, each entry of the multicast mapping table recording a correspondence between a virtual local area network identifier, a multicast address, and a unicast tunnel set; the unicast tunnel set includes unicast tunnel information of all wireless access points within the multicast group corresponding to the multicast address; the method includes:

[0008] Based on the virtual LAN identifier in the received service message and the multicast mapping table, determine the unicast tunnel set corresponding to the service message;

[0009] The number of valid unicast tunnels and the number of invalid unicast tunnels are determined based on the unicast tunnel information in the unicast tunnel set.

[0010] Based on the number of valid unicast tunnels and the number of invalid unicast tunnels, the service packets are forwarded to the radio access points within the multicast group via unicast tunnels and / or multicast tunnels.

[0011] In an optional implementation, forwarding the service packets to the radio access points within the multicast group via unicast tunnels and / or multicast tunnels based on the number of valid unicast tunnels and the number of invalid unicast tunnels includes:

[0012] When the number of valid unicast tunnels exceeds the multicast threshold and all unicast tunnels in the unicast tunnel set are valid, the multicast address corresponding to the service message is determined according to the virtual LAN identifier in the received service message and the multicast mapping table.

[0013] A multicast tunnel message is obtained by encapsulating the service message with the multicast address corresponding to the service message, and the multicast tunnel message is forwarded to the wireless access point in the multicast group.

[0014] In an optional implementation, forwarding the service packets to the radio access points within the multicast group via unicast tunnels and / or multicast tunnels based on the number of valid unicast tunnels and the number of invalid unicast tunnels includes:

[0015] When the number of valid unicast tunnels exceeds the multicast threshold and there are invalid unicast tunnels in the unicast tunnel set, the multicast address corresponding to the service packet and the identifiers of all invalid unicast tunnels are obtained according to the virtual LAN identifier in the received service packet and the multicast mapping table; the difference between the survival time of the invalid unicast tunnel and the current time is greater than the valid time threshold.

[0016] The corresponding unicast tunnel message is obtained by encapsulating the service message according to the identifier of each invalid unicast tunnel, and the unicast tunnel message is forwarded to the wireless access point corresponding to each invalid unicast tunnel.

[0017] A multicast tunnel message is obtained by encapsulating the service message with the multicast address corresponding to the service message, and the multicast tunnel message is forwarded to the wireless access point in the multicast group.

[0018] In an optional implementation, forwarding the service packets to the radio access points within the multicast group via unicast tunnels and / or multicast tunnels based on the number of valid unicast tunnels and the number of invalid unicast tunnels includes:

[0019] When the number of valid unicast tunnels does not exceed the multicast threshold, the corresponding unicast tunnel message is obtained by encapsulating the service message according to the identifier of each unicast tunnel in the unicast tunnel set, and the unicast tunnel message is forwarded to the wireless access point corresponding to each unicast tunnel.

[0020] In an optional implementation, the unicast tunnel information includes the identifier and lifespan of the unicast tunnel; determining the number of valid unicast tunnels and the number of invalid unicast tunnels based on the unicast tunnel information in the unicast tunnel set includes:

[0021] Calculate the difference between the current time and the lifetime of each unicast tunnel in the set of unicast tunnels;

[0022] The number of valid unicast tunnels is obtained by counting the number of unicast tunnels whose difference is less than or equal to the effective time threshold.

[0023] The number of invalid unicast tunnels is obtained by counting the number of unicast tunnels whose difference is greater than the effective time threshold.

[0024] In an optional implementation, before receiving the service message, the method further includes the following steps:

[0025] Create the corresponding unicast tunnel based on the wireless access point's online request;

[0026] Configure a corresponding virtual LAN identifier for each virtual LAN configured on the wireless access point;

[0027] If there is an entry in the multicast mapping table that matches the virtual LAN identifier, then the identifier of the unicast tunnel is added to the unicast tunnel set in the matching entry.

[0028] If there is no entry in the multicast mapping table that matches the virtual LAN identifier, a new multicast address is obtained from the multicast address pool, and a corresponding entry is added to the multicast mapping table according to each virtual LAN identifier, the new multicast address, and the identifier of the unicast tunnel.

[0029] The multicast addresses and ports corresponding to all the virtual LAN identifiers are sent to the wireless access point so that the wireless access point can join the multicast group and listen on the ports according to the received multicast addresses.

[0030] In an optional implementation, the method further includes:

[0031] Periodically send keep-alive information to all wireless access points in the multicast group through the multicast tunnel;

[0032] When a response message is received from the wireless access point based on the keep-alive information, the liveness time of the unicast tunnel corresponding to the wireless access point is updated in the multicast mapping table.

[0033] Secondly, the present invention provides a message forwarding device applied to a wireless controller, the wireless controller being communicatively connected to multiple wireless access points; the wireless controller stores a multicast mapping table, each entry of the multicast mapping table recording a correspondence between a virtual local area network identifier, a multicast address, and a unicast tunnel set; the unicast tunnel set includes unicast tunnel information of all wireless access points within the multicast group corresponding to the multicast address; the device includes:

[0034] The acquisition module is used to determine the unicast tunnel set corresponding to the service packet based on the virtual local area network identifier in the received service packet and the multicast mapping table; and to determine the number of valid unicast tunnels and the number of invalid unicast tunnels based on the unicast tunnel information in the unicast tunnel set.

[0035] The forwarding module is used to forward the service packets to the radio access points in the multicast group through unicast tunnels and / or multicast tunnels according to the number of valid unicast tunnels and the number of invalid unicast tunnels.

[0036] Thirdly, the present invention provides a wireless controller, the wireless controller including a memory and a processor, the memory being used to store a computer program, and the processor being used to execute the message forwarding method as described in the first aspect above when the computer program is invoked.

[0037] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the message forwarding method as described in the first aspect above.

[0038] Compared to existing technologies, the packet forwarding method, apparatus, wireless controller, and storage medium provided in this invention determine the set of unicast tunnels corresponding to the service packet based on the virtual LAN identifier and multicast mapping table in the received service packet; determine the number of valid and invalid unicast tunnels based on the unicast tunnel information in the unicast tunnel set; and forward the service packet to the wireless access point within the multicast group through unicast tunnels and / or multicast tunnels according to the number of valid and invalid unicast tunnels. This achieves automatic switching between multicast and unicast tunnels for forwarding service packets, effectively improving environmental compatibility during packet forwarding. When using multicast tunnels to forward multicast service packets, it is not necessary to copy the service packet for each wireless access point in the multicast group; instead, a copy of the multicast packet is encapsulated for each multicast group. This ensures packet forwarding quality while minimizing the consumption of wireless controller forwarding resources and service load, thereby improving packet forwarding efficiency and network forwarding throughput.

[0039] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0040] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 The diagram illustrates an application scenario provided by an embodiment of the present invention.

[0042] Figure 2 A flowchart illustrating a message forwarding method provided in an embodiment of the present invention is shown.

[0043] Figure 3 This diagram illustrates another flowchart of the message forwarding method provided in an embodiment of the present invention.

[0044] Figure 4 A block diagram of a message forwarding device provided in an embodiment of the present invention is shown.

[0045] Figure 5 A block diagram of a wireless controller provided in an embodiment of the present invention is shown.

[0046] Icons: 10-Wireless Controller; 20-Wireless Access Point; 110-Memory; 120-Processor; 130-Communication Module; 200-Message Forwarding Device; 201-Acquisition Module; 202-Forwarding Module; 203-Processing Module; 204-Keep Alive Module. Detailed Implementation

[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0048] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0049] It should be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0050] In a WLAN network, when service packets are forwarded using tunnel forwarding, the STA sends the service packet to the AP, which then encapsulates it via a CAPWAP data tunnel before sending it to the AC. The AC then centrally manages and forwards the packets. Similarly, service packets destined for the STA are also encapsulated via CAPWAP by the AC. This means that the service packet is treated as a payload, and an outer layer of ETH (Ethernet), IP (Internet Protocol), UDP (User Datagram Protocol), and CAPWAP headers is added. The IP address in the outer header includes the IP addresses of both the AC and the AP. The encapsulated tunnel packet is then sent to the AP, which decapsulates it and forwards it to the corresponding STA.

[0051] When the number of APs managed by the AC in the same broadcast domain increases, for example, when the AC manages thousands of APs, the AC needs to copy the same number of tunnel packets as the number of APs when sending multicast or broadcast packets to the APs, and send them to each AP one by one. This will cause the AC to consume a lot of forwarding resources, resulting in a huge service load on the AC.

[0052] Based on this, embodiments of the present invention provide a packet forwarding method and apparatus. According to the validity of the radio access points within the multicast group corresponding to the service packet, automatic switching between multicast tunnels and unicast tunnels for forwarding service packets is achieved, effectively improving environmental compatibility during packet forwarding. When using a multicast tunnel to forward multicast service packets, it is not necessary to copy the service packet for each radio access point in the multicast group. Instead, a copy of the multicast packet is encapsulated for each multicast group. This ensures packet forwarding quality while minimizing the consumption of radio controller forwarding resources and service load, thereby improving packet forwarding efficiency and network forwarding throughput.

[0053] Please refer to Figure 1 , Figure 1 A schematic diagram illustrating an application scenario provided by an embodiment of the present invention is shown. Figure 1 In this configuration, the wireless controller 10 communicates with multiple wireless access points 20 via CAPWAP tunnels, which include unicast tunnels and / or multicast tunnels. After receiving service packets from the upper-layer network, the wireless controller 10 executes steps S10 to S30 and their corresponding sub-steps in the following embodiments, based on the specific service packet. The wireless controller 10 also periodically determines the liveness status of the wireless access points 20 in the multicast group to achieve the corresponding technical effects. When a wireless access point 20 goes online, it needs to send an online request to the wireless controller 10. The wireless controller 10 executes steps S40 to S80 and their corresponding sub-steps in the following embodiments based on the received online request to achieve the corresponding technical effects.

[0054] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0055] Please refer to Figure 2 , Figure 2 This diagram illustrates a flowchart of a message forwarding method provided by an embodiment of the present invention. The method is executed by the aforementioned wireless controller, which is communicatively connected to multiple wireless access points. The wireless controller maintains a multicast mapping table, where each entry records the correspondence between a virtual LAN identifier, a multicast address, and a unicast tunnel set. The unicast tunnel set includes unicast tunnel information for all wireless access points within the multicast group corresponding to the multicast address. The method includes the following steps:

[0056] Step S10: Determine the set of unicast tunnels corresponding to the service message based on the virtual LAN identifier and multicast mapping table in the received service message.

[0057] In this embodiment of the invention, the type of the service packet is determined based on the destination MAC address in the received service packet. If the service packet is a unicast packet, it is forwarded to the corresponding wireless access point through a unicast tunnel. If the service packet is a multicast packet, a set of unicast tunnels matching the virtual LAN identifier in the service packet is found in the multicast mapping table. That is, a matching entry with the same virtual LAN identifier as the service packet is found in the multicast mapping table, and the set of unicast tunnels in the matching entry is taken as the set of unicast tunnels corresponding to the service packet.

[0058] Step S20: Determine the number of valid unicast tunnels and the number of invalid unicast tunnels based on the unicast tunnel information in the unicast tunnel set.

[0059] Step S30: Based on the number of valid unicast tunnels and the number of invalid unicast tunnels, forward the service packets to the radio access point within the multicast group through unicast tunnels and / or multicast tunnels.

[0060] In this embodiment of the invention, the number of valid and invalid unicast tunnels is counted based on the unicast tunnel information of all wireless access points within the multicast group recorded in the unicast tunnel set. Based on the number of valid and invalid unicast tunnels, the forwarding method of service packets is rationally planned, enabling automatic switching between unicast tunnel forwarding and multicast tunnel forwarding.

[0061] In summary, the packet forwarding method provided by this invention automatically switches between multicast tunnels and unicast tunnels for forwarding service packets based on the validity of the wireless access points within the multicast group corresponding to the service packet, effectively improving environmental compatibility during packet forwarding. When using a multicast tunnel to forward multicast service packets, it is not necessary to copy the service packet for each wireless access point in the multicast group. Instead, a multicast packet is copied and encapsulated for each multicast group. This ensures packet forwarding quality while minimizing the consumption of wireless controller forwarding resources and service load, thereby improving packet forwarding efficiency and network forwarding throughput.

[0062] Optionally, in practical applications, unicast tunnel information includes the identifier and lifespan of the unicast tunnel. The number of valid and invalid unicast tunnels can be determined based on the lifespan of the wireless access point, thereby enabling adaptive switching between unicast and multicast tunnels for forwarding service packets. Figure 2 The sub-steps of step S20 may include:

[0063] Calculate the difference between the current time and the lifetime of each unicast tunnel in the unicast tunnel set. Count the number of unicast tunnels whose difference is less than or equal to the effective lifetime threshold to obtain the number of effective unicast tunnels. Count the number of unicast tunnels whose difference is greater than the effective lifetime threshold to obtain the number of invalid unicast tunnels.

[0064] In this embodiment of the invention, each unicast tunnel in the unicast tunnel set corresponds to a wireless access point. The validity of the wireless access point in the multicast group is determined based on the liveness time of each wireless access point recorded in the unicast tunnel set. The validity time threshold can be set according to the actual network configuration, and this invention does not limit it.

[0065] The system obtains the current time of the wireless controller, iterates through the matched unicast tunnel set, and calculates the difference between the current time and the lifetime of each unicast tunnel. If the difference is less than or equal to the effective lifetime threshold, the wireless access point is considered valid (i.e., the unicast tunnel of the wireless access point is valid). The number of valid wireless access points is accumulated to obtain the number of valid unicast tunnels. If the difference is greater than the effective lifetime threshold, the wireless access point is considered invalid (i.e., the unicast tunnel of the wireless access point is invalid). The number of invalid wireless access points is accumulated to obtain the number of invalid unicast tunnels. In other words, the number of valid unicast tunnels records the number of valid wireless access points within the multicast group, and the number of invalid unicast tunnels records the number of invalid wireless access points within the multicast group.

[0066] Optionally, in practical applications, in order to save the forwarding resources of the wireless controller, service packets are forwarded to all valid wireless access points in the multicast group through a multicast tunnel. Figure 2 The sub-steps of step S30 may include:

[0067] When the number of valid unicast tunnels exceeds the multicast threshold and all unicast tunnels in the unicast tunnel set are valid (i.e., the number of invalid unicast tunnels is 0), the multicast address corresponding to the service packet is determined based on the virtual LAN identifier and multicast mapping table in the received service packet. A multicast tunnel packet is then encapsulated based on the multicast address and the service packet, and forwarded to the radio access point within the multicast group.

[0068] In this embodiment of the invention, when all wireless access points within the multicast group matched according to the service packet are valid, a multicast tunnel is used to forward the service packet. First, the multicast address corresponding to the service packet is obtained by matching the virtual LAN identifier in the received service packet with the multicast mapping table, and the corresponding multicast MAC (Media Access Control) address is generated based on the multicast address.

[0069] In this embodiment of the invention, a multicast tunnel message is encapsulated according to the multicast address, multicast MAC address, and service message corresponding to the service message, and then forwarded to all wireless access points within the multicast group through the multicast tunnel. During multicast tunnel message encapsulation, the outermost Ethernet header and network layer header are encapsulated in a multicast manner.

[0070] As one possible implementation, assume that the encapsulation format of the multicast tunnel message includes a multicast tunnel MAC header, a multicast tunnel IP header, a UDP header, a CAPWAP header, and a service message. The multicast tunnel MAC header includes a destination MAC address and a source MAC address. The destination MAC address is the multicast MAC address corresponding to the service message, and the source MAC address is the MAC address of the wireless controller. The multicast tunnel IP header includes a destination IP address and a source IP address. The destination IP address is the multicast address corresponding to the service message, and the source IP address is the IP address of the wireless controller. The UDP header includes a destination port and a source port. The destination port is the port allocated during multicast tunnel creation, and the source port can be a specified port, such as 5247. The CAPWAP header is the same as the CAPWAP header in existing unicast tunnel messages and will not be described further here.

[0071] Optionally, in practical applications, to ensure that invalid wireless access points within a multicast group can obtain service packets in a timely manner, and to improve forwarding efficiency, multicast tunnels and unicast tunnels are used reasonably to forward service packets. Figure 2 The sub-steps of step S30 may include:

[0072] When the number of valid unicast tunnels exceeds the multicast threshold and invalid unicast tunnels exist in the unicast tunnel set, the multicast address corresponding to the service packet and the identifiers of all invalid unicast tunnels are obtained based on the virtual LAN identifier and multicast mapping table in the received service packet. The difference between the lifetime of an invalid unicast tunnel and the current time must be greater than the valid lifetime threshold. A corresponding unicast tunnel packet is encapsulated based on the identifier of each invalid unicast tunnel and the service packet, and the unicast tunnel packet is forwarded to the corresponding radio access point of each invalid unicast tunnel. A multicast tunnel packet is encapsulated based on the multicast address corresponding to the service packet and the service packet, and the multicast tunnel packet is forwarded to the radio access point within the multicast group.

[0073] In this embodiment of the invention, when the number of valid wireless access points within the multicast group matched by the service packet exceeds the multicast threshold and there are also invalid wireless access points (i.e., the number of invalid unicast tunnels is greater than 0), the corresponding multicast address and the identifiers of all invalid unicast tunnels are obtained. The multicast threshold can be set according to the actual application scenario, and this invention does not limit it.

[0074] In this embodiment of the invention, the wireless controller maintains a unicast mapping table. Each entry in the unicast mapping table records the correspondence between the unicast tunnel identifier, unicast address, unicast MAC address, and unicast port. For each invalid unicast tunnel, a matching unicast entry is determined in the unicast mapping table. The corresponding unicast tunnel message is then encapsulated using the unicast address, unicast MAC address, unicast port, and service message from the matching unicast entry. Finally, the unicast tunnel message is forwarded to the wireless access point through the corresponding unicast tunnel. The encapsulation format of the unicast tunnel message can be found in existing technologies and will not be elaborated here.

[0075] As can be seen, invalid wireless access points within a multicast group forward service packets one-to-one through a unicast tunnel, thereby ensuring that invalid wireless access points can receive service packets in a timely manner, and thus improving the reliability of wireless LAN data forwarding.

[0076] In this embodiment of the invention, since there are a large number of valid wireless access points in the multicast group corresponding to the service packet, in order to reduce the consumption of wireless controller forwarding resources and improve the forwarding efficiency of service packets, a multicast tunnel packet is encapsulated according to the multicast address corresponding to the service packet and the service packet, and the multicast tunnel packet is forwarded to the wireless access points in the multicast group.

[0077] Optionally, in practical applications, to avoid excessive propagation of service packets in multicast groups, unicast tunnels are used to forward packets directly when the number of effective wireless access points is small. Figure 2 The sub-steps of step S30 may include:

[0078] When the number of valid unicast tunnels does not exceed the multicast threshold, the corresponding unicast tunnel message is obtained by encapsulating the service message according to the identifier of each unicast tunnel in the unicast tunnel set, and the unicast tunnel message is forwarded to the wireless access point corresponding to each unicast tunnel.

[0079] In this embodiment of the invention, when the number of valid wireless access points in the multicast group corresponding to the service packet does not reach the multicast threshold, in order to avoid the service packet from being excessively spread in the multicast group due to multicast, the service packet can be encapsulated into a unicast tunnel packet corresponding to each wireless access point, and the unicast tunnel packet can be forwarded to the wireless access point through the corresponding unicast tunnel.

[0080] Optionally, in practical applications, the wireless controller needs to create unicast tunnels for newly connected wireless access points, and multicast tunnels for wireless access points that support multicast forwarding. Please refer to... Figure 3 The message forwarding method also includes the following steps:

[0081] Step S40: Create a corresponding unicast tunnel based on the wireless access point's online request.

[0082] Step S50: Configure a corresponding virtual LAN identifier for each virtual LAN configured on the wireless access point.

[0083] In this embodiment of the invention, when a wireless access point comes online, it obtains an IP address and discovers the wireless controller, then sends an online request to the wireless controller according to the CAPWAP protocol standard. Upon receiving the online request, the wireless controller allocates an identifier for a unicast tunnel and creates a corresponding unicast tunnel based on the CAPWAP encapsulation information in the online request. After successful creation of the unicast tunnel, the unicast tunnel identifier, unicast address, unicast MAC address, and unicast port are saved to a unicast mapping table.

[0084] Step S60: If there is an entry in the multicast mapping table that matches the virtual LAN identifier, then add the unicast tunnel identifier to the unicast tunnel set in the matching entry.

[0085] In this embodiment of the invention, it is determined whether the wireless access point supports multicast tunneling based on the capability identifier carried in the online request. If the wireless access point does not support multicast tunneling, the online request is completed, and subsequent packets are forwarded to the wireless access point through a unicast tunnel.

[0086] If the wireless access point supports multicast tunnels, the multicast mapping table is traversed according to the virtual LAN identifier. If a matching entry exists in the multicast mapping table, the identifier of the unicast tunnel is added to the unicast tunnel set in the matching entry.

[0087] Step S70: If there is no entry in the multicast mapping table that matches the virtual LAN identifier, then obtain a new multicast address from the multicast address pool, and add the corresponding entry in the multicast mapping table according to each virtual LAN identifier, the new multicast address, and the identifier of the unicast tunnel.

[0088] In this embodiment of the invention, a multicast address pool is created on the wireless controller. The multicast address pool records the correspondence between configured multicast addresses and their allocation status. For example, the allocation status of an allocated multicast address is set to "allocated," and the allocation status of an unallocated multicast address is set to "unallocated."

[0089] If the multicast mapping table does not record an entry corresponding to the virtual LAN identifier, an unassigned multicast address is obtained from the multicast address pool as the multicast address corresponding to the virtual LAN identifier, and the allocation status of the multicast address is updated to assigned.

[0090] Step S80: Send the multicast addresses and ports corresponding to all virtual LAN identifiers to the wireless access point so that the wireless access point can join the multicast group and listen on the received multicast addresses.

[0091] In this embodiment of the invention, after the wireless controller updates the multicast mapping table (i.e., enables the multicast tunnel of the wireless access point) according to the wireless access point's online request, it sends the multicast address and port to the wireless access point via a CAPWAP control packet, informing the wireless access point of its multicast group so that the wireless access point can join the multicast group of the multicast tunnel and listen on the port to receive service packets. The CAPWAP control packet can be a Join Response, Config Status Response, or similar message.

[0092] It should be noted that when a wireless access point deletes a WLAN or goes offline, it sends a corresponding removal request to the wireless controller to update the multicast mapping table. The entry to be updated is determined based on the VLAN ID in the removal request and the multicast mapping table. When a wireless access point deletes a WLAN, the VLAN ID is the same as the VLAN ID corresponding to the WLAN to be deleted. When a wireless access point goes offline, the VLAN ID includes the VLAN IDs corresponding to all WLANs configured on the wireless access point.

[0093] The identifier of the matching unicast tunnel is determined based on the unicast address and unicast mapping table carried in the removal request. It then checks if other unicast tunnel information exists in the unicast tunnel set of the corresponding entry to be updated. If it does, the unicast tunnel information corresponding to the identifier of the matching unicast tunnel is deleted from the unicast tunnel set; otherwise, the entry to be updated is removed, and the allocation status of the corresponding multicast address is updated to unallocated.

[0094] Furthermore, if the configured WLAN changes while the wireless access point is online, such as when it is modified to support multicast tunnels, the wireless access point sends an update request to the wireless controller. The wireless controller then executes steps S70 to S80 above to update the multicast mapping table based on the virtual LAN identifier in the update request, and sends the corresponding multicast address and port to the wireless access point so that the wireless access point can join the multicast group and listen on the received multicast address.

[0095] Optionally, in practical applications, the wireless controller monitors the liveness status of wireless access points in the multicast group by periodically sending keep-alive information. The message forwarding method also includes the following steps:

[0096] The system periodically sends keep-alive information to all wireless access points in the multicast group through the multicast tunnel; when it receives a response information sent by a wireless access point based on the keep-alive information, it updates the lifespan of the unicast tunnel corresponding to the wireless access point in the multicast mapping table.

[0097] In this embodiment of the invention, the wireless controller periodically sends keep-alive information to all wireless access points through a multicast tunnel. After receiving the keep-alive information, the wireless access points send response information to the wireless controller through a unicast tunnel. For example, the wireless access point sends a KeepAlive message to the wireless controller through a unicast tunnel. The wireless controller determines whether the corresponding wireless access point in the multicast group is alive based on the KeepAlive message. If the wireless access point is alive, the controller updates the liveness time of the unicast tunnel corresponding to the wireless access point.

[0098] Based on the same inventive concept, this embodiment of the invention also provides a message forwarding device. Its basic principle and the resulting technical effects are the same as those in the above embodiments. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content in the above embodiments.

[0099] Please refer to Figure 4 , Figure 4 This diagram illustrates a block illustration of a message forwarding device 200 provided in an embodiment of the present invention. The message forwarding device 200 is applied to a wireless controller, which is communicatively connected to multiple wireless access points. The wireless controller maintains a multicast mapping table, where each entry records the correspondence between a virtual LAN identifier, a multicast address, and a unicast tunnel set. The unicast tunnel set includes unicast tunnel information for all wireless access points within the multicast group corresponding to the multicast address. The message forwarding device 200 includes an acquisition module 201, a forwarding module 202, a processing module 203, and a keep-alive module 204.

[0100] The acquisition module 201 is used to determine the set of unicast tunnels corresponding to the service message based on the virtual LAN identifier and multicast mapping table in the received service message; and to determine the number of valid unicast tunnels and the number of invalid unicast tunnels based on the unicast tunnel information in the unicast tunnel set.

[0101] The forwarding module 202 is used to forward service packets to the wireless access point in the multicast group through unicast tunnels and / or multicast tunnels according to the number of valid unicast tunnels and the number of invalid unicast tunnels.

[0102] In summary, the packet forwarding device provided in this embodiment of the invention automatically switches between multicast tunnels and unicast tunnels for forwarding service packets based on the validity of the wireless access points within the multicast group corresponding to the service packet, effectively improving environmental compatibility during packet forwarding. When using a multicast tunnel to forward service packets, it is not necessary to copy the service packet for each wireless access point in the multicast group. Instead, a multicast packet is copied and encapsulated for each multicast group. This ensures packet forwarding quality while minimizing the consumption of wireless controller forwarding resources and service load, thereby improving packet forwarding efficiency and network forwarding throughput.

[0103] Optionally, the acquisition module 201 is specifically used to calculate the difference between the current time and the lifespan of each unicast tunnel in the unicast tunnel set; count the number of unicast tunnels whose difference is less than or equal to the effective time threshold to obtain the number of effective unicast tunnels; and count the number of unicast tunnels whose difference is greater than the effective time threshold to obtain the number of invalid unicast tunnels.

[0104] Optionally, the forwarding module 202 is specifically used to determine the multicast address corresponding to the service packet based on the virtual LAN identifier and multicast mapping table in the received service packet when the number of valid unicast tunnels exceeds the multicast threshold and all unicast tunnels in the unicast tunnel set are valid; encapsulate the multicast tunnel packet according to the multicast address corresponding to the service packet and the service packet to obtain a multicast tunnel packet, and forward the multicast tunnel packet to the wireless access point in the multicast group.

[0105] Optionally, the forwarding module 202 is specifically configured to, when the number of valid unicast tunnels exceeds the multicast threshold and there are invalid unicast tunnels in the unicast tunnel set, obtain the multicast address corresponding to the service packet and the identifiers of all invalid unicast tunnels according to the virtual LAN identifier and multicast mapping table in the received service packet; the difference between the survival time of the invalid unicast tunnel and the current time is greater than the valid time threshold; encapsulate the corresponding unicast tunnel packet according to the identifier of each invalid unicast tunnel and the service packet, and forward the unicast tunnel packet to the wireless access point corresponding to each invalid unicast tunnel; encapsulate the multicast tunnel packet according to the multicast address corresponding to the service packet and the service packet, and forward the multicast tunnel packet to the wireless access point within the multicast group.

[0106] Optionally, the forwarding module 202 is specifically used to obtain the corresponding unicast tunnel message based on the identifier of each unicast tunnel in the unicast tunnel set and the service message encapsulation when the number of valid unicast tunnels does not exceed the multicast threshold, and forward the unicast tunnel message to the wireless access point corresponding to each unicast tunnel.

[0107] Optionally, the processing module 203 is configured to: create a corresponding unicast tunnel based on the wireless access point's online request; configure a corresponding virtual LAN identifier for each virtual LAN configured on the wireless access point; if a matching entry exists in the multicast mapping table, add the unicast tunnel identifier to the unicast tunnel set in the matching entry; if no matching entry exists in the multicast mapping table, obtain a new multicast address from the multicast address pool, and add a corresponding entry to the multicast mapping table based on each virtual LAN identifier, the new multicast address, and the unicast tunnel identifier; and send the multicast addresses and ports corresponding to all virtual LAN identifiers to the wireless access point so that the wireless access point can join the multicast group and listen on the received multicast address.

[0108] Optionally, the keep-alive module 204 is used to periodically send keep-alive information to all wireless access points in the multicast group through the multicast tunnel; when it receives a response information sent by a wireless access point based on the keep-alive information, it updates the lifespan of the unicast tunnel corresponding to the wireless access point in the multicast mapping table.

[0109] Please refer to Figure 5 This is a block diagram of a wireless controller 10 provided in an embodiment of the present invention. The wireless controller 10 includes a memory 110, a processor 120, and a communication module 130. The memory 110, processor 120, and communication module 130 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.

[0110] The memory 110 is used to store programs or data. The memory 110 can be, but is not limited to, RAM (Random Access Memory), ROM (Read Only Memory), PROM (Programmable Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electric Erasable Programmable Read-Only Memory), etc.

[0111] The processor 120 is used to read / write data or programs stored in the memory 110 and perform corresponding functions. For example, when a computer program stored in the memory 110 is executed by the processor 120, the message forwarding method disclosed in the above embodiments can be implemented.

[0112] The communication module 130 is used to establish a communication connection between the wireless controller 10 and other communication terminals via a network, and to send and receive data via the network.

[0113] It should be understood that, Figure 5 The structure shown is only a schematic diagram of the wireless controller 10. The wireless controller 10 may also include components such as... Figure 5 The more or fewer components shown, or having the same Figure 5 The different configurations shown. Figure 5 The components shown can be implemented using hardware, software, or a combination thereof.

[0114] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by processor 120, implements the message forwarding method disclosed in the above embodiments.

[0115] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0116] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0117] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM (Read-Only Memory), RAM (Random Access Memory), magnetic disks, or optical disks.

[0118] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A message forwarding method, characterized in that, This is applied to a wireless controller that communicates with multiple wireless access points. The wireless controller stores a multicast mapping table, and each entry in the multicast mapping table records the correspondence between a virtual LAN identifier, a multicast address, and a unicast tunnel set. The unicast tunnel set includes unicast tunnel information for all wireless access points within the multicast group corresponding to the multicast address. The unicast tunnel information includes the unicast tunnel's identifier and lifetime; the method includes: Based on the virtual LAN identifier in the received service message and the multicast mapping table, determine the unicast tunnel set corresponding to the service message; Calculate the difference between the current time and the lifespan of each unicast tunnel in the unicast tunnel set; count the number of unicast tunnels whose difference is less than or equal to the effective time threshold to obtain the number of effective unicast tunnels; When the number of valid unicast tunnels exceeds the multicast threshold and all unicast tunnels in the unicast tunnel set are valid, the multicast address corresponding to the service packet is determined according to the virtual LAN identifier in the received service packet and the multicast mapping table; a multicast tunnel packet is encapsulated according to the multicast address corresponding to the service packet and the service packet, and the multicast tunnel packet is forwarded to the wireless access point in the multicast group; When the number of valid unicast tunnels exceeds the multicast threshold and there are invalid unicast tunnels in the unicast tunnel set, the multicast address corresponding to the service packet and the identifiers of all invalid unicast tunnels are obtained according to the virtual LAN identifier in the received service packet and the multicast mapping table; the corresponding unicast tunnel packet is encapsulated according to the identifier of each invalid unicast tunnel and the service packet, and the unicast tunnel packet is forwarded to the radio access point corresponding to each invalid unicast tunnel; the multicast tunnel packet is encapsulated according to the multicast address corresponding to the service packet and the service packet, and the multicast tunnel packet is forwarded to the radio access point within the multicast group; wherein, the difference between the survival time of the invalid unicast tunnel and the current time is greater than the valid time threshold; When the number of valid unicast tunnels does not exceed the multicast threshold, the corresponding unicast tunnel message is obtained by encapsulating the service message according to the identifier of each unicast tunnel in the unicast tunnel set, and the unicast tunnel message is forwarded to the wireless access point corresponding to each unicast tunnel.

2. The message forwarding method according to claim 1, characterized in that, Before receiving the service message, the method further includes the following steps: Create the corresponding unicast tunnel based on the wireless access point's online request; Configure a corresponding virtual LAN identifier for each virtual LAN configured on the wireless access point; If there is an entry in the multicast mapping table that matches the virtual LAN identifier, then the identifier of the unicast tunnel is added to the unicast tunnel set in the matching entry. If there is no entry in the multicast mapping table that matches the virtual LAN identifier, a new multicast address is obtained from the multicast address pool, and a corresponding entry is added to the multicast mapping table according to each virtual LAN identifier, the new multicast address, and the identifier of the unicast tunnel. The multicast addresses and ports corresponding to all the virtual LAN identifiers are sent to the wireless access point so that the wireless access point can join the multicast group and listen on the ports according to the received multicast addresses.

3. The message forwarding method according to claim 1, characterized in that, The method further includes: Periodically send keep-alive information to all wireless access points in the multicast group through the multicast tunnel; When a response message is received from the wireless access point based on the keep-alive information, the liveness time of the unicast tunnel corresponding to the wireless access point is updated in the multicast mapping table.

4. A message forwarding device, characterized in that, It is applied to a wireless controller that communicates with multiple wireless access points; the wireless controller records a multicast mapping table, and each entry in the multicast mapping table records the correspondence between a virtual LAN identifier, a multicast address, and a unicast tunnel set; The unicast tunnel set includes unicast tunnel information of all wireless access points within the multicast group corresponding to the multicast address. The unicast tunnel information includes the unicast tunnel's identifier and lifespan; The device includes: The acquisition module is used to determine the unicast tunnel set corresponding to the service packet based on the virtual local area network identifier in the received service packet and the multicast mapping table; calculate the difference between the current time and the lifespan of each unicast tunnel in the unicast tunnel set; count the number of unicast tunnels whose difference is less than or equal to the effective time threshold, and obtain the number of effective unicast tunnels. The forwarding module is configured to, when the number of valid unicast tunnels exceeds the multicast threshold and all unicast tunnels in the unicast tunnel set are valid, determine the multicast address corresponding to the service packet based on the virtual local area network identifier in the received service packet and the multicast mapping table; encapsulate the multicast tunnel packet according to the multicast address corresponding to the service packet and the service packet to obtain a multicast tunnel packet; and forward the multicast tunnel packet to the wireless access point within the multicast group. When the number of valid unicast tunnels exceeds the multicast threshold and there are invalid unicast tunnels in the unicast tunnel set, the multicast address corresponding to the service packet and the identifiers of all invalid unicast tunnels are obtained according to the virtual LAN identifier in the received service packet and the multicast mapping table; the corresponding unicast tunnel packet is encapsulated according to the identifier of each invalid unicast tunnel and the service packet, and the unicast tunnel packet is forwarded to the radio access point corresponding to each invalid unicast tunnel; the multicast tunnel packet is encapsulated according to the multicast address corresponding to the service packet and the service packet, and the multicast tunnel packet is forwarded to the radio access point within the multicast group; wherein, the difference between the survival time of the invalid unicast tunnel and the current time is greater than the valid time threshold; When the number of valid unicast tunnels does not exceed the multicast threshold, the corresponding unicast tunnel message is obtained by encapsulating the service message according to the identifier of each unicast tunnel in the unicast tunnel set, and the unicast tunnel message is forwarded to the wireless access point corresponding to each unicast tunnel.

5. A wireless controller, characterized in that, The wireless controller includes a memory and a processor, the memory being used to store a computer program, and the processor being used to execute the message forwarding method as described in any one of claims 1-3 when the computer program is invoked.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the message forwarding method as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Method for realizing switching from multicast to unicast in wireless environment

    CN102547589A

  • AP (Access Point) upgrading method and device

    CN108064026A