[go: up one dir, main page]

CN105471768B - CAPWAP message transmission method and the network switch - Google Patents

CAPWAP message transmission method and the network switch Download PDF

Info

Publication number
CN105471768B
CN105471768B CN201410425959.XA CN201410425959A CN105471768B CN 105471768 B CN105471768 B CN 105471768B CN 201410425959 A CN201410425959 A CN 201410425959A CN 105471768 B CN105471768 B CN 105471768B
Authority
CN
China
Prior art keywords
message
card board
cable card
line card
capwap
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410425959.XA
Other languages
Chinese (zh)
Other versions
CN105471768A (en
Inventor
张印熙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410425959.XA priority Critical patent/CN105471768B/en
Publication of CN105471768A publication Critical patent/CN105471768A/en
Application granted granted Critical
Publication of CN105471768B publication Critical patent/CN105471768B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention relates to fields of communication technology, disclose a kind of CAPWAP message transmission method and the network switch, in this scenario, after there is no the cable card board of CAPWAP tunnel processing capacity to receive CAPWAP message, CAPWAP message can be sent to the cable card board with CAPWAP tunnel processing capacity, therefore, it solves the problems, such as that the cable card board of no CAPWAP tunnel processing capacity can not be handled CAPWAP message, improves the flexibility of transmission CAPWAP message.

Description

CAPWAP报文传输方法及网络交换机CAPWAP message transmission method and network switch

技术领域technical field

本发明涉及通信技术领域,特别涉及无线接入点控制和提供(英文:Control AndProvisioning of Wireless Access Points,缩写:CAPWAP)报文传输方法及网络交换机。The present invention relates to the field of communication technology, in particular to a control and provisioning of wireless access point (English: Control And Provisioning of Wireless Access Points, abbreviation: CAPWAP) message transmission method and a network switch.

背景技术Background technique

无线局域网(英文:wireless local area network,缩写:WLAN)中包括无线终端点(英文:Wireless Termination Point,缩写:WTP)和接入控制器(英文:AccessController,缩写:AC),其中,AC用于对无线局域网中的WTP进行控制和管理。A wireless local area network (English: wireless local area network, abbreviation: WLAN) includes a wireless terminal point (English: Wireless Termination Point, abbreviation: WTP) and an access controller (English: AccessController, abbreviation: AC). Control and manage the WTP in the wireless LAN.

WTP的报文的转发方式分为隧道转发(又称为“集中转发”)和直接转发(又称为“本地转发”)。其中,隧道转发是指WTP转发报文时,要经过CAPWAP隧道先将报文转发至AC,再由AC转发该报文。WTP的报文的转发方式为隧道转发时,如图1所示,站点(英文:station,缩写:STA)的报文到达WTP后,WTP封装该报文得到CAPWAP报文后,发送给AC。然后AC解封装CAPWAP报文得到STA的原始报文后再转发该原始报文。STA是具有到无线媒介(英文:wireless medium,缩写:WM)的接口的设备。STA可以是无线终端,例如是膝上电脑(英文:laptop computer)、平板电脑(英文:tablet computer)、手机等等。The packet forwarding mode of WTP is divided into tunnel forwarding (also called "centralized forwarding") and direct forwarding (also called "local forwarding"). The tunnel forwarding means that when the WTP forwards a packet, it first forwards the packet to the AC through the CAPWAP tunnel, and then the AC forwards the packet. When the packet forwarding mode of the WTP is tunnel forwarding, as shown in Figure 1, after the station (English: station, abbreviation: STA) packet reaches the WTP, the WTP encapsulates the packet to obtain a CAPWAP packet and sends it to the AC. Then the AC decapsulates the CAPWAP packet to obtain the original packet of the STA, and then forwards the original packet. The STA is a device having an interface to a wireless medium (English: wireless medium, abbreviated: WM). The STA may be a wireless terminal, such as a laptop computer (English: laptop computer), a tablet computer (English: tablet computer), a mobile phone, and the like.

一个AC可能管理多个WTP,而每一个WTP与AC之间均有一条CAPWAP隧道,AC接收到来自STA通过CAPWAP隧道发送的报文后,会存储该STA的地址和该隧道的CAPWAP隧道表项的映射关系,CAPWAP隧道表项包括:WTP的IP地址、WTP的用于CAPWAP隧道的端口号、AC的用于CAPWAP隧道的端口号。AC接收到来自因特网(英文:Internet)的报文,要将该报文发送给该STA时,根据该STA的地址和CAPWAP隧道表项的映射找到CAPWAP隧道表项,再用找到的CAPWAP隧道表项封装来自Internet的报文,然后发送。An AC may manage multiple WTPs, and there is a CAPWAP tunnel between each WTP and the AC. After the AC receives the message sent by the STA through the CAPWAP tunnel, the AC will store the address of the STA and the CAPWAP tunnel entry of the tunnel. The CAPWAP tunnel entry includes: the IP address of the WTP, the port number of the WTP used for the CAPWAP tunnel, and the port number of the AC used for the CAPWAP tunnel. AC receives a message from the Internet (English: Internet), and when it wants to send the message to the STA, it finds the CAPWAP tunnel entry according to the mapping between the address of the STA and the CAPWAP tunnel entry, and then uses the found CAPWAP tunnel table The item encapsulates the message from the Internet and sends it.

目前,通常在网络交换机上承载AC功能。在网络交换机上有多个线卡板,这多个线卡板的一些线卡板是具有CAPWAP隧道处理能力的线卡板,一些线卡板是缺乏CAPWAP隧道处理能力的线卡板。WTP将接收到的报文封装为CAPWAP报文后,将CAPWAP报文发送至具有CAPWAP隧道处理能力的线卡板,具有CAPWAP隧道处理能力的线卡板处理该CAPWAP报文后,转发解封装后的报文。缺乏CAPWAP隧道处理能力的线卡板无法对CAPWAP报文进行处理,因此,目前的CAPWAP报文传输方法存在灵活性较低的缺陷。Currently, the AC function is usually carried on a network switch. There are multiple line card boards on the network switch, some of the multiple line card boards are line card boards capable of CAPWAP tunnel processing, and some line card boards are line card boards lacking of CAPWAP tunnel processing capability. After the WTP encapsulates the received message into a CAPWAP message, it sends the CAPWAP message to the line card with the CAPWAP tunnel processing capability. After the line card with the CAPWAP tunnel processing capability processes the CAPWAP message, it forwards the decapsulated message. A line card lacking the CAPWAP tunnel processing capability cannot process the CAPWAP message. Therefore, the current CAPWAP message transmission method has a defect of low flexibility.

综上所述,目前由于没有CAPWAP隧道处理能力的线卡板无法对CAPWAP报文进行处理,因此,存在灵活性较低的缺陷。To sum up, at present, because the line cards without the CAPWAP tunnel processing capability cannot process the CAPWAP packets, there is a defect of low flexibility.

发明内容Contents of the invention

本发明实施例提供一种CAPWAP报文传输方法及网络交换机,用以解决目前在传输CAPWAP报文的过程中存在的灵活性较低的缺陷。Embodiments of the present invention provide a CAPWAP message transmission method and a network switch, which are used to solve the defect of low flexibility existing in the current process of transmitting CAPWAP messages.

本发明实施例提供的具体技术方案如下:The specific technical scheme that the embodiment of the present invention provides is as follows:

第一方面,提供一种无线接入点控制和提供CAPWAP报文传输方法,包括:In the first aspect, a method for controlling wireless access points and providing CAPWAP message transmission is provided, including:

网络交换机的第一线卡板接收来自无线终端点WTP的第一报文,其中,所述第一线卡板为第一类型线卡板,所述第一类型线卡板为缺乏CAPWAP隧道处理能力的线卡板;The first line card board of the network switch receives the first message from the wireless terminal point WTP, wherein the first line card board is a first type line card board, and the first type line card board lacks CAPWAP tunnel processing capable line cards;

所述第一线卡板确定所述来自WTP的第一报文为CAPWAP报文;The first line card board determines that the first packet from the WTP is a CAPWAP packet;

所述第一线卡板将所述第一报文发送至所述网络交换机的第二线卡板,其中,所述第二线卡板为第二类型线卡板,所述第二类型线卡板为具有CAPWAP隧道处理能力的线卡板。The first line card board sends the first message to a second line card board of the network switch, wherein the second line card board is a second type line card board, and the second type line card board It is a line card board capable of processing CAPWAP tunnels.

结合第一方面,在第一方面的第一种可能的实现方式中,所述第一线卡板将所述第一报文发送至所述第二线卡板,包括:With reference to the first aspect, in a first possible implementation manner of the first aspect, the first line card board sending the first message to the second line card board includes:

所述第一线卡板根据所述第一线卡板到所述第二线卡板的映射,将所述第一报文发送至所述第二线卡板;或者The first line card board sends the first message to the second line card board according to the mapping from the first line card board to the second line card board; or

所述第一线卡板根据所述第一报文中所述WTP的地址以及所述WTP的地址到所述第二线卡板的映射,将所述第一报文发送至所述第二线卡板。The first line card board sends the first message to the second line card according to the address of the WTP in the first message and the mapping from the address of the WTP to the second line card board plate.

结合第一方面,或者第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述第一线卡板将所述第一报文发送至所述第二线卡板之后,还包括:With reference to the first aspect, or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the first line card sends the first message to the After the second line card board, also include:

所述第二线卡板获取所述第一报文对应的CAPWAP隧道表项,所述CAPWAP隧道表项包括所述第一报文的CAPWAP报文头中的所述WTP的地址,所述第一报文的CAPWAP报文头的源端口号和目的端口号;The second line card obtains the CAPWAP tunnel entry corresponding to the first message, the CAPWAP tunnel entry includes the address of the WTP in the CAPWAP header of the first message, and the first The source port number and destination port number of the CAPWAP message header of the message;

所述第二线卡板解封装所述第一报文,获取解封装后的第一报文的源地址;The second line card board decapsulates the first packet, and obtains the source address of the decapsulated first packet;

所述第二线卡板记录所述CAPWAP隧道表项与所述解封装后的第一报文的源地址的映射。The second line card records the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first packet.

结合第一方面的第二种可能的实现方式,在第一方面的第三种可能的实现方式中,所述第二线卡板记录所述CAPWAP隧道表项与所述解封装后的第一报文的源地址的映射之后,还包括:With reference to the second possible implementation of the first aspect, in a third possible implementation of the first aspect, the second line card records the CAPWAP tunnel entry and the decapsulated first report After the mapping of the source address of the text, it also includes:

所述网络交换机将所述第二线卡板的标识与所述解封装后的第一报文的源地址的映射,记录在所述网络交换机的所有第一类型线卡板中。The network switch records the mapping between the identifier of the second line card board and the source address of the decapsulated first packet in all first-type line card boards of the network switch.

结合第一方面的第二或者第三种可能的实现方式,在第一方面的第四种可能的实现方式中,所述第二线卡板记录所述CAPWAP隧道表项与所述解封装后的第一报文的源地址的映射之后,还包括:With reference to the second or third possible implementation of the first aspect, in a fourth possible implementation of the first aspect, the second line card records the CAPWAP tunnel entry and the decapsulated After the mapping of the source address of the first packet, it also includes:

所述网络交换机将所述CAPWAP隧道表项与所述解封装后的第一报文的源地址的映射,同步至所述网络交换机的所述第二线卡板外的所有第二类型线卡板。The network switch synchronizes the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first packet to all second-type line card boards other than the second line card board of the network switch .

结合第一方面的第三或者第四种可能的实现方式,在第一方面的第五种可能的实现方式中,所述方法还包括:With reference to the third or fourth possible implementation of the first aspect, in a fifth possible implementation of the first aspect, the method further includes:

所述网络交换机的第三线卡板接收第二报文,所述第三线卡板为第一类型线卡板,所述第二报文的目的地址和所述解封装后的第一报文的源地址相同;The third line card board of the network switch receives the second message, the third line card board is a first type line card board, the destination address of the second message and the address of the decapsulated first message The source address is the same;

所述第三线卡板根据所述第二报文的目的地址以及所述第二线卡板的标识与所述解封装后的第一报文的源地址的映射,将所述第二报文发送给所述第二线卡板;The third line card sends the second message according to the destination address of the second message and the mapping between the identifier of the second line card and the source address of the decapsulated first message to the second line card board;

所述第二线卡板根据所述第二报文的目的地址以及所述CAPWAP隧道表项与所述解封装后的第一报文的源地址的映射,得到所述CAPWAP隧道表项,并根据所述CAPWAP隧道表项封装所述第二报文。The second line card board obtains the CAPWAP tunnel entry according to the destination address of the second message and the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first message, and according to The CAPWAP tunnel entry encapsulates the second packet.

结合第一方面的第三至第五种可能的实现方式中的任意一种可能的实现方式,在第一方面的第六种可能的实现方式中,所述方法还包括:In combination with any possible implementation manner in the third to fifth possible implementation manners of the first aspect, in a sixth possible implementation manner of the first aspect, the method further includes:

所述第二线卡板接收第三报文,所述第三报文的目的地址和所述解封装后的第一报文的源地址相同;The second line card board receives a third message, and the destination address of the third message is the same as the source address of the decapsulated first message;

所述第二线卡板根据所述第三报文的目的地址以及所述CAPWAP隧道表项与所述解封装后的第一报文的源地址的映射,得到所述CAPWAP隧道表项,并根据所述CAPWAP隧道表项封装所述第三报文。The second line card board obtains the CAPWAP tunnel entry according to the destination address of the third message and the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first message, and according to The CAPWAP tunnel entry encapsulates the third packet.

第二方面,提供一种网络交换机,包括背板、第一线卡板及第二线卡板,所述第一线卡板和所述第二线卡板通过所述背板相连,所述第一线卡板为第一类型线卡板,所述第一类型线卡板为缺乏无线接入点控制和提供CAPWAP隧道处理能力的线卡板,所述第二线卡板为第二类型线卡板,所述第二类型线卡板为具有CAPWAP隧道处理能力的线卡板,其中:In a second aspect, a network switch is provided, including a backplane, a first line card board, and a second line card board, the first line card board and the second line card board are connected through the backplane, and the first line card board The line card board is a first type line card board, the first type line card board is a line card board that lacks wireless access point control and provides CAPWAP tunnel processing capabilities, and the second line card board is a second type line card board , the second type of line card board is a line card board with CAPWAP tunnel processing capability, wherein:

所述第一线卡板,用于接收来自无线终端点WTP的第一报文,确定所述来自WTP的第一报文为CAPWAP报文,并将所述第一报文发送至所述网络交换机的第二线卡板;The first line card board is configured to receive the first message from the wireless terminal point WTP, determine that the first message from the WTP is a CAPWAP message, and send the first message to the network The second line card board of the switch;

所述第二线卡板,用于接收所述第一线卡板发送的所述第一报文。The second line card board is configured to receive the first message sent by the first line card board.

结合第二方面,在第二方面的第一种可能的实现方式中,所述第一线卡板具体用于:With reference to the second aspect, in a first possible implementation manner of the second aspect, the first line card board is specifically used for:

根据所述第一线卡板到所述第二线卡板的映射,将所述第一报文发送至所述第二线卡板;或者sending the first message to the second line card according to the mapping from the first line card to the second line card; or

根据所述第一报文中所述WTP的地址以及所述WTP的地址到所述第二线卡板的映射,将所述第一报文发送至所述第二线卡板。Send the first message to the second line card board according to the address of the WTP in the first message and the mapping from the address of the WTP to the second line card board.

结合第二方面,或者第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述第二线卡板还用于:With reference to the second aspect, or the first possible implementation manner of the second aspect, in the second possible implementation manner of the second aspect, the second line card board is also used for:

获取所述第一报文对应的CAPWAP隧道表项,所述CAPWAP隧道表项包括所述第一报文的CAPWAP报文头中的所述WTP的地址,所述第一报文的CAPWAP报文头的源端口号和目的端口号;Obtain the CAPWAP tunnel entry corresponding to the first packet, the CAPWAP tunnel entry includes the address of the WTP in the CAPWAP packet header of the first packet, and the CAPWAP packet of the first packet The source port number and destination port number of the header;

解封装所述第一报文,获取解封装后的第一报文的源地址;Decapsulate the first packet, and obtain the source address of the decapsulated first packet;

记录所述CAPWAP隧道表项与所述解封装后的第一报文的源地址的映射。Record the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first packet.

结合第二方面的第二种可能的实现方式,在第二方面的第三种可能的实现方式中,所述网络交换机还包括主控板,所述主控板通过所述背板与所述第一线卡板、所述第二线卡板相连,其中:With reference to the second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the network switch further includes a main control board, and the main control board communicates with the The first line card board is connected to the second line card board, wherein:

所述主控板用于接收所述第二线卡板发送的所述解封装后的第一报文的源地址,并将所述第二线卡板的标识与所述解封装后的第一报文的源地址的映射记录在所述网络交换机的所有第一类型线卡板中。The main control board is configured to receive the source address of the decapsulated first message sent by the second line card board, and combine the identifier of the second line card board with the decapsulated first message The mapping of the source address of the text is recorded in all the first type line card boards of the network switch.

结合第二方面的第三种可能的实现方式,在第二方面的第四种可能的实现方式中,所述网络交换机包括多个第二类型线卡板,所述主控板还用于:With reference to the third possible implementation of the second aspect, in a fourth possible implementation of the second aspect, the network switch includes a plurality of second-type line card boards, and the main control board is further configured to:

接收所述第二线卡板发送的所述CAPWAP隧道表项与所述解封装后的第一报文的源地址的映射,并将所述CAPWAP隧道表项与所述解封装后的第一报文的源地址的映射同步至所述网络交换机的所述第二线卡板外的所有第二类型线卡板。receiving the mapping between the CAPWAP tunnel entry sent by the second line card and the source address of the decapsulated first packet, and combining the CAPWAP tunnel entry with the decapsulated first packet The mapping of the source address of the text is synchronized to all second-type line card boards other than the second line card board of the network switch.

结合第二方面的第二种可能的实现方式,在第二方面的第五种可能的实现方式中,所述第二线卡板还用于向所述网络交换机的所有第一类型线卡板发送所述第二线卡板的标识与所述解封装后的第一报文的源地址的映射;With reference to the second possible implementation manner of the second aspect, in a fifth possible implementation manner of the second aspect, the second line card board is further configured to send A mapping between the identifier of the second line card board and the source address of the decapsulated first message;

所述网络交换机的所有第一类型线卡板记录所述第二线卡板的标识与所述解封装后的第一报文的源地址的映射。All first-type line card boards of the network switch record the mapping between the identifier of the second line card board and the source address of the decapsulated first packet.

结合第二方面的第五种可能的实现方式,在第二方面的第六种可能的实现方式中,所述网络交换机包括多个第二类型线卡板,所述第二线卡板还用于将所述CAPWAP隧道表项与所述解封装后的第一报文的源地址的映射同步至所述网络交换机的所述第二线卡板外的所有第二类型线卡板。With reference to the fifth possible implementation manner of the second aspect, in a sixth possible implementation manner of the second aspect, the network switch includes multiple second-type line card boards, and the second line card boards are also used to Synchronize the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first packet to all second-type line card boards other than the second line card board of the network switch.

结合第二方面的第三至第六种可能的实现方式中的任意一种可能的实现方式,在第二方面的第七种可能的实现方式中,所述网络交换机还包括第三线卡板,所述第三线卡板通过所述背板与所述主控板、所述第一线卡板、所述第二线卡板相连,所述第三线卡板为第一类型线卡板,所述第二报文的目的地址和所述解封装后的第一报文的源地址相同,其中:With reference to any one possible implementation manner of the third to sixth possible implementation manners of the second aspect, in a seventh possible implementation manner of the second aspect, the network switch further includes a third line card board, The third line card board is connected to the main control board, the first line card board, and the second line card board through the backplane, the third line card board is a first type line card board, and the The destination address of the second message is the same as the source address of the decapsulated first message, wherein:

所述第三线卡板用于接收第二报文,根据所述第二报文的目的地址以及所述第二线卡板的标识与所述解封装后的第一报文的源地址的映射,将所述第二报文发送给所述第二线卡板;The third line card board is used to receive the second message, and according to the destination address of the second message and the mapping between the identifier of the second line card board and the source address of the decapsulated first message, sending the second message to the second line card;

所述第二线卡板还用于:The second line card board is also used for:

根据所述第二报文的目的地址以及所述CAPWAP隧道表项与所述解封装后的第一报文的源地址的映射,得到所述CAPWAP隧道表项,并根据所述CAPWAP隧道表项封装所述第二报文。Obtain the CAPWAP tunnel entry according to the destination address of the second packet and the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first packet, and obtain the CAPWAP tunnel entry according to the CAPWAP tunnel entry Encapsulate the second packet.

结合第二方面的第三至第七种可能的实现方式中的任意一种可能的实现方式,在第二方面的第八种可能的实现方式中,所述第二线卡板还用于:With reference to any possible implementation manner in the third to seventh possible implementation manners of the second aspect, in an eighth possible implementation manner of the second aspect, the second line card board is further used for:

接收第三报文,所述第三报文的目的地址和所述解封装后的第一报文的源地址相同;receiving a third packet, where the destination address of the third packet is the same as the source address of the decapsulated first packet;

据所述第三报文的目的地址以及所述CAPWAP隧道表项与所述解封装后的第一报文的源地址的映射,得到所述CAPWAP隧道表项,并根据所述CAPWAP隧道表项封装所述第三报文。According to the destination address of the third packet and the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first packet, the CAPWAP tunnel entry is obtained, and according to the CAPWAP tunnel entry Encapsulate the third packet.

本发明有益效果如下:The beneficial effects of the present invention are as follows:

通常的,缺乏CAPWAP隧道处理能力的线卡板无法对CAPWAP报文处理,因此,存在灵活性较低的问题,本发明实施例中,网络交换机的第一线卡板接收来自WTP的第一报文,其中,第一线卡板为第一类型线卡板,第一类型线卡板为缺乏CAPWAP隧道处理能力的线卡板;第一线卡板确定来自WTP的第一报文为CAPWAP报文;第一线卡板将第一报文发送至网络交换机的第二线卡板,其中,第二线卡板为第二类型线卡板,第二类型线卡板为具有CAPWAP隧道处理能力的线卡板,在该方案中,确定CAPWAP隧道处理能力的第一线卡板接收到CAPWAP报文后,可以将CAPWAP报文发送至第二线卡板,而第二线卡板具有CAPWAP隧道处理能力,因此,解决了未具有CAPWAP隧道处理能力的线卡板无法对CAPWAP报文处理的问题,提高了灵活性。Generally, a line card board lacking CAPWAP tunnel processing capability cannot process a CAPWAP message. Therefore, there is a problem of low flexibility. In the embodiment of the present invention, the first line card board of the network switch receives the first report from the WTP In this document, the first line card board is a first type line card board, and the first type line card board is a line card board lacking CAPWAP tunnel processing capability; the first line card board determines that the first message from the WTP is a CAPWAP message Text; the first line card board sends the first message to the second line card board of the network switch, wherein the second line card board is a second type of line card board, and the second type of line card board is a line card with CAPWAP tunnel processing capability In this solution, the first line card that determines the CAPWAP tunnel processing capability can send the CAPWAP message to the second line card after receiving the CAPWAP message, and the second line card has the CAPWAP tunnel processing capability, so , which solves the problem that the line cards without CAPWAP tunnel processing capability cannot process CAPWAP packets, and improves flexibility.

附图说明Description of drawings

图1为隧道转发示意图;Figure 1 is a schematic diagram of tunnel forwarding;

图2A为网络交换机的结构示意图;FIG. 2A is a schematic structural diagram of a network switch;

图2B为本发明实施例中CAPWAP报文传输的详细流程图;Fig. 2B is a detailed flowchart of CAPWAP message transmission in the embodiment of the present invention;

图3为本发明实施例中CAPWAP报文传输的实施例;Fig. 3 is the embodiment of CAPWAP message transmission in the embodiment of the present invention;

图4为本发明实施例中网络交换机的实体结构示意图。FIG. 4 is a schematic diagram of a physical structure of a network switch in an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚地描述。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly described below in conjunction with the drawings in the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

下面结合说明书附图对本发明优选的实施方式进行详细说明,应当理解,此处所描述的优选实施例仅用于说明和解释本发明,并不用于限定本发明,并且在不冲突的情况下,本发明实施例及实施例中的特征可以相互组合。The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described here are only used to illustrate and explain the present invention, and are not intended to limit the present invention. The embodiments of the invention and the features in the embodiments can be combined with each other.

网络交换机的结构如图2A所示,主要包括:主控板、背板(英文:backplane)、电源、具有CAPWAP隧道处理能力的线卡板(英文:line card board),及缺乏CAPWAP隧道处理能力的线卡板,其中:The structure of the network switch is shown in Figure 2A, which mainly includes: main control board, backplane (English: backplane), power supply, line card board (English: line card board) with CAPWAP tunnel processing capability, and lack of CAPWAP tunnel processing capability line card board, where:

主控板:用于网络交换机控制面的处理,比如路由协议的计算等操作。主控板一般包括中央处理器(英文:central processing unit,缩写:CPU)。Main control board: used for the processing of the control plane of the network switch, such as the calculation of the routing protocol and other operations. The main control board generally includes a central processing unit (English: central processing unit, abbreviation: CPU).

线卡板:用于网络交换机数据面的处理,比如报文转发等操作。线卡板包括线卡芯片(英文:line card circuit)。线卡芯片可以是网络处理器(英文:network processor,缩写:NP),专用集成电路(英文:application-specific integrated circuit,缩写:ASIC),可编程逻辑器件(英文:programmable logic device,缩写:PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(英文:complex programmable logic device,缩写:CPLD),现场可编程逻辑门阵列(英文:field-programmable gate array,缩写:FPGA),通用阵列逻辑(英文:generic array logic,缩写:GAL)或其组合。Line card board: used for data plane processing of network switches, such as packet forwarding and other operations. The line card board includes a line card chip (English: line card circuit). The line card chip can be a network processor (English: network processor, abbreviation: NP), an application-specific integrated circuit (English: application-specific integrated circuit, abbreviation: ASIC), a programmable logic device (English: programmable logic device, abbreviation: PLD ) or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (English: complex programmable logic device, abbreviated: CPLD), field-programmable logic gate array (English: field-programmable gate array, abbreviated: FPGA), general array logic (English: generic array logic, abbreviation: GAL) or a combination thereof.

背板:用于提供多个线卡板之间、线卡板和主控板之间的连接。Backplane: used to provide connections between multiple line card boards, and between line card boards and the main control board.

电源:用于为网络交换机提供电能。Power supply: used to provide power to the network switch.

下面结合附图对本发明优选的实施方式进行详细说明。Preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.

参阅图2B所示,本发明实施例中,CAPWAP报文传输的一种详细流程如下:Referring to Figure 2B, in the embodiment of the present invention, a detailed process of CAPWAP message transmission is as follows:

步骤200:网络交换机的第一线卡板接收来自WTP的第一报文,其中,第一线卡板为第一类型线卡板,第一类型线卡板为缺乏CAPWAP隧道处理能力的线卡板。Step 200: The first line card board of the network switch receives the first message from the WTP, wherein the first line card board is a first type line card board, and the first type line card board is a line card lacking CAPWAP tunnel processing capability plate.

步骤210:第一线卡板确定来自WTP的第一报文为CAPWAP报文。Step 210: The first line card board determines that the first packet from the WTP is a CAPWAP packet.

步骤220:第一线卡板将第一报文发送至网络交换机的第二线卡板,其中,第二线卡板为第二类型线卡板,第二类型线卡板为具有CAPWAP隧道处理能力的线卡板。Step 220: The first line card board sends the first message to the second line card board of the network switch, wherein the second line card board is a second type of line card board, and the second type of line card board is capable of processing CAPWAP tunnels Line card board.

STA将报文发送至WTP,WTP将接收到的报文进行CAPWAP封装处理后,得到CAPWAP报文,即第一报文。WTP向网络交换机发送该第一报文,第一报文中包括了STA发送的报文。The STA sends the message to the WTP, and the WTP performs CAPWAP encapsulation on the received message to obtain the CAPWAP message, that is, the first message. The WTP sends the first message to the network switch, where the first message includes the message sent by the STA.

本发明实施例中,第一线卡板确定来自WTP的第一报文为CAPWAP报文时,可以采用如下方式:In the embodiment of the present invention, when the first line card board determines that the first message from the WTP is a CAPWAP message, the following methods may be used:

第一线卡板根据第一报文的目的用户数据报协议(英文:User DatagramProtocol,缩写:UDP)端口号,确定来自WTP的第一报文为CAPWAP报文。The first line board determines that the first message from the WTP is a CAPWAP message according to the destination User Datagram Protocol (English: User Datagram Protocol, abbreviation: UDP) port number of the first message.

其中,第一报文的目的UDP端口号为5246或者5247,则第一报文为CAPWAP报文。Wherein, if the destination UDP port number of the first packet is 5246 or 5247, the first packet is a CAPWAP packet.

如果网络交换机中只有一个第二类型线卡板,即第二线卡板,则第一线卡板将第一报文发送至这唯一的第二类型线卡板。具体的,所有第一类型线卡板中都记录有这唯一的第二类型线卡板,即第二线卡板的标识。也就是第一线卡板中有第一线卡板到第二线卡板的映射,第一线卡板根据第一线卡板到第二线卡板的映射,将第一报文发送至第二线卡板。If there is only one line card of the second type in the network switch, that is, the second line card, the first line card sends the first message to the only line card of the second type. Specifically, all the first-type line card boards record the unique second-type line card board, that is, the identifier of the second line card board. That is, there is a mapping from the first line card to the second line card in the first line card, and the first line card sends the first message to the second line card according to the mapping from the first line card to the second line card. Card board.

如果网络交换机包括多个第二类型线卡板,网络交换机中不同的第一类型线卡板接收到的CAPWAP报文,可以分别发送至不同的第二类型线卡板。第一线卡板将第一报文发送至第二线卡板时,可以采用如下两种方式:If the network switch includes multiple second-type line card boards, the CAPWAP packets received by different first-type line card boards in the network switch may be sent to different second-type line card boards respectively. When the first line card board sends the first packet to the second line card board, the following two methods can be adopted:

方式一:第一线卡板根据第一线卡板到第二线卡板的映射,将第一报文发送至第二线卡板。Manner 1: The first line card sends the first message to the second line card according to the mapping from the first line card to the second line card.

方式二:第一线卡板根据第一报文中WTP的地址以及WTP的地址到第二线卡板的映射,将第一报文发送至第二线卡板。Method 2: The first line card sends the first message to the second line card according to the address of the WTP in the first message and the mapping from the address of the WTP to the second line card.

如果采用方式一,在将第一报文发送至第二线卡板之前,第一线卡板先搜索第一线卡板到第二线卡板的映射,如果搜索到该映射,则根据该映射将第一报文发送至第二线卡板。如果搜索不到该映射,则第一线卡板根据预先确定的规则,例如根据第二类型线卡板的负载,在多个第二类型线卡板中选择一个作为第二线卡板,将第一报文发送至该第二线卡板。第一线卡板记录第一线卡板到第二线卡板的映射,之后第一线卡板接收到的CAPWAP报文都发送至该第二线卡板。If method 1 is adopted, before sending the first message to the second line card, the first line card first searches for a mapping from the first line card to the second line card, and if the mapping is found, the The first message is sent to the second line card board. If the mapping cannot be found, the first line card selects one of multiple second-type line card boards as the second line card board according to predetermined rules, for example, according to the load of the second-type line card board, and assigns the first line card board to the A message is sent to the second line card. The first line card records the mapping from the first line card to the second line card, and then all CAPWAP packets received by the first line card are sent to the second line card.

如果采用方式二,在将第一报文发送至第二线卡板之前,第一线卡板先搜索第一报文中WTP的地址到第二线卡板的映射,如果搜索到该映射,则根据该映射将第一报文发送至第二线卡板。如果搜索不到该映射,则第一线卡板根据预先确定的规则,例如根据第二类型线卡板的负载,在多个第二类型线卡板中选择一个作为第二线卡板,将第一报文发送至该第二线卡板。第一线卡板记录该WTP的地址到第二线卡板的映射,之后第一线卡板接收到的来自该WTP的CAPWAP报文都发送至该第二线卡板。如果收到新的WTP发送的CAPWAP报文,则重新选择一个第二类型线卡板。If method 2 is adopted, before sending the first message to the second line card, the first line card first searches for the mapping from the address of the WTP in the first message to the second line card. The mapping sends the first message to the second line card. If the mapping cannot be found, the first line card selects one of multiple second-type line card boards as the second line card board according to predetermined rules, for example, according to the load of the second-type line card board, and assigns the first line card board to the A message is sent to the second line card. The first line card records the mapping from the address of the WTP to the second line card, and then all the CAPWAP messages received by the first line card from the WTP are sent to the second line card. If a CAPWAP message sent by a new WTP is received, a second-type line card is reselected.

每一个WTP发送CAPWAP报文至第二类型线卡板后,第二类型线卡板要生成一个CAPWAP隧道表项,因此,第二类型线卡板中存储的CAPWAP隧道表项越多,剩余的存储CAPWAP隧道表项的空间越小,说明该第二线卡板所管理的WTP越多。因此,在网络交换机中有多个第二类型线卡板的场景中,为了均衡各个第二类型线卡板的负载,进一步的,第一线卡板接收网络交换机的各个第二类型线卡板发送的本线卡板中存储CAPWAP隧道表项的剩余空间。在需要在第二类型线卡板选择一个作为第二线卡板时,第一线卡板选择具有存储CAPWAP隧道表项的最大剩余空间的第二类型线卡板作为第二线卡板。After each WTP sends a CAPWAP message to the second-type line card, the second-type line card needs to generate a CAPWAP tunnel entry. Therefore, the more CAPWAP tunnel entries stored in the second-type line card, the remaining The smaller the space for storing CAPWAP tunnel entries, the more WTPs managed by the second line card. Therefore, in a scenario where there are multiple second-type line card boards in the network switch, in order to balance the load of each second-type line card board, further, the first line card board receives each second-type line card board of the network switch The remaining space for storing CAPWAP tunnel entries in the sent card board of this line. When it is necessary to select one of the second-type line cards as the second line card, the first line card selects the second-type line card with the largest remaining space for storing the CAPWAP tunnel entry as the second line card.

例如,网络交换机上共插入10个线卡板,其中1-5号线卡板为第一类型线卡板,6-10号线卡板为第二类型线卡板,且6-10号线卡板中的每一个线卡板可以存储CAPWAP隧道表项的总空间为1K,若6-10号线卡板可以存储CAPWAP隧道表项的剩余空间分别为0.5K、0.4K、0.3K、0.3K、0.2K,那么,当1号线卡板接收到CAPWAP报文后,将CAPWAP报文发送至6号线卡板。For example, a total of 10 line card boards are inserted into the network switch, among which line card boards No. 1-5 are the first type line card boards, line card boards No. Each line card in the card board can store CAPWAP tunnel entries with a total space of 1K. If line cards 6-10 can store CAPWAP tunnel entries, the remaining space is 0.5K, 0.4K, 0.3K, and 0.3K respectively. K, 0.2K, then, when the line card board receives the CAPWAP message, it sends the CAPWAP message to the line card board.

本发明实施例中,CAPWAP隧道表项可以保存在第二类型线卡板的转发芯片上。In the embodiment of the present invention, the CAPWAP tunnel entry may be stored on the forwarding chip of the second type line card board.

本发明实施例中,第一线卡板将第一报文发送至第二线卡板之后,还包括如下操作:In the embodiment of the present invention, after the first line card board sends the first message to the second line card board, the following operations are further included:

第二线卡板获取第一报文对应的CAPWAP隧道表项,CAPWAP隧道表项包括第一报文的CAPWAP报文头中的WTP的地址,第一报文的CAPWAP报文头的源端口号和目的端口号;The second line board obtains the CAPWAP tunnel entry corresponding to the first packet. The CAPWAP tunnel entry includes the address of the WTP in the CAPWAP packet header of the first packet, the source port number and destination port number;

第二线卡板解封装第一报文,获取解封装后的第一报文的源地址;The second line card board decapsulates the first packet, and obtains the source address of the decapsulated first packet;

第二线卡板记录CAPWAP隧道表项与解封装后的第一报文的源地址的映射。The second line card records the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first packet.

其中,第一报文的源地址可以为STA的MAC地址。Wherein, the source address of the first packet may be the MAC address of the STA.

本发明实施例中,为了使第一线卡板接收到发送至WTP的报文后,可以将该报文发送至相应的第二线卡板,第二线卡板记录CAPWAP隧道表项与解封装后的第一报文的源地址的映射之后,网络交换机将第二线卡板的标识与解封装后的第一报文的源地址的映射,记录在网络交换机的所有第一类型线卡板中。In the embodiment of the present invention, after the first line card board receives the message sent to the WTP, it can send the message to the corresponding second line card board, and the second line card board records the CAPWAP tunnel entry and the decapsulated After mapping the source address of the first message, the network switch records the mapping between the identifier of the second line card and the source address of the decapsulated first message in all first-type line cards of the network switch.

可选的,如果网络交换机包括多个第二类型线卡板,为了使第二线卡板外的第二类型线卡板接收到发送至WTP的报文后,可以根据CAPWAP隧道表项直接封装该报文,而不需要转发至第二线卡板,第二线卡板记录CAPWAP隧道表项与解封装后的第一报文的源地址的映射之后,网络交换机将CAPWAP隧道表项与解封装后的第一报文的源地址的映射,同步至第二线卡板外的所有第二类型线卡板。Optionally, if the network switch includes multiple second-type line card boards, after receiving the message sent to the WTP, the second-type line card board outside the second line card board can directly encapsulate the message according to the CAPWAP tunnel entry. After the second line card records the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first packet, the network switch compares the CAPWAP tunnel entry with the decapsulated The mapping of the source address of the first packet is synchronized to all second-type line card boards other than the second line card board.

在网络交换机将第二线卡板的标识与解封装后的第一报文的源地址的映射,记录在网络交换机的所有第一类型线卡板中时,可以是网络交换机中的主控板做的,也可以是网络交换机中的第二线卡板做的,也就是说可以有两种方式:When the network switch records the mapping between the identification of the second line card board and the source address of the decapsulated first message in all the first type line card boards of the network switch, it can be done by the main control board in the network switch It can also be done by the second line card in the network switch, that is to say, there are two ways:

方式一:主控板接收第二线卡板发送的解封装后的第一报文的源地址,并将第二线卡板的标识与解封装后的第一报文的源地址的映射记录在网络交换机的所有第一类型线卡板中;Method 1: The main control board receives the source address of the decapsulated first packet sent by the second line card, and records the mapping between the identifier of the second line card and the source address of the decapsulated first packet in the network In all the first type line card boards of the switch;

方式二:第二线卡板向网络交换机的所有第一类型线卡板发送第二线卡板的标识与解封装后的第一报文的源地址的映射;Method 2: The second line card board sends the mapping between the identification of the second line card board and the source address of the decapsulated first message to all the first type line card boards of the network switch;

网络交换机的所有第一类型线卡板记录第二线卡板的标识与解封装后的第一报文的源地址的映射。All first-type line card boards of the network switch record the mapping between the identifier of the second line card board and the source address of the decapsulated first packet.

同样的,在网络交换机将CAPWAP隧道表项与解封装后的第一报文的源地址的映射,同步至第二线卡板外的所有第二类型线卡板时,可以是网络交换机中的主控板做的,也可以是网络交换机中的第二线卡板做的,也就是说可以有两种方式:Similarly, when the network switch synchronizes the mapping between the CAPWAP tunnel table entry and the source address of the decapsulated first packet to all second-type line card boards outside the second line card board, it may be the master in the network switch The control board can also be made by the second line card board in the network switch, that is to say, there are two ways:

方式一:主控板接收第二线卡板发送的CAPWAP隧道表项与解封装后的第一报文的源地址的映射,并将CAPWAP隧道表项与解封装后的第一报文的源地址的映射同步至网络交换机的第二线卡板外的所有第二类型线卡板;Method 1: The main control board receives the mapping between the CAPWAP tunnel entry sent by the second line board and the source address of the decapsulated first packet, and compares the CAPWAP tunnel entry with the source address of the decapsulated first packet The mapping of is synchronized to all second-type line card boards other than the second line card board of the network switch;

方式二:第二线卡板将CAPWAP隧道表项与解封装后的第一报文的源地址的映射同步至网络交换机的第二线卡板外的所有第二类型线卡板。Method 2: The second line card synchronizes the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first packet to all second-type line cards other than the second line card of the network switch.

上述过程讲述的是WTP将报文发送至网络交换机,本发明实施例中,网络交换机也可能将报文发送至WTP,因此,上述方法还包括如下操作:The above process describes that the WTP sends the message to the network switch. In the embodiment of the present invention, the network switch may also send the message to the WTP. Therefore, the above method also includes the following operations:

网络交换机的第三线卡板接收第二报文,第三线卡板为第一类型线卡板,第二报文的目的地址和解封装后的第一报文的源地址相同。第三线卡板根据第二报文的目的地址以及第二线卡板的标识与解封装后的第一报文的源地址的映射,将第二报文发送给第二线卡板。其他的第一类型线卡板,如第一线卡板,如果接收到目的地址和解封装后的第一报文的源地址相同的报文,也执行同样的操作以将该报文发送至第二线卡板。The third line card of the network switch receives the second message, the third line card is the first type of line card, and the destination address of the second message is the same as the source address of the decapsulated first message. The third line card sends the second message to the second line card according to the destination address of the second message and the mapping between the identifier of the second line card and the source address of the decapsulated first message. Other first-type line card boards, such as the first line card board, if they receive a message with the same destination address as the source address of the decapsulated first message, they also perform the same operation to send the message to the first Second line board.

第二线卡板根据第二报文的目的地址以及CAPWAP隧道表项与解封装后的第一报文的源地址的映射,得到CAPWAP隧道表项,并根据CAPWAP隧道表项封装第二报文。The second line card obtains the CAPWAP tunnel entry according to the destination address of the second packet and the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first packet, and encapsulates the second packet according to the CAPWAP tunnel entry.

本发明实施例中,还包括如下操作:In the embodiment of the present invention, the following operations are also included:

第二线卡板接收第三报文,第三报文的目的地址和解封装后的第一报文的源地址相同;The second line card board receives the third message, and the destination address of the third message is the same as the source address of the decapsulated first message;

第二线卡板根据第三报文的目的地址以及CAPWAP隧道表项与解封装后的第一报文的源地址的映射,得到CAPWAP隧道表项,并根据CAPWAP隧道表项封装第三报文。The second line card obtains the CAPWAP tunnel entry according to the destination address of the third packet and the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first packet, and encapsulates the third packet according to the CAPWAP tunnel entry.

其他的第二类型线卡板,如第四线卡板,如果接收到目的地址和解封装后的第一报文的源地址相同的报文,也执行类似操作。由于第四线卡板中已经保存了同步的CAPWAP隧道表项与解封装后的第一报文的源地址的映射,第四线卡板可以根据该映射,得到CAPWAP隧道表项,并根据CAPWAP隧道表项封装第三报文。Other second-type line card boards, such as the fourth line card board, also perform similar operations if they receive a packet with the same destination address as the source address of the decapsulated first packet. Since the mapping between the synchronous CAPWAP tunnel entry and the source address of the decapsulated first packet has been saved in the fourth line card, the fourth line card can obtain the CAPWAP tunnel entry according to the mapping, and based on the CAPWAP The tunnel entry encapsulates the third packet.

可选的,在第一线卡板将第一报文发送至第二线卡板时,在第一报文外封装特殊重定向端口(英文:Redirect Special Port,缩写:RDSP),RSDP用于通知第二线卡板第一报文为CAPWAP报文,以使得第二线卡板无需再次确定第一报文的类型。Optionally, when the first line card board sends the first message to the second line card board, a special redirection port (English: Redirect Special Port, abbreviation: RDSP) is encapsulated outside the first message, and RSDP is used for notification The first packet of the second line card is a CAPWAP packet, so that the second line card does not need to determine the type of the first packet again.

可替换的,在另一个场景中,第一线卡板也可以在第一报文外封装普通的指向第二线卡板的端口,第二线卡板接收到第一报文后确定第一报文是CAPWAP报文。Alternatively, in another scenario, the first line card can also encapsulate a common port pointing to the second line card outside the first message, and the second line card determines the first message after receiving the first message It is a CAPWAP message.

仍以上面的那个实施例为例进行说明:1号线卡板将确定出的CAPWAP报文发送至6号线卡板时,在确定出的CAPWAP报文外封装RSDP,用于通知6号线卡板,1号线卡板向6号线卡板发送的报文为CAPWAP报文,6号线卡板不需要再次确定1号线卡板发送的报文的类型,6号线卡板根据1号线卡板发送的报文外封装的RSDP确定该报文为CAPWAP报文,直接对1号线卡板发送的CAPWAP报文进行解封装处理,并发送解封装后的报文,若1号线卡板不在确定出的CAPWAP报文外封装RSDP的话,6号线卡板先要判断接收到1号线卡板发送的报文的类型,在判断出报文的类型为CAPWAP报文时,再对1号线卡板发送的报文进行解封装处理,并发送解封装后的报文。Still taking the above embodiment as an example for illustration: when the card board of line 1 sends the determined CAPWAP message to the card board of line 6, RSDP is encapsulated outside the determined CAPWAP message to notify line 6 Card board, the message sent by the card board of line 1 to the card board of line 6 is a CAPWAP message, the card board of line 6 does not need to confirm the type of the message sent by the card board of line 1 again, the card board of line 6 according to The RSDP encapsulated outside the packet sent by line card 1 determines that the packet is a CAPWAP packet, directly decapsulates the CAPWAP packet sent by line card 1, and sends the decapsulated packet. If 1 If the line card does not encapsulate RSDP outside the determined CAPWAP message, the line 6 card first needs to determine the type of the received message sent by the line 1 card, and when it determines that the type of the message is a CAPWAP message , and then decapsulate the message sent by the card board of line 1, and send the decapsulated message.

为了更好地理解本发明实施例,以下给出具体应用场景,针对CAPWAP报文传输的过程,作出进一步详细描述,如图3所示(WTP向网络交换机发送报文):In order to better understand the embodiments of the present invention, specific application scenarios are given below, and a further detailed description is made for the process of CAPWAP message transmission, as shown in Figure 3 (WTP sends messages to the network switch):

1号线卡板和2号线卡板均没有CAPWAP隧道处理能力,5号线卡板为1号线卡板确定出的CAPWAP报文所发送的线卡板。Neither the line card board nor the line card board of line 2 has the CAPWAP tunnel processing capability, and the line card board of line 5 is the line card board that sends the CAPWAP message determined by the line card board of line 1.

步骤300:1号线卡板接收来自WTP的第一报文。Step 300: The line card board of line 1 receives the first message from the WTP.

步骤310:1号线卡板从接收到的来自WTP的第一报文中根据目的UDP端口号,确定为CAPWAP报文,将第一报文发送至5号线卡板。Step 310: The No. 1 line card determines the first message received from the WTP as a CAPWAP message according to the destination UDP port number, and sends the first message to the No. 5 line card.

在该步骤中,第一报文外封装了RSDP。In this step, RSDP is encapsulated outside the first packet.

步骤320:5号线卡板接收1号线卡板发送的第一报文,并根据封装的RDSP确定出1号线卡板发送的报文为CAPWAP报文。Step 320: The card board of line 5 receives the first message sent by the card board of line 1, and determines that the message sent by the card board of line 1 is a CAPWAP message according to the encapsulated RDSP.

步骤330:5号线卡板获取第一报文对应的CAPWAP隧道表项,解封装第一报文,获取解封装后的第一报文的源地址;并记录CAPWAP隧道表项与解封装后的第一报文的源地址的映射,然后发送。Step 330: The line card board obtains the CAPWAP tunnel entry corresponding to the first message, decapsulates the first message, obtains the source address of the decapsulated first message; and records the CAPWAP tunnel entry and the decapsulated A mapping of the source address of the first packet is then sent.

在该实施例中,1号线卡板将接收到的CAPWAP报文发送至5号线卡板,5号线卡板对CAPWAP报文执行解封装等相关处理后并发送,解决了1号线卡板无法将CAPWAP报文发送的缺陷,提高了传输CAPWAP报文的灵活性。In this embodiment, the line card board on line 1 sends the received CAPWAP message to the line card board on line 5, and the line card board performs decapsulation and other related processing on the CAPWAP message and sends it, which solves the problem of line 1 The defect that the board cannot send CAPWAP messages improves the flexibility of transmitting CAPWAP messages.

本发明实施例中,1号线卡板可能接收发送至WTP的第二报文,因此,上述过程还包括如下操作:In the embodiment of the present invention, the No. 1 line card board may receive the second message sent to the WTP, therefore, the above process also includes the following operations:

步骤340:1号线卡板接收第二报文,第二报文的目的地址和解封装后的第一报文的源地址相同。Step 340: Line 1 board receives the second packet, the destination address of the second packet is the same as the source address of the decapsulated first packet.

步骤350:1号线卡板根据第二报文的目的地址以及5号线卡板的标识与解封装后的第一报文的源地址的映射,将第二报文发送给5号线卡板。Step 350: Line card board 1 sends the second message to line card 5 according to the destination address of the second message and the mapping between the identification of line card board 5 and the source address of the decapsulated first message plate.

步骤360:5号线卡板根据第二报文的目的地址以及CAPWAP隧道表项与解封装后的第一报文的源地址的映射,得到CAPWAP隧道表项,并根据CAPWAP隧道表项封装第二报文,并将封装后的第二报文发送至WTP。Step 360: The line card board obtains the CAPWAP tunnel entry according to the destination address of the second packet and the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first packet, and encapsulates the first packet according to the CAPWAP tunnel entry. second packet, and sends the encapsulated second packet to the WTP.

在该实施例中,1号线卡板将接收到的报文发送至5号线卡板,5号线卡板对报文执行封装等相关处理后,发送至WTP,解决了1号线卡板无法将CAPWAP报文发送至WTP的缺陷,提高了传输CAPWAP报文的灵活性。In this embodiment, line card board No. 1 sends the received message to line card board No. 5, and line card board No. 5 performs encapsulation and other related processing on the message and sends it to WTP, which solves the problem of The board cannot send CAPWAP messages to the WTP, which improves the flexibility of transmitting CAPWAP messages.

基于上述技术方案,参阅图4所示,本发明实施例提供一种网络交换机,包括包括背板40、第一线卡板41及第二线卡板42,第一线卡板41和第二线卡板42通过背板40相连,第一线卡板41为第一类型线卡板,第一类型线卡板为缺乏CAPWAP隧道处理能力的线卡板,第二线卡板42为第二类型线卡板,第二类型线卡板为具有CAPWAP隧道处理能力的线卡板,其中:Based on the above technical solution, as shown in FIG. 4 , an embodiment of the present invention provides a network switch, including a backplane 40, a first line card board 41 and a second line card board 42, and the first line card board 41 and the second line card board The boards 42 are connected through the backplane 40, the first line card board 41 is a first type line card board, the first type line card board is a line card board lacking the CAPWAP tunnel processing capability, and the second line card board 42 is a second type line card board board, the second type of line card board is a line card board with CAPWAP tunnel processing capability, wherein:

第一线卡板41,用于接收来自无WTP的第一报文,确定来自WTP的第一报文为CAPWAP报文,并将第一报文发送至网络交换机的第二线卡板42;The first line card board 41 is used to receive the first message from no WTP, determine that the first message from the WTP is a CAPWAP message, and send the first message to the second line card board 42 of the network switch;

第二线卡板42,用于接收第一线卡板41发送的第一报文。The second line card board 42 is configured to receive the first packet sent by the first line card board 41 .

本发明实施例中,可选的,第一线卡板41具体用于:In this embodiment of the present invention, optionally, the first line card board 41 is specifically used for:

根据第一线卡板41到第二线卡板42的映射,将第一报文发送至第二线卡板42;或者Send the first message to the second line card board 42 according to the mapping from the first line card board 41 to the second line card board 42; or

根据第一报文中WTP的地址以及WTP的地址到第二线卡板42的映射,将第一报文发送至第二线卡板42。The first message is sent to the second line card board 42 according to the address of the WTP in the first message and the mapping from the address of the WTP to the second line card board 42 .

本发明实施例中,进一步的,第二线卡板42还用于:In the embodiment of the present invention, further, the second line card board 42 is also used for:

获取第一报文对应的CAPWAP隧道表项,CAPWAP隧道表项包括第一报文的CAPWAP报文头中的WTP的地址,第一报文的CAPWAP报文头的源端口号和目的端口号;Obtain the corresponding CAPWAP tunnel table entry of the first message, the CAPWAP tunnel table entry includes the address of the WTP in the CAPWAP message header of the first message, the source port number and the destination port number of the CAPWAP message header of the first message;

解封装第一报文,获取解封装后的第一报文的源地址;Decapsulate the first packet, and obtain the source address of the decapsulated first packet;

记录CAPWAP隧道表项与解封装后的第一报文的源地址的映射。Record the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first packet.

本发明实施例中,进一步的,网络交换机还包括主控板43,主控板通过背板40与第一线卡板41、第二线卡板42相连,其中:In the embodiment of the present invention, further, the network switch further includes a main control board 43, and the main control board is connected to the first line card board 41 and the second line card board 42 through the backplane 40, wherein:

主控板43用于接收第二线卡板42发送的解封装后的第一报文的源地址,并将第二线卡板42的标识与解封装后的第一报文的源地址的映射记录在网络交换机的所有第一类型线卡板中。The main control board 43 is used to receive the source address of the decapsulated first message sent by the second line card board 42, and record the mapping between the identification of the second line card board 42 and the source address of the decapsulated first message In all type 1 line card boards of network switches.

本发明实施例中,进一步的,网络交换机包括多个第二类型线卡板,主控板43还用于:In the embodiment of the present invention, further, the network switch includes a plurality of second-type line card boards, and the main control board 43 is also used for:

接收第二线卡板42发送的CAPWAP隧道表项与解封装后的第一报文的源地址的映射,并将CAPWAP隧道表项与解封装后的第一报文的源地址的映射同步至网络交换机的第二线卡板42外的所有第二类型线卡板。Receive the mapping between the CAPWAP tunnel entry sent by the second line card board 42 and the source address of the decapsulated first packet, and synchronize the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first packet to the network All second-type line card boards except the second line card board 42 of the switch.

本发明实施例中,可选的,第二线卡板42还用于向网络交换机的所有第一类型线卡板发送第二线卡板42的标识与解封装后的第一报文的源地址的映射;In the embodiment of the present invention, optionally, the second line card board 42 is also used to send the identification of the second line card board 42 and the source address of the decapsulated first message to all the first type line card boards of the network switch. mapping;

网络交换机的所有第一类型线卡板记录第二线卡板42的标识与解封装后的第一报文的源地址的映射。All first-type line card boards of the network switch record the mapping between the identifier of the second line card board 42 and the source address of the decapsulated first packet.

本发明实施例中,可选的,网络交换机包括多个第二类型线卡板,第二线卡板42还用于将CAPWAP隧道表项与解封装后的第一报文的源地址的映射同步至网络交换机的第二线卡板42外的所有第二类型线卡板。In the embodiment of the present invention, optionally, the network switch includes multiple second-type line card boards, and the second line card board 42 is also used to synchronize the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first packet To all second-type line card boards except the second line card board 42 of the network switch.

本发明实施例中,进一步的,网络交换机还包括第三线卡板44,第三线卡板44通过背板40与主控板43、第一线卡板41、第二线卡板42相连,第三线卡板44为第一类型线卡板,第二报文的目的地址和解封装后的第一报文的源地址相同,其中:In the embodiment of the present invention, further, the network switch further includes a third line card board 44, and the third line card board 44 is connected to the main control board 43, the first line card board 41, and the second line card board 42 through the backplane 40. The card board 44 is a first type line card board, and the destination address of the second message is the same as the source address of the decapsulated first message, wherein:

第三线卡板44用于接收第二报文,根据第二报文的目的地址以及第二线卡板42的标识与解封装后的第一报文的源地址的映射,将第二报文发送给第二线卡板42;The third line card board 44 is used to receive the second message, and according to the destination address of the second message and the mapping between the identification of the second line card board 42 and the source address of the decapsulated first message, send the second message to the second line card board 42;

第二线卡板42还用于:The second line card board 42 is also used for:

根据第二报文的目的地址以及CAPWAP隧道表项与解封装后的第一报文的源地址的映射,得到CAPWAP隧道表项,并根据CAPWAP隧道表项封装第二报文。Obtain the CAPWAP tunnel entry according to the destination address of the second packet and the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first packet, and encapsulate the second packet according to the CAPWAP tunnel entry.

本发明实施例中,进一步的,第二线卡板42还用于:In the embodiment of the present invention, further, the second line card board 42 is also used for:

接收第三报文,第三报文的目的地址和解封装后的第一报文的源地址相同;receiving the third packet, where the destination address of the third packet is the same as the source address of the decapsulated first packet;

据第三报文的目的地址以及CAPWAP隧道表项与解封装后的第一报文的源地址的映射,得到CAPWAP隧道表项,并根据CAPWAP隧道表项封装第三报文。According to the destination address of the third packet and the mapping between the CAPWAP tunnel entry and the source address of the decapsulated first packet, the CAPWAP tunnel entry is obtained, and the third packet is encapsulated according to the CAPWAP tunnel entry.

综上所述,本发明实施例中,提出一种传输CAPWAP报文的方法:网络交换机的第一线卡板接收来自WTP的第一报文,其中,第一线卡板为第一类型线卡板,第一类型线卡板为缺乏CAPWAP隧道处理能力的线卡板;第一线卡板确定来自WTP的第一报文为CAPWAP报文;第一线卡板将第一报文发送至网络交换机的第二线卡板,其中,第二线卡板为第二类型线卡板,第二类型线卡板为具有CAPWAP隧道处理能力的线卡板,在该方案中,未具有CAPWAP隧道处理能力的第一线卡板接收到CAPWAP报文后,可以将CAPWAP报文发送至第二线卡板,而第二线卡板具有CAPWAP隧道处理能力,因此,解决了未具有CAPWAP隧道处理能力的线卡板无法对CAPWAP报文处理的问题,提高了传输CAPWAP报文的灵活性。To sum up, in the embodiment of the present invention, a method for transmitting CAPWAP messages is proposed: the first line card board of the network switch receives the first message from the WTP, wherein the first line card board is the first type line card board, the first type of line card board is a line card board lacking CAPWAP tunnel processing capability; the first line card board determines that the first message from the WTP is a CAPWAP message; the first line card board sends the first message to The second line card board of the network switch, wherein the second line card board is a second type line card board, and the second type line card board is a line card board with CAPWAP tunnel processing capability. In this solution, it does not have CAPWAP tunnel processing capability After receiving the CAPWAP message, the first line card can send the CAPWAP message to the second line card, and the second line card has the CAPWAP tunnel processing capability. The problem that the CAPWAP message cannot be processed improves the flexibility of transmitting the CAPWAP message.

显然,本领域的技术人员可以对本发明实施例进行各种改动和变型而不脱离本发明实施例的范围。这样,倘若本发明实施例的这些修改和变型属于本发明权利要求的范围之内,则本发明也意图包含这些改动和变型在内。Apparently, those skilled in the art can make various changes and modifications to the embodiments of the present invention without departing from the scope of the embodiments of the present invention. Thus, if these modifications and variations of the embodiments of the present invention fall within the scope of the claims of the present invention, the present invention is also intended to include these modifications and variations.

Claims (12)

1. a kind of wireless access point control and offer CAPWAP message transmission method, which is characterized in that including:
First cable card board of the network switch receives the first message from wireless terminal point WTP, wherein first cable card board For first kind cable card board, the first kind cable card board is the cable card board for lacking CAPWAP tunnel processing capacity;
First cable card board determines that first message from WTP is CAPWAP message;
First message is sent to the second cable card board of the network switch by first cable card board, wherein described Two cable card boards are Second Type cable card board, and the Second Type cable card board is the cable card board with CAPWAP tunnel processing capacity;
The network switch includes multiple Second Type cable card boards, and the method further includes:
Second cable card board obtains the corresponding CAPWAP tunnel list item of first message, and the CAPWAP tunnel list item includes The address of the WTP in the CAPWAP message head of first message, the source of the CAPWAP message head of first message Slogan and destination slogan;
Second cable card board decapsulates first message, obtains the source address of the first message after decapsulation;
Second cable card board records reflecting for the CAPWAP tunnel list item and the source address of the first message after the decapsulation It penetrates;
The network switch by the mapping of the source address of the first message after the CAPWAP tunnel list item and the decapsulation, All Second Type cable card boards being synchronized to outside second cable card board of the network switch.
2. the method as described in claim 1, which is characterized in that first message is sent to described by first cable card board Second cable card board, including:
First cable card board sends first message according to first cable card board to the mapping of second cable card board To second cable card board;Or
First cable card board is according to the address of WTP described in first message and the address of the WTP to described second First message is sent to second cable card board by the mapping of cable card board.
3. the method as described in claim 1, which is characterized in that second cable card board record the CAPWAP tunnel list item with After the mapping of the source address of the first message after the decapsulation, further include:
The network switch reflects the mark and the source address of the first message after the decapsulation of second cable card board It penetrates, is recorded in all first kind cable card boards of the network switch.
4. the method as described in claim 1, which is characterized in that the method further includes:
The third cable card board of the network switch receives the second message, and the third cable card board is first kind cable card board, institute The destination address for stating the second message is identical with the source address of the first message after the decapsulation;
The third cable card board is according to the destination address of second message and the mark of second cable card board and the solution Second message is sent to second cable card board by the mapping of the source address of the first message after encapsulation;
Second cable card board is according to the destination address of second message and the CAPWAP tunnel list item and the deblocking The mapping of the source address of the first message after dress obtains the CAPWAP tunnel list item, and according to the CAPWAP tunnel list item Encapsulate second message.
5. method as described in claim 3 or 4, which is characterized in that the method further includes:
Second cable card board receives third message, the destination address and the first message after the decapsulation of the third message Source address it is identical;
Second cable card board is according to the destination address of the third message and the CAPWAP tunnel list item and the deblocking The mapping of the source address of the first message after dress obtains the CAPWAP tunnel list item, and according to the CAPWAP tunnel list item Encapsulate the third message.
6. a kind of network switch, which is characterized in that including backboard, the first cable card board, the second cable card board and master control borad, the master Control plate is connected by the backboard with first cable card board, second cable card board, first cable card board and described second Cable card board is connected by the backboard, and first cable card board is first kind cable card board, and the first kind cable card board is scarce Weary wireless access point control and the cable card board for providing CAPWAP tunnel processing capacity, second cable card board is Second Type line card Plate, the Second Type cable card board are the cable card board with CAPWAP tunnel processing capacity, wherein:
First cable card board, for receiving the first message from wireless terminal point WTP, determine described in from WTP first Message is CAPWAP message, and first message is sent to the second cable card board of the network switch;
Second cable card board, first message sent for receiving first cable card board;
Second cable card board is additionally operable to:Obtain the corresponding CAPWAP tunnel list item of first message, the CAPWAP tunnel List item includes the address of the WTP in the CAPWAP message head of first message, the CAPWAP message of first message The source port number and destination slogan of head;First message is decapsulated, the source address of the first message after decapsulation is obtained;Note Record the mapping of the CAPWAP tunnel list item and the source address of the first message after the decapsulation;
The network switch includes multiple Second Type cable card boards, and the master control borad is used for:Receive the second cable card board hair The mapping of the CAPWAP tunnel list item that send and the source address of the first message after the decapsulation, and by the CAPWAP tunnels The mapping of road list item and the source address of the first message after the decapsulation is synchronized to second line of the network switch All Second Type cable card boards outside snap-gauge.
7. the network switch as claimed in claim 6, which is characterized in that first cable card board is specifically used for:
According to first cable card board to the mapping of second cable card board, first message is sent to second line card Plate;Or
It, will according to the address of WTP described in first message and the address of the WTP to the mapping of second cable card board First message is sent to second cable card board.
8. the network switch as claimed in claim 6, which is characterized in that the master control borad is additionally operable to receive second line card The source address of the first message after the decapsulation that plate is sent, and will be after the mark of second cable card board and the decapsulation The first message source address map record in all first kind cable card boards of the network switch.
9. the network switch as claimed in claim 6, which is characterized in that second cable card board is additionally operable to hand over to the network All first kind cable card boards changed planes send the source of the mark and the first message after the decapsulation of second cable card board The mapping of address;
After all first kind cable card boards of the network switch record mark and the decapsulation of second cable card board The first message source address mapping.
10. the network switch as claimed in claim 9, which is characterized in that the network switch includes multiple Second Types Cable card board, second cable card board are additionally operable to by the source of the first message after the CAPWAP tunnel list item and the decapsulation The mapping of location is synchronized to all Second Type cable card boards outside second cable card board of the network switch.
11. the network switch as described in any one of claim 8 to 10, which is characterized in that the network switch is also Including third cable card board, the third cable card board passes through the backboard and the master control borad, first cable card board, described second Cable card board is connected, and the third cable card board is first kind cable card board, after the destination address of the second message and the decapsulation The source address of first message is identical, wherein:
The third cable card board is for receiving second message, according to the destination address of second message and described second Second message is sent to described the by the mapping of the mark and the source address of the first message after the decapsulation of cable card board Two cable card boards;
Second cable card board is additionally operable to:
According to the destination address of second message and the CAPWAP tunnel list item and the first message after the decapsulation Source address mapping, obtain the CAPWAP tunnel list item, and according to CAPWAP tunnel list item encapsulation second report Text.
12. the network switch as described in any one of claim 8 to 10, which is characterized in that second cable card board is also For:
Third message is received, the destination address of the third message is identical with the source address of the first message after the decapsulation;
According to the destination address of the third message and the CAPWAP tunnel list item and the first message after the decapsulation The mapping of source address obtains the CAPWAP tunnel list item, and encapsulates the third message according to the CAPWAP tunnel list item.
CN201410425959.XA 2014-08-26 2014-08-26 CAPWAP message transmission method and the network switch Active CN105471768B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410425959.XA CN105471768B (en) 2014-08-26 2014-08-26 CAPWAP message transmission method and the network switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410425959.XA CN105471768B (en) 2014-08-26 2014-08-26 CAPWAP message transmission method and the network switch

Publications (2)

Publication Number Publication Date
CN105471768A CN105471768A (en) 2016-04-06
CN105471768B true CN105471768B (en) 2018-11-06

Family

ID=55609057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410425959.XA Active CN105471768B (en) 2014-08-26 2014-08-26 CAPWAP message transmission method and the network switch

Country Status (1)

Country Link
CN (1) CN105471768B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107547479A (en) * 2016-06-29 2018-01-05 迈普通信技术股份有限公司 IPsec implementation method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547583A (en) * 2010-12-17 2012-07-04 上海贝尔股份有限公司 Method, device and system for multicast service transmission control in wireless local area network system
CN102868647A (en) * 2012-09-26 2013-01-09 大唐移动通信设备有限公司 Data processing method and device based on Linux network core
CN102946619A (en) * 2012-11-30 2013-02-27 武汉虹信通信技术有限责任公司 Load balancing method for bypass data of WLAN (wireless local area network)
CN103517446A (en) * 2012-06-20 2014-01-15 中兴通讯股份有限公司 Access controller (AC), wireless local area network system and wireless access method based on system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7873710B2 (en) * 2007-02-06 2011-01-18 5O9, Inc. Contextual data communication platform

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547583A (en) * 2010-12-17 2012-07-04 上海贝尔股份有限公司 Method, device and system for multicast service transmission control in wireless local area network system
CN103517446A (en) * 2012-06-20 2014-01-15 中兴通讯股份有限公司 Access controller (AC), wireless local area network system and wireless access method based on system
CN102868647A (en) * 2012-09-26 2013-01-09 大唐移动通信设备有限公司 Data processing method and device based on Linux network core
CN102946619A (en) * 2012-11-30 2013-02-27 武汉虹信通信技术有限责任公司 Load balancing method for bypass data of WLAN (wireless local area network)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
网络控制系统实验平台的开发;张印熙;《中国优秀硕士学位论文全文数据库 信息科技辑》;20041215(第4期);第I140-439页 *

Also Published As

Publication number Publication date
CN105471768A (en) 2016-04-06

Similar Documents

Publication Publication Date Title
US9736278B1 (en) Method and apparatus for connecting a gateway router to a set of scalable virtual IP network appliances in overlay networks
CN108718278B (en) Message transmission method and device
CN108600074B (en) Method and device for forwarding multicast data message
JP2020520612A (en) Packet transmission method, edge device, and machine-readable storage medium
CN111901132B (en) Group management method, device and system
CN106603550B (en) A kind of Network Isolation method and device
CN108600109B (en) Message forwarding method and device
CN104796336B (en) A kind of method and device for being configured, issuing flow table item
CN103188753B (en) Carry out method and the device of transfer of data based on different links between heterogeneous network
CN104885416A (en) Bridging network devices in a hybrid communication network
US8472420B2 (en) Gateway device
CN105634942A (en) Method and switch for forwarding message
CN108494701B (en) Load sharing method and device
JP2024504466A (en) Packet forwarding methods, packet processing methods, and devices
WO2022048412A1 (en) Method for generating table item, method for sending message, device, and system
US11166188B2 (en) Method for transmitting information, method for receiving information, PDCP entity, and computer storage medium
CN105812221B (en) The device and method of data transmission in virtual expansible Local Area Network
CN106507414A (en) Message forwarding method and device
CN103812775B (en) Method, device and system for forwarding messages
CN108718276A (en) A kind of message forwarding method and device
CN105471768B (en) CAPWAP message transmission method and the network switch
US9847929B2 (en) Cluster and forwarding method
CN116506355B (en) Processing method for unloading flow chart storage and related device
CN108156066B (en) Message forwarding method and device
EP4060957A1 (en) Access control method, apparatus and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant