CN102857427A - Method for detecting next hop MAC (Media Access Control) address and route device thereof - Google Patents

Method for detecting next hop MAC (Media Access Control) address and route device thereof Download PDF

Info

Publication number
CN102857427A
CN102857427A CN2012103084103A CN201210308410A CN102857427A CN 102857427 A CN102857427 A CN 102857427A CN 2012103084103 A CN2012103084103 A CN 2012103084103A CN 201210308410 A CN201210308410 A CN 201210308410A CN 102857427 A CN102857427 A CN 102857427A
Authority
CN
China
Prior art keywords
address
hardware
route
hop
routing
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.)
Pending
Application number
CN2012103084103A
Other languages
Chinese (zh)
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 CN2012103084103A priority Critical patent/CN102857427A/en
Publication of CN102857427A publication Critical patent/CN102857427A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a route device which comprises a protocol control device and a hardware transmitting device. The protocol control device is internally provided with a detecting module. The detecting module automatically sends a detecting message to detect the accessibility of the next hop IP (Internet Protocol) address so as to require a hardware MAC (Media Access Control) address of the next hop address and to trigger a hardware routing table of the hardware transmitting device to be updated. According to the invention, the next hop MAC address is obtained through the detecting module so that a target hardware route table of an IP data packet to be transmitted is searched successfully, and the IP data packet is just transmitted from the hardware to ensure that data reaches the line speed, therefore, the IP data packet processing efficiency is greatly improved. The CPU (Central Processing Unit) resources are not occupied to process, so that the CPU resources are saved.

Description

Survey method and the routing device thereof of route next jump MAC Address
[technical field]
The present invention relates to the broadband network communication field, relate in particular to method and the routing device of package forward.
[background technology]
Along with developing rapidly of internet technology, network application is used to our life and has been brought huge variation, incident be network traffic data in continuous growth, thereby, the network device processing data efficiency is also had higher requirement.
At present, the three-tier switch and the router that possess routing function are common network routing devices, and the routing device of transmitting based on hardware mainly is made of agreement chain of command and two parts of hardware forwarding face, as shown in Figure 1, i.e. agreement control device and hardware retransmission unit.Wherein, the route service module of agreement chain of command is mainly used in moving variety of protocol, by protocol massages carry out alternately route learning, and generate the kernel software routing table, and the kernel software route table items information announcement that will learn is to hardware forwarding face; And hardware forwarding face is made of one or more exchange chip, when network data flow arrives routing device, finishes route querying and surface speed forwarding at exchange chip.
After three-tier switch or router were received an IP packet, if search the MAC Address that has down hop in the hardware routing table, then the IP data envelope was dressed up Frame and is directly walked hardware and transmit.If do not have the MAC Address of down hop this moment in the hardware routing table, also can't find hardware mac address corresponding to destination address, the hardware routing table item is searched unsuccessfully; The IP data packet messages can on send the CPU of agreement chain of command; And the message behind the upper CPU enters the TCP/IP network protocol stack and goes to search the kernel software routing table, after kernel software routing table lookup success, the TCP/IP network protocol stack can pass through ARP(Address Resolution Protocol, address resolution protocol) agreement sends the ARP request message and goes to obtain physical hardware address corresponding to down hop; Next-hop ip address with correspondence after the ARP study writes the ARP high-speed cache with the physical hardware address that obtains; Meanwhile forwarding module can activate to issue and write the hardware routing table item.If receive same purpose IP packet, can search hardware routing table, directly walk hardware and transmit.
Above-mentioned before not getting access to down hop physical hardware address, the IP datagram literary composition needs upper CPU to search the kernel software routing table, can expend like this cpu resource of agreement chain of command.And the efficient that the CPU message is processed is not high, especially when on a large amount of message of appearance during CPU, may affect the normal operation of other agreements.
[summary of the invention]
The technical problem that the present invention need solve provides a kind of method of quick detection route next jump MAC Address, thereby when data retransmission, does not need to take cpu resource, saves cpu resource.
For solving above-mentioned technical problem, the present invention has designed a kind of method of surveying the route next jump MAC Address, and it comprises the steps:
Step 1: the route service module automatic learning in the agreement control device of routing device or manual configuration produce a route table items that arrives the destination, and this route table items comprises IP address, destination and next-hop ip address;
Step 2: check the activity of route table items, if this route table items is movable, then this route table items is write in the kernel software routing table; If this route table items is inactive, after then needing to wait its activity, again it is write in the kernel route table;
Step 3: configuration one detecting module in the agreement control device of routing device, the accessibility of going to detecting next-hop IP address by detecting module timed sending ARP request message;
Step 4: after requested equipment is received the ARP request message, judge that destination address is oneself, reply the arp reply message to routing device;
Step 5: routing device is received the arp reply message, can obtain next-hop mac address according to the arp reply message, write in the ARP high-speed cache, and stop to send the ARP request message, if routing device is not received the arp reply message, detecting devices continues to send the ARP request message of broadcasting; Synchronously, detecting module issues next-hop mac address to hardware routing table, triggers the hardware routing table item and upgrades, and writes all hardware routing table items of this this down hop of purpose Internet Addiction in the hardware routing table.
Further improve as the present invention, the ARP request message is broadcasting packet, and target MAC (Media Access Control) address is ffffffff; Purpose IP address is the IP address of down hop.
The present invention also provides a kind of routing device, comprise agreement control device and hardware retransmission unit, be provided with a detecting module in the described agreement control device, thereby described detecting module sends the hardware mac address that probe messages is gone the accessibility request next hop address of detecting next-hop IP address automatically, and the hardware routing table renewal that triggers the hardware retransmission unit.
The present invention obtains next-hop mac address by detecting module, thereby the purpose hardware routing table item of the IP packet that needs forwarding is searched successfully, the IP packet only need to be walked hardware and transmit, and guarantees that data reach surface speed forwarding, has improved greatly IP processing data packets efficient; And do not need to take cpu resource and process, saved cpu resource.
[description of drawings]
Fig. 1 is the model schematic diagram of existing routing device;
Fig. 2 is the model schematic diagram of routing device of the present invention;
Fig. 3 is the schematic flow sheet that the present invention surveys the method for route next jump MAC Address.
[embodiment]
The invention will be further described below in conjunction with drawings and embodiments.
As shown in Figure 2, be a kind of embodiment of routing device of the present invention.According to logical partitioning, routing device of the present invention comprises agreement chain of command and hardware forwarding chain of command, that is, and and agreement control device and hardware retransmission unit.
Be provided with a detecting module in the described agreement control device, this detecting module is mainly realized three functions: one, receive route change information: when the kernel software route table items of agreement chain of command changes, detecting module can the automatic reception route change information; Two, automatically send probe messages, thereby go the MAC Address of the accessibility request down hop of detecting next-hop IP address; Three, the hardware routing table that obtains the MAC Address of down hop and trigger the hardware retransmission unit upgrades, and hardware routing table writes the MAC Address of down hop, and packet then can pass through the hardware surface speed forwarding.
The present invention surveys the method for route next jump MAC Address, as shown in Figure 2, comprises following step:
Step 1: at first, the route service module in the agreement control device of routing device can produce a route table items that arrives the destination by automatic learning by dynamic routing protocol, or static manual configuration generates a route table items that arrives destination address.Comprise IP address and the next-hop ip address for arriving at the destination and passing through of destination in the route table items, also include an added field and comprised subnet mask or mask-length.
Step 2: check the activity of route table items, determine that namely the corresponding link-local of next-hop ip address is in place, and whether the IP address of local interface belongs to consolidated network.If this route table items is movable, then this route table items is write in the kernel software routing table; If this route table items is inactive, after then needing to wait its activity, again it is write in the kernel route table.Step 1 and Step 2 all are at the route service module automatic learning of routing device and finish, as long as write movable next-hop ip address in the kernel software route table items, could just can go for by this next bar IP address and ask this next-hop mac address.
Step 3: configuration one detecting module in the agreement control device of routing device, the accessibility of going to detecting next-hop IP address by detecting module timed sending ARP request message.In the present embodiment, the ARP request message is broadcasting packet, and target MAC (Media Access Control) address is ffffffff; Purpose IP address is the IP address of down hop.That is, the network equipment that connects to routing device sends the ARP request message of broadcasting, and the purpose IP in the message is the next-hop ip address of routing device.
Step 4: after requested equipment is received the ARP request message, judge that destination address is oneself, reply the arp reply message to routing device, this arp reply message is unicast message, its target MAC (Media Access Control) address is the source MAC of ARP request message, purpose IP address is the interface IP address of transmission ARP request message, and its source MAC and source IP address are next-hop mac address and the IP address of routing device.
Step 5: routing device is received the arp reply message, and the source MAC and the source IP address that take out the arp reply message write in the ARP high-speed cache, and stop to send the ARP request message; If routing device is not received the arp reply message, detecting devices continues to send the ARP request message of broadcasting.Synchronously, detecting module issues next-hop mac address to hardware routing table, triggers the hardware routing table item and upgrades, and writes all hardware routing table items of this this down hop of purpose Internet Addiction in the hardware routing table.At this moment, disposed the next-hop mac address of routing device in the hardware routing table, when then the data flow of same purpose network reaches, directly searched by hardware routing table and carry out effectively forwarding of high speed.
The present invention obtains next-hop mac address by detecting module, thereby the purpose hardware routing table item of the IP packet that needs forwarding is searched successfully, the IP packet only need to be walked hardware and transmit, and guarantees that data reach surface speed forwarding, has improved greatly IP processing data packets efficient; And do not need to take cpu resource and process, saved cpu resource.
Above-described only is embodiments of the present invention, should be pointed out that for the person of ordinary skill of the art at this, under the prerequisite that does not break away from the invention design, can also make improvement, but these all belongs to protection scope of the present invention.

Claims (3)

1. routing device, comprise agreement control device and hardware retransmission unit, it is characterized in that: be provided with a detecting module in the described agreement control device, thereby described detecting module sends the hardware mac address that probe messages is gone the accessibility request next hop address of detecting next-hop IP address automatically, and the hardware routing table renewal that triggers the hardware retransmission unit.
2. a method of surveying the route next jump MAC Address is characterized in that, comprises the steps:
Step 1: the route service module automatic learning in the agreement control device of routing device or manual configuration produce a route table items that arrives the destination, and this route table items comprises IP address, destination and next-hop ip address;
Step 2: check the activity of route table items, if this route table items is movable, then this route table items is write in the kernel software routing table; If this route table items is inactive, after then needing to wait its activity, again it is write in the kernel route table;
Step 3: configuration one detecting module in the agreement control device of routing device, the accessibility of going to detecting next-hop IP address by detecting module timed sending ARP request message;
Step 4: after requested equipment is received the ARP request message, judge that destination address is oneself, reply the arp reply message to routing device;
Step 5: routing device is received the arp reply message, can obtain next-hop mac address according to the arp reply message, write in the ARP high-speed cache, and stop to send the ARP request message, if routing device is not received the arp reply message, detecting devices continues to send the ARP request message of broadcasting; Synchronously, detecting module issues next-hop mac address to hardware routing table, triggers the hardware routing table item and upgrades, and writes all hardware routing table items of this this down hop of purpose Internet Addiction in the hardware routing table.
3. the method for detection route next jump MAC Address according to claim 1 is characterized in that, the ARP request message is broadcasting packet, and target MAC (Media Access Control) address is ffffffff; Purpose IP address is the IP address of down hop.
CN2012103084103A 2012-08-27 2012-08-27 Method for detecting next hop MAC (Media Access Control) address and route device thereof Pending CN102857427A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012103084103A CN102857427A (en) 2012-08-27 2012-08-27 Method for detecting next hop MAC (Media Access Control) address and route device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012103084103A CN102857427A (en) 2012-08-27 2012-08-27 Method for detecting next hop MAC (Media Access Control) address and route device thereof

Publications (1)

Publication Number Publication Date
CN102857427A true CN102857427A (en) 2013-01-02

Family

ID=47403630

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012103084103A Pending CN102857427A (en) 2012-08-27 2012-08-27 Method for detecting next hop MAC (Media Access Control) address and route device thereof

Country Status (1)

Country Link
CN (1) CN102857427A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017124886A1 (en) * 2016-01-18 2017-07-27 华为技术有限公司 Method and gateway for acquiring route as required
WO2019223534A1 (en) * 2018-05-22 2019-11-28 华为技术有限公司 Method and device for monitoring forwarding table entry
CN110581805A (en) * 2018-06-08 2019-12-17 杭州海康威视数字技术股份有限公司 Routing table updating method, device, switch and storage medium
CN112152921A (en) * 2015-12-30 2020-12-29 华为技术有限公司 Method for establishing routing table, electronic equipment and network

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1992672A (en) * 2005-12-27 2007-07-04 中兴通讯股份有限公司 Method for preventing network interruption caused by address aging and time inconformity
CN101330447A (en) * 2007-06-21 2008-12-24 中国科学院声学研究所 Method for detecting next-hop MAC address
CN101621470A (en) * 2009-07-27 2010-01-06 中兴通讯股份有限公司 Detection method of routing availability and route equipment
CN102158407A (en) * 2011-03-31 2011-08-17 华为技术有限公司 Address resolution protocol (ARP) table entry configuration method and device
CN102158348A (en) * 2011-01-30 2011-08-17 北京星网锐捷网络技术有限公司 Network topology discovery method, device and network equipment
CN102413038A (en) * 2011-10-25 2012-04-11 瑞斯康达科技发展股份有限公司 Processing method and system for inaccessibility of next hop of route

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1992672A (en) * 2005-12-27 2007-07-04 中兴通讯股份有限公司 Method for preventing network interruption caused by address aging and time inconformity
CN101330447A (en) * 2007-06-21 2008-12-24 中国科学院声学研究所 Method for detecting next-hop MAC address
CN101621470A (en) * 2009-07-27 2010-01-06 中兴通讯股份有限公司 Detection method of routing availability and route equipment
CN102158348A (en) * 2011-01-30 2011-08-17 北京星网锐捷网络技术有限公司 Network topology discovery method, device and network equipment
CN102158407A (en) * 2011-03-31 2011-08-17 华为技术有限公司 Address resolution protocol (ARP) table entry configuration method and device
CN102413038A (en) * 2011-10-25 2012-04-11 瑞斯康达科技发展股份有限公司 Processing method and system for inaccessibility of next hop of route

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112152921A (en) * 2015-12-30 2020-12-29 华为技术有限公司 Method for establishing routing table, electronic equipment and network
CN112217723A (en) * 2015-12-30 2021-01-12 华为技术有限公司 Method for establishing routing table, electronic equipment and network
US11658896B2 (en) 2015-12-30 2023-05-23 Huawei Technologies Co., Ltd. Routing table creation method, electronic device, and network
CN112152921B (en) * 2015-12-30 2023-07-28 华为技术有限公司 Method for establishing routing table, electronic equipment and network
WO2017124886A1 (en) * 2016-01-18 2017-07-27 华为技术有限公司 Method and gateway for acquiring route as required
JP2018523443A (en) * 2016-01-18 2018-08-16 華為技術有限公司Huawei Technologies Co.,Ltd. Method and gateway for obtaining a route based on a request
US10447593B2 (en) 2016-01-18 2019-10-15 Huawei Technologies Co., Ltd. Method and gateway for obtaining route according to requirement
WO2019223534A1 (en) * 2018-05-22 2019-11-28 华为技术有限公司 Method and device for monitoring forwarding table entry
US11489752B2 (en) 2018-05-22 2022-11-01 Huawei Technologies Co., Ltd. Forwarding entry monitoring method and apparatus
CN110581805A (en) * 2018-06-08 2019-12-17 杭州海康威视数字技术股份有限公司 Routing table updating method, device, switch and storage medium

Similar Documents

Publication Publication Date Title
CN101938415B (en) Rapid forwarding method for network forwarding device
CN102932499B (en) Method and device for learning media access control (MAC) addresses in virtual private lan service (VPLS) networks
CN102291320B (en) MAC (media access control) address learning method and edge device
CN102316028B (en) Method and apparatus for sending internet protocol packet
CN104901891A (en) Method and device for forwarding multicast message
CN102571587B (en) Method and equipment for forwarding messages
EP3697033B1 (en) Method and device for forwarding information
CN102859973A (en) Method, apparatus and system for address resolution
CN101394333B (en) The method E-Packeted, device and network system
CN103248720A (en) Method and device for inquiring physical address
CN102123106A (en) MAC (Multi-Access Computer) addresses learning method and device in virtual private local area network service (VPLS) network
CN102857427A (en) Method for detecting next hop MAC (Media Access Control) address and route device thereof
CN110113264A (en) A kind of caching and route implementation method for naming data network
CN102857588A (en) Processing method and apparatus for address resolution protocol ARP information
CN101094510B (en) Device and method for distributing seeking request to mobile communication system
CN104022956A (en) Method and device for data message processing in location/ID separation protocol network
CN106209644B (en) A kind of message forwarding method and device based on equivalent route
CN103957161A (en) Packet forwarding method and device
CN102045250B (en) Forwarding method for multicast message in VPLS, and service provider edge equipment
CN101888338A (en) Information forwarding method and gateway
CN104040967B (en) The stream forwarding method and message forwarding equipment of a kind of message
CN102859947B (en) Method, apparatus and system for neighbor discovery
CN101945342A (en) Customer premise equipment and method for implementing wireless multicast-to-unicast service thereof
CN102769567B (en) A kind of retransmission method of multilink transparent internet Frame and device
CN101035082B (en) Unpacked message recombining method and interface board

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20130102