CN102217253B - Message forwarding method, equipment and network device - Google Patents

Message forwarding method, equipment and network device Download PDF

Info

Publication number
CN102217253B
CN102217253B CN 201180000590 CN201180000590A CN102217253B CN 102217253 B CN102217253 B CN 102217253B CN 201180000590 CN201180000590 CN 201180000590 CN 201180000590 A CN201180000590 A CN 201180000590A CN 102217253 B CN102217253 B CN 102217253B
Authority
CN
China
Prior art keywords
next hop
mac address
arp
port
forwarding
Prior art date
Application number
CN 201180000590
Other languages
Chinese (zh)
Other versions
CN102217253A (en
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 PCT/CN2011/073689 priority Critical patent/WO2011120459A2/en
Publication of CN102217253A publication Critical patent/CN102217253A/en
Application granted granted Critical
Publication of CN102217253B publication Critical patent/CN102217253B/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/66Layer 2 routing, e.g. in Ethernet based MAN's

Abstract

本发明实施例提供一种报文转发方法、装置及网络设备。 Embodiment of the present invention provides a packet forwarding method, apparatus and network equipment. 其中,所述报文转发方法包括:根据接收到报文的目的IP地址查询三层路由表,获取下一跳标识信息;根据下一跳标识信息查询ARP表,获取与下一跳标识信息对应的下一跳MAC地址,ARP表由下一跳标识信息和下一跳标识信息对应的下一跳MAC地址组成;根据下一跳MAC地址查询二层转发表,获取下一跳MAC地址对应的出端口信息;将报文从所述出端口信息对应的出端口转发出去。 Wherein the message forwarding method comprising: a query according to the destination address of the received IP packet L3 routing table, acquiring identification information of the next hop; query the next hop ARP table according to the identification information, acquires the identification information corresponding to the next hop the next hop MAC address, the ARP table by the next-hop MAC address of the next hop information and the identification information corresponding to the next hop identified composition; Layer 2 forwarding table queries according to the next hop MAC address, obtaining a next hop MAC address the port information; the packet forwarding from the port information corresponding to the egress port out. 采用本发明技术方案转发报文,可以解决现有技术中发生VLAN内端口切换时因产生大量的ARP Miss消息和ARP请求报文导致设备瞬间很忙和流量中断的问题,提高了报文的转发效率。 The technical solution of the present invention to forward packets, can solve problems that a large amount of ARP and ARP Miss message port VLAN switching occurs within the prior art devices cause instant request message busy traffic interruption and improve the packet forwarding effectiveness.

Description

报文转发方法、装置及网络设备 Message forwarding method, apparatus and network equipment

技术领域 FIELD

[0001] 本发明实施例涉及网络通信技术,尤其涉及一种报文转发方法、装置及网络设备。 Example relates to network communication technology [0001] The present invention particularly relates to a packet forwarding method, apparatus and network equipment. 背景技术 Background technique

[0002] 现有三层交换机通过将同一虚拟局域网(Virtual Local Area Network ;简称为:VLAN)内的物理端口绑定为虚拟端口(VLANIF),并为虚拟端口配置网际协议(InternetProtocol ;简称为:IP)地址、媒体访问控制(Media Access Control ;简称为:MAC)地址等 [0002] By the same existing three-tier exchange VLAN (Virtual Local Area Network; referred to as: VLAN) physical port in the virtual port (VLANIF), and port configuration for the virtual Internet Protocol (InternetProtocol; referred to as: IP ) address, a media access control (media access Control; for short: MAC) address, etc.

来实现三层转发。 To implement Layer 3 forwarding.

[0003] 基于VLANIF的三层转发过程为:转发模块在接收到报文时,首先根据报文的目的IP地址查找三层路由表,获取目的IP地址对应的出接口信息和下一跳IP地址,再根据出接口信息和下一跳IP地址查找地址解析协议(Address Resolution Protocol ;简称为:ARP)表,获取对应的MAC地址和出端口信息,将报文从该出端口信息对应的物理端口转发给MAC地址对应的网络设备。 [0003] Based on the VLANIF Layer 3 forwarding process: forwarding module when receiving a packet, the destination IP address lookup packets L3 routing table, acquires the destination IP address and interface information corresponding to the next hop IP address and then find the ARP and interface information according to the next hop IP address (address Resolution protocol; for short: ARP) table, and acquires the MAC address corresponding to the port information, the packet from the port information corresponding to the physical port forwarded to the MAC address of the network device. 如果转发模块根据出接口信息和下一跳IP地址查找ARP表时,未匹配到相应的MAC地址和出端口信息,将会上报ARP丢失(MISS)消息给ARP模块,以使ARP模块向该VLANIF下的所有物理端口发送ARP请求报文进行ARP学习。 If the ARP forwarding module searches for information according to the interface and the next hop IP address, not to match the corresponding MAC address and port information, which are reported to be lost ARP (MISS) message to the ARP module, so that the ARP module to VLANIF all physical ports in the transmitted ARP request packets ARP learning.

[0004] 其中,在VLAN内端口备份(Port Backup)的场景下,当主端口故障时,用户会切换到备用端口上,而三层交换机会将主端口下的ARP表删除。 [0004] wherein, at the port VLAN backup (Port Backup) scene, when the main port failure, the user will switch to the alternate port, the ARP table in the three switches will remove the primary port. 在这种情况下,转发模块接收到报文时会因查找不到ARP表而上报ARP丢失(Miss)消息给ARP模块,ARP模块向相应VLANIF下的所有物理端口广播ARP请求报文,以通过重新进行ARP学习为备用端口建立存储用户的IP地址、MAC地址以及对应出端口等信息的ARP表。 In this case, due to the forwarding module receives the ARP lookup and not reported lost ARP (Miss) message packet of the ARP module, the module ARP request packet to all the physical ports corresponding to the broadcast ARP under the VLANIF, through re-establishing ARP learning is stored in the user's backup port IP address, MAC address and ARP table corresponding to the port information and the like.

[0005] 在实现本发明的过程中,发明人发现现有技术至少存在以下不足:当主端口上的用户较多时,会造成大量ARP Miss消息和大量ARP请求报文,这将导致设备瞬间很忙,并且在ARP学习过程中还会导致流量的中断,降低了报文转发的效率。 [0005] During the implementation of the present invention, the inventors found that the prior art has at least the following disadvantages: When a user on the primary port more, will cause a large and a large number of ARP Miss ARP request packets, which will cause the device busy instantaneous and in ARP learning process will lead to interruption of traffic, reducing the efficiency of packet forwarding.

发明内容 SUMMARY

[0006] 本发明实施例提供一种报文转发方法、装置及网络设备,用以解决现有技术中主端口和备用端口切换时导致设备很忙、流量中断的问题,提高报文转发的效率。 An embodiment provides a packet forwarding method, apparatus and network equipment, to solve the problem led to the device busy traffic interruption when the prior art switching master and back ports [0006] the present invention, to improve the efficiency of packet forwarding .

[0007] 本发明实施例提供一种报文转发方法,包括: [0007] The embodiments of the present invention provides a packet forwarding method, comprising:

[0008] 根据接收到报文的目的网际协议IP地址查询三层路由表,获取下一跳标识信息; [0008] The object of the received packet IP internet protocol address query IP routing table, the next hop obtain identification information;

[0009] 根据所述下一跳标识信息查询地址解析协议ARP表,获取与所述下一跳标识信息对应的下一跳媒体访问控制MAC地址,所述ARP表由所述下一跳标识信息和所述下一跳标识信息对应的下一跳MAC地址组成; [0009] The identification information of the next hop ARP table ARP query, acquires the next hop media access identification information corresponding to the next-hop MAC address of the control, the ARP table identification information by the next-hop and the next-hop MAC address of the next hop identifier information corresponding to the composition;

[0010] 根据所述下一跳MAC地址查询二层转发表,获取所述下一跳MAC地址对应的出端 [0010] The next hop MAC address of the layer 2 forwarding the query to obtain the next-hop MAC address of an end

口信息; Port information;

[0011] 将所述报文从所述出端口信息对应的出端口转发出去。 [0011] the packet from the egress port forwarding information corresponding to the out port.

[0012] 本发明实施例提供一种报文转发装置,包括:[0013] 第一获取模块,用于根据接收到报文的目的网际协议IP地址查询三层路由表,获取下一跳标识信息; [0012] The embodiments of present invention provides a packet forwarding device, comprising: [0013] a first obtaining module, configured to query the routing table according to the three received message objects Internet Protocol IP address, acquires the identification information of the next hop ;

[0014] 第二获取模块,用于根据所述下一跳标识信息查询地址解析协议ARP表,获取与所述下一跳标识信息对应的下一跳媒体访问控制MAC地址,所述ARP表由所述下一跳标识信息和所述下一跳标识信息对应的下一跳MAC地址组成; [0014] a second obtaining module, configured to parse the protocol according to the next hop ARP table polling address identification information, acquires the media access information corresponding to the next hop identified next hop MAC address control, the ARP table by a the identification information and the next-hop MAC address of the next hop identification information corresponding to the next hop composition;

[0015] 第三获取模块,用于根据所述下一跳MAC地址查询二层转发表,获取所述下一跳MAC地址对应的出端口信息; [0015] The third acquisition module, according to the next-hop MAC address of the Layer 2 forwarding table queries to obtain the next-hop port information corresponding to the MAC address;

[0016] 转发模块,用于将所述报文从所述出端口信息对应的出端口转发出去。 [0016] The forwarding module, for the packet from the egress port forwarding information corresponding to the out port.

[0017] 本发明实施例提供一种网络设备,包括本发明实施例提供的报文转发装置。 Example embodiments provide a network device [0017] The present invention comprises a packet forwarding apparatus according to an embodiment of the present invention.

[0018] 本发明实施例的报文转发方法、装置及网络设备,采用根据接收到的报文的目的IP地址查询三层路由表,获取下一跳标识信息,然后根据下一跳标识信息查询由下一跳标识信息和下一跳标识信息对应的下一跳MAC地址组成的ARP表,获取对应的MAC地址,再根据获取的MAC地址查询二层转发表,从所述二层转发表中获取与所述MAC地址对应的出端口信息,从而将报文从获取的出端口转发出去的技术方案,由于ARP表仅包括下一跳标识信息和与之对应的MAC地址,不再包括与MAC地址对应的出端口信息,在端口发生切换时,不需要进行ARP学习,而利用二层转发表的学习来实现MAC地址与出端口信息对应关系的更新,解决了在端口发生切换时因产生大量ARP Miss报文和ARP请求报文导致设备瞬间很忙和流量中断的问题,提高了报文的转发效率。 [0018] The packet forwarding method, apparatus and network apparatus of the embodiment of the present invention, using the received destination IP address query packet three routing table, the next hop obtain identification information, and identification information inquiry according to the next hop the next hop ARP table by the next hop MAC address and identification information of identification information corresponding to the next hop composition acquires the MAC address corresponding to layer 2 forwarding and then query the MAC address acquired from the forwarding table Layer acquire the MAC address corresponding to the port information so that the packets are forwarded from the egress port out of the acquired aspect, since the next hop ARP table includes only the identification information and the corresponding MAC address, not including the MAC address information corresponding to the port, the port switching occurs, no ARP learning, while the Layer 2 forwarding table to achieve a MAC address and port information corresponding relationship update solves the port switching occurs due to a large amount ARP Miss packets and ARP request packets cause the device to issue an instant busy and traffic disruption and improve the efficiency of packet forwarding.

附图说明 BRIEF DESCRIPTION

[0019] 为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。 [0019] In order to more clearly illustrate the technical solutions in the embodiments or the prior art embodiment of the present invention, the accompanying drawings for illustrating the prior art described or needed to be used in an embodiment will be briefly introduced hereinafter, the description below the figures show some embodiments of the present invention, those of ordinary skill in the art is concerned, without creative efforts, can derive from these drawings other drawings.

[0020] 图1为本发明一实施例提供的报文转发方法的流程图; [0020] FIG. 1 is a flowchart of packet forwarding method according to an embodiment of the present invention;

[0021] 图2为本发明一实施例提供的报文转发装置的结构示意图; [0021] FIG. 2 is a schematic configuration of the packet forwarding apparatus according to an embodiment of the present invention;

[0022] 图3为本发明又一实施例提供的报文转发装置的结构示意图。 [0022] Fig 3 a schematic structure of still another embodiment of the packet forwarding apparatus provided in an embodiment of the present invention.

具体实施方式 Detailed ways

[0023] 为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。 [0023] In order that the invention object, technical solutions, and advantages of the embodiments more clearly, the following the present invention in the accompanying drawings, technical solutions of embodiments of the present invention are clearly and completely described, obviously, the described the embodiment is an embodiment of the present invention is a part, but not all embodiments. 基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。 Based on the embodiments of the present invention, those of ordinary skill in the art to make all other embodiments without creative work obtained by, it falls within the scope of the present invention.

[0024] 图1为本发明一实施例提供的报文转发方法的流程图。 [0024] FIG. 1 is a flowchart of a method for forwarding packets according to an embodiment of the present invention. 如图1所示,本实施例的方法包括: As shown in FIG 1, the method according to the present embodiment includes:

[0025] 步骤11、根据接收到报文的目的IP地址查询三层路由表,获取下一跳标识信息; [0025] Step 11, based on the received packet destination IP address query IP routing table, the next hop obtain identification information;

[0026] 网络中的其他设备向三层交换机发送报文时,会在发送的报文中携带IP地址信息(源IP地址和目的IP地址),以供三层交换机进行三层转发。 [0026] When the other devices on the network sends a message to three switches, carries the IP address information (source IP address and destination IP address) in the message sent, for forwarding at Layer three switches. 三层交换机进行三层转发基于其上存储的三层路由表,该三层路由表中存储有目的IP地址和与目的IP地址对应的下一跳标识信息。 Layer three switches for forwarding based on the routing table stored in the three, three-layer routing table stores the next-hop destination IP address and identification information corresponding to the destination IP address. 本实施例的下一跳标识信息主要是指与目的IP地址对应的路由出接口的信息和该路由出接口的下一跳IP地址,路由出接口的信息包括出接口类型和出接口索引。 Identification information of the next hop according to the present embodiment mainly refers to the destination IP address corresponding to the outgoing routing information of the next hop IP address of the interface, the interface to the routing information interfaces include the interface type and the interface index. 当路由出接口为VLANIF下的物理端口时,该出接口的类型为VLANIF,出接口索引即VLANIF标识为该VLANIF对应的VLAN值。 When the outgoing interface is the physical port at VLANIF, which is a type VLANIF interface, i.e. the interface index identifying the VLAN VLANIF VLANIF corresponding value. 例如:如果创建VLAN 100对应的VLANIF,则VLANIF对应的出接口索引即为VLAN 100。 For example: If the Create 100 corresponding VLAN VLANIF, the VLANIF outbound interface index is the VLAN 100.

[0027] 三层交换机解析报文并获取报文的目的IP地址,以报文的目的IP地址为输入查询三层路由表;如果在三层路由表中查询到与目的IP地址相同的IP地址,则获取与目的IP地址相同的IP地址所对应的下一跳标识信息。 [0027] Layer packet switch parses and obtains the destination IP address of the packet to the packet destination IP address of an input query IP routing table; If the query IP routing table to the destination IP address with the same IP address , the identification information is acquired with the same next hop IP address corresponding to the destination IP address.

[0028] 其中,对于接收到的报文而言,若本地三层交换机是其最后一跳,即报文的目的IP地址为三层交换机的某个物理端口的IP地址,则获取的下一跳标识信息中将不包括下一跳IP地址,而仅包括路由出接口信息。 [0028] wherein, for the received message, if the local switch is the three last hop, i.e. the packet destination IP address is an IP address of the physical port of the three switches, the acquisition of the next hop identification information is not included in the next hop IP address, and only the information including the outgoing interface. 若本地三层交换机不是其最后一跳,则获取的下一跳标识信息同时包括路由出接口信息和下一跳IP地址。 If the local switch is not its final three-hop, the next hop is acquired identification information includes both the outgoing interface and next hop IP address information.

[0029] 在本实施例中,以路由出接口为VLANIF下的物理端口为例,则出接口信息主要是指VLANIF标识,亦即VLANIF对应的VLAN值。 [0029] In the present embodiment, the outgoing interface to the physical ports in Example VLANIF, it mainly refers to the interface information VLANIF identification, i.e. the value corresponding to the VLAN VLANIF.

[0030] 步骤12、根据下一跳标识信息查询ARP表,获取与下一跳标识信息对应的下一跳MAC地址,所述ARP表由下一跳标识信息和下一跳标识信息对应的下一跳MAC地址组成; [0030] Step 12, the identification information according to the next hop ARP table query, get the next hop MAC address identification information corresponding to the next hop, the next hop ARP table identification information and the identification information corresponding to the next hop at hop MAC address;

[0031] 其中,下一跳MAC地址是指下一跳IP地址对应的物理设备的MAC地址。 [0031] wherein the next hop MAC address is the MAC address of the physical device corresponding to the next hop IP address. 在本实施例中,ARP表由下一跳标识信息和与之对应的下一跳MAC地址组成。 In the present embodiment, ARP table identification information from the next hop MAC address and the next-hop corresponding composition. 即当下一跳标识信息包括下一跳IP地址时,ARP表中仅包括路由出接口信息、下一跳IP地址和下一跳MAC地址的对应关系;当下一跳标识信息不包括下一跳IP地址时,ARP表仅包括路由出接口信息、三层交换机上某个物理端口的IP地址(即报文的目的IP地址)和与该物理端口直接连接的设备的MAC地址。 I.e., when the identification information comprises a next hop next hop IP address, the ARP routing table includes only the interface information, the correspondence between the IP address and the next-hop hop MAC address; next hop does not include information identifying hop IP an address, ARP routing table includes only the interface information, MAC address, IP address of a physical port (i.e., the packet destination IP address) and the three switches are directly connected to the physical port of the device.

[0032] 具体的,当下一跳标识信息包括路由出接口标识(例如VLANIF标识)和下一跳IP地址时,三层交换机具体以路由出接口标识(和下一跳IP地址为输入查询ARP表,并获取ARP表中与路由出接口标识和下一跳IP地址均匹配的表项中的MAC地址(即下一跳MAC地址)。其中,该下一跳MAC地址可唯一标识接收该报文的下一台物理设备。 [0032] Specifically, when the next-hop routing information comprises an identification interface identifier (e.g. VLANIF identification) and a next hop IP address, the three switches to route the particular interface identifier (and IP address of the next hop ARP table query input , and acquires the MAC address (i.e., the next hop MAC address) in the ARP table entries in the outgoing interface and next hop IP address identification are matched. wherein the next hop MAC address uniquely identifies the received packet next physical device.

[0033] 当下一跳标识信息仅包括路由出接口标识而不包括下一跳IP地址时,三层交换机以路由出接口标识和报文中的目的IP地址为输入查询ARP表,并获取ARP表中与路由出接口标识和报文中的目的IP地址均匹配的表项中的MAC地址(即下一跳MAC地址)。 When [0033] the next hop routing information comprises an identification interface identifier and does not include only the next hop IP address, the three switches to route identifier and the destination IP address of the interface for the packet input query ARP table, and acquires the ARP the routing address with the MAC address and destination IP identification packet interfaces are matched table entry (i.e., the next hop MAC address). 此时,该下一跳MAC地址对应的物理设备,通过路由出接口标识对应的物理端口与三层交换机直接相连,并且为该报文的最终接收者。 In this case, the next hop MAC address corresponding to the physical device, the route via the corresponding interface identifier and a physical port is directly connected to three switches, and to the ultimate recipient of the message.

[0034] 步骤13、根据下一跳MAC地址查询二层转发表,获取下一跳MAC地址对应的出端Π ; [0034] Step 13, in accordance with the next hop MAC address lookup Layer 2 forwarding table, acquires the next hop MAC address corresponding to the end of [pi;

[0035] 由于在本实施例中,ARP表中未存储有下一跳MAC地址对应的网络设备与三层交换机相连接的端口信息,因此,三层交换机在查询ARP表获取到下一跳MAC地址后,进一步根据获取的下一跳MAC地址查询二层转发表,以获取下一跳MAC地址对应的端口信息(即出端口信息)。 [0035] Since in the present embodiment, the ARP does not store port information corresponding to the next hop MAC address of the network device and three switches are connected, thus obtaining the three switches in the query to the next hop ARP table MAC after the address, according to a further query Layer MAC address acquired next-hop forwarding table for the port information corresponding to the next hop MAC address (i.e., the port information).

[0036] 其中,在三层交换机上还存储有二层转发表,该二层转发表中存储有三层交换机的端口信息以及各物理端口所连接的网络设备的MAC地址,以供三层交换机进行二层转发。 [0036] wherein three switches are also stored on a layer 2 forwarding, layer 2 forwarding the MAC address stored in the port information and the three switches each physical port of the network device connected to the switch for Layer Frame forwarding. 具体的,三层交换机以获取的下一跳MAC地址作为输入查询二层转发表,并获取二层转发表中与该下一跳MAC地址相同的MAC地址对应的端口信息。 Specifically the next hop MAC address, three switches for the layer 2 forwarding a query as input, and obtains the port information corresponding to layer 2 forwarding in the same MAC address MAC address of the next hop.

[0037] 步骤14、将报文从所述出端口信息对应的出端口转发出去。 [0037] Step 14, the packet is forwarded from the port information corresponding to the egress port out.

[0038] 在获取下一跳MAC地址对应的出端口后,三层交换机将报文从该出端口转发出去,即转发给下一跳MAC地址对应的网络设备。 [0038] In obtaining the next hop MAC address corresponding to a rear port, three switches packets from the forwarding of the port for the next hop that is forwarded to the MAC address of the corresponding network device.

[0039] 本实施例的报文转发方法,三层交换机首先根据报文的目的IP地址查找三层路由表,获取下一跳标识信息,然后根据下一跳标识信息查询ARP表获取下一跳MAC地址,再根据获取的下一跳MAC地址查找二层转发表,获取出端口,通过出端口将报文转发出去,使得ARP表可以仅包括下一跳标识信息和对应的MAC地址,而不再包括与MAC地址对应的端口信息,因此,在发生VLAN内端口切换时,不需要进行ARP学习,可以利用二层转发表的学习来实现MAC地址与端口信息对应关系的更新,解决了在发生VLAN内端口切换时因产生大量ARP Miss报文和ARP请求报文而导致三层交换机瞬间很忙和流量中断的问题,提高了报文的转发效率。 [0039] The packet forwarding method according to the present embodiment, three switches three first lookup table according to the destination IP routing address of the packet, acquires the next hop identification information, and acquires the next hop ARP table according to the identification information of the next hop query MAC address, and then find the next hop MAC address obtained in accordance with Layer 2 forwarding table, obtain the port, the port forwards the packet through the so ARP table may include only the identification information corresponding to the next hop MAC address, and not further comprising port information corresponding to the MAC address, therefore, when the VLAN port switching occurs, no ARP learning, Layer 2 forwarding table may be utilized to implement learning the MAC address and port information updated correspondence relationship, solves the occurrence port due to a large amount of ARP Miss packets and ARP request to a busy and cause problems instantaneous flow interruption when switching three switches within the VLAN, improve the efficiency of packet forwarding.

[0040] 基于上述实施例,在VLAN支持端口备份的情况下,主端口与备份端口发生切换,说明与主端口连接的网络设备,重新通过另一个物理端口(备份端口)与三层交换机连接,说明三层交换机与该网络设备之间的出端口发生了切换。 [0040] Based on the above embodiments, in the case where the backup VLAN support port, the main port and the backup port switching occurs, indicates that the network device is connected to the main port, is connected to three switches again through another physical port (port backup), DESCRIPTION ports between the three switches and the network switching device occurs. 其中,由于切换前后的出端口属于同一VLAN,因此,VLANIF标识与MAC地址的对应关系并未发生变化;又因为本实施例的ARP表中仅包括VLANIF标识、下一跳IP地址和下一跳MAC地址的对应关系,而不包括端口信息,因此,当出端口发生切换时,ARP表中的信息不会发生变化,不需要触发ARP学习,也就不会产生大量ARP Miss消息和大量ARP请求报文,减轻了端口切换时三层交换机的负担,同时由于不进行ARP学习也就不会产生由于ARP学习造成的流量中断,提高了转发报文的效率和质量。 However, since the switch ports belong to the same before and after the VLAN, thus the corresponding relationship VLANIF identifier and the MAC address has not changed; and because the ARP table of the present embodiment includes only VLANIF identification, next hop IP address and the next hop mapping between the MAC address and does not include port information, and therefore, when the switching occurs out of the port, the information in the ARP table does not change, no trigger ARP learning, will not produce a large amount and a large number of ARP Miss ARP request message packets, reducing the burden of three switches port switch, and because no ARP learning will not generate traffic due to the disruption caused by ARP learning, improve the packet forwarding efficiency and quality.

[0041] 进一步,对三层交换机而言,在接收到报文时,三层交换机会通过获取接收报文时所使用的物理端口和解析接收到的报文以获取其中的源MAC地址,来建立物理端口与物理端口所连接的网络设备的MAC地址的对应关系,以形成二层转发表。 [0041] Further, for three switches, upon receiving the message, to obtain the three switches will be the source MAC address which packets by acquiring and parsing the received physical port to receive messages used to establishing correspondence between the MAC address and physical port of the network device of the physical port connected to form a layer 2 forwarding. 另外,三层交换机也会根据其各物理端口的实际使用情况对二层转发表进行动态更新,其更新过程与上述形成二层转发表的过程相同。 Moreover, three switches will also layer 2 forwarding based on actual usage of their respective physical ports is dynamically updated, the update process is the same as the above-described process of forming layer 2 forwarding. 因此,当发生VLAN内的端口切换时,三层交换机会根据接收到的报文学习到物理端口发生了切换,并根据切换后的物理端口更新二层转发表,即将原出端口对应的MAC地址对应的端口信息更新为切换后的出端口;在更新后的二层转发表中将会存储切换后的出端口的信息与原出端口对应的MAC地址的对应关系。 Accordingly, when a port in the VLAN switching occurs, you will learn the three switches according to the received packet to the physical port switching occurs, and forwarding table update Layer The physical port after the switching, i.e. the original corresponding MAC address updating port information corresponding to the port after the handover; and forwarding the MAC address correspondence information of the primary egress port corresponding to the port after the handover will be stored in the update Layer. 由于三层交换机上的二层转发表通常由专门的硬件模块进行维护,因此,其更新速度相对比较快。 Because Layer 2 forwarding three switches usually performed by specialized hardware module maintains, therefore, that update speed is relatively fast.

[0042] 基于上述,在端口发生切换的情况下,当三层交换机根据查询ARP表获取的MAC地址,去查询二层转发表以进行二层转发时,可以获取正确的出端口,即可以获取到切换后的出端口,从而保证报文通过正确的出端口转发,即可以保证报文被成功转发。 [0042] In the above, in the case where the handover occurred on the port, when the MAC address acquired three switches according to the ARP query, the query to the layer 2 forwarding at Layer 2 forwarding based, can obtain the correct output port can be acquired after the switching to the outgoing port, thus ensuring a correct packet forwarding port, which can ensure that packets are forwarded through successfully.

[0043] 在上述各实施例中,在根据下一跳标识信息查询ARP表,获取下一跳标识信息对应的下一跳MAC地址之前还包括:根据接收到的ARP响应报文,生成ARP表的过程。 [0043] In the above embodiments, the query before the next hop ARP table according to the identification information, acquires the next hop MAC address of the next hop corresponding to the identification information further comprises: a response packet based on the received ARP, generates an ARP the process of. 具体的,三层交换机在接收到第一个报文时,根据第一个报文的目的IP地址生成ARP请求报文,并根据报文携带的VLAN值在相应VLANIF下的所有物理端口上广播该ARP请求报文;网络中与三层交换机连接的属于同一VLAN的其他网络设备接收到ARP请求报文后,判断本身的IP地址是否与ARP请求报文中请求MAC地址用的IP地址相同;如果不相同,则不做响应;如果相同,则向三层交换机发送ARP响应报文,该ARP响应报文中携带有该网络设备的IP地址和MAC地址。 Specifically, three switches upon receiving the first message, the destination IP address of the ARP generating a first request message packet, and in accordance with the broadcast packet carries a VLAN value of all the physical ports in the respective VLANIF the ARP request packet; other network devices in the network belonging to the same VLAN connected to the three switches receiving an ARP request packet, IP address, determines whether its own packet requesting the same MAC address and the IP address of the ARP request; If not, then no response; if the same, then the three switches to send an ARP response packet, the ARP response packet carries an IP address of the network device and a MAC address. 三层交换机接收到ARP响应报文后,将接收ARP响应报文的路由出接口的信息(即VLANIF对应的VLAN值和VLANIF类型等)以及ARP响应报文中网络设备的IP地址和MAC地址进行存储以形成ARP表。 After three switches receives the ARP response packet, the received ARP response packet to the routing information (i.e., a value corresponding VLAN VLANIF VLANIF type and the like) interface and the IP address in the ARP response packet network and the MAC address ARP table stored in form. 其中,路由出接口的信息和网络设备的IP地址作为下一跳标识信息,而网络设备的MAC地址作为下一跳MAC地址。 Wherein the routing information of the IP address and the network interface device identification information as the next hop, and the MAC address of the network device as the next hop MAC address.

[0044] 由上述分析可见,在本实施例中,三层交换机在ARP学习过程中,仅将出端口的信息学习到VLANIF层面,而不是学习到具体的物理端口,实现了ARP表与物理端口的分离,使得在发生VLAN内端口切换时不需要进行ARP学习,而通过查询ARP获取下一跳MAC地址,然后根据获取的下一跳MAC地址查找二层转发表找到出端口,完成报文的转发。 [0044] As seen from the above analysis, in the present embodiment, three switches in the ARP learning process, only the information learned VLANIF port level, rather than learning to specific physical ports for the physical port the ARP separation so that no ARP learning occurs when switching over VLAN port, and get the next hop MAC address by querying the ARP, and then look for Layer 2 forwarding table to find a port based on the MAC address of the next hop to obtain complete message forwarding.

[0045] 本实施例的报文转发方法,首先查找三层路由表获取下一跳标识信息,在根据下一跳标识信息查询ARP表获取下一跳MAC地址,然后根据下一跳MAC地址查找二层转发表,使报文由三层转发模块转发到二层转发模块,进而由二层转发模块根据获取的出端口将报文转发出去,将三层转发和二层转发相结合,在成功转发报文的同时,使得ARP表与物理端口信息相分离,在发生VLAN内端口切换时不需要进行ARP学习,解决了现有技术中因发生VLAN内端口切换产生大量ARP Miss消息以及大量ARP请求报文导致的三层交换机瞬间很忙和流量中断的问题,提高了报文转发的成功率。 [0045] The packet forwarding method according to the present embodiment, three first looks for the next hop routing table for the identification information, acquires the next hop MAC address in accordance with the identification information of the next hop ARP table query, and then find the next hop MAC address in accordance with Layer 2 forwarding table, the packet is forwarded by the three modules forwarded to the second floor forwarding module, and then forwarded by the acquisition of a two-story module according to port forward the message, the forwarding and Layer 3 forwarding combined success Meanwhile packet forwarding, so that the ARP and physical port information phase separation, no ARP learning port in the VLAN switching occurs, solves the prior art due to the occurrence of a large amount of the VLAN switch ports ARP Miss ARP request message and a number of problems caused instant messages and busy traffic interruption of three switches, improve the success rate packet forwarding.

[0046] 图2为本发明一实施例提供的报文转发装置的结构示意图。 [0046] FIG. 2 provides a schematic structural diagram of the packet forwarding device according to an embodiment of the present invention. 如图2所示,本实施例的装置包括:第一获取模块21、第二获取模块22、第三获取模块23和转发模块24。 Apparatus, the present embodiment 2 comprises: a first acquisition module 21, a second acquisition module 22, a third acquisition module 23 and a forwarding module 24.

[0047] 其中,第一获取模块21,用于根据接收到的报文的目的IP地址查询三层路由表,获取下一跳标识信息;本实施例的三层路由表中存储有目的IP地址和与目的IP地址对应的下一跳标识信息;下一跳标识信息是指与目的IP地址对应的路由出接口的信息和该路由出接口的下一跳IP地址,路由出接口的信息包括出接口类型和出接口索引。 [0047] wherein the first obtaining module 21, configured to query three routing table according to the received destination IP address of the packet, acquires identification information of the next hop; IP routing table stored in the present embodiment has a destination IP address and the identification information of the next hop corresponding to the destination IP address; refers to identification information of the next hop and the destination IP address corresponding to the routing information and the routing of the interface to the next hop IP address of the interface, the routing information comprising an interface interface type and the interface index. 第二获取模块22,与第一获取模块21连接,用于根据第一获取模块21获取的下一跳标识信息查询ARP表,获取与下一跳标识信息对应的下一跳MAC地址;本实施例的ARP表由下一跳标识信息和下一跳标识信息对应的下一跳MAC地址组成。 The second acquisition module 22, connected to the first obtaining module 21, configured to query the ARP table 21 according to the first acquiring module acquires the identification information of the next hop, the next hop MAC address acquired next-hop corresponding to the identification information; the present embodiment Example ARP table by the next-hop MAC address of the next hop information and identification information corresponding to the next hop identified composition. 第三获取模块23,与第二获取模块22连接,用于根据第二获取模块22获取的下一跳MAC地址查询二层转发表,获取下一跳MAC地址对应的出端口信息。 The third acquisition module 23, and a second acquisition module 22 is connected, according to a layer 2 forwarding the query for the next hop MAC address acquired by the second acquiring module 22 acquires a MAC address corresponding to the next hop information of the port. 转发模块24,与第三获取模块23连接,用于将报文从第三获取模块23获取的出端口信息所对应的出端口转发出去。 Forwarding module 24, and a third acquisition module 23 is connected, for the acquired packet from the third port information obtaining module 23 forwards a corresponding port out.

[0048] 本实施例报文转发装置的上述功能模块可用于执行上述实施例提供的报文转发方法的流程,其工作原理不再赘述,详见方法实施例的描述。 [0048] Scheme message forwarding method embodiment of the functional module packet forwarding device may be provided for performing the above-described embodiments of the present embodiment, its operation principle will not be repeated, the description in the method embodiment.

[0049] 本实施例的报文转发装置,通过第一获取模块查询三层路由表获取下一跳标识信息,通过第二获取模块查询ARP表获取下一跳MAC地址,再通过第三获取模块查询二层转发表获取出端口,由转发模块将报文从出端口转发出去,使得ARP表可以仅包括下一跳标识信息和对应的MAC地址,而不再包括与MAC地址对应的端口信息,因此,在发生VLAN内端口切换时,通过本实施例的报文转发装置转发报文时,不需要进行ARP学习,可以利用二层转发表的学习来实现MAC地址与端口信息对应关系的更新,解决了在发生VLAN内端口切换时因产生大量ARP Miss报文和ARP请求报文而导致三层交换机瞬间很忙和流量中断的问题,提高了报文的转发效率。 [0049] Example embodiment of the present packet forwarding device, acquires identification information of the next hop through the first three-obtaining module queries the routing table, the next hop MAC address acquired by the second acquiring module queries the ARP, then the third acquisition module obtaining Layer 2 forwarding table queries egress port, the forwarding module forwards the packet from the port so that only the ARP table may include identification information corresponding to the next hop MAC address, rather than including port information corresponding to the MAC address, Accordingly, when a port in the VLAN switching occurs, the packet forwarding of the present embodiment when device forwarding packets without ARP learning, Layer 2 forwarding table may be utilized to implement learning the MAC address and port information corresponding to the updated relationship, to solve the problem when switching occurs within a VLAN port due to a large amount of ARP Miss packets and ARP request to a busy and lead to momentary interruption of three switches traffic, improve the efficiency of packet forwarding. [0050] 图3为本发明又一实施例提供的报文转发装置的结构示意图。 [0050] Fig 3 a schematic structure of still another embodiment of the packet forwarding apparatus provided in an embodiment of the present invention. 本实施例基于图2所示的实施例实现,如图3所示,本实施例的装置还包括:生成模块31。 The present embodiment is based on the embodiment shown in FIG. 2 implementation shown in Figure 3, the apparatus of this embodiment further comprises: a generating module 31.

[0051] 生成模块31,用于在第二获取模块22查询ARP表之前根据接收到的ARP响应报文,生成ARP表。 [0051] The generating module 31, in response to the received packet according to the second ARP before obtaining module queries the ARP table 22, generates an ARP table. 具体的,报文转发装置会根据接收到的第一个报文生成ARP请求报文,并向该报文所在的VLAN下的所有物理端口广播生成的ARP请求报文;收到ARP请求报文的网络设备根据判断ARP请求报文中请求MAC地址的IP地址与本身的IP地址是否相同,判断结果为相同的网络设备生成包括其IP地址和MAC地址的ARP响应报文并发送给报文转发装置,具体是发送给报文转发装置中的生成模块31。 Specifically, the packet forwarding device will received the ARP request packet to a packet generated based on the first, and requests all the physical ports generated broadcast ARP packet in VLAN packets located; receiving the ARP request packet Analyzing apparatus according to the network the ARP request packet requesting an IP address of the MAC address and the IP address itself is the same, the same determination result is generated that includes the network device which ARP IP address and MAC address of the response packet and sends the packet forwarding It means, in particular to a packet forwarding device generation module 31. 该生成模块31根据接收ARP响应报文的路由接口的信息(例如:如果路由出接口为VLANIF,则路由出接口信息主要是指VALNIF对应的VLAN值(即VLANIF标识)和VLANIF类型等)以及网络设备的IP地址和MAC地址进行存储,形成ARP表。 The generation module 31 based on information routing interface packets received ARP response (eg: if the outgoing interface VLANIF, the routing outbound interface information mainly refers VALNIF corresponding VLAN value (i.e. VLANIF identification) and VLANIF type, etc.) and network IP address and MAC address of the device is stored, is formed ARP table.

[0052] 进一步,本实施例的报文转发装置还包括:更新模块32。 [0052] Further, the packet forwarding device of the present embodiment further comprises: an updating module 32. 该更新模块32,用于在出端口发生切换时,更新二层转发表中下一跳MAC地址对应的端口信息为切换后的出端口。 The updating module 32, configured to, when a port switching occurs, updating layer 2 forwarding port information corresponding to the next hop MAC address of an egress port after the handover. 具体的,更新模块32可以在接收到报文时,通过获取接收报文所使用的物理端口以及解析接收到的报文中的源MAC地址,来获取物理端口与物理端口所连接的网络设备的MAC地址的对应关系,根据获取的对应关系生成或更新二层转发表。 Specifically, the update module 32 may upon receiving the message, by obtaining physical port receives packets used and parses the received packet source MAC address, to obtain the network device physical port and a physical port connected mapping between the MAC address, according to the obtained relationship between the production or updating layer 2 forwarding. 如果获取的MAC地址对应的物理端口与二层转发表中已存储的不同,则将二层转发表中该MAC地址对应的端口信息改为新获取的物理端口的信息。 If the acquired various physical port corresponding to the MAC address forwarding table Layer and stored, then the port information layer 2 forwarding table corresponding to the MAC address of the physical port information newly acquired.

[0053] 其中,对于接收到的报文而言,本实施例的报文转发装置可能是其最后一跳,也可能不是其最后一跳。 [0053] wherein, for the purposes of the received packet, the packet forwarding device of the present embodiment may be the last hop, which may not be the last-hop. 如果本实施例的报文转发装置为报文的最后一跳,则第一获取模块21获取的下一跳标识信息中将不包括下一跳IP地址,而仅包括路由出接口信息(主要是指路由出接口标识,例如VLANIF标识);如果本实施例的报文转发装置不是报文的最后一跳,则第一获取模块21获取的下一跳标识信息同时包括路由出接口信息(主要是指路由出接口标识)和下一跳IP地址。 If the packet forwarding device of the present embodiment, the last-hop packet, the next hop in the first acquiring module 21 acquires the identification information does not include the next hop IP address, and only the information including the outgoing interface (mainly the outgoing interface identification means, e.g. VLANIF identification); If the packet according to the present embodiment means not the last hop forwarding packets, acquires the next hop of the first identification information acquisition module 21 includes both the outgoing interface information (mainly It refers to the outgoing interface identification) and a next hop IP address.

[0054] 基于上述,本实施例提供一种第二获取模块22的实现结构。 [0054] Based on the above provided, a second embodiment of the present embodiment acquiring module 22 implementation structure. 第二获取模块22包括:第一获取单元221和第二获取单元222。 The second acquisition module 22 comprises: a first acquiring unit 221 and the second acquisition unit 222. 以路由出接口为VLANIF为例,则第二获取模块22的工作原理为:当第一获取模块21获取的下一跳标识信息包括VLANIF标识和下一跳IP地址时,由第一获取单元221以VLANIF标识和下一跳IP地址为输入参数,查询ARP表,获取下一跳MAC地址;当第一获取模块21获取的下一跳标识信息不包括下一跳IP地址时,由第二获取单元222以VLANIF标识和报文中的目的IP地址为输入参数,查询ARP表,获取下一跳MAC地址。 In an example, VLANIF the route, then the second acquisition module 22 works as follows: when the first identification information acquired next hop acquisition module 21 comprises VLANIF identifier and next hop IP address, by the first acquisition unit 221 VLANIF and to identify next hop IP address as input parameter, the ARP query, acquires the next hop MAC address; next hop when a first acquiring module 21 acquires the identification information does not include the next hop IP address acquired by the second VLANIF unit 222 to identify the destination IP address of the packet and the input parameters, the ARP query, acquires the next hop MAC address.

[0055] 本实施例报文转发装置的上述各功能模块或单元可用于执行上述实施例提供的报文转发方法中的相应流程,其工作原理不再赘述。 [0055] The present embodiment each of the packet forwarding device functional modules or units may be used to execute a corresponding process message forwarding method to the above embodiment in which the principle omitted.

[0056] 本实施例的报文转发装置可以是三层交换机等具有报文转发功能的网络设备。 Packet forwarding means [0056] embodiment of the present embodiment may be three switches and other network equipment having the function of forwarding packets. 本实施例报文转发装置中的第一获取模块21、第二获取模块22以及生成模块31主要基于三层路由表进行处理,可将其划分为三层的功能模块;而第三获取模块23、转发模块24以及更新模块32主要基于二层转发表进行处理,可将其划分为二层的功能模块。 Example embodiment of the present packet transfer apparatus 21 in a first acquisition module, a second acquisition module 22 and the generation module 31 performs processing based on three main routing table, which can be divided into three functional blocks; third acquisition module 23 forwarding module 24 and the update module 32 is mainly based on a layer 2 forwarding processes, it can be divided into two layers of functional blocks.

[0057] 综上所述,本实施例的报文转发装置通过上述功能模块或单元,首先查找三层路由表获取下一跳标识信息,在根据下一跳标识信息查询ARP表获取下一跳MAC地址,然后根据下一跳MAC地址查找二层转发表,使报文由三层功能模块转发到二层功能模块,进而由二层功能模块根据获取的出端口将报文转发出去,将三层转发和二层转发相结合,在成功转发报文的同时,使得ARP表与物理端口信息相分离,在发生VLAN内端口切换时不需要进行ARP学习,解决了现有技术中因发生VLAN内端口切换产生大量ARP Miss消息以及大量ARP请求报文导致的三层交换机瞬间很忙和流量中断的问题,提高了报文转发的成功率。 Packet [0057] As described above, the present embodiment is forwarded by the functional unit modules or units, the first lookup table for the three-hop routing identification information, the identification information acquiring a next hop according to the next hop ARP table query MAC address, and then look for Layer 2 forwarding table according to the next hop MAC address, the packet forwarding composed of three functional modules function modules to the second floor, and then by a two-story function module according to the acquired port forwarding packets out, tris and forwarding forwarding layer layer combination, while successfully forward packets, so that the ARP table with the physical port information phase separation, no ARP learning VLAN ports when the handover occurs, solves the prior art due to the occurrence VLAN port switching produce large amounts of ARP Miss messages and issue a large number of ARP request packets caused by momentary busy and three switches traffic disruption, improve the success rate packet forwarding.

[0058] 本发明一实施例提供一种网络设备,该网络设备包括报文转发装置。 [0058] one embodiment of the present invention provides a network device, the network device comprises a packet forwarding device. 其中,报文转发装置的工作流程可参见图1所示实施例的描述,而其结构可参见图2和图3所示实施例的描述,在此不再赘述。 Wherein, packet forwarding apparatus workflow, see the description of the embodiment shown in FIG. 1, and its structure Referring to Figures 2 and 3 shown in the embodiment described, it is not repeated herein.

[0059] 本实施例的网络设备可以是三层交换机等,可以采用上述方法实施例提供的报文转发方法的流程来转发报文,解决了现有技术中因发生VLAN内端口切换产生大量ARPMiss消息以及大量ARP请求报文导致的三层交换机瞬间很忙和流量中断的问题,提高了报文转发的成功率。 [0059] Network device according to the present embodiment may be three switches and the like, can process the packet forwarding method according to an embodiment of the above method to forward packets to solve the prior art due to the occurrence of the VLAN switch ports large amount ARPMiss ARP request messages and a large number of problems caused instant messages and busy traffic interruption of three switches, improve the success rate packet forwarding.

[0060] 本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:R0M、RAM、磁碟或者光盘等各种可以存储程序代码的介质。 [0060] Those of ordinary skill in the art can be appreciated: realize all or part of the steps of the method described above may be implemented by a program instructing relevant hardware to complete, the program may be stored in a computer readable storage medium, the program execution when, comprising the step of performing the above-described embodiment of the method; and the storage medium comprising: a variety of medium may store program codes R0M, RAM, magnetic disk, or optical disk.

[0061] 最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。 [0061] Finally, it should be noted that: the above embodiments are intended to illustrate the present invention, rather than limiting;. Although the present invention has been described in detail embodiments, those of ordinary skill in the art should be understood: may still be made to the technical solutions described in each embodiment of the modified or part of the technical features equivalents; as such modifications or replacements do not cause the essence of corresponding technical solutions to depart from the technical solutions of the embodiments of the present invention and scope.

Claims (7)

1.一种报文转发方法,其特征在于,包括: 根据接收到报文的目的网际协议IP地址查询三层路由表,获取下一跳标识信息; 根据所述下一跳标识信息查询地址解析协议ARP表,获取与所述下一跳标识信息对应的下一跳媒体访问控制MAC地址,所述ARP表由所述下一跳标识信息和所述下一跳标识信息对应的下一跳MAC地址组成;其中,所述根据所述下一跳标识信息查询ARP表,获取与所述下一跳标识信息对应的下一跳MAC地址包括:当所述下一跳标识信息包括路由出接口标识和下一跳IP地址时,根据所述路由出接口标识和所述下一跳IP地址查询所述ARP表,获取所述下一跳MAC地址;当所述下一跳标识信息不包括所述下一跳IP地址时,根据所述路由出接口标识和所述目的IP地址查询所述ARP表,获取所述下一跳MAC地址; 根据所述下一跳MAC地址查询二层转发表,获取所述下一跳MAC A packet forwarding method, comprising: IP address query routing table according to the received Layer destination Internet protocol packets, acquires identification information of the next hop; parsing the identification information according to the next-hop address query protocol ARP table, acquires the identification information corresponding to the next hop next hop media access control MAC address, next hop by said identification information and said identification information corresponding to the next hop ARP table of the hop MAC address components; wherein the query to the next hop ARP table according to the identification information, acquires the next hop MAC address identification information corresponding to the next hop comprises: when the next-hop routing information comprises an identification interface identifier and a next hop IP address, according to the route identifier and an interface to the next hop IP address queries the ARP table, the next hop MAC address acquired; next hop if the identification information does not include the when the next hop IP address, the outbound interface according to the route identifier and the destination IP address query the ARP table, the next hop MAC address acquired; according to the next hop MAC address forwarding table Layer query, acquires the next hop MAC 地址对应的出端口信息; 将所述报文从所述出端口信息对应的出端口转发出去。 Address corresponding to the port information; the packet from the egress port forwarding information corresponding to the out port.
2.根据权利要求1所述的报文转发方法,其特征在于,在根据所述下一跳标识信息查询ARP表,获取与所述下一跳标识信息对应的下一跳MAC地址之前包括: 根据接收到的ARP响应报文,生成所述ARP表。 The packet forwarding method according to claim 1, wherein, in the identification information of the next hop ARP table query, before obtaining the next hop MAC address information corresponding to the next hop identifier comprises: the response to the received ARP packet, generating said ARP table.
3.根据权利要求1或2所述的报文转发方法,其特征在于,还包括: 当所述出端口发生切换时,更新所述二层转发表中所述下一跳MAC地址对应的端口信息为切换后的出端口信息。 The packet forwarding method of claim 1 or claim 2, characterized in that, further comprising: said outlet port when the switching occurs, the update of the port corresponding to the next hop MAC address forwarding table Layer output port information after the handover.
4.一种报文转发装置,其特征在于,包括: 第一获取模块,用于根据接收到报文的目的网际协议IP地址查询三层路由表,获取下一跳标识信息; 第二获取模块,用于根据所述下一跳标识信息查询地址解析协议ARP表,获取与所述下一跳标识信息对应的下一跳媒体访问控制MAC地址,所述ARP表由所述下一跳标识信息和所述下一跳标识信息对应的下一跳MAC地址组成;其中,所述第二获取模块包括:第一获取单元,用于在所述下一跳标识信息包括路由出接口标识和下一跳IP地址时,根据所述路由出接口标识和所述下一跳IP地址,查询所述ARP表,获取所述下一跳MAC地址;第二获取单元,用于在所述下一跳标识信息不包括所述下一跳IP地址时,根据所述路由出接口标识和所述目的IP地址查询所述ARP表,获取所述下一跳MAC地址; 第三获取模块,用于根据所述下一跳MAC地 A packet forwarding device, comprising: a first acquisition module, a query for the IP address to IP routing table according to the received destination Internet protocol packets, acquires the next hop identifier information; and a second acquiring module , according to the identification information of the next hop ARP table ARP query, acquires the identification information corresponding to the next hop next hop media access control MAC address, the ARP table identification information by the next-hop and the next-hop MAC address of the next hop corresponding to the identification information of the composition; wherein the second acquiring module comprises: a first obtaining unit, for the next hop routing information comprises an identification interface identification and the next when the IP address hopping, according to the route identifier and the interface to the next hop IP address, the ARP query table, the next hop MAC address acquired; second acquisition unit, for identifying the next hop information does not include the next hop IP address, the outbound interface according to the route identifier and the destination IP address query the ARP table, the next hop MAC address acquired; a third acquiring module, according to the the next hop MAC 查询二层转发表,获取所述下一跳MAC地址对应的出端口信息; 转发模块,用于将所述报文从所述出端口信息对应的出端口转发出去。 Layer 2 forwarding table queries to obtain the next-hop MAC address corresponding to the port information; forwarding module, for the packet from the egress port forwarding information corresponding to the out port.
5.根据权利要求4所述的报文转发装置,其特征在于,还包括: 生成模块,用于根据接收到的ARP响应报文,生成所述ARP表。 5. A packet according to claim 4, transfer apparatus, characterized by further comprising: a generating module, responsive to the received packet in accordance with ARP, generating the ARP table.
6.根据权利要求4或5所述的报文转发装置,其特征在于,还包括: 更新模块,用于在所述出端口发生切换时,更新所述二层转发表中所述下一跳MAC地址对应的端口信息为切换后的出端口信息。 The packets 4 or claim 5 transfer apparatus, characterized by further comprising: an updating module, configured to output ports of said switch occurs, the layer 2 update the next-hop forwarding table port information corresponding to the MAC address of the port information after the handover.
7.—种网络设备,其特征在于,包括权利要求4-6任一项所述的报文转发装置。 7.- species network device, wherein the message comprises one of claims 4-6 forwarding apparatus.
CN 201180000590 2011-05-05 2011-05-05 Message forwarding method, equipment and network device CN102217253B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/073689 WO2011120459A2 (en) 2011-05-05 2011-05-05 Message forwarding method, equipment and network device

Publications (2)

Publication Number Publication Date
CN102217253A CN102217253A (en) 2011-10-12
CN102217253B true CN102217253B (en) 2013-10-09

Family

ID=44712671

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201180000590 CN102217253B (en) 2011-05-05 2011-05-05 Message forwarding method, equipment and network device

Country Status (2)

Country Link
CN (1) CN102217253B (en)
WO (1) WO2011120459A2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10027623B2 (en) 2013-04-02 2018-07-17 Hewlett Packard Enterprise Development Lp Internet protocol address resolution

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139071B (en) 2011-11-29 2016-07-13 华为技术有限公司 Message forwarding method, apparatus and system for
WO2014056178A1 (en) * 2012-10-12 2014-04-17 华为技术有限公司 Memory system, memory module, memory module access method and computer system
CN103795635B (en) * 2012-11-01 2017-04-12 华为技术有限公司 Packet broadcast control processing method, apparatus and system
CN102938794B (en) * 2012-11-14 2016-01-13 华为技术有限公司 Arp ARP message forwarding method, the controller and switch
CN103929357A (en) * 2013-01-11 2014-07-16 浙江大华技术股份有限公司 Data transmission method and network equipment
WO2015079284A1 (en) * 2013-11-26 2015-06-04 Pismo Labs Technology Ltd. Methods and systems for processing internet protocol packets
CN104717138A (en) * 2013-12-11 2015-06-17 中兴通讯股份有限公司 Method of realizing message forwarding and switch
CN105812263B (en) * 2016-03-10 2019-03-29 盛科网络(苏州)有限公司 A method of realizing that routing ARP information is separated with editor's information in asic chip
CN105939274A (en) * 2016-05-17 2016-09-14 杭州迪普科技有限公司 Message forwarding method and apparatus
CN106209642A (en) * 2016-06-30 2016-12-07 杭州迪普科技有限公司 Method and device for forwarding IP message
CN108600106A (en) * 2018-04-28 2018-09-28 北京邮电大学 Low-delay data exchange device and method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040162781A1 (en) * 2003-02-14 2004-08-19 Kennsco, Inc. Monitoring and alert systems and methods
CN101127681B (en) * 2007-09-05 2011-01-19 杭州华三通信技术有限公司 Method and device for binding server MAC address with uplink port
CN101257447A (en) * 2008-03-14 2008-09-03 华为技术有限公司 Method, system and routing apparatus of load sharing
CN101771732B (en) * 2010-01-06 2014-08-27 福建星网锐捷网络有限公司 Message processing method, device and network equipment
CN101815107B (en) * 2010-05-13 2013-10-09 华为技术有限公司 Method, system and equipment for managing address in Ethernet ring

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10027623B2 (en) 2013-04-02 2018-07-17 Hewlett Packard Enterprise Development Lp Internet protocol address resolution

Also Published As

Publication number Publication date
WO2011120459A3 (en) 2012-03-22
CN102217253A (en) 2011-10-12
WO2011120459A2 (en) 2011-10-06

Similar Documents

Publication Publication Date Title
US8259720B2 (en) Triple-tier anycast addressing
CN102594689B (en) Distributed network control method and device
US20070127502A1 (en) Method of multi-port virtual local area network (vlan) supported by multi-protocol label switch (mpls)_
CN101459618B (en) Data packet forwarding method and device for virtual machine network
CN101047583B (en) It supports virtual local area network service passive optical network system and corresponding method
CN104412551B (en) Packet forwarding is mobile virtual machine optimization
CN102148749B (en) Method and device for extending switch port
US8155131B2 (en) Method, system and router for communication between IP devices
CN102859973B (en) Method, apparatus and system for address resolution
JP5974092B2 (en) Packet Broadcast mechanism in the divided architecture network
WO2011144495A1 (en) Methods and apparatus for use in an openflow network
JP2014511089A (en) Mapping of private and public addresses
CN104246701B (en) Source routing based on different systems and methods InfiniBand routing traffic between subnets
JP5992602B2 (en) System and method for using the label distribution protocol (LDP) in the IPv6 network
CN101764709B (en) Based on the physical network topology discovery and network management server of snmp
CN105453523A (en) Handling of virtual machine mobility in large data center
CN101945034B (en) Data switching system and method based on locator identify separation protocol (LISP)
CN102143068B (en) Method, device and system for learning MAC (Media Access Control) address
CN103748835B (en) Dynamically updating a label switched path
WO2012071906A1 (en) Method and apparatus for realizing multicasting flow load sharing based on equal-cost multi-path route
CN101521631B (en) Treatment method, equipment and system for VPLS network messages
CN101834831A (en) Method, device and system for realizing redundant backup of network address translation (NAT) equipment
CN101014014A (en) Routing aggregation method, packet transmitting method and border router of autonomous system
CN101022413B (en) Load equalizing method and route server
Scott et al. Addressing the Scalability of Ethernet with MOOSE

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C14 Granted