Summary of the invention
The present invention is directed to network message process and three layers of performance issue forwarded of AC equipment in wlan network, message is classified by context dependence according to ip, suitable high-performance three-layer forwarding method is selected for different messages, abundant utilization software and hardware resources, reaches three layers of optimization forwarded while ensureing complicated network processing logic.
Technical scheme of the present invention is a kind of message fast three-layer retransmission method for AC equipment in wlan network, when AP and user reach the standard grade, creates and upgrades with the context of three layers of forwarding information, and irrelevant three layers of synchronous context forward information to exchange chip; When network message arrives AC equipment, classify and fast-forwarding is carried out to network message;
Described classification to the implementation that network message carries out fast-forwarding is, context dependent is judged whether according to object ip, for context-sensitive message, search the context with three layers of forwarding information, complete CAPWAP tunnel encapsulation and realize three layers fast turn simultaneously; For context-free message, issue exchange chip hardware engine and search and forward.
And the described context with three layers of forwarding information, refers to contextual content except comprising the necessary context of network processes, further comprises the three layers of forwarding information be associated with the ip of user and AP.
And, when syntople upgrades, upgrade three layers of forwarding information.
Method of the present invention, has the following advantages:
1. play the flexibility of software, for the CAPWAP tunnel encapsulation that context-sensitive network message adopts network process module to complete hardware to be difficult to, solve again the performance issue that the software three layers that brings thus forwards simultaneously.
2. play the high-performance of hardware, for the method that context-free network message adopts exchange chip hardware consulting table to forward, give full play to hardware performance.
Embodiment
Technical solution of the present invention is described in detail below in conjunction with drawings and Examples.
The technical scheme of embodiment is, when AP and user reach the standard grade, creates and upgrades with the context of three layers of forwarding information, and irrelevant three layers of synchronous context forward information to exchange chip; When network message arrives AC equipment, classify and fast-forwarding is carried out to network message.Described classification to the implementation that network message carries out fast-forwarding is, context dependent is judged whether according to object ip, for context-sensitive message, search the context with three layers of forwarding information, complete CAPWAP tunnel encapsulation and realize three layers fast turn simultaneously; For context-free message, issue exchange chip hardware engine and search and forward.
During concrete enforcement, computer software technology can be adopted to realize automatic operational process, software modularity technology also can be adopted to realize in AC system.
The environment that realizes of embodiment is:
A () exchange chip can carry out the forwarding of hardware fast three-layer, but cannot carry out complicated Message processing and tunnel encapsulation; Network processing unit can carry out complicated Message processing and tunnel encapsulation, but three layers of forwarding performance have much room for improvement.
B () context and three layers of forwarding information are all feature with ip, and finally create corresponding relation, and therefore three layers of forwarding information can be deposited within a context.
Fig. 1 describes typical function structure chart.Generally be provided with exchange chip in AC equipment, due to the needs of network processes, network message often needs the network processes of first carrying out some complexity, instead of is directly forwarded by exchange chip.After some messages need encapsulation tunnel, then carry out three layers of forwarding, this part work is completed by network process module.Encapsulation tunnel needs to search contextual, and contextual foundation, upgrades and completed by context management module with searching.Embodiment arranges network process module, context management module, and these three modules of three layer-management modules belong to the module of software view.In order to deposit within a context by three layers of forwarding information, the function of three layer-management modules is management three layers of forwarding information exactly, and is synchronized in context or exchange chip.The effect of exchange chip is three layers of forwarding that the message had nothing to do to partial context carries out hardware view, the form of general employing three layer retransmitting tables+two-layer retransmitting table, two-layer retransmitting table and MAC Address and VLAN and forwarding port corresponding relation, the MAC Address of three layer retransmitting tables and object ip or ip address field and down hop and the corresponding relation of outgoing interface.
Specifically:
When AP and user reach the standard grade, the context management module primarily of AC equipment is responsible for the context creating and upgrade with three layers of forwarding information;
When AC equipment obtains routing iinformation, context-free three layers of three layer-management module synchronization forward information to exchange chip;
When network message arrives AC equipment, primarily of network process module classification, fast-forwarding is carried out to network message.
Embodiment creates and upgrades the context with three layers of forwarding information, focus in context containing three layers of forwarding information, context is except comprising the necessary context of network processes, further comprises the three layers of forwarding information be associated with the ip of user, AP, i.e. routing rule and Adjacent rule; Further, for information such as the next-hop mac address in Adjacent rule, meeting timely notification context administration module when syntople upgrades.Routing rule and object ip or ip address field (specifically referring to the ip of AP and user here) and the ip address of down hop and the corresponding relation of outgoing interface, Adjacent rule is the corresponding relation of the i.e. ip of down hop and the MAC of down hop.
Fig. 2 describes the context workflow diagram creating and upgrade with three layers of forwarding information.
Step 1, correlation module starts initialization.Comprise context management module, three layer-management modules and network process module and carry out initialization respectively.
Step 2, AP(wireless router) to reach the standard grade, message is sent to AC by AP; User reaches the standard grade, and after the message of user is encapsulated by AP, sends to AC.As shown in number in the figure 20.
Step 3, AC obtains the message of reaching the standard grade of AP and user from AP, sets up the context of AP and user, and notifies that three layer-management modules carry out work.As shown in number in the figure 21.
Step 4, three layer-management modules, according to the ip of user in step 3 and AP, are searched routing iinformation and search syntople by ARP message, obtain next-hop mac address, three layers of forwarding information are informed to context management module.As shown in number in the figure 22.Routing iinformation, comprises dynamic routing, static routing etc.ARP and address resolution protocol, by an ICP/IP protocol of ip address acquisition physical address.Namely next-hop mac address searches gained adjacency information.Can start to perform irrelevant three layers of synchronous context after this step completes and forward information to exchange chip.
Step 5, context management module upgrades corresponding user and the contextual three layers of forwarding information of AP after receiving the message of three layers of forwarding informations renewal.As shown in number in the figure 23.When upgrading context, three layers of forwarding information are deposited within a context.
Step 6, because Routing Adjacency relation likely changes, therefore after the context establishment, three layer-management modules also need to monitor syntople.As shown in number in the figure 24.
Step 7, the monitoring result in step 6 is tested by three layer-management modules, if syntople there occurs change, then needs notification context administration module to carry out the renewal of three layers of forwarding information, can return and continue to perform step 5.As shown in number in the figure 25.
Embodiment forwards information to exchange chip by irrelevant for synchronous context three layers, refer to after judging that according to the object ip of routing rule three layers of forwarding information (routing rule and Adjacent rule) are for context-free, three layers of forwarding information are passed in hardware three layer retransmitting table.
Fig. 3 three layers of describing that synchronous context has nothing to do forward information to the workflow diagram of exchange chip.
Step 1, module starts initialization.Refer to three layer-management modules herein.
Step 2, three layer-management modules obtain routing iinformation, comprise dynamic routing, static routing etc.As shown in number in the figure 30.
Step 3, three layer-management modules search syntople according to routing iinformation, can reach, then enter step 4 and carry out context-free judgement if adjacent.As shown in number in the figure 31.If adjacent unreachable, do not descend photos and sending messages.Specifically search and also obtain next-hop mac address realization by ARP message.
Step 4, three layer-management modules judge whether context-free, are to search context according to the object ip in routing iinformation, if search less than context, then prove context-free.As shown in number in the figure 32.
Step 5, in step 4, if the determination result is YES, then three layer-management modules by three layers of forwarding information synchronized update to exchange chip.As shown in number in the figure 33.If judged result is no, be then context-sensitive situation, see the flow processing of accompanying drawing 2.Three layers of forwarding information comprise the routing iinformation of step 2 and the adjacency information of step 3, i.e. routing rule and Adjacent rule.
Step 6, because Routing Adjacency relation likely changes, therefore three layer-management modules also need to monitor syntople.As shown in number in the figure 34.
Step 7, the monitoring result in step 6 is tested by three layer-management modules, if syntople there occurs change, then needs renewal exchange chip being carried out to three layers of forwarding information, can return and continue to perform step 5.As shown in number in the figure 35.
Classification is carried out fast-forwarding to network message and is referred to, judges whether context dependent, for context-sensitive message, search the context with three layers of forwarding information according to object ip, completes CAPWAP tunnel encapsulation and realize three layers simultaneously to turn soon; For context-free message, issue exchange chip hardware engine and search.
Fig. 4 is fast-forwarding is carried out in classification workflow diagram to network message.
Step 1, module starts initialization.Comprise context management module, three layer-management modules and network process module and carry out initialization respectively.
Step 2, network process module receives network message and to go forward side by side row relax, and CAPWAP encapsulation and three layers of forwarding set up contact by the ip of message, judges whether context dependent so first here according to object ip.As shown in number in the figure 40.
Step 3, network process module judges whether context dependent according to object ip, decides to adopt which kind of pass-through mode.As shown in number in the figure 41.
If the determination result is YES, this illustrates that follow-up process needs to use contextual information and carries out CAPWAP tunnel encapsulation and realize three layers simultaneously turning soon, so, network process module is when encapsulating CAPWAP tunnel, search context from context management module, object MAC is directly revised as next-hop MAC etc. by three layers of forwarding information based on context.As shown in number in the figure 42.
If judged result is no, this illustrates that follow-up process does not need to use contextual information and carries out CAPWAP tunnel encapsulation, if it is not good now to look into routing performance with software, therefore message is sent to exchange chip and carries out hardware forwarding by network process module.As shown in number in the figure 43.
Specific embodiment described herein is only to the explanation for example of the present invention's spirit.Those skilled in the art can make various amendment or supplement or adopt similar mode to substitute to described specific embodiment, but can't depart from spirit of the present invention or surmount the scope that appended claims defines.