WO2013078884A1 - 报文转发方法、装置和系统 - Google Patents

报文转发方法、装置和系统 Download PDF

Info

Publication number
WO2013078884A1
WO2013078884A1 PCT/CN2012/079705 CN2012079705W WO2013078884A1 WO 2013078884 A1 WO2013078884 A1 WO 2013078884A1 CN 2012079705 W CN2012079705 W CN 2012079705W WO 2013078884 A1 WO2013078884 A1 WO 2013078884A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
packet
interface
mac address
port number
Prior art date
Application number
PCT/CN2012/079705
Other languages
English (en)
French (fr)
Inventor
罗幼泉
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP12854052.3A priority Critical patent/EP2760168B1/en
Publication of WO2013078884A1 publication Critical patent/WO2013078884A1/zh
Priority to US14/289,055 priority patent/US9525631B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/54Store-and-forward switching systems 
    • H04L12/56Packet switching systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • H04L45/7452Multiple parallel or consecutive lookup operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]

Definitions

  • the present invention relates to the field of communications, and in particular, to a "3 ⁇ 4 text forwarding method, apparatus, and system.
  • L3 Layer 3
  • DIP destination Internet Protocol
  • NH Next Host
  • ARP Address Resolution Protocol
  • the current routing device can successfully forward the IP packet to the NH. That is, the routing device must have the NH route to the destination network segment and the NH ARP. Under the condition, the IP packet can be successfully sent to the NH on the link until the destination device.
  • the NH ARP entry needs to be learned. After learning, the IP packet can be forwarded. The first time the file is forwarded, the delay is inevitable. For the delay sensitive text, such as voice, 4 The forwarding delay of the text will affect the call quality, but the ARP learning of any node on the forwarding path is unsuccessful, such as If the ARP conflicts and the ARP entry is full, the packet is lost and the service is interrupted. Summary of the invention
  • An embodiment of the present invention provides a packet forwarding method, including:
  • the routing device receives the IP packet, and obtains the destination IP address carried in the IP packet.
  • the routing device obtains an IP address of a next hop device on the link from the routing table according to the destination IP address;
  • the media access control MAC address of the next hop device and the corresponding port number on the routing device Obtaining, according to the IP address of the next hop device, the media access control MAC address of the next hop device and the corresponding port number on the routing device; if not, the routing device according to the destination IP address Acquiring the corresponding interface on the routing device from the routing table, and obtaining the MAC address of the next hop device and the corresponding port number from the fuzzy address resolution protocol ARP table according to the interface;
  • the routing device forwards the IP packet to the next hop device according to the MAC address of the next hop device and the port number;
  • the fuzzy ARP table records the correspondence between the interface, the port number, and the MAC address.
  • An embodiment of the present invention provides a routing device, including:
  • a receiving unit configured to receive an Internet Protocol IP packet, and obtain a destination IP address carried in the IP packet;
  • a processing unit configured to acquire, according to an IP address of the next hop device, a media access control MAC address of the next hop device and a corresponding port number on the routing device; if not, according to the destination IP address The address is obtained from the routing table, and the corresponding interface on the routing device is obtained, and the MAC address of the next hop device and the corresponding port number are obtained from the fuzzy address resolution protocol ARP table according to the interface; The MAC address of the hop device and the port number forward the IP packet to the next hop device; The fuzzy ARP table records the correspondence between the interface, the port number, and the MAC address.
  • An embodiment of the present invention provides a packet forwarding system, including a routing device.
  • the routing device is configured to receive an Internet Protocol IP packet, obtain a destination IP address carried in the IP packet, and obtain an IP address of a next hop device on the link from the routing table according to the destination IP address; Obtaining, by the IP address of the next hop device, the media access control MAC address of the next hop device and the corresponding port number on the routing device; if not, obtaining the location from the routing table according to the destination IP address.
  • the corresponding interface on the routing device obtains the MAC address of the next hop device and the corresponding port number from the fuzzy address resolution protocol ARP table according to the interface; and according to the MAC address of the next hop device and the port number
  • the IP packet is forwarded to the next hop device.
  • the fuzzy ARP table records the correspondence between the interface, the port number, and the MAC address.
  • the method, the device, and the system provided by the embodiments of the present invention can obtain the NH MAC address and the local corresponding port according to the interface, and can effectively solve the problem of delay or interruption of the Layer 3 service, and improve the problem. Timeliness and reliability of Layer 3 forwarding. BRIEF DESCRIPTION OF THE DRAWINGS
  • the drawings to be used in the embodiments or the description of the prior art will be briefly described below, and obviously, in the following description The drawings are only some of the embodiments of the present invention, and other drawings may be obtained from those skilled in the art without departing from the drawings.
  • 1 is a flowchart of a method according to an embodiment of the present invention
  • FIG. 2 is a system architecture diagram according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a structure of a routing device according to an embodiment of the present invention.
  • the technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
  • An embodiment of the present invention provides a packet forwarding method, as shown in FIG. 1 , including:
  • Step 100 Receive an IP packet, and obtain a destination IP address in the IP packet.
  • the device corresponding to the destination IP address may be on the same network segment as the routing device or across network segments. After receiving the IP packet, the routing device obtains the destination IP address carried in the IP packet.
  • Step 102 Obtain an IP address of the NH on the link from the routing table according to the destination IP address.
  • R1 is connected to port P2 of R2 through port P1, and the corresponding interfaces are IF1 and IF2 respectively;
  • R2 is connected to port P4 on R3 through port P3, and the corresponding interfaces are IF3 and IF4 respectively.
  • the MAC address of R1 is MAC1 and the IP is 1.1.1.1/24;
  • the MAC address of R2 is MAC2 and the IP is 1.1.1.2/24;
  • the MAC address of R3 is MAC3 and the IP is 3.3.3.2/24
  • Table 1 the structure of the routing table Can be as shown in Table 1 below:
  • R1 needs to forward IP packets to the device with the destination IP address 3.3.3.3/24 and the device with the IP address 3.3.3.3/24, assume R4, the MAC address of R4 is MAC4, and connect to R3 (not shown in Figure 2). As shown, R1 searches for the corresponding IP address from the DIP column of the routing table, obtains the IP address of NH as 1.1.1.2, and the interface (OIF) is IF1. If the information is not available, the corresponding interface is obtained from the routing table according to the destination IP address, and the NH MAC address and corresponding port are obtained from the fuzzy ARP table according to the interface.
  • OIF interface
  • the routing device can obtain the NH MAC address and the corresponding port (OP) on the routing device from the ARP table.
  • the ARP table can be as shown in Table 2:
  • IP and MAC, OIF, and OP are recorded in the ARP table (hereinafter referred to as the accurate ARP table).
  • the accurate ARP table After obtaining the NH IP address, you can obtain the NH MAC address and the local corresponding port number from the exact ARP table.
  • the IP of the NH obtained in step 102 is 1.1.1.2, from the precise ARP.
  • the MAC address of the NH can be found as MAC2, and the corresponding port (OP) on R1 is PI. Then, R1 sends the IP packet to R2 through P1.
  • the interface is not available, obtain the corresponding interface (outbound interface) on the link from the routing table, and obtain the NH MAC address and corresponding port number from the fuzzy ARP table according to the outbound interface.
  • the fuzzy ARP table is obtained.
  • the structure can be as shown in Table 3:
  • the fuzzy ARP table in this embodiment records the correspondence between the interface and the MAC and port number of the NH. For example, if the destination interface (outbound interface) of the destination IP address 3.3.3.2/24 on R1 is IF1, if R1 fails to obtain the NH MAC address and port number from the accurate ARP table, the fuzzy ARP table can be obtained according to the obtained outgoing interface. In this embodiment, the corresponding port number on R1 and the MAC address of NH are obtained. In this embodiment, IF1 on R1 corresponds to port PI, NH is R2, and MAC address is MAC2.
  • the routing device forwards the IP address to the NH according to the obtained port number and the NH's MAC address.
  • the fuzzy ARP table and the accurate ARP table can be one table or two separate tables.
  • the structure can be as shown in the following table.
  • the accurate ARP is learned on R1. , R2, R3 learned fuzzy ARP. table 3
  • Step 106 Forward the IP packet to the NH according to the obtained port number and the NH MAC address. After obtaining the MAC address of the NH, the routing device encapsulates the IP packet and sends the IP address to the NH through the port corresponding to the port number.
  • the method provided in this embodiment needs to establish a fuzzy ARP table in the local device in advance.
  • the process may be: when the interface on the routing device is activated, the device sends a gratuitous ARP packet to the other device, and the gratuitous ARP packet actively advertises the IP address of the local routing device. Address and MAC address information so that other devices receive the free After the ARP packet is received, the corresponding relationship between the receiving port number, the receiving interface, and the MAC address of the peer device is saved in the fuzzy ARP table.
  • the routing device also receives the gratuitous ARP packets sent by other devices, and stores the correspondence between the receiving port number, the receiving interface, and the MAC address of the peer device in the local fuzzy ARP table. If a number of gratuitous ARP packets are received from the peer interface, the MAC address of the last gratuitous ARP packet is obtained. The same interface and port occupy only one ARP entry. .
  • the ambiguous ARP entry can be deleted from the ARP entry.
  • the ARP entry corresponding to the interface in the fuzzy ARP table can be deleted.
  • the packet forwarding method provided in this embodiment can obtain the NH MAC address and the local corresponding port according to the interface, and can effectively solve the problem of delay or interruption of the Layer 3 service, and improve the Layer 3. Timeliness and reliability of forwarding.
  • An embodiment of the present invention provides a routing device, as shown in FIG. 3, including: a receiving unit 30, a processing unit 32, and a sending unit 34.
  • the receiving unit 30 is configured to receive an IP packet, and obtain a destination IP address carried in the IP packet.
  • the processing unit 32 is configured to obtain, according to the destination IP address, an IP address of the NH on the link from the routing table, and obtain the media access control MAC address of the NH and the corresponding port number according to the IP address of the NH; If not, the corresponding interface on the routing device is obtained from the routing table according to the destination IP address, and the NH MAC address and the corresponding port number are obtained from the obfuscated ARP table according to the interface.
  • the sending unit 34 is configured to convert the IP packet according to the MAC address of the NH and the port number Issued to the NH.
  • the processing unit 32 may obtain the MAC address and the port number corresponding to the IP address of the NH from the ARP table.
  • the ARP table may be a table or a different table. The specific form may refer to the foregoing embodiment. description.
  • the receiving unit 30 is further configured to receive a gratuitous ARP packet, where the gratuitous ARP packet carries an IP address and a MAC address of another device.
  • the processing unit 32 is further configured to obtain a port number for receiving the gratuitous ARP packet, and record, in the fuzzy ARP table, the corresponding port number, the corresponding interface, and the MAC address carried in the gratuitous ARP packet. relationship.
  • the processing unit 32 is further configured to delete an entry corresponding to the interface from the fuzzy ARP table when the interface transitions from an active state to an inactive state.
  • the routing device provided in this embodiment can obtain the NH MAC address and the local corresponding port according to the interface, and can effectively solve the problem of delay or interruption of the Layer 3 service, and improve the Layer 3 forwarding. Timeliness and reliability.

Abstract

本发明公开一种报文转发方法、装置和系统,方法包括:接收IP报文,获取所述IP报文中携带的目的IP地址;根据所述目的IP地址从路由表中获取链路上下一跳设备的IP地址;根据所述下一跳设备的IP地址获取所述下一跳设备的MAC地址以及对应的端口号;如果获取不到,则根据所述目的IP地址从路由表中获取所述路由设备上对应的接口,根据所述接口从模糊ARP表中获取下一跳设备的MAC地址和对应的端口号;根据所述下一跳设备的MAC地址以及所述端口号将IP报文转发给所述下一跳设备;其中,所述模糊ARP表记录有接口、端口号和MAC地址的对应关系。

Description

报文转发方法、 装置和系统
本申请要求于 2011 年 11 月 29 日提交中国专利局、 申请号为 201110386699.6、 发明名称为 艮文转发方法、 装置和系统"的中国专利申请的优 先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信领域, 尤其涉及"¾文转发方法、 装置和系统。
背景技术
路由设备在跨网段进行三层(L3 )通信时, 分两步实现:
1、 根据 DIP ( destination Internet Protocol,目的 IP )在当前路由设备上查找 路由表, 匹配目的网段的 NH ( Next Host, 下一跳设备), 如果无法从路由表中 匹配到路由, 则会匹配到默认路由;
2、 在当前路由设备上根据 NH查找本地 ARP ( Address Resolution Protocol, 地址解析协议 )表, 匹配精确 ARP; 如果精确 ARP不存在, 则向 NH发送 ARP 请求, 并收到 NH的响应消息后, 对 NH的 ARP进行学习并添加到 ARP表内, 以太链路上转发。
如果当前路由设备上已存在上述表项, 则当前路由设备能成功将 IP报文转 发至 NH, 也就是说, 路由设备上必须存在到目的网段的 NH路由以及 NH的 ARP, 只有具备这两个条件, IP报文就能成功发送给链路上的 NH, 直到目的设 备。在三层转发过程中, NH的 ARP表项需要学习, 学习之后才能转发 IP报文, 第一次转发 ^艮文过程必然出现时延, 对时延比较敏感的 文如语音^艮文, 4艮文 转发时延将影响通话质量, 而在转发路径上任何一个节点 ARP学习不成功, 如 因为 ARP出现冲突、 ARP表项已满等, 则会导致报文丟失而出现业务中断。 发明内容
本发明一个实施例提供一种报文转发方法, 包括:
路由设备接收 IP报文, 获取所述 IP报文中携带的目的 IP地址;
所述路由设备根据所述目的 IP地址从路由表中获取链路上下一跳设备的 IP 地址;
所述路由设备根据所述下一跳设备的 IP地址获取所述下一跳设备的媒体访 问控制 MAC地址以及所述路由设备上对应的端口号; 如果获取不到, 则根据所 述目的 IP地址从路由表中获取所述路由设备上对应的接口, 根据所述接口从模 糊地址解析协议 ARP表中获取下一跳设备的 MAC地址和对应的端口号;
所述路由设备根据所述下一跳设备的 MAC地址以及所述端口号将 IP报文 转发给所述下一跳设备;
其中, 所述模糊 ARP表记录有接口、 端口号和 MAC地址的对应关系。 本发明一个实施例提供一种路由设备, 包括:
接收单元,用于接收因特网协议 IP报文,获取所述 IP报文中携带的目的 IP 地址;
处理单元, 用于根据所述下一跳设备的 IP地址获取所述下一跳设备的媒体 访问控制 MAC地址以及所述路由设备上对应的端口号; 如果获取不到, 则根据 所述目的 IP地址从路由表中获取所述路由设备上对应的接口, 根据所述接口从 模糊地址解析协议 ARP表中获取下一跳设备的 MAC地址和对应的端口号; 发送单元, 用于根据所述下一跳设备的 MAC地址以及所述端口号将 IP报 文转发给所述下一跳设备; 其中, 所述模糊 ARP表记录有接口、 端口号和 MAC地址的对应关系。 本发明一个实施例提供一种报文转发系统, 包括路由设备,
所述路由设备, 用于接收因特网协议 IP报文, 获取所述 IP报文中携带的目 的 IP地址;根据所述目的 IP地址从路由表中获取链路上下一跳设备的 IP地址; 根据所述下一跳设备的 IP地址获取所述下一跳设备的媒体访问控制 MAC地址 以及所述路由设备上对应的端口号; 如果获取不到, 则根据所述目的 IP地址从 路由表中获取所述路由设备上对应的接口, 根据所述接口从模糊地址解析协议 ARP表中获取下一跳设备的 MAC地址和对应的端口号; 以及根据所述下一跳 设备的 MAC地址以及所述端口号将 IP报文转发给所述下一跳设备; 其中, 所述模糊 ARP表记录有接口、 端口号和 MAC地址的对应关系。 本发明实施例提供的方法、 装置和系统, 在查找精确 ARP表失败时, 可以 根据接口获取 NH的 MAC地址和本地对应的端口,能有效的解决三层业务时延 或中断的问题, 提高了三层转发的及时性和可靠性。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付 出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。 图 1为本发明实施例提供的方法的流程图; 图 2为本发明实施例提供的系统架构图;
图 3为本发明实施例提供的路由设备的结构的示意图。 具体实施例 下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
本发明一个实施例提供一种报文转发方法, 如图 1所示, 包括:
步骤 100, 接收 IP报文, 获取 IP报文中的目的 IP地址。
目的 IP地址所对应的设备可能和路由设备在同一个网段,也可能跨网段的。 路由设备在收到 IP报文后, 获取 IP报文中携带的目的 IP地址。
步骤 102, 根据目的 IP地址从路由表中获取链路上 NH的 IP地址。
假设有三个路由设备, 如图 2所示, 分别是 Rl、 R2和 R3。 R1通过端口 P1连接到 R2的端口 P2,对应的接口分别是 IF1和 IF2; R2通过端口 P3连接到 R3上的端口 P4, 对应的接口分别为 IF3和 IF4。 R1的 MAC地址为 MAC1 , IP 为 1.1.1.1/24; R2的 MAC地址为 MAC2, IP为 1.1.1.2/24; R3的 MAC地址为 MAC3 , IP为 3.3.3.2/24, 则路由表的结构可以如下表 1所示:
表 1
路由表 DIP/Mask 丽 OIF 类型
R1 3.3.3.3/24 1.1.1.2 IF1 精确路由
0.0.0.0/0 1.1.1.2 IF1 默认路由
R2 3.3.3.3/24 3.3.3.2 IF3 精确路由
1.1.1.1/24 1.1.1.2 IF2 精确路由
R3 1.1.1.1/24 3.3.3.2 IF4 精确路由
0.0.0.0/0 3.3.3.2 IF4 默认路由 假如 Rl需要将 IP报文转发给目的 IP地址为 3.3.3.3/24的设备, IP地址为 3.3.3.3/24的设备, 假设为 R4, R4的 MAC地址为 MAC4, 连接 R3 (图 2中未 示出),则 R1从路由表的 DIP列查找对应的 IP地址,获取 NH的 IP地址为 1.1.1.2 , 接口 (OIF )为 IF1。 果获取不到, 则根据目的 IP地址从路由表中获取对应的接口, 根据接口从模糊 ARP表中获取 NH的 MAC地址和对应的端口。
路由设备在获取 NH的 IP地址后, 可以从 ARP表中获取 NH的 MAC地址 以及本路由设备上对应的端口 (OP ), ARP表可以如表 2所示:
表 2
Figure imgf000006_0001
ARP表(下面称之为精确 ARP表)中记录有 IP与 MAC、 OIF、 OP的对应 关系。 在获取到 NH的 IP地址后, 可以从精确 ARP表中获取 NH的 MAC地址 以及本地对应的端口号。
还是以 R1作为举例, 在步骤 102中获取 NH的 IP为 1.1.1.2, 从精确 ARP 表中可以查到 NH的 MAC地址为 MAC2, R1上对应的端口 (OP )为 PI , 则 R1将 IP报文通过 P1发送给 R2。
如果获取不到, 则从路由表中获取链路上对应的接口 (出接口), 根据出接 口从模糊 ARP表中获取 NH的 MAC地址和对应的端口号, 本实施例中 , 模糊 ARP表的结构可以如表 3所示:
表 3
Figure imgf000007_0001
本实施例中的模糊 ARP表记录有接口与 NH的 MAC、 端口号的对应关系。 如目的 IP地址 3.3.3.2/24在 R1上对应的接口 (出接口)为 IF1 , 如果 R1 在从精确 ARP表中获取 NH的 MAC和端口号失败, 则可以根据获取的出接口 从模糊 ARP表中获取 R1上对应的端口号和 NH的 MAC地址, 本实施例中 , R1上 IF1对应端口 PI , NH为 R2, MAC地址为 MAC2。
路由设备根据获取的端口号和 NH的 MAC地址将 IP ^艮文转发给 NH。
在实际使用过程中,模糊 ARP表和精确 ARP表可以是一个表,也可以是分 开的两个表, 当两者为一个表时, 结构可以如下表所示, 其中, R1上学习到了 精确 ARP, R2、 R3学习到了模糊 ARP。 表 3
Figure imgf000008_0001
步骤 106 , 根据获取的端口号和 NH的 MAC地址将 IP报文转发给 NH。 路由设备在获取 NH的 MAC地址后, 对 IP 文进行封装, 通过端口号对 应的端口将 IP ^艮文发送给 NH。
本实施例提供的方法需要预先在本地建立模糊 ARP表, 过程可以是路由设 备上的接口在激活时,向其他设备发送免费 ARP报文,该免费 ARP报文主动对 外公告本端路由设备的 IP地址和 MAC地址信息, 以使得其他设备收到该免费 ARP报文后,在模糊 ARP表中保存接收端口号、接收接口以及对端设备的 MAC 地址的对应关系。
路由设备也会接收其他设备发送的免费 ARP报文,在本地的模糊 ARP表中 保存接收端口号、接收接口以及对端设备 MAC地址的对应关系。如果在相同的 接口和端口的组合下, 前后收到对端的多份免费 ARP报文, 则刷新成最后一份 免费 ARP报文的 MAC地址, 即相同的接口和端口只占用一条 ARP表项资源。
当接口处在激活状态下, 模糊 ARP表项可以不老化, 只刷新, 当接口去激 活时, 可以删除模糊 ARP表中该接口对应的 ARP表项。
为方便查找, 可以在增加一条 ARP表项时,按照接口排序, 如从小到大等。 新插入的表项放在该接口的最前面, 刷新时, 也调整到该接口的最前面。
本实施例提供的报文转发方法, 在查找精确 ARP表失败时, 可以根据接口 获取 NH的 MAC地址和本地对应的端口,能有效的解决三层业务时延或中断的 问题, 提高了三层转发的及时性和可靠性。
本发明一个实施例提供一种路由设备, 如图 3所示, 包括: 接收单元 30、 处理单元 32和发送单元 34。
接收单元 30 , 用于接收 IP报文, 获取所述 IP报文中携带的目的 IP地址。 处理单元 32, 用于根据所述目的 IP地址从路由表中获取链路上 NH的 IP 地址; 根据所述 NH的 IP地址获取所述 NH的媒体访问控制 MAC地址以及对 应的端口号; 如果获取不到, 则根据所述目的 IP地址从路由表中获取所述路由 设备上对应的接口, 根据所述接口从模糊地 ARP表中获取 NH的 MAC地址和 对应的端口号。
发送单元 34, 用于根据所述 NH的 MAC地址以及所述端口号将 IP报文转 发给所述 NH。
处理单元 32具体可以从 ARP表中获取 NH的 IP地址对应的 MAC地址和 端口号, ARP表可以和模糊 ARP表是一个表, 也可以是不同的两个表, 具体形 式可以参照上面实施例的描述。
接收单元 30还用于接收免费 ARP报文, 所述免费 ARP报文携带其他设备 的 IP地址和 MAC地址;
处理单元 32还用于获取接收所述免费 ARP报文的端口号,在所述模糊 ARP 表中记录所述获取的端口号、 对应的接口和所述免费 ARP报文中携带的 MAC 地址的对应关系。
处理单元 32还用于在所述接口从激活态变迁到非激活状态时, 从所述模糊 ARP表中删除所述接口对应的表项。
本实施例提供的路由设备, 在查找精确 ARP表失败时, 可以根据接口获取 NH的 MAC地址和本地对应的端口,能有效的解决三层业务时延或中断的问题, 提高了三层转发的及时性和可靠性。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤是 可以通过程序来指令相关的硬件完成, 所述的程序可以存储于一计算机可读存 储介质中, 如 ROM/RAM、 磁碟或光盘等。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限于 此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易想到 变化或替换, 都应涵盖在本发明的保护范围之内, 因此, 本发明的保护范围应 所述以权利要求的保护范围为准。

Claims

权利要求书
1、 一种报文转发方法, 其特征在于, 包括:
路由设备接收因特网协议 IP报文,获取所述 IP报文中携带的目的 IP地址; 所述路由设备根据所述目的 IP地址从路由表中获取链路上下一跳设备的 IP 地址;
所述路由设备根据所述下一跳设备的 IP地址获取所述下一跳设备的媒体访 问控制 MAC地址以及所述路由设备上对应的端口号; 如果获取不到, 则根据所 述目的 IP地址从路由表中获取所述路由设备上对应的接口, 根据所述接口从模 糊地址解析协议 ARP表中获取下一跳设备的 MAC地址和所述路由设备上对应 的端口号;
所述路由设备根据所述下一跳设备的 MAC地址以及所述端口号将 IP报文 转发给所述下一跳设备;
其中, 所述模糊 ARP表记录有接口、 端口号和 MAC地址的对应关系。
2、 根据权利要求 1所述的方法, 其特征在于, 所述根据所述下一跳设备的 IP地址获取所述下一跳设备的媒体访问控制 MAC地址具体包括:
根据所述下一跳设备的 IP地址从 ARP表中获取下一跳设备的 MAC地址, 所述 ARP表中记录有 IP地址、 端口号、 接口和 MAC地址的对应关系。
3、根据权利要求 1所述的方法,其特征在于,所述接收 IP报文之前还包括: 所述路由设备通过所述接口发送免费 ARP报文,所述免费 ARP报文携带所 述路由设备的 MAC地址和 IP地址。
4、根据权利要求 1所述的方法,其特征在于,所述接收 IP报文之前还包括: 接收免费 ARP报文, 所述免费 ARP报文携带 MAC地址;
在所述模糊 ARP表中保存接收所述免费 ARP报文的端口号、接口和所述免 费 ARP报文中携带的 MAC地址的对应关系。
5、 根据权利要求 1-4任意一项所述的方法, 其特征在于, 当所述接口从激 活状态进入非激活状态时, 从所述模糊 ARP表中删除所述接口对应的表项。
6、 一种路由设备, 其特征在于, 包括:
接收单元,用于接收因特网协议 IP报文,获取所述 IP报文中携带的目的 IP 地址;
处理单元, 用于根据所述目的 IP地址从路由表中获取链路上下一跳设备的 IP地址; 根据所述下一跳设备的 IP地址获取所述下一跳设备的媒体访问控制 MAC地址以及所述路由设备上对应的端口号; 如果获取不到, 则根据所述目的 IP地址从路由表中获取所述路由设备上对应的接口, 根据所述接口从模糊地址 解析协议 ARP表中获取下一跳设备的 MAC地址和对应的端口号;
发送单元, 用于根据所述下一跳设备的 MAC地址以及所述端口号将 IP报 文转发给所述下一跳设备;
其中, 所述模糊 ARP表记录有接口、 端口号和 MAC地址的对应关系。
7、 根据权利要求 6所述的设备, 其特征在于,
所述接收单元还用于接收免费 ARP报文,所述免费 ARP报文携带链路上其 他设备的 IP地址和 MAC地址;
所述处理单元还用于获取接收所述免费 ARP报文的端口号, 在所述模糊 ARP表中记录所述获取的端口号、 对应的接口和所述免费 ARP报文中携带的 MAC地址的对应关系。
8、 根据权利要求 6或 7所述的设备, 其特征在于, 所述处理单元还用于在 所述接口从激活状态进入非激活状态时, 从所述模糊 ARP表中删除所述接口对 应的表项。
9、 一种报文转发系统, 其特征在于, 包括路由设备,
所述路由设备, 用于接收因特网协议 IP报文, 获取所述 IP报文中携带的目 的 IP地址;根据所述目的 IP地址从路由表中获取链路上下一跳设备的 IP地址; 根据所述下一跳设备的 IP地址获取所述下一跳设备的媒体访问控制 MAC地址 以及所述路由设备上对应的端口号; 如果获取不到, 则根据所述目的 IP地址从 路由表中获取所述路由设备上对应的接口, 根据所述接口从模糊地址解析协议 ARP表中获取下一跳设备的 MAC地址和对应的端口号; 以及根据所述下一跳 设备的 MAC地址以及所述端口号将 IP报文转发给所述下一跳设备;
其中, 所述模糊 ARP表记录有接口、 端口号和 MAC地址的对应关系。
10、 根据权利要求 9 所述的系统, 其特征在于, 所述路由设备还用于接收 免费 ARP报文, 所述免费 ARP报文携带其他设备的 IP地址和 MAC地址, 获 取接收所述免费 ARP报文的端口号,在所述模糊 ARP表中记录所述获取的端口 号、 对应的接口和所述免费 ARP报文中携带的 MAC地址的对应关系。
PCT/CN2012/079705 2011-11-29 2012-08-06 报文转发方法、装置和系统 WO2013078884A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP12854052.3A EP2760168B1 (en) 2011-11-29 2012-08-06 Method, device and system for forwarding message
US14/289,055 US9525631B2 (en) 2011-11-29 2014-05-28 Packet forwarding method, apparatus, and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110386699.6 2011-11-29
CN201110386699.6A CN103139071B (zh) 2011-11-29 2011-11-29 报文转发方法、装置和系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/289,055 Continuation US9525631B2 (en) 2011-11-29 2014-05-28 Packet forwarding method, apparatus, and system

Publications (1)

Publication Number Publication Date
WO2013078884A1 true WO2013078884A1 (zh) 2013-06-06

Family

ID=48498401

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/079705 WO2013078884A1 (zh) 2011-11-29 2012-08-06 报文转发方法、装置和系统

Country Status (4)

Country Link
US (1) US9525631B2 (zh)
EP (1) EP2760168B1 (zh)
CN (1) CN103139071B (zh)
WO (1) WO2013078884A1 (zh)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103929357A (zh) * 2013-01-11 2014-07-16 浙江大华技术股份有限公司 一种数据传输方法及网络设备
WO2014139157A1 (zh) * 2013-03-15 2014-09-18 华为技术有限公司 一种报文处理的方法、报文设备和系统
CN104243302B (zh) * 2013-06-20 2018-03-16 华为技术有限公司 业务路由报文处理方法、装置及网络系统
CN104426816B (zh) * 2013-08-19 2018-08-21 华为技术有限公司 一种虚拟机通信方法及装置
US10257083B2 (en) * 2014-08-29 2019-04-09 Cisco Technology, Inc. Flow cache based mechanism of packet redirection in multiple border routers for application awareness
US9749225B2 (en) 2015-04-17 2017-08-29 Huawei Technologies Co., Ltd. Software defined network (SDN) control signaling for traffic engineering to enable multi-type transport in a data plane
CN106376003B (zh) * 2015-07-23 2019-11-19 中移(杭州)信息技术有限公司 检测无线局域网连接及无线局域网数据发送方法及其装置
CN105517188A (zh) * 2015-11-30 2016-04-20 珠海市君天电子科技有限公司 一种建立通信连接的方法及装置
CN106789146B (zh) * 2016-04-15 2021-04-02 新华三技术有限公司 一种拓扑获得方法及装置
CN106209642A (zh) * 2016-06-30 2016-12-07 杭州迪普科技有限公司 一种转发ip报文的方法及装置
JP7010804B2 (ja) * 2018-11-22 2022-01-26 株式会社東芝 中継装置、ネットワークシステム、中継方法およびプログラム
CN110224936B (zh) * 2019-06-12 2021-11-09 四川灵通电讯有限公司 基于mac地址和网络接口的路由方法
US11063869B2 (en) * 2019-10-28 2021-07-13 Dell Products L.P. ARP table management system
TWI739320B (zh) * 2020-02-25 2021-09-11 瑞昱半導體股份有限公司 網路通訊裝置以及網路映射表的操作方法
US11258621B2 (en) * 2020-06-09 2022-02-22 Cisco Technology, Inc. Directed broadcast in network fabric
CN112968839B (zh) * 2021-03-29 2022-02-22 新华三信息安全技术有限公司 报文处理方法及装置
CN113872863B (zh) * 2021-08-25 2023-04-18 优刻得科技股份有限公司 一种路径搜索方法及装置
CN114465776B (zh) * 2021-12-31 2023-09-12 华为技术有限公司 一种泛洪攻击防御方法及相关装置
CN115514702A (zh) * 2022-09-16 2022-12-23 苏州盛科科技有限公司 快速切换链路的方法、装置、电子设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1988495A (zh) * 2005-12-20 2007-06-27 鸿富锦精密工业(深圳)有限公司 网络地址转换装置及其转送封包的方法
CN101159619A (zh) * 2007-11-20 2008-04-09 杭州华三通信技术有限公司 Arp表项的快速添加方法、装置及交换设备
CN102217253A (zh) * 2011-05-05 2011-10-12 华为技术有限公司 报文转发方法、装置及网络设备

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030130832A1 (en) * 2002-01-04 2003-07-10 Peter Schulter Virtual networking system and method in a processing system
JP4457058B2 (ja) * 2005-08-26 2010-04-28 アラクサラネットワークス株式会社 フィルタリングを備えるパケット転送装置
WO2008037159A1 (fr) * 2006-09-25 2008-04-03 Hangzhou H3C Technologies Co., Ltd. Procédé et dispositif de réseau pour communiquer entre différents composants
JP5506444B2 (ja) * 2010-02-18 2014-05-28 株式会社日立製作所 情報システム、装置および方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1988495A (zh) * 2005-12-20 2007-06-27 鸿富锦精密工业(深圳)有限公司 网络地址转换装置及其转送封包的方法
CN101159619A (zh) * 2007-11-20 2008-04-09 杭州华三通信技术有限公司 Arp表项的快速添加方法、装置及交换设备
CN102217253A (zh) * 2011-05-05 2011-10-12 华为技术有限公司 报文转发方法、装置及网络设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2760168A4 *

Also Published As

Publication number Publication date
US9525631B2 (en) 2016-12-20
EP2760168A4 (en) 2014-07-30
EP2760168A1 (en) 2014-07-30
EP2760168B1 (en) 2015-06-10
CN103139071B (zh) 2016-07-13
CN103139071A (zh) 2013-06-05
US20140269729A1 (en) 2014-09-18

Similar Documents

Publication Publication Date Title
WO2013078884A1 (zh) 报文转发方法、装置和系统
US10050877B2 (en) Packet forwarding method and apparatus
US9621508B2 (en) System and method for sharing VXLAN table information with a network controller
CN103546374B (zh) 一种边缘二层网络中转发报文的方法和装置
EP2475132B1 (en) Name-to-address mapping system and data transmission method
US9537793B2 (en) Ensuring any-to-any reachability with opportunistic layer 3 forwarding in massive scale data center environments
WO2016086713A1 (zh) 一种等价多路径的出接口更新方法及装置
CN107800625B (zh) 一种报文转发方法及装置
JP2005505158A5 (zh)
WO2019201209A1 (zh) 报文转发
CN110505621B (zh) 一种终端迁移的处理方法及装置
CA3104756C (en) Loop avoidance communications method, device, and system
WO2015109478A1 (zh) 实现arp的方法、交换设备及控制设备
WO2013026336A1 (zh) 一种路径检测的实现方法及节点
WO2022121466A1 (zh) 以太虚拟专用网的数据处理方法、设备及存储介质
CN113055295A (zh) 通信方法、通信设备和通信系统
WO2014071718A1 (zh) 拓扑分级方法、装置及洪泛的处理方法、装置
US9166884B2 (en) Network location service
CN107547373B (zh) 一种报文转发方法、装置、设备及机器可读存储介质
JP2023544870A (ja) Mlagリンク障害時切換え方法および装置
CN103560968A (zh) 交换机硬件主机路由表更新方法、装置和交换机
WO2013071825A1 (zh) 一种实现身份位置分离网络的设备及方法
JP6378121B2 (ja) ゲートウェイ装置及び通信方法
WO2013023465A1 (zh) 身份位置分离与传统网络互联互通方法、ilr和asr
US10735252B2 (en) Outside router fault detection

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12854052

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2012854052

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE