Movatterモバイル変換


[0]ホーム

URL:


CN101330447A - A Method of Detecting Next Hop MAC Address - Google Patents

A Method of Detecting Next Hop MAC Address
Download PDF

Info

Publication number
CN101330447A
CN101330447ACNA200710117667XACN200710117667ACN101330447ACN 101330447 ACN101330447 ACN 101330447ACN A200710117667X ACNA200710117667X ACN A200710117667XACN 200710117667 ACN200710117667 ACN 200710117667ACN 101330447 ACN101330447 ACN 101330447A
Authority
CN
China
Prior art keywords
router
mac address
message
hop mac
gateway
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
CNA200710117667XA
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.)
WUXI ZHONGKE R&D CENTER OF INTELLIGENT INFORMATION PROCESSING TECHNOLOGIES Co Ltd
Original Assignee
Institute of Acoustics CAS
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 Institute of Acoustics CASfiledCriticalInstitute of Acoustics CAS
Priority to CNA200710117667XApriorityCriticalpatent/CN101330447A/en
Publication of CN101330447ApublicationCriticalpatent/CN101330447A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Landscapes

Abstract

Translated fromChinese

本发明公开了一种探测下一跳MAC地址的方法,包括:路由器在配置网络路由时,探测到路由表中的路由表项不具备下一跳MAC地址信息;路由器的控制平面主动构造一个邻居请求报文,并发送到互联网中与路由器相连接的下一跳网关上;下一跳网关接收到邻居请求报文后,向路由器回复邻居公告报文;路由器根据邻居报文将路由表项中的下一跳MAC地址信息填写完整,并向数据平面中的路由表下发路由表项。本发明通过发送邻居请求报文主动探测网络路由的下一跳MAC地址,减小了路由器控制平面CPU的消耗,提高了路由器的效率。

Figure 200710117667

The invention discloses a method for detecting the next-hop MAC address, which includes: when the router configures the network route, it detects that the routing table entry in the routing table does not have the next-hop MAC address information; the control plane of the router actively constructs a neighbor The request message is sent to the next-hop gateway connected to the router in the Internet; after receiving the neighbor solicitation message, the next-hop gateway replies to the router with a neighbor announcement message; Fill in the next-hop MAC address information completely, and deliver the routing entry to the routing table in the data plane. The invention actively detects the next-hop MAC address of the network route by sending the neighbor request message, reduces the CPU consumption of the router control plane, and improves the efficiency of the router.

Figure 200710117667

Description

Translated fromChinese
一种探测下一跳MAC地址的方法A Method of Detecting Next Hop MAC Address

技术领域technical field

本发明涉及计算机网络领域,特别涉及计算机网络领域中网络路由的实现。The invention relates to the field of computer networks, in particular to the realization of network routing in the field of computer networks.

背景技术Background technique

在说明书附图1中描述了一个常见的网络应用环境,用户在与因特网连接时,首先通过一个路由器连接到网关上,然后经由网关实现与因特网的连接。由此可见,路由设备在网络数据通信中必不可少,而基于网络处理器或者ASIC(ApplicationSpecific Intergrated Circuits)的路由器是一种常见的网络路由设备。如图2所示,它按逻辑可划分为控制平面和数据平面两部分。其中,控制平面负责维护非实时的协议处理操作,如运行路由协议、网络管理等;数据平面负责对数据报文进行转发操作。一般来说,控制平面的非实时操作由通用CPU执行;而数据平面,尤其是负责高速数据转发部分,则运行在网络处理器或者ASIC上。A common network application environment is described in Figure 1 of the specification. When a user connects to the Internet, he first connects to the gateway through a router, and then realizes the connection to the Internet through the gateway. It can be seen that routing devices are indispensable in network data communication, and routers based on network processors or ASICs (Application Specific Integrated Circuits) are a common network routing device. As shown in Figure 2, it can be logically divided into two parts, the control plane and the data plane. Among them, the control plane is responsible for maintaining non-real-time protocol processing operations, such as running routing protocols, network management, etc.; the data plane is responsible for forwarding data packets. Generally speaking, the non-real-time operation of the control plane is performed by a general-purpose CPU; while the data plane, especially the part responsible for high-speed data forwarding, runs on the network processor or ASIC.

在路由器中,路由器根据自身存储的路由表进行数据转发,路由表由各个路由表项组成,一般来说,每个路由表项至少应当包括以下字段:前缀、下一跳MAC地址、接口。利用路由表实现路由转发的基本操作过程如下:当路由器收到IP报文后,根据目的IP地址查询路由表(常见的路由查询算法为最长前缀匹配算法),如果查到匹配的路由表项并且该路由表项的内容表明为非本机路由,则根据路由表项中的下一跳MAC地址对IP报文中的以太网首部进行重新封装,然后从路由表项的接口字段所表示的接口发送IP报文。In the router, the router performs data forwarding according to the routing table stored by itself. The routing table is composed of various routing table entries. Generally speaking, each routing table entry should include at least the following fields: prefix, next-hop MAC address, and interface. The basic operation process of using the routing table to realize routing forwarding is as follows: when the router receives the IP packet, it queries the routing table according to the destination IP address (the common routing query algorithm is the longest prefix matching algorithm), if a matching routing table entry is found And the content of the routing table item shows that it is a non-local route, then according to the next hop MAC address in the routing table item, the Ethernet header in the IP message is re-encapsulated, and then from the interface field of the routing table item. The interface sends IP packets.

要完成上述的路由转发过程,首先需要控制平面将路由协议产生的路由下发至数据平面,形成数据平面的路由表,从而使得网络处理器能够根据数据平面的路由表获得路由信息。但对于控制平面的某些路由条目(如缺省路由),最开始配置时只配置了下一跳网关的IPv6地址,没有对应的下一跳MAC地址。而从上述的路由转发过程可知,在转发数据报文时,只有获得下一跳MAC地址才能够对报文进行封装、转发。因此,在实现路由转发操作前,一般的实现方法如下:To complete the above route forwarding process, firstly, the control plane needs to send the route generated by the routing protocol to the data plane to form a data plane routing table, so that the network processor can obtain routing information according to the data plane routing table. However, for some routing entries (such as default routes) on the control plane, only the IPv6 address of the next-hop gateway is configured at the beginning of configuration, and there is no corresponding next-hop MAC address. It can be seen from the above routing and forwarding process that when forwarding a data message, the message can be encapsulated and forwarded only after the next-hop MAC address is obtained. Therefore, before implementing routing and forwarding operations, the general implementation method is as follows:

1、在路由器的数据平面接收到IP报文后,查询路由表,如果路由表正常,则进行正常的数据转发操作,但如果在路由表中所查询到的下一跳网关的二层信息不完全,则将IP报文发送到控制平面;1. After the data plane of the router receives the IP message, it queries the routing table. If the routing table is normal, it performs normal data forwarding operations. However, if the second-hop gateway information in the routing table is not Complete, send the IP packet to the control plane;

2、控制平面缓存该IP报文,并向下一跳网关发送邻居请求报文;2. The control plane caches the IP packet and sends a neighbor solicitation packet to the next-hop gateway;

3、下一跳网关收到邻居请求报文后,回复邻居应答报文;3. After receiving the Neighbor Solicitation message, the next-hop gateway replies with a Neighbor Reply message;

4、路由器的控制平面根据邻居应答报文中可得到下一跳MAC地址,形成一条完整的路由表项后,再将完整的路由表项发送到数据平面,由数据平面完成路由查询、数据转发等后续工作。4. The control plane of the router can obtain the next-hop MAC address according to the neighbor response message, and after forming a complete routing table entry, it sends the complete routing table entry to the data plane, and the data plane completes routing query and data forwarding Wait for the follow-up work.

上述获取下一跳MAC地址的操作被称为控制平面被动学习过程。这种方法的缺点在于,在被动学习MAC地址的过程中,数据平面的网络处理器需要向控制平面的CPU发送大量的报文,直到被动学习过程结束,控制平面向数据平面返回完整的路由表项,这一操作会耗费控制平面中的CPU资源,影响路由器的执行效率。The above operation of acquiring the next-hop MAC address is called a passive learning process of the control plane. The disadvantage of this method is that in the process of passively learning the MAC address, the network processor of the data plane needs to send a large number of packets to the CPU of the control plane, until the passive learning process is over, and the control plane returns a complete routing table to the data plane This operation consumes CPU resources in the control plane and affects the execution efficiency of the router.

发明内容Contents of the invention

本发明的目的是克服现有的下一跳MAC地址被动学习方法在被动学习过程中需要向路由器发送大量的报文,耗费CPU资源,影响路由器执行效率的缺陷,从而提供一种高效的下一跳MAC地址探测方法。The purpose of the present invention is to overcome the defect that the existing next-hop MAC address passive learning method needs to send a large number of messages to the router during the passive learning process, consumes CPU resources, and affects the execution efficiency of the router, thereby providing an efficient next-hop MAC address. Jump MAC address detection method.

为了实现上述目的,本发明提供了一种探测下一跳MAC地址的方法,包括以下步骤:In order to achieve the above object, the present invention provides a method for detecting the next-hop MAC address, comprising the following steps:

步骤1)、路由器在配置网络路由时,探测到路由表中的路由表项不具备下一跳MAC地址信息;Step 1), the router detects that the routing table entry in the routing table does not have the next-hop MAC address information when configuring network routing;

步骤2)、路由器的控制平面主动构造一个邻居请求报文,并发送到互联网中与路由器相连接的下一跳网关上;Step 2), the control plane of the router actively constructs a neighbor solicitation message, and sends it to the next-hop gateway connected to the router in the Internet;

步骤3)、下一跳网关接收到所述的邻居请求报文后,向所述路由器回复邻居公告报文;Step 3), after the next-hop gateway receives the neighbor solicitation message, it replies the neighbor advertisement message to the router;

步骤4)、路由器接收到所述的邻居公告报文后,根据所述的邻居报文将路由表项中的下一跳MAC地址信息填写完整,并向数据平面中的路由表下发路由表项。Step 4), after the router receives the neighbor announcement message, fills in the next-hop MAC address information in the routing table entry according to the neighbor message, and sends the routing table to the routing table in the data plane item.

上述技术方案中,当路由器没有接收到所述的邻居公告报文时,重新发送邻居请求报文,直至所述的路由器收到所述的邻居公告报文或重新发送邻居请求报文的次数超过一个阈值。In the above technical solution, when the router does not receive the Neighbor Advertisement message, it resends the Neighbor Solicitation message until the router receives the Neighbor Advertisement message or resends the Neighbor Solicitation message for more than a threshold.

上述技术方案中,在所述的邻居请求报文中,IPv6首部的目的IPv6地址字段为下一跳网关对应的请求节点组播地址,在邻居请求消息首部的目标地址字段为下一跳网关的IPv6地址。In the above technical solution, in the neighbor solicitation message, the destination IPv6 address field of the IPv6 header is the request node multicast address corresponding to the next-hop gateway, and the target address field of the neighbor solicitation message header is the address of the next-hop gateway. IPv6 address.

上述技术方案中,在所述的邻居公告报文中,邻居公告消息首部的目标地址字段为下一跳网关的IPv6地址,目标链路层地址字段为下一跳网关的MAC地址。In the above technical solution, in the Neighbor Advertisement message, the target address field of the Neighbor Advertisement message header is the IPv6 address of the next-hop gateway, and the target link layer address field is the MAC address of the next-hop gateway.

所述的阈值可以取值为3。The threshold may be 3.

本发明的优点在于:The advantages of the present invention are:

本发明通过发送邻居请求报文主动探测网络路由的下一跳MAC地址,减小了路由器控制平面CPU的消耗,提高了路由器的效率。The invention actively detects the next-hop MAC address of the network route by sending the neighbor request message, reduces the consumption of the router control plane CPU, and improves the efficiency of the router.

附图说明Description of drawings

图1为一个常见的网络应用环境的示意图;FIG. 1 is a schematic diagram of a common network application environment;

图2为路由器按逻辑划分的示意图;Fig. 2 is a schematic diagram of routers logically divided;

图3为本发明的探测下一跳MAC地址的方法的流程图。FIG. 3 is a flowchart of a method for detecting a next-hop MAC address in the present invention.

具体实施方式Detailed ways

下面结合附图和具体实施方式对本发明作进一步详细描述:Below in conjunction with accompanying drawing and specific embodiment the present invention is described in further detail:

本发明可应用于任何基于网络处理器或者ASIC的硬件路由器。下面以网络处理器为例,结合附图3,介绍本发明方法的一个最佳实施例:The present invention is applicable to any network processor or ASIC based hardware router. Take network processor as example below, in conjunction with accompanying drawing 3, introduce a preferred embodiment of the inventive method:

步骤10、路由器在转发IP报文前,首先配置网络路由,在配置过程中,检查路由表中的路由表项是否具备下一跳MAC地址信息,若路由表中的路由表项不具备下一跳MAC地址信息,则执行下一步,否则按照正常下发路由的方法执行。Step 10, before the router forwards the IP message, at first configure the network route, in the configuration process, check whether the routing table entry in the routing table has the next-hop MAC address information, if the routing table entry in the routing table does not have the next-hop MAC address information, If the MAC address information is missing, go to the next step; otherwise, go to the method of delivering the route normally.

步骤20、路由器的控制平面主动构造一个邻居请求NS(NeighbourSolicitation)报文,并发送到互联网中与路由器相连接的下一跳网关上;同时还要设定一个重发次数,并初始化该重发次数为0;Step 20, the control plane of the router actively constructs a Neighbor Solicitation NS (NeighbourSolicitation) message, and sends it to the next-hop gateway connected to the router in the Internet; at the same time, a number of retransmissions must be set, and the retransmission will be initialized The number of times is 0;

在本步骤中,所采用的NS报文格式与RFC2461中定义的一致,在NS报文中,IPv6首部的目的IPv6地址字段为该下一跳网关对应的请求节点组播地址(Solicited-node Multicast Address),另外,在NS消息首部中,目标地址(TargetAddress)字段为下一跳网关的IPv6地址;In this step, the adopted NS message format is consistent with that defined in RFC2461. In the NS message, the destination IPv6 address field of the IPv6 header is the request node multicast address (Solicited-node Multicast Address) corresponding to the next-hop gateway. Address), in addition, in the NS message header, the target address (TargetAddress) field is the IPv6 address of the next-hop gateway;

步骤30、下一跳网关接收到邻居请求报文后,向路由器回复邻居公告NA(Neighbour Advertisement)报文;在NA消息首部中,目标地址(Target Address)字段为下一跳网关的IPv6地址,在目标链路层地址(Target link-layer Address)字段为下一跳网关的MAC地址。Step 30, after the next-hop gateway receives the Neighbor Solicitation message, it replies to the router with a Neighbor Advertisement NA (Neighbour Advertisement) message; in the NA message header, the target address (Target Address) field is the IPv6 address of the next-hop gateway, In the target link layer address (Target link-layer Address) field is the MAC address of the next-hop gateway.

步骤40、判断路由器是否收到了邻居公告报文,若收到,则根据邻居公告NA报文将路由表项中的下一跳MAC地址信息填写完整,并向数据平面中的路由表下发该路由表项,然后执行步骤70;若没有收到,则执行下一步;Step 40, determine whether the router has received the neighbor advertisement message, and if so, fill in the next-hop MAC address information in the routing table entry according to the neighbor advertisement NA message, and send the message to the routing table in the data plane. Routing entry, then execute step 70; if not received, then execute the next step;

步骤50、重新向下一跳网关发送NS报文;Step 50, resending the NS message to the next-hop gateway;

步骤60、将重发次数值加1,若当前的重发次数高于一个预先设定的阈值,则标注网络路由不可达,并且不向数据平面的路由表下发相应的路由表项,否则,重新执行步骤40;例如,假设在本实施例中,所设定的阈值为3次,则当前的重发次数到达3次,就可标注网络路由不可达。Step 60: Add 1 to the number of retransmissions, if the current number of retransmissions is higher than a preset threshold, mark the network route as unreachable, and do not send the corresponding routing entry to the routing table of the data plane, otherwise , re-execute step 40; for example, assuming that in this embodiment, the set threshold is 3 times, then the current number of retransmissions reaches 3 times, and the network route can be marked as unreachable.

步骤70、路由器的控制平面完成下发路由表项操作后,路由器数据平面的网络处理器就可以根据该路由表项对相应的IP报文进行数据转发,而不再将IP报文上送控制平面的CPU。Step 70: After the control plane of the router completes the operation of delivering the routing table entry, the network processor of the data plane of the router can forward the corresponding IP message according to the routing table entry, instead of sending the IP message to the control Flat CPU.

最后所应说明的是,以上实施例仅用以说明本发明的技术方案而非限制。尽管参照实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,对本发明的技术方案进行修改或者等同替换,都不脱离本发明技术方案的精神和范围,其均应涵盖在本发明的权利要求范围当中。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than limit them. Although the present invention has been described in detail with reference to the embodiments, those skilled in the art should understand that modifications or equivalent replacements to the technical solutions of the present invention do not depart from the spirit and scope of the technical solutions of the present invention, and all of them should be included in the scope of the present invention. within the scope of the claims.

Claims (5)

CNA200710117667XA2007-06-212007-06-21 A Method of Detecting Next Hop MAC AddressPendingCN101330447A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CNA200710117667XACN101330447A (en)2007-06-212007-06-21 A Method of Detecting Next Hop MAC Address

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CNA200710117667XACN101330447A (en)2007-06-212007-06-21 A Method of Detecting Next Hop MAC Address

Publications (1)

Publication NumberPublication Date
CN101330447Atrue CN101330447A (en)2008-12-24

Family

ID=40206046

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CNA200710117667XAPendingCN101330447A (en)2007-06-212007-06-21 A Method of Detecting Next Hop MAC Address

Country Status (1)

CountryLink
CN (1)CN101330447A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2010145472A1 (en)*2009-06-192010-12-23中兴通讯股份有限公司Method for processing messages and network device
CN102857427A (en)*2012-08-272013-01-02上海斐讯数据通信技术有限公司Method for detecting next hop MAC (Media Access Control) address and route device thereof
CN104618242A (en)*2015-02-122015-05-13杭州华三通信技术有限公司Method and device for transferring message
WO2017124886A1 (en)*2016-01-182017-07-27华为技术有限公司Method and gateway for acquiring route as required

Cited By (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2010145472A1 (en)*2009-06-192010-12-23中兴通讯股份有限公司Method for processing messages and network device
US9112143B2 (en)2009-06-192015-08-18Zte CorporationMethod for processing messages and network device
CN102857427A (en)*2012-08-272013-01-02上海斐讯数据通信技术有限公司Method for detecting next hop MAC (Media Access Control) address and route device thereof
CN104618242A (en)*2015-02-122015-05-13杭州华三通信技术有限公司Method and device for transferring message
CN104618242B (en)*2015-02-122018-06-15新华三技术有限公司A kind of message forwarding method and device
WO2017124886A1 (en)*2016-01-182017-07-27华为技术有限公司Method and gateway for acquiring route as required
US10447593B2 (en)2016-01-182019-10-15Huawei Technologies Co., Ltd.Method and gateway for obtaining route according to requirement
CN113162857A (en)*2016-01-182021-07-23华为技术有限公司Method and gateway for acquiring route on demand
CN113162857B (en)*2016-01-182023-01-13华为技术有限公司Method and gateway for acquiring route on demand

Similar Documents

PublicationPublication DateTitle
CN107204867B (en)Information transmission method, device and system
US6845091B2 (en)Mobile ad hoc extensions for the internet
US7698463B2 (en)System and method for disseminating topology and link-state information to routing nodes in a mobile ad hoc network
US7031288B2 (en)Reduced-overhead protocol for discovering new neighbor nodes and detecting the loss of existing neighbor nodes in a network
US7327683B2 (en)Method and apparatus for disseminating topology information and for discovering new neighboring nodes
US20010040895A1 (en)An IPv6-IPv4 compatibility aggregatable global unicast address format for incremental deployment of IPv6 nodes within IPv4
CN103430149B (en)Virtual machine migration notification method and system
CN101394333B (en) Method, device and network system for forwarding message
WO2022041916A1 (en)Message header processing method and apparatus, storage medium and electronic device
CN112491706B (en)Data message processing method and device, storage medium and electronic device
JP5519710B2 (en) Maximum transmission unit (MTU) size detection mechanism and method for data link layer
WO2018032962A1 (en)Method, device and system for information synchronization
WO2009111959A1 (en)Method and device for route installation and distribution
WO2021121065A1 (en)Bier packet forwarding method, device, apparatus, and storage medium
CN103763750B (en)Method for fast achieving packet forwarding in wireless ad hoc network of TDMA protocol
WO2018121257A1 (en)Method, apparatus and system for sending message, and storage medium
WO2018141215A1 (en)Method for updating routing in network, network device and system
CN101616078A (en) A method for discovering the maximum transmission unit of a path, a router and a node device
US12058027B2 (en)Packet transmission method, correspondence obtaining method, apparatus, and system
CN101252524A (en) Method, system and device for message transmission
US20210029020A1 (en)System and method for interior gateway protocol (igp) fast convergence
CN101330447A (en) A Method of Detecting Next Hop MAC Address
US11870683B2 (en)3GPP network function set adaptation for pre-5G network elements
CN100561971C (en) Table entry fast convergence method and message fast forwarding method according to the table entry
CN108667731A (en) A processing and device based on BIER information

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
ASSSuccession or assignment of patent right

Owner name:WUXI ZHONGKE INTELLIGENT INFORMATION TREATMENT RES

Free format text:FORMER OWNER: ACOUSTICS INST., CHINESE ACADEMY OF SCIENCES

Effective date:20110722

C41Transfer of patent application or patent right or utility model
CORChange of bibliographic data

Free format text:CORRECT: ADDRESS; FROM: 100080 NO. 21, NORTH 4TH RING ROAD WEST, HAIDIAN DISTRICT, BEIJING TO: 214135 TOWER C, CHINA MICRO/NANO SENSOR NETWORK INTERNATIONAL INNOVATION PARK, NO. 200, LINGHU AVENUE, T-PARK, WUXI NEW DISTRICT, JIANGSU PROVINCE

TA01Transfer of patent application right

Effective date of registration:20110722

Address after:214135 Jiangsu New District of Wuxi, Taihu international science and Technology Parks Linghu Road No. 200 China micro nano Sensor Network International Innovation Park building C

Applicant after:Wuxi Zhongke R&D Center of Intelligent Information Processing Technologies Co., Ltd.

Address before:100080, No. 21 West Fourth Ring Road, Beijing, Haidian District

Applicant before:Institute of acoustics, Chinese Academy of Sciences

C02Deemed withdrawal of patent application after publication (patent law 2001)
WD01Invention patent application deemed withdrawn after publication

Application publication date:20081224


[8]ページ先頭

©2009-2025 Movatter.jp