CN100377550C - Routing table next-hop IP address to MAC address analytic method - Google Patents

Routing table next-hop IP address to MAC address analytic method Download PDF

Info

Publication number
CN100377550C
CN100377550C CNB2005101264718A CN200510126471A CN100377550C CN 100377550 C CN100377550 C CN 100377550C CN B2005101264718 A CNB2005101264718 A CN B2005101264718A CN 200510126471 A CN200510126471 A CN 200510126471A CN 100377550 C CN100377550 C CN 100377550C
Authority
CN
China
Prior art keywords
interface
address
mac address
hop
message
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
CNB2005101264718A
Other languages
Chinese (zh)
Other versions
CN1777148A (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 Digital Technologies Chengdu 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 CNB2005101264718A priority Critical patent/CN100377550C/en
Publication of CN1777148A publication Critical patent/CN1777148A/en
Application granted granted Critical
Publication of CN100377550C publication Critical patent/CN100377550C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention provides a resolution method for routing table next-hop IP address to MAC address. The method comprises the steps that control software sends interface information required by sending an ARP request to a hardware forwarding engine; when the next-hop IP address searched by a route is not resolved, the hardware forwarding engine encapsulates an ARP request message by oneself according to information sent by the software, and sends the ARP request message in a physical network segment or a VLAN; simultaneously, the IP message is discarded; after an ARP response message is received by a CPU, next-hop list items in the hardware forwarding engine are updated for rendering the hardware forwarding engine to carry out the normal forwarding to a subsequent data message. The present invention is adopted for maximumly reducing the occupation conditions of the CPU, and simultaneously, an ARP message, other protocol messages and the data message matched with an interface IP address can be put in different queues for processing to make system processing reasonable.

Description

A kind of routing table next-hop IP address to MAC address analytic method
Technical field
The present invention relates to the IP switching network communications field, relate in particular to the next-hop IP address to MAC address analytic handling process of routing table in the IP switching network equipment.
Background technology
In IP network, three layers of forwarding of packet must be known that the MAC Address of next-hop ip address correspondence just can be carried out the encapsulation of message, thereby message is carried out correct forwarding by link layer after finishing route querying.In TCP/IP protocol suite, the ARP agreement is responsible for the IP address resolution is become MAC Address.
ARP message format on Fig. 1 Ethernet
The ARP message is divided into two types of request message and response messages.Request message is used for broadcasting MAC Address analysis request in the network segment, node checks whether the IP address of request is this IP addresses of nodes after receiving the ARP request message, if then be organized into the node that response message replies to the request of sending according to content of message, comprise the MAC Address of this machine point in the response message, thereby finish the process of parsing.
In data communications equipment, the ARP agreement is a software module of system control program, operates in the Controlled CPU.The result that ARP resolves produces the main frame route, preserves this IP address and pairing MAC Address; Also upgrade simultaneously the next-hop MAC information in the corresponding network segment route.No matter this IP address is the next hop address of transmitting as in the middle of the destination address of message or the message like this, and the Hardware Forwarding Engine in the equipment is all known the MAC information of this IP address correspondence, thereby the message after correct will the forwarding carries out link layer packaging.
When there is not the list item of corresponding parsing in the next-hop ip address of routing forwarding in the ARP table, will triggers the ARP module and outwards send the ARP request message.Hardware Forwarding Engine is transferred to software CPU with original IP message, is responsible for finishing the overall process that the ARP request message sends and the reception of arp reply message is handled by the ARP module.Whole resolving all is the CPU software processes.
MAC Address analytic structure figure in Fig. 2 communication equipment
In catenet, direct-connected host number is many, adopts the mechanism for resolving of this software control to have more shortcoming, and a large amount of IP messages of not resolving pour in, and can take the CPU bandwidth, influence the stability of a system; And influence the acceptance of other protocol massages, the message processing speed of other agreements in the reduction system.
Summary of the invention
The object of the present invention is to provide a kind of more efficient MAC Address analytic method, make full use of the advantage of hardware, share the software processes burden of Controlled CPU, make system stable more and efficient under the large scale network applied environment.
Technology contents of the present invention: a kind of routing table next-hop IP address to MAC address analytic method, step comprises:
Control Software will send ARP asks needed interface message to be handed down to Hardware Forwarding Engine; When Hardware Forwarding Engine found that the next-hop ip address of route querying is not resolved, the information that issues according to Control Software encapsulated the ARP request message voluntarily and sends in the physics network segment or VLAN; Control Software is issued to Hardware Forwarding Engine with the MAC Address that is resolved to after receiving arp response; Hardware Forwarding Engine is finished the normal forwarding of subsequent packet.
According to the information that Control Software issues, in Hardware Forwarding Engine, set up an interface message table, comprise at least: interface index, the vlan number of interface (if supported vlans), interface IP address, the MAC Address of interface, interface encapsulation type.
In the next skip list of route, increase a flag bit field, if being MAC Address, the flag bit in the next skip list item do not resolve sign, find the corresponding interface list item according to the interface index in the next skip list item, next-hop ip address according to information in the interface list item and message is organized into the ARP request message, sends in the corresponding physics network segment or VLAN.
When interface in the system increased, the interface management module of Control Software was handed down to Hardware Forwarding Engine with interface related information, and distributed the unique interface index value of the overall situation, set up the corresponding interface list item; When the system-kill interface, the pairing interface list item of the interface management module of Control Software notice Hardware Forwarding Engine delete interface index.
After Controlled CPU receives the arp reply message, upgrade the list item of next jumping in the Hardware Forwarding Engine, the MAC Address that is resolved to is write list item, and the updating mark position is that MAC Address has been resolved sign.
Described Hardware Forwarding Engine is finished the normal forwarding of subsequent packet, comprising: when receiving the message that mails to described next-hop ip address, according to the MAC Address in the list item of described next jumping message is encapsulated and transmits.
Described flag bit is 1 o'clock, and the sign MAC Address is resolved; Described flag bit is 0 o'clock, and the sign MAC Address is not resolved.
Technique effect of the present invention: Controlled CPU only need be handled the arp reply message of 64 byte-sized, can finish address learning rapidly and issue, greatly reduced the situation that takies of CPU, under the environment that has thousands of direct-connected main frames, also can keep normal CPU usage, guarantee the stability of system.The data message of ARP message and other protocol massages and matched interfaces IP address can be placed in the different formations and handle simultaneously, makes things convenient for the scheduling of message to handle, and makes system handles more reasonable.
Description of drawings
Below in conjunction with accompanying drawing, describe the present invention in detail.
Fig. 1 is the ARP message format on the Ethernet;
Fig. 2 is the MAC Address analytic structure figure in the communication equipment;
Fig. 3 is the data flow diagram of system;
Fig. 4 is the forwarding process chart of network processing unit.
Embodiment
Assorted processing logic can be realized new agreement and logical process flow process by programming; Network processing unit also has the list item space bigger than ASIC on the other hand.So in data communications equipment, often use network processing unit, be used to solve the task that hardware asics can't be finished as Hardware Forwarding Engine.
After network processing unit is finished route querying according to the purpose IP address of message, if the MAC Address of this IP address correspondence was not resolved, can increase new processing logic by programming and come to send the ARP request message, rather than simple CPU that message is transmitted to carries out the ARP parsing as ASIC by network processing unit.
Because the result who resolves need be organized into the hardware that the main frame route sending-down is given the total interface plate, and upgrade the next-hop mac address information in the corresponding network segment route.Therefore the arp reply message is still handled by Control Software, gives the ARP protocol module processing of Controlled CPU with this message, thereby finishes the parsing of IP address and MAC Address.
The data flow diagram of Fig. 3 system
Describe a kind of preferable realization example of the present invention below in detail.
1, in network processing unit, sets up a new table, called after interface table.This table comprises following information.
Interface index: the index value that the overall situation is unique, distribute by Control Software, be used for the index list item.
Interface IP address: the IP address of preserving this interface.
Interface mac address: the MAC Address of preserving this interface.
Interface encapsulation type: the encapsulated type of preserving this interface.
The vlan number of interface: preserve the VLANTAG information of this interface, be used in the VLAN of appointment, sending the ARP request message.
2, when interface in the system increased, the interface management module of Control Software was handed down to network processing unit with interface related above-mentioned information, and distributed the unique interface index value of the overall situation, set up the corresponding interface list item.
3, when the system-kill interface, as long as the interface management module of Control Software is the pairing interface list item of informing network processor delete interface index.
4, increase a flag bit field in the next skip list of route, flag bit is 1 if the MAC Address of this next-hop IP has been resolved, otherwise flag bit is 0.Processing logic checks whether this flag bit decision needs to send the ARP request message.
5, the index according to next jumping finds the next skip list item after route querying is finished, if the flag bit in the next skip list item is 1, represents that this list item resolves, and can encapsulate E-Packeting according to the mac address information in the next skip list item.Otherwise flag bit is 0, then finds the corresponding interface list item according to the interface index in the next skip list item, is organized into the ARP request message according to the next-hop ip address of information in the interface list item and message, is sending in corresponding VLAN.
The forwarding handling process of Fig. 4 network processing unit
6, the field of ARP request message is done following filling:
Message source MAC: the interface mac address in the interface table
Message purpose MAC: broadcasting MAC Address FF:FF:FF:FF:FF:FF
Type of hardware:
Protocol type: be set to the ARP request
Hardware address length:, encapsulate as ethernet type according to the encapsulated type in the interface table.This field is 6.
The length of protocol address of length of protocol address: Ipv4 is 4
Transmit leg hardware address: the MAC Address of being preserved in the interface table
Transmit leg protocol address: the Ip address of being preserved in the interface table
Target side hardware address: be complete 0
Target side protocol address: for next that E-Packets jumped 32 IP addresses
7, after Controlled CPU receives the arp reply message, upgrade the list item of next jumping in the network processing unit, the MAC Address that is resolved to is write list item, and the update mark position is 1, this list item is resolved, and follow-up like this IP message just can correctly encapsulate and forward.

Claims (7)

1. routing table next-hop IP address to MAC address analytic method, step comprises: Control Software will send ARP asks needed interface message to be handed down to Hardware Forwarding Engine; When Hardware Forwarding Engine found that the next-hop ip address of route querying is not resolved, the information that issues according to Control Software encapsulated the ARP request message voluntarily and sends in the physics network segment or VLAN; Control Software is issued to Hardware Forwarding Engine with the MAC Address that is resolved to after receiving arp response; Hardware Forwarding Engine is finished the normal forwarding of subsequent packet.
2. routing table next-hop IP address to MAC address analytic method as claimed in claim 1, it is characterized in that: also comprise: the information that issues according to Control Software, in Hardware Forwarding Engine, set up an interface message table, at least comprise: interface index, the vlan number of interface, interface IP address, the MAC Address of interface, interface encapsulation type.
3. routing table next-hop IP address to MAC address analytic method as claimed in claim 2, it is characterized in that: in the next skip list of route, increase a flag bit field, if being MAC Address, the flag bit in the next skip list item do not resolve sign, find the corresponding interface list item according to the interface index in the next skip list item, next-hop ip address according to information in the interface list item and message is organized into the ARP request message, sends in the corresponding physics network segment or VLAN.
4. routing table next-hop IP address to MAC address analytic method as claimed in claim 2, it is characterized in that: also comprise: when interface in the system increases, the interface management module of Control Software is handed down to Hardware Forwarding Engine with interface related information, and distribute the unique interface index value of the overall situation, set up the corresponding interface list item; When the system-kill interface, the pairing interface list item of the interface management module of Control Software notice Hardware Forwarding Engine delete interface index.
5. routing table next-hop IP address to MAC address analytic method as claimed in claim 3, it is characterized in that: after Controlled CPU receives the arp reply message, upgrade the list item of next jumping in the Hardware Forwarding Engine, the MAC Address that is resolved to is write list item, and the updating mark position is that MAC Address has been resolved sign.
6. routing table next-hop IP address to MAC address analytic method as claimed in claim 5, it is characterized in that: described Hardware Forwarding Engine is finished the normal forwarding of subsequent packet, comprise: when receiving the message that mails to described next-hop ip address, message is encapsulated and transmits according to the MAC Address in the list item of described next jumping.
7. routing table next-hop IP address to MAC address analytic method as claimed in claim 3 is characterized in that: described flag bit is 1 o'clock, and the sign MAC Address is resolved; Described flag bit is 0 o'clock, and the sign MAC Address is not resolved.
CNB2005101264718A 2005-12-13 2005-12-13 Routing table next-hop IP address to MAC address analytic method Expired - Fee Related CN100377550C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005101264718A CN100377550C (en) 2005-12-13 2005-12-13 Routing table next-hop IP address to MAC address analytic method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005101264718A CN100377550C (en) 2005-12-13 2005-12-13 Routing table next-hop IP address to MAC address analytic method

Publications (2)

Publication Number Publication Date
CN1777148A CN1777148A (en) 2006-05-24
CN100377550C true CN100377550C (en) 2008-03-26

Family

ID=36766460

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005101264718A Expired - Fee Related CN100377550C (en) 2005-12-13 2005-12-13 Routing table next-hop IP address to MAC address analytic method

Country Status (1)

Country Link
CN (1) CN100377550C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102014064A (en) * 2010-12-07 2011-04-13 中兴通讯股份有限公司 Method and device for forwarding messages based on Linux system

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771732B (en) * 2010-01-06 2014-08-27 福建星网锐捷网络有限公司 Message processing method, device and network equipment
CN102957619B (en) * 2011-08-25 2016-05-18 清华大学 Virtual route system and method
CN109428819B (en) * 2017-08-28 2022-01-11 阿里巴巴集团控股有限公司 Method, network component, device and computer storage medium for transmitting data
CN109639581B (en) * 2019-02-21 2021-05-28 杭州迪普科技股份有限公司 Table entry maintenance method and device of switch chip
CN112055094B (en) * 2019-06-06 2022-04-29 烽火通信科技股份有限公司 Method and system for realizing ARP (Address resolution protocol) search and ARPMISS (advanced RISS-mobile switching operating System) processing
CN110224936B (en) * 2019-06-12 2021-11-09 四川灵通电讯有限公司 Routing method based on MAC address and network interface
CN112311905B (en) * 2019-07-29 2022-11-25 烽火通信科技股份有限公司 Method and equipment for realizing dynamic ARP learning

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1411230A (en) * 2002-10-14 2003-04-16 北京港湾网络有限公司 Network equipment CPU load protective method
CN1412210A (en) * 2001-10-12 2003-04-23 中国石油天然气股份有限公司 Preparation method of low-molecular-weight and high-activity polyisobutylene
EP1545067A1 (en) * 2003-12-19 2005-06-22 Alcatel Network unit for forwarding an ethernet packet

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1412210A (en) * 2001-10-12 2003-04-23 中国石油天然气股份有限公司 Preparation method of low-molecular-weight and high-activity polyisobutylene
CN1411230A (en) * 2002-10-14 2003-04-16 北京港湾网络有限公司 Network equipment CPU load protective method
EP1545067A1 (en) * 2003-12-19 2005-06-22 Alcatel Network unit for forwarding an ethernet packet

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102014064A (en) * 2010-12-07 2011-04-13 中兴通讯股份有限公司 Method and device for forwarding messages based on Linux system
CN102014064B (en) * 2010-12-07 2015-01-28 中兴通讯股份有限公司 Method and device for forwarding messages based on Linux system

Also Published As

Publication number Publication date
CN1777148A (en) 2006-05-24

Similar Documents

Publication Publication Date Title
CN100377550C (en) Routing table next-hop IP address to MAC address analytic method
WO2022078509A1 (en) Method and apparatus for encapsulating extension header of ipv6 packet
EP3314827B1 (en) Method and system for managing data traffic in a computing network
US6578084B1 (en) Packet processing using encapsulation and decapsulation chains
US10164910B2 (en) Method and apparatus for an information-centric MAC layer
CN107113240A (en) Expansible VLAN file transmitting method, computer equipment and computer-readable recording medium
US8478853B2 (en) Handling of multiple MAC unicast addresses with virtual machines
EP3335125B1 (en) CARRIER GRADE ETHERNET LAYER 2 OVER LAYER 3 SATELLITE BACKBONES (L2oL3SB)
CN105282024A (en) Cut-through forwarding of CCNx message fragments with IP encapsulation
CN101573913A (en) Method and apparatus for improved multicast routing
WO2018195229A1 (en) Packet forwarding mechanism
US11363675B2 (en) Mesh network system
US10382391B2 (en) Systems and methods for managing network address information
CN114124785B (en) Flow table processing method and device and electronic equipment
US7787461B2 (en) System and a method for processing field frames for multiprotocol use in a communications network
CN102549549A (en) Methods, apparatuses, related computer program product and data structure for distributed storage of service provision-related information
CN104202313A (en) Data forwarding method and gateway
CN105933235B (en) Data communications method and device
US20040215819A1 (en) Apparatus for and method for controlling packet, and computer program product
CN109246016B (en) Cross-VXLAN message processing method and device
CN117395195A (en) Communication method, device, equipment and storage medium
CN104471538A (en) Data stream processing method, device and system
CN103841016A (en) Programmable virtualization router multi-protocol type data package parallel processing method and device
JP4986265B2 (en) COMMUNICATION DEVICE, OPERATION METHOD THEREOF, AND OPERATION PROGRAM
CN104580486B (en) A kind of combined type product information after sale and service supplying 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
ASS Succession or assignment of patent right

Owner name: HUAWEI TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: GANGWAN NETWORK CO., LTD.

Effective date: 20060922

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20060922

Address after: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Applicant after: Huawei Technologies Co., Ltd.

Address before: 100094 harbour network research and development center, No. 17, Zhongguancun Software Park, No. 8 northeast Wang Xi Road, Beijing, Haidian District

Applicant before: Harbour Networks Holdings Limited

C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: HUAWEI DIGIT TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: HUAWEI TECHNOLOGY CO LTD

Effective date: 20100728

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 518129 HUAWEI HEADQUARTERS OFFICE BUILDING, BANTIAN, LONGGANG DISTRICT, SHENZHEN CITY, GUANGDONG PROVINCE TO: 100085 NO.3, XINXI ROAD, SHANGDI, HAIDIAN DISTRICT, BEIJING CITY

TR01 Transfer of patent right

Effective date of registration: 20100728

Address after: 100085 Beijing, Haidian District on the road, No. 3

Patentee after: Huawei Digit Technology Co., Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: Huawei Technologies Co., Ltd.

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

Granted publication date: 20080326

Termination date: 20121213