CN102868622B - A kind of three-layer network forwarding unit and its implementation - Google Patents

A kind of three-layer network forwarding unit and its implementation Download PDF

Info

Publication number
CN102868622B
CN102868622B CN201210399566.7A CN201210399566A CN102868622B CN 102868622 B CN102868622 B CN 102868622B CN 201210399566 A CN201210399566 A CN 201210399566A CN 102868622 B CN102868622 B CN 102868622B
Authority
CN
China
Prior art keywords
module
arp
memory space
mac address
layer network
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.)
Expired - Fee Related
Application number
CN201210399566.7A
Other languages
Chinese (zh)
Other versions
CN102868622A (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.)
Shanghai Feixun Data Communication Technology Co Ltd
Original Assignee
Shanghai Feixun Data Communication Technology 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201210399566.7A priority Critical patent/CN102868622B/en
Publication of CN102868622A publication Critical patent/CN102868622A/en
Application granted granted Critical
Publication of CN102868622B publication Critical patent/CN102868622B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention belongs to a kind of network routing forwarding equipment, particularly relate to a kind of three-layer network forwarding unit and its implementation, comprise and drive packet receiving module, system protocol stack module, routing configuration module, system protocol stack module comprises arp submodule, drive packet receiving module and system protocol stack model calling, also comprise address resolution logic module, address resolution logic module respectively with driving packet receiving module, system protocol stack module and routing configuration model calling; Be provided with mac address learning list memory space in address resolution logic module, mac address learning list memory space, by driving packet receiving module and system protocol stack module, obtains arp package informatin and the forwarding port information corresponding with arp package informatin.The beneficial effect of the technical program is: by set up one independently module ensure that and forward port correct, solve the wasting of resources existed in current technical scheme, the problems such as the degree of coupling between module is large simultaneously.

Description

A kind of three-layer network forwarding unit and its implementation
Technical field
The present invention relates to a kind of network routing forwarding equipment, particularly relate to a kind of three-layer network forwarding unit and its implementation.
Background technology
The exchange chip solution of current main flow is relating in three layers of Host routes process, can find down hop according to the object IP of IP message, after having changed two layers of packet header, needs upper layer software (applications) to specify outbound port.Defect in this flow process can not cause problem in the ordinary course of things, but there is migration once the physical port on equipment at end host, the routing forwarding of this terminal will be interrupted, because the route table items in exchange chip can not change, the message after replacing two layers of packet header appoints so meeting go out from original port.
The method that some companies that have employed the program to realize three layer functions process this defect is, a port field is added in operating system protocol stack arp cache tables, be used for recording generate this arp list item arp bag from which physical port of exchange chip, even if the physical location of terminal there occurs change like this, protocol stack just can be learnt according to the change of port field at once, then notification application can re-issue configuration, the physical location of this terminal is upgraded.
A huge problem of the method is the degree of coupling significantly increasing system, according to ISO network hierarchy principle, arp list item is positioned at network layer, and physical port belongs to link layer, now physical port field is placed in arp list item, in fact, together with the configuration of link layer being coupling in network layer, the problem performance that its degree of coupling is brought is as follows:
1, can record except gateway act on behalf of port data message except the network segment corresponding to arp information, and in fact and the arp list item of not all needs to record port, cause the waste in the utilization of resources.
If 2 operating systems do not allow to change protocol stack, the program will be made to implement, cause cannot compatiblely using of product.
3, be unfavorable for cutting out of software, when system does not need three layered schemes, protocol stack must be changed again, cause the inconvenience in use.
Summary of the invention
For the defect existing for prior art, now provide a kind of be intended to solve the problem three-layer network forwarding unit and the technical scheme of its implementation, concrete technical scheme is as follows:
A kind of three-layer network forwarding unit, comprise and drive packet receiving module, system protocol stack module, routing configuration module, described system protocol stack module comprises arp submodule, described driving packet receiving module and described system protocol stack model calling, wherein, also comprise address resolution logic module, described address resolution logic module respectively with described driving packet receiving module, system protocol stack module and routing configuration model calling; Mac address learning list memory space is provided with in described address resolution logic module, described mac address learning list memory space, by described driving packet receiving module and system protocol stack module, obtains arp package informatin and the forwarding port information corresponding with described arp package informatin; Described mac address learning list memory space comprises IP data space, mac address date memory space, forwards port data memory space.
Above-mentioned three-layer network forwarding unit, wherein, the routing gateway of three-layer network forwarding unit described in described mac address learning list memory space record act on behalf of the arp package informatin in the network segment and wrap corresponding forwarding port information with described arp.
Above-mentioned three-layer network forwarding unit, wherein, described mac address learning list memory space also comprises virtual LAN data memory space.
Above-mentioned three-layer network forwarding unit, wherein, the mac address learning list memory space in described address resolution logic is synchronous aging with described arp submodule.
The implementation method that three-layer network forwards, wherein, comprises above-mentioned three-layer network forwarding unit, specifically comprises the steps:
Step 1, described three-layer network forwarding unit receive arp bag by described driving packet receiving module;
Step 2, described address resolution logic module call arp submodule resolve described arp wrap in the network segment whether acted on behalf of at the routing gateway of described three-layer network forwarding unit of IP address in; If not, then described arp bag is sent to system protocol stack module by described address resolution logic module, if so, then enters step 3;
The arp resolved through described arp submodule is wrapped each field and inserts in described mac address learning list memory space by step 3, described address resolution logic module, described address resolution logic module obtains and wraps corresponding forwarding port information with described arp from driving packet receiving module simultaneously, write in described mac address learning list memory space, and be sent to protocol stack module;
Step 4, described address resolution logic module send the data message in described mac address learning list memory space to described routing configuration module, arranged routing forwarding by described routing configuration module, described three-layer network forwarding unit carries out the forwarding of data according to the setting of routing configuration module.
The implementation method that above-mentioned three-layer network forwards, wherein, described step 3 also comprises step 3.1, has been present in the mac address date memory space in described mac address learning list memory space when the mac information in described arp bag, and forwarding port data corresponding in forwarding port information corresponding to described arp bag and the forwarding port data memory space of described mac information in mac address learning list memory space inconsistent time, new data information is covered former data message by described address resolution logic module; Step 3.2, described address resolution logic module will be new for routing configuration module described in message notice, re-issue corresponding Host routes entry by described routing configuration module.
The beneficial effect of technique scheme is:
The technical program is by setting up after one independently module ensure that the physical port on equipment of end host moves, equipment can select correct forwarding port according to the port information after change, kernel protocol stack need not be changed simultaneously, and having can cutting row, greatly save resource, reduce the degree of coupling between module, be beneficial to software and cut out and reuse.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the structural representation of the embodiment of a kind of three-layer network forwarding unit of the present invention;
Fig. 2 is the schematic flow sheet of the embodiment of a kind of three-layer network retransmission method of the present invention.
Embodiment
Below in conjunction with the drawings and specific embodiments, the invention will be further described, but not as limiting to the invention.
Be illustrated in figure 1 the structural representation of the embodiment of a kind of three-layer network forwarding unit of the present invention, comprise and drive packet receiving module, system protocol stack module, routing configuration module, system protocol stack module comprises arp submodule, packet receiving module is driven to be connected with arp submodule, also comprise address resolution logic module, address resolution logic module respectively with driving packet receiving module, arp submodule and routing configuration model calling.By use one new can cutting standalone module address resolution logic module, record effectively can be carried out to arp information in the arp bag collected, driving packet receiving module in simultaneously can being driven by exchange chip obtains the forwarding port information corresponding to this arp bag, when the physical port of Host routes terminal changes, the relevant information of port change can be obtained in time, thus cover the data message of original record, and this lastest imformation is informed routing configuration module by the form of notice, by routing configuration module this is made and reconfiguring, upgrade the physical port of this terminal, ensure that the correctness of routing forwarding.
By adopting the technical program, can carry out Layer2 switching identify port according to next hop address, even if after the physical port on equipment of end host moves, equipment can select correct forwarding port according to the port information after changing.Simultaneously, being independently module due to what adopt, therefore when not changing protocol stack, above-mentioned functions can being realized, greatly reduce the degree of coupling between the consumption of resource and module, and avoid due to cannot protocol stack be changed and occur the situation that product is incompatible.
In the specific embodiment of a kind of three-layer network forwarding unit of the present invention, the routing gateway of mac address learning list memory space record three-layer network forwarding unit act on behalf of the arp package informatin in the network segment and wrap corresponding forwarding port information with arp, instead of the forwarding port information of the information recorded in all arp bags received and its correspondence, therefore, it is possible to play the effect of reasonably optimizing to resource, effectively reduce the waste of resource.
In the specific embodiment of a kind of three-layer network forwarding unit of the present invention, mac address learning list memory space in address resolution logic module is synchronous with arp submodule aging, achieve the synchronism of arp module and address resolution logic module, prevent because the two is inconsistent, and the generation of routing iinformation record conflict situations may be caused.
Be provided with mac address learning list memory space in address resolution logic module, mac address learning list memory space, by driving packet receiving module and arp submodule, obtains arp package informatin and the forwarding port information corresponding with arp package informatin.Mac address learning list memory space comprises IP data space, mac address date memory space, forwards port data memory space.According to the applicable cases of reality, also can add vlan (VLAN) data space in mac address learning list memory space, to further expand the function and application scope of address resolution logic module.
As shown in Figure 2, be the implementation method that a kind of three-layer network of the present invention forwards, comprise above-mentioned three-layer network forwarding unit, it specifically comprises the steps:
Step 1, three-layer network forwarding unit receive arp bag by driving packet receiving module, and are filtered it by address resolution logic module;
Whether step 2, address resolution logic module to resolve this packet be in the network segment whether acted on behalf of at the routing gateway of three-layer network forwarding unit of IP address in arp bag and arp bag if calling arp submodule; If not in the network segment, then arp bag is sent to system protocol stack module by address resolution logic module, carries out the usual operation of follow-up data bag, if not, then enter step 3;
The arp resolved through arp submodule is wrapped each field and inserts in mac address learning list memory space by step 3, address resolution logic module, address resolution logic module obtains and wraps corresponding forwarding port information with arp from driving packet receiving module simultaneously, in write mac address learning list memory space, and be sent to protocol stack module and do subsequent operation;
Step 4, address resolution logic module send the data message in mac address learning list memory space to routing configuration module, arranged routing forwarding by routing configuration module, three-layer network forwarding unit carries out the forwarding of data according to the setting of routing configuration module;
Step 5, when arp bag in mac information be present in the mac address memory space in mac address learning list memory space, and forwarding port data corresponding in forwarding port information corresponding to arp bag and the forwarding port data memory space of mac information in mac address learning list memory space inconsistent time, new data information is covered former data message by address resolution logic module; So just can carry out port data timely to the end host of originating port change in time to upgrade, avoid the mistake of port repeat;
New data information in mac address learning list memory space is sent to routing configuration module by step 6, address resolution logic module, arranged routing forwarding by routing configuration module, three-layer network forwarding unit carries out the forwarding of data according to the setting of routing configuration module.
This module can flexible approach separately, does not rely on concrete operating system and protocol stack version.If other exchange scheme has same defect, also can solve, adopt in the system of the scheme of Botong can use at all supports three layers of Host routes, and can seamlessly be generalized on other like product, have broad application prospects.
The foregoing is only preferred embodiment of the present invention; not thereby embodiments of the present invention and protection range is limited; to those skilled in the art; should recognize and all should be included in the scheme that equivalent replacement done by all utilizations specification of the present invention and diagramatic content and apparent change obtain in protection scope of the present invention.

Claims (6)

1. a three-layer network forwarding unit, comprise and drive packet receiving module, system protocol stack module, routing configuration module, described system protocol stack module comprises arp submodule, and described driving packet receiving module is connected with described arp submodule, it is characterized in that,
Also comprise address resolution logic module, described address resolution logic module respectively with described driving packet receiving module, described system protocol stack module and described routing configuration model calling;
Mac address learning list memory space is provided with in described address resolution logic module, described mac address learning list memory space, by described driving packet receiving module and system protocol stack module, obtains arp package informatin and the forwarding port information corresponding with described arp package informatin;
Described mac address learning list memory space comprises IP data space IP data space, mac address date memory space, forwards port data memory space.
2. three-layer network forwarding unit as claimed in claim 1, it is characterized in that, the routing gateway of three-layer network forwarding unit described in described mac address learning list memory space record act on behalf of the arp package informatin in the network segment and wrap corresponding forwarding port information with described arp.
3. three-layer network forwarding unit as claimed in claim 1, it is characterized in that, described mac address learning list memory space also comprises vlan data space.
4. three-layer network forwarding unit as claimed in claim 1, it is characterized in that, the mac address learning list memory space in described address resolution logic module is synchronous aging with described arp submodule.
5. the implementation method that forwards of three-layer network, is characterized in that, comprise as the three-layer network forwarding unit as described in arbitrary in Claims 1 to 4, specifically comprise the steps:
Step 1, described three-layer network forwarding unit receive arp bag by described driving packet receiving module;
Step 2, described address resolution logic module call arp submodule resolve described arp wrap in the network segment whether acted on behalf of at the routing gateway of described three-layer network forwarding unit of IP address in; If not, then described arp bag is sent to system protocol stack module by described address resolution logic module, if so, then enters
Step 3;
The arp resolved through described arp submodule is wrapped each field and inserts in described mac address learning list memory space by step 3, described address resolution logic module, described address resolution logic module obtains and wraps corresponding forwarding port information with described arp from driving packet receiving module simultaneously, write in described mac address learning list memory space, and be sent to system protocol stack module;
Step 4, described address resolution logic module send the data message in described mac address learning list memory space to described routing configuration module, arranged routing forwarding by described routing configuration module, described three-layer network forwarding unit carries out the forwarding of data according to the setting of routing configuration module.
6. the implementation method of three-layer network forwarding as claimed in claim 5, it is characterized in that, described step 3 also comprises step 3.1, has been present in the mac address date memory space in described mac address learning list memory space when the mac information in described arp bag, and forwarding port information corresponding to the described arp bag forwarding port data corresponding in mac address learning list memory space with described mac information inconsistent time, new data information is covered former data message by described address resolution logic module;
Step 3.2, described address resolution logic module will be new for routing configuration module described in message notice, re-issue corresponding Host routes entry by described routing configuration module.
CN201210399566.7A 2012-10-19 2012-10-19 A kind of three-layer network forwarding unit and its implementation Expired - Fee Related CN102868622B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210399566.7A CN102868622B (en) 2012-10-19 2012-10-19 A kind of three-layer network forwarding unit and its implementation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210399566.7A CN102868622B (en) 2012-10-19 2012-10-19 A kind of three-layer network forwarding unit and its implementation

Publications (2)

Publication Number Publication Date
CN102868622A CN102868622A (en) 2013-01-09
CN102868622B true CN102868622B (en) 2015-09-02

Family

ID=47447223

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210399566.7A Expired - Fee Related CN102868622B (en) 2012-10-19 2012-10-19 A kind of three-layer network forwarding unit and its implementation

Country Status (1)

Country Link
CN (1) CN102868622B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104410541B (en) * 2014-11-18 2017-09-15 盛科网络(苏州)有限公司 The method and device that VXLAN internal layer virtual machine traffics are counted in intermediary switch
CN105072208A (en) * 2015-07-09 2015-11-18 北京宇航系统工程研究所 MAC address learning method of SDH device
CN107547286B (en) * 2017-09-25 2020-10-09 新华三技术有限公司 Method and device for generating Address Resolution Protocol (ARP) table

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1764193A (en) * 2005-11-23 2006-04-26 杭州华为三康技术有限公司 Method for renewing address analysis protocol rapidly
CN101127709A (en) * 2007-09-26 2008-02-20 杭州华三通信技术有限公司 A method and device for updating port address in address parsing protocol table
JP2008252192A (en) * 2007-03-29 2008-10-16 Fujitsu Ltd Frame repeating device and communication network system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7792124B2 (en) * 2007-04-01 2010-09-07 Cisco Technology, Inc. Data forwarding in a layer three satellite network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1764193A (en) * 2005-11-23 2006-04-26 杭州华为三康技术有限公司 Method for renewing address analysis protocol rapidly
JP2008252192A (en) * 2007-03-29 2008-10-16 Fujitsu Ltd Frame repeating device and communication network system
CN101127709A (en) * 2007-09-26 2008-02-20 杭州华三通信技术有限公司 A method and device for updating port address in address parsing protocol table

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
TD-SCDM RNC系统中三层交换的设计与实现;张峰;《中国优秀硕士学位论文全文数据库信息科技辑》;20090715;I136-311正文37-38页52-53页及相关附图 *

Also Published As

Publication number Publication date
CN102868622A (en) 2013-01-09

Similar Documents

Publication Publication Date Title
CN102413046B (en) Method for forwarding flow by means of virtual router redundancy protocol backup set and equipment
CN102209024B (en) The moving method of virtual machine and system
CN102137024B (en) Message processing method, exit routing device and border routing device
CN102571587B (en) Method and equipment for forwarding messages
CN103067277B (en) Set up and control the method for passage, forwarding unit and control equipment
CN101924699B (en) Message forwarding method, system and provider edge equipment
CN105790996A (en) Distributed gateway backup processing method and network equipment
CN101364927A (en) Method, apparatus and system realizing fault recovery of virtual private network
CN101577719B (en) A kind of double hot standby method, device and system
CN103414626A (en) Message processing method and device based on network virtualization
CN104253736A (en) PE (provider edge) equipment and method for notifying same of information
CN101710875A (en) Method and device for realizing rapid re-routing
CN104270231B (en) A kind of system and method for realizing binode interconnection pseudo-wire
CN101820395A (en) Routing information configuration and private network label addition method and device based on MPLS (Multiple Protocol Label Switching)
CN111277423B (en) Data center flow intercommunication method, device, equipment and storage medium
CN102984014A (en) Data transmission method and network system
CN103002065A (en) Method and device for sharing internet protocol (IP) address by host device and standby device
CN104995878A (en) Message transmission method, apparatus and communication system
CN102868622B (en) A kind of three-layer network forwarding unit and its implementation
US20160205033A1 (en) Pool element status information synchronization method, pool register, and pool element
CN105531967A (en) Message transmission method and device and communication system
CN111490933A (en) Bidirectional forwarding detection switching method and edge device
CN102904814B (en) Data transmission method, source PE, object PE and data transmission system
CN103200117B (en) A kind of load-balancing method and device
CN106850268B (en) device and method for realizing linear protection switching

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
PP01 Preservation of patent right

Effective date of registration: 20180313

Granted publication date: 20150902

PP01 Preservation of patent right
PD01 Discharge of preservation of patent

Date of cancellation: 20210313

Granted publication date: 20150902

PD01 Discharge of preservation of patent
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150902

Termination date: 20181019

CF01 Termination of patent right due to non-payment of annual fee