WO2017219868A1 - Arp entry processing method and apparatus - Google Patents

Arp entry processing method and apparatus Download PDF

Info

Publication number
WO2017219868A1
WO2017219868A1 PCT/CN2017/087584 CN2017087584W WO2017219868A1 WO 2017219868 A1 WO2017219868 A1 WO 2017219868A1 CN 2017087584 W CN2017087584 W CN 2017087584W WO 2017219868 A1 WO2017219868 A1 WO 2017219868A1
Authority
WO
WIPO (PCT)
Prior art keywords
arp entry
arp
mac address
designated
exit
Prior art date
Application number
PCT/CN2017/087584
Other languages
French (fr)
Chinese (zh)
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 中兴通讯股份有限公司
Publication of WO2017219868A1 publication Critical patent/WO2017219868A1/en

Links

Images

Classifications

    • 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/253Routing or path finding in a switch fabric using establishment or release of connections between ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming

Definitions

  • Embodiments of the present invention relate to, but are not limited to, the field of communications, and in particular, to a method and an apparatus for processing an Address Resolution Protocol (ARP) entry.
  • ARP Address Resolution Protocol
  • the ARP entry is forwarded by using the host route in the device, and the ARP exit information is determined by the MAC (Media Access Control) address.
  • the ARP entry needs to be re-triggered by the ARP request.
  • the ARP entry will be updated according to the status of the ARP response packet, and the host route will be true. Updated, or was actually deleted.
  • the update of the ARP entry may be lagging. Even if the Layer 3 traffic continues to pass through, the worst case is that there is no data flow.
  • the central processing unit CPU
  • CPU central processing unit
  • the central processing unit is sent to trigger the sending of the ARP request message, so the ARP entry exists, and the MAC address entry does not exist, and the Layer 3 traffic continues to the port pointed to by the original MAC address.
  • the error condition of the forwarding this condition will continue until the ARP entry ages before it can be terminated. In other words, this abnormal traffic will be determined by the aging time of the ARP entry.
  • the MAC address is aging.
  • the new MAC address is learned, the ARP entry is updated, the device's new host routing entry is delivered, and the original host routing entry is modified to be the new MAC address exit.
  • ARP keepalive timer expires and is deleted. Except for ARP entries, host routes are deleted and abnormal forwarding traffic stops.
  • the ARP when the MAC address is aged, the ARP must wait until the keep-alive mechanism finds a new valid MAC entry, or it has to wait until the ARP entry is deleted by the aging time, and the abnormal traffic forwarded through the ARP entry will be Change or termination.
  • the method used is mostly to set the aging time of the ARP entry to be slightly larger than the aging time of the MAC address. This mechanism is used to minimize the transit time of abnormal traffic, but it cannot solve the abnormality fundamentally. Traffic problem.
  • the embodiment of the present invention provides a method and a device for processing an ARP entry, so as to solve at least the problem that the ARP must wait for the MAC address to be re-learned or ARP aging to process the traffic forwarding when the MAC address is aged.
  • a method for processing an ARP entry including: detecting a service interruption signal corresponding to a MAC address; and acquiring an ARP entry corresponding to the MAC address when the service interruption signal is detected; Pointing the next hop address of the host route corresponding to the ARP entry to the designated exit.
  • the designated exit is a black hole exit
  • the black hole exit is an exit that cannot forward traffic.
  • the method further includes: routing the message of the host corresponding to the ARP entry. And/or discarded by the last hop of the ARP entry.
  • the method before the next hop address of the host route corresponding to the ARP entry is directed to the black hole exit, the method further includes: sending an ARP keep-alive message to the user side device; When receiving the response packet of the ARP keepalive packet, the next hop address of the host route corresponding to the ARP entry is directed to the black hole exit.
  • the next hop address of the host route corresponding to the ARP entry is directed to the designated port, where the designated port is a port for implementing forwarding service traffic.
  • the designated egress is a designated port, where the designated port is a port for implementing forwarding service traffic.
  • the method further includes: routing the message of the host corresponding to the ARP entry. And/or the message forwarded by the last hop of the ARP entry is forwarded by the designated port.
  • an apparatus for processing an ARP entry including: a detecting module, configured to: detect a service interruption signal corresponding to a MAC address; and an acquiring module configured to: detect the service interruption signal Obtaining an ARP entry corresponding to the MAC address; the first pointing module is configured to: point a next hop address of the host route corresponding to the ARP entry to the designated exit.
  • the designated exit is a black hole exit
  • the black hole exit is an exit that cannot forward traffic.
  • the apparatus further includes: a discarding module, configured to: forward the message of the host corresponding to the ARP entry and/or forward the message by the last hop of the ARP entry The message is discarded.
  • the apparatus further includes: a sending module, configured to: send an ARP keep-alive message to the user side device; and the second pointing module is configured to: not receive the ARP keep-alive message The next hop address of the host route corresponding to the ARP entry points to the black hole exit.
  • the apparatus further includes: a third pointing module, configured to: when receiving the response message of the ARP keep-alive message, routing the host corresponding to the ARP entry The one-hop address is directed to the designated port, where the designated port is a port for implementing forwarding traffic.
  • the designated egress is a designated port, where the designated port is a port for implementing forwarding service traffic.
  • the apparatus further includes: a forwarding module, configured to: after the first pointing module points the next hop address of the host route corresponding to the ARP entry to the designated exit, The packet of the host route corresponding to the ARP entry and/or the packet forwarded by the last hop of the ARP entry is forwarded by the designated port.
  • a forwarding module configured to: after the first pointing module points the next hop address of the host route corresponding to the ARP entry to the designated exit, The packet of the host route corresponding to the ARP entry and/or the packet forwarded by the last hop of the ARP entry is forwarded by the designated port.
  • a storage medium is also provided.
  • the storage medium is arranged to store program code for performing the following steps:
  • the storage medium is further configured to store program code for performing the following steps:
  • the storage medium is further configured to store program code for performing the following steps:
  • the packet of the host route corresponding to the ARP entry and/or the packet forwarded by the last hop of the ARP entry are forwarded by the designated port.
  • the embodiment of the invention further provides a computer readable storage medium storing computer executable instructions, the method for processing the ARP entry being implemented when the computer executable instructions are executed.
  • the ARP entry is obtained by the MAC address of the interrupt signal, and the next hop address of the host route corresponding to the entry is directed to the designated egress.
  • Learning or ARP entry aging can deal with traffic forwarding, thus achieving the effect of timely processing traffic forwarding when the MAC address changes.
  • FIG. 1 is a block diagram showing the hardware structure of a computer terminal for processing an ARP entry according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for processing an ARP entry according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of an application scenario 1 of a method for processing an ARP entry according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of an application scenario 2 of a method for processing an ARP entry according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of an application scenario 3 of a method for processing an ARP entry according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram of an application scenario 4 of a method for processing an ARP entry according to an embodiment of the present invention.
  • FIG. 7 is a structural diagram of an apparatus for processing an ARP entry according to an embodiment of the present invention.
  • FIG. 8 is a structural diagram of another apparatus for processing an ARP entry according to an embodiment of the present invention.
  • FIG. 9 is a structural diagram of still another apparatus for processing an ARP entry according to an embodiment of the present invention.
  • FIG. 10 is a structural diagram of still another apparatus for processing an ARP entry according to an embodiment of the present invention.
  • FIG. 11 is a structural diagram of a processing apparatus for an ARP entry according to an embodiment of the present invention.
  • the ARP entry will be added or deleted frequently. If the MAC address is turbulent, the ARP entry will be added and deleted frequently. The invalidation of the ARP entry will cause more serious route invalidation. The agreement expires, so it will intensify the network The route is turbulent. Therefore, in the related art, when the MAC address is aged, the ARP must wait until the MAC address is re-learned or the ARP entry is aged to process the traffic forwarding. There is no better solution.
  • FIG. 1 is a block diagram showing the hardware structure of a computer terminal for processing an ARP entry according to an embodiment of the present invention.
  • computer terminal 10 may include one or more (only one shown) processor 102 (processor 102 may include, but is not limited to, a Micro Controller Unit (MCU) or A processing device such as a programmable logic device FPGA (Field Programmable Gate Array), a memory 104 for storing data, and a transmission device 106 for communication functions.
  • MCU Micro Controller Unit
  • FPGA Field Programmable Gate Array
  • FIG. 1 is merely illustrative and does not limit the structure of the above electronic device.
  • computer terminal 10 may also include more or fewer components than those shown in FIG. 1, or have a different configuration than that shown in FIG.
  • the memory 104 can be used to store software programs and modules of the application software, such as program instructions/modules corresponding to the processing method of the ARP entry in the embodiment of the present invention, and the processor 102 executes by executing the software program and the module stored in the memory 104.
  • Memory 104 may include high speed random access memory, and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 104 may also include memory remotely located relative to processor 102, which may be coupled to computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • Transmission device 106 can be used to receive or transmit data via a network.
  • the network specific examples described above may include a wireless network provided by a communication provider of the computer terminal 10.
  • the transmission device 106 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet.
  • the transmission device 106 can be a Radio Frequency (RF) module for communicating with the Internet wirelessly.
  • NIC Network Interface Controller
  • RF Radio Frequency
  • FIG. 2 is a flowchart of a method for processing an ARP entry according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps:
  • Step S202 detecting a service interruption signal corresponding to the MAC address
  • the foregoing service interruption signal is reported by the hardware device. That is to say, when the MAC address aging or the MAC address is learned in the hardware device, service interruption information is generated.
  • Step S204 Acquire an ARP entry corresponding to the MAC address when the service interruption signal is detected
  • the software table of the ARP is queried according to the obtained MAC address, and the ARP entry related to the obtained MAC address is determined during the searching process of the software table.
  • the software table includes one or more ARP entries.
  • Step S206 pointing the next hop address of the host route corresponding to the ARP entry to the designated exit.
  • the designated egress may be a black hole egress, where the black hole egress is an egress that cannot forward traffic.
  • the packet of the host route corresponding to the ARP entry and/or the packet forwarded by the previous hop of the ARP entry are discarded at the black hole exit.
  • the failure of some MAC addresses is not caused by the deletion of the MTC address represented by the aging of the MAC address, but the temporary failure caused by changing the port used for forwarding the traffic, if the host route is directed directly If the black hole is exported, you need to transfer the host route blackhole exit to the designated port after changing the port. This process is very redundant, and delays traffic forwarding, causing a bad experience for the user. Therefore, before the next hop address of the host route corresponding to the ARP entry (that is, the egress of the host route) is directed to the designated egress, the ARP keep-alive packet is sent to the user-side device, if the user-side device sends the packet.
  • the ARP keepalive message responds, it means that the MAC address failure is not due to the MAC address deletion caused by the MAC address aging, but the temporary failure caused by changing the port used to forward traffic. Then the host route will be invalid. According to the packet, determine the port pointed to by the next hop address of the host route and continue to enter The traffic is forwarded, and if no response is received, the host route is directed to the blackhole exit according to the original method to implement traffic forwarding.
  • the designated egress may be a designated port, where the designated port is a port for implementing forwarding service traffic.
  • the message of the host route corresponding to the ARP entry and/or the previous one of the ARP entry is The packet forwarded by the hop is forwarded by the designated port.
  • the packet forwarded by the last hop of the ARP entry may be a packet sent by the sub-route connected to the host route to the host route.
  • route 10.10.10.0 255.255.255.0 points to the ARP entry 10.10.10.1, its associated MAC address is 00:11:22:33:44:55, and the exit is port 1.
  • FIG. 3 is a schematic diagram of an application scenario 1 of a method for processing an ARP entry according to an embodiment of the present invention. As shown in Figure 3, the following steps are included:
  • the S1 and ARP entry processing devices receive an interrupt signal that the MAC address of the 00:11:22:33:44:55 reported by the hardware device is deleted.
  • the S2, ARP entry processing device receives the message that the MAC address of 00:11:22:33:44:55 is deleted, and queries its own software table to find that the ARP entry 10.10.10.1 is related to the MAC address.
  • the ARP entry processing device sets the exit of the host route corresponding to the ARP entry 10.10.0.1 to port 0xFFFFFF (the black hole exit that does not exist).
  • Packets of the host route with the traffic destined for 10.10.10.1 are discarded. Packets forwarded by the route 10.10.10.0 are modified to black hole exits because the next hop of the host route 10.10.10.1 is changed to 10.10. The forwarding traffic of the 10.0 route is also discarded.
  • FIG. 4 is a schematic diagram of an application scenario 2 of a method for processing an ARP entry according to an embodiment of the present invention. As shown in Figure 4, the following steps are included:
  • the MAC address after the failure is 00:11:22:33:44:55 and is learned again on port 1.
  • the S2 and the ARP entry processing device receive the interrupt signal learned by the MAC address of the 00:11:22:33:44:55 reported by the hardware device on the port 1.
  • the S3, ARP entry processing device receives the message that the MAC address of 00:11:22:33:44:55 is learned on port 1, and queries its own software table to find that the ARP entry 10.10.10.1 is related to the MAC address.
  • the ARP entry processing device sets the ARP entry 10.10.0.1 corresponding to the host route to point to port 1
  • FIG. 5 is a schematic diagram of an application scenario 3 of a method for processing an ARP entry according to an embodiment of the present invention. As shown in Figure 5, the following steps are included:
  • the S2 the ARP entry processing device receives the interrupt signal learned by the MAC address of the 00:11:22:33:44:55 reported by the hardware device on the port 2.
  • the S3, ARP entry processing device receives the message that the MAC address of 00:11:22:33:44:55 is learned on port 2, and queries its own software table to find that 10.10.10.1 is related to the MAC address.
  • the ARP entry processing device sets the exit of the host route corresponding to the ARP entry 10.10.0.1 to point to port 2.
  • the MAC address is drifted and the traffic is completely forwarded to the new port.
  • FIG. 6 is a schematic diagram of an application scenario 4 of a method for processing an ARP entry according to an embodiment of the present invention. As shown in Figure 6, the following steps are included:
  • the S1 and ARP entry processing devices receive an interrupt signal that the MAC address of the 00:11:22:33:44:55 reported by the hardware device is deleted.
  • the S2 and ARP entry processing devices attempt to send ARP keep-alive messages before setting the egress of the host route corresponding to the ARP entry 10.10.10.1 to the blackhole exit.
  • the ARP entry exit is first directed to the blackhole exit, and then the ARP timer keep-alive mechanism is awaiting further processing.
  • the ARP immediately triggers the ARP to perform the keep-alive action. This action can make a confirmation before the traffic is cut off to ensure that the link is as normal as possible.
  • the ARP After the MAC address is aged out, the ARP must wait until the MAC address is re-learned or ARP aging to process the traffic forwarding. This can achieve the effect of timely processing the traffic forwarding when the MAC address changes. .
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A preferred embodiment.
  • the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium (such as ROM/RAM, disk). , CD), including a number of instructions to make a terminal device (can It is a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in the embodiments of the present invention.
  • a processing device for the ARP entry is provided, and the device is configured to implement the foregoing embodiment and the optional implementation manner, and details are not described herein.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • FIG. 7 is a structural diagram of a processing apparatus for an ARP entry according to an embodiment of the present invention. As shown in FIG. 7, the apparatus includes:
  • the detecting module 72 is configured to: detect a service interruption signal corresponding to the MAC address;
  • the foregoing service interruption signal is reported by the hardware device. That is to say, when the MAC address aging or the MAC address is learned in the hardware device, service interruption information is generated.
  • the obtaining module 74 is configured to: when detecting the service interruption signal, acquire an ARP entry corresponding to the MAC address;
  • the software table of the ARP is queried according to the obtained MAC address, and the ARP entry related to the obtained MAC address is determined during the searching process of the software table.
  • the software table includes one or more ARP entries.
  • the first pointing module 76 is configured to point the next hop address of the host route corresponding to the ARP entry to the designated exit.
  • the designated egress is a black hole egress
  • the black hole egress is an egress that cannot forward service traffic.
  • FIG. 8 is a structural diagram of another apparatus for processing an ARP entry according to an embodiment of the present invention. As shown in FIG. 8, the apparatus includes, in addition to all the modules shown in FIG. 7, when the designated exit is a black hole exit. :
  • the discarding module 82 is configured to discard the packet routed by the host corresponding to the ARP entry and/or the packet forwarded by the previous hop of the ARP entry.
  • the packet forwarded by the last hop of the ARP entry may be a packet sent by the sub-route connected to the host route to the host route.
  • FIG. 9 is a structural diagram of another apparatus for processing an ARP entry according to an embodiment of the present invention. As shown in FIG. 9, in addition to all the modules shown in FIG. 8, the method further includes:
  • the sending module 92 is configured to: send an ARP keep-alive message to the user side device;
  • the second directional module 94 is configured to: when the response packet of the ARP keep-alive packet is not received, point the next hop address of the host route corresponding to the ARP entry to the black hole exit.
  • FIG. 10 is a structural diagram of still another apparatus for processing an ARP entry according to an embodiment of the present invention. As shown in FIG. 10, in addition to the modules other than the second pointing module 94, all of the modules shown in FIG. 9 are included. :
  • the third directional module 1002 is configured to: when receiving the response message of the ARP keepalive message, point the next hop address of the host route corresponding to the ARP entry to the designated port, where the designated port is The port used to implement forwarding traffic.
  • the designated egress is a designated port, where the designated port is a port used to implement forwarding service traffic.
  • the second pointing module 94 is further included.
  • FIG. 11 is a structural diagram of a processing apparatus for an ARP entry according to an embodiment of the present invention. As shown in FIG. 11, when the designated egress is a designated port for learning a MAC address, all but the one shown in FIG. Also included outside the module are:
  • the forwarding module 1102 is configured to: after the first directional module 76 points the next hop address of the host route corresponding to the ARP entry to the designated egress, the packet routed by the host corresponding to the ARP entry And/or the message forwarded by the last hop of the ARP entry is forwarded by the designated port.
  • the above modules can be implemented by software or hardware, and for the latter, This is achieved by, but not limited to, the above modules are all located in the same processor; or the above modules are respectively located in different processors in any combination.
  • the processing device of the ARP entry may be a device corresponding to the processing method of the foregoing ARP entry, and all the implementation manners in the foregoing method embodiments may be applied to the embodiment of the device, and the same technical effect can be achieved.
  • Embodiments of the present invention also provide a storage medium.
  • the foregoing storage medium may be configured to store program code for performing the following steps:
  • the storage medium is further arranged to store program code for performing the following steps:
  • the storage medium is further arranged to store program code for performing the following steps:
  • the packet of the host route corresponding to the ARP entry and/or the packet forwarded by the last hop of the ARP entry are forwarded by the designated port.
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the embodiment of the invention further provides a computer readable storage medium storing computer executable instructions, the method for processing the ARP entry being implemented when the computer executable instructions are executed.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • the device/function module/functional unit in the above embodiment When the device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the ARP entry is obtained by the MAC address of the interrupt signal, and the next hop of the host route corresponding to the entry is directed to the designated egress. Therefore, when the MAC address is aged, the ARP must wait until the MAC address is re-established. After learning or ARP aging, the problem of traffic forwarding can be handled, so that the traffic forwarding can be processed in time when the MAC address changes.

Abstract

An ARP entry processing method comprises: detecting a service interruption signal corresponding to a MAC address; when the service interruption signal is detected, obtaining an ARP entry corresponding to the MAC address; and directing a next hop address of a host route corresponding to the ARP entry to a specified egress.

Description

ARP条目的处理方法及装置ARP entry processing method and device 技术领域Technical field
本发明实施例涉及但不限于通信领域,尤其是一种地址解析协议(Address Resolution Protocol,ARP)条目的处理方法及装置。Embodiments of the present invention relate to, but are not limited to, the field of communications, and in particular, to a method and an apparatus for processing an Address Resolution Protocol (ARP) entry.
背景技术Background technique
一般情况下,ARP条目在设备中是使用主机路由来进行转发的,而ARP的出口信息,是由MAC(Media Access Control,媒体访问控制)地址来决定的,而在MAC学习的过程中,可能出现MAC地址老化的状况,而此时,ARP条目会需要进行ARP请求的重新触发,而当ARP请求被响应之后,根据ARP回应报文的状态,ARP条目才会出现更新,主机路由才会真正更新,或者被真正的删除。In general, the ARP entry is forwarded by using the host route in the device, and the ARP exit information is determined by the MAC (Media Access Control) address. In the process of MAC learning, it is possible. A MAC address aging condition occurs. At this time, the ARP entry needs to be re-triggered by the ARP request. After the ARP request is responded, the ARP entry will be updated according to the status of the ARP response packet, and the host route will be true. Updated, or was actually deleted.
但是,由于设备的MAC地址老化和ARP的更新之间会存在一定的时间差,ARP条目的更新会存在滞后的现象,甚至如果三层流量在持续贯通的情况下,最坏的情况就是没有数据流上送中央处理器(Central Processing Unit,CPU)去触发ARP请求报文的发送,因此就会出现ARP条目存在,而MAC地址条目已经不存在,而三层流量却持续往原MAC地址指向的端口转发的错误情况,此状况会一直持续到ARP条目老化之后,才能终止。也就是说,此异常流量将会由ARP条目的老化时间决定。However, due to the certain time difference between the MAC address aging of the device and the ARP update, the update of the ARP entry may be lagging. Even if the Layer 3 traffic continues to pass through, the worst case is that there is no data flow. The central processing unit (CPU) is sent to trigger the sending of the ARP request message, so the ARP entry exists, and the MAC address entry does not exist, and the Layer 3 traffic continues to the port pointed to by the original MAC address. The error condition of the forwarding, this condition will continue until the ARP entry ages before it can be terminated. In other words, this abnormal traffic will be determined by the aging time of the ARP entry.
相关技术中普遍的设备MAC地址老化后ARP转发的步骤如下:The steps of ARP forwarding after the MAC address of a device is aging in the related art are as follows:
1、MAC地址出现老化。1. The MAC address is aging.
2、ARP条目没有任何变化,主机路由仍然存在,通过此主机路由转发的数据仍然贯通。直到出现ARP定时器保活,发出ARP请求报文。2. There is no change in the ARP entry. The host route still exists. The data forwarded through this host route is still running through. An ARP request packet is sent until the ARP timer keeps alive.
3、若ARP请求报文得到响应,则学习到新的MAC地址,ARP条目进行更新,下发设备新的主机路由表项,修改原主机路由条目的出口为新的MAC地址出口。3. If the ARP request packet is responded, the new MAC address is learned, the ARP entry is updated, the device's new host routing entry is delivered, and the original host routing entry is modified to be the new MAC address exit.
4、若ARP请求报文未得到响应,则一直等到ARP保活定时器超时,删 除ARP条目,主机路由被删除,异常转发流量停止。4. If the ARP request packet is not responded, the ARP keepalive timer expires and is deleted. Except for ARP entries, host routes are deleted and abnormal forwarding traffic stops.
由此可见,相关技术中,MAC地址出现老化时,ARP必须要等到保活机制发现新的有效MAC条目,或者是一直要等到ARP条目被老化时间删除,通过这个ARP条目转发的异常流量才会出现变化或者终止。It can be seen that, in the related art, when the MAC address is aged, the ARP must wait until the keep-alive mechanism finds a new valid MAC entry, or it has to wait until the ARP entry is deleted by the aging time, and the abnormal traffic forwarded through the ARP entry will be Change or termination.
一般设备上为了防止此问题的出现,所采用的方法多半是设置ARP条目的老化时间稍微大于MAC地址的老化时间,用这样的机制去尽量减少异常流量的贯通时间,却无法从根本上解决异常流量的问题。In order to prevent this problem from occurring on a general device, the method used is mostly to set the aging time of the ARP entry to be slightly larger than the aging time of the MAC address. This mechanism is used to minimize the transit time of abnormal traffic, but it cannot solve the abnormality fundamentally. Traffic problem.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例提供了一种ARP条目的处理方法及装置,以至少解决相关技术中针对MAC地址老化时,ARP必须等到MAC地址重新被学习或者ARP老化才能够对流量转发进行处理的问题。The embodiment of the present invention provides a method and a device for processing an ARP entry, so as to solve at least the problem that the ARP must wait for the MAC address to be re-learned or ARP aging to process the traffic forwarding when the MAC address is aged.
根据本发明的一个实施例,提供了一种ARP条目的处理方法,包括:检测MAC地址对应的业务中断信号;在检测到所述业务中断信号时,获取与所述MAC地址对应的ARP条目;将与所述ARP条目对应的主机路由的下一跳地址指向指定出口。According to an embodiment of the present invention, a method for processing an ARP entry is provided, including: detecting a service interruption signal corresponding to a MAC address; and acquiring an ARP entry corresponding to the MAC address when the service interruption signal is detected; Pointing the next hop address of the host route corresponding to the ARP entry to the designated exit.
在一种示例性实施方式中,当所述MAC地址为失效MAC地址时,所述指定出口为黑洞出口,其中,所述黑洞出口为无法转发业务流量的出口。In an exemplary embodiment, when the MAC address is a failed MAC address, the designated exit is a black hole exit, and the black hole exit is an exit that cannot forward traffic.
在一种示例性实施方式中,在将所述ARP条目对应的主机路由的下一跳地址指向指定出口之后,所述方法还包括:将与所述ARP条目对应的所述主机路由的报文和/或由所述ARP条目的上一跳所转发的报文丢弃。In an exemplary embodiment, after the next hop address of the host route corresponding to the ARP entry is directed to the designated exit, the method further includes: routing the message of the host corresponding to the ARP entry. And/or discarded by the last hop of the ARP entry.
在一种示例性实施方式中,在将所述ARP条目对应的主机路由的下一跳地址指向所述黑洞出口之前,所述方法还包括:向用户侧设备发送ARP保活报文;在没有接收到所述ARP保活报文的响应报文时,将所述ARP条目对应的主机路由的下一跳地址指向所述黑洞出口。In an exemplary embodiment, before the next hop address of the host route corresponding to the ARP entry is directed to the black hole exit, the method further includes: sending an ARP keep-alive message to the user side device; When receiving the response packet of the ARP keepalive packet, the next hop address of the host route corresponding to the ARP entry is directed to the black hole exit.
在一种示例性实施方式中,在接收到所述ARP保活报文的响应报文时, 将所述ARP条目对应的主机路由的下一跳地址指向指定端口,其中,所述指定端口为用于实现转发业务流量的端口。In an exemplary embodiment, when receiving the response message of the ARP keepalive message, The next hop address of the host route corresponding to the ARP entry is directed to the designated port, where the designated port is a port for implementing forwarding service traffic.
在一种示例性实施方式中,当所述MAC地址为被指定端口学习的MAC地址时,所述指定出口为指定端口,其中,所述指定端口为用于实现转发业务流量的端口。In an exemplary embodiment, when the MAC address is a MAC address learned by a designated port, the designated egress is a designated port, where the designated port is a port for implementing forwarding service traffic.
在一种示例性实施方式中,在将所述ARP条目对应的主机路由的下一跳地址指向指定出口之后,所述方法还包括:将与所述ARP条目对应的所述主机路由的报文和/或由所述ARP条目的上一跳所转发的报文由所述指定端口转发。In an exemplary embodiment, after the next hop address of the host route corresponding to the ARP entry is directed to the designated exit, the method further includes: routing the message of the host corresponding to the ARP entry. And/or the message forwarded by the last hop of the ARP entry is forwarded by the designated port.
根据本发明的另一个实施例,提供了一种ARP条目的处理装置,包括:检测模块,设置为:检测MAC地址对应的业务中断信号;获取模块,设置为:在检测到所述业务中断信号时,获取与所述MAC地址对应的ARP条目;第一指向模块,设置为:将与所述ARP条目对应的主机路由的下一跳地址指向指定出口。According to another embodiment of the present invention, an apparatus for processing an ARP entry is provided, including: a detecting module, configured to: detect a service interruption signal corresponding to a MAC address; and an acquiring module configured to: detect the service interruption signal Obtaining an ARP entry corresponding to the MAC address; the first pointing module is configured to: point a next hop address of the host route corresponding to the ARP entry to the designated exit.
在一种示例性实施方式中,当所述MAC地址为失效MAC地址时,所述指定出口为黑洞出口,其中,所述黑洞出口为无法转发业务流量的出口。In an exemplary embodiment, when the MAC address is a failed MAC address, the designated exit is a black hole exit, and the black hole exit is an exit that cannot forward traffic.
在一种示例性实施方式中,所述装置还包括:丢弃模块,设置为:将与所述ARP条目对应的所述主机路由的报文和/或由所述ARP条目的上一跳所转发的报文丢弃。In an exemplary embodiment, the apparatus further includes: a discarding module, configured to: forward the message of the host corresponding to the ARP entry and/or forward the message by the last hop of the ARP entry The message is discarded.
在一种示例性实施方式中,所述装置还包括:发送模块,设置为:向用户侧设备发送ARP保活报文;第二指向模块,设置为:在没有接收到所述ARP保活报文的响应报文时,将所述ARP条目对应的主机路由的下一跳地址指向所述黑洞出口。In an exemplary embodiment, the apparatus further includes: a sending module, configured to: send an ARP keep-alive message to the user side device; and the second pointing module is configured to: not receive the ARP keep-alive message The next hop address of the host route corresponding to the ARP entry points to the black hole exit.
在一种示例性实施方式中,所述装置还包括:第三指向模块,设置为:在接收到所述ARP保活报文的响应报文时,将所述ARP条目对应的主机路由的下一跳地址指向指定端口,其中,所述指定端口为用于实现转发业务流量的端口。In an exemplary embodiment, the apparatus further includes: a third pointing module, configured to: when receiving the response message of the ARP keep-alive message, routing the host corresponding to the ARP entry The one-hop address is directed to the designated port, where the designated port is a port for implementing forwarding traffic.
在一种示例性实施方式中,当所述MAC地址为被指定端口学习的MAC 地址时,所述指定出口为指定端口,其中,所述指定端口为用于实现转发业务流量的端口。In an exemplary embodiment, when the MAC address is a MAC learned by a designated port In the case of an address, the designated egress is a designated port, where the designated port is a port for implementing forwarding service traffic.
在一种示例性实施方式中,所述装置还包括:转发模块,设置为:在所述第一指向模块将与所述ARP条目对应的主机路由的下一跳地址指向指定出口之后,将与所述ARP条目对应的所述主机路由的报文和/或由所述ARP条目的上一跳所转发的报文由所述指定端口转发。In an exemplary embodiment, the apparatus further includes: a forwarding module, configured to: after the first pointing module points the next hop address of the host route corresponding to the ARP entry to the designated exit, The packet of the host route corresponding to the ARP entry and/or the packet forwarded by the last hop of the ARP entry is forwarded by the designated port.
根据本发明的又一个实施例,还提供了一种存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:According to still another embodiment of the present invention, a storage medium is also provided. The storage medium is arranged to store program code for performing the following steps:
S11,检测MAC地址对应的业务中断信号;S11. Detect a service interruption signal corresponding to the MAC address.
S12,在检测到所述业务中断信号时,获取与所述MAC地址对应的ARP条目;S12. Acquire an ARP entry corresponding to the MAC address when the service interruption signal is detected.
S13,将与所述ARP条目对应的主机路由的下一跳地址指向指定出口。S13. Point the next hop address of the host route corresponding to the ARP entry to the designated exit.
在一种示例性实施方式中,存储介质还设置为存储用于执行以下步骤的程序代码:In an exemplary embodiment, the storage medium is further configured to store program code for performing the following steps:
S21,将与所述ARP条目对应的所述主机路由的报文和/或由所述ARP条目的上一跳所转发的报文丢弃。S21. Discard the packet of the host route corresponding to the ARP entry and/or the packet forwarded by the previous hop of the ARP entry.
在一种示例性实施方式中,存储介质还设置为存储用于执行以下步骤的程序代码:In an exemplary embodiment, the storage medium is further configured to store program code for performing the following steps:
S31,将与所述ARP条目对应的所述主机路由的报文和/或由所述ARP条目的上一跳所转发的报文由所述指定端口转发。S31. The packet of the host route corresponding to the ARP entry and/or the packet forwarded by the last hop of the ARP entry are forwarded by the designated port.
本发明实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现上述ARP条目的处理方法。The embodiment of the invention further provides a computer readable storage medium storing computer executable instructions, the method for processing the ARP entry being implemented when the computer executable instructions are executed.
通过本发明实施例,由于通过产生中断信号的MAC地址获取ARP条目,并将根据该条目对应的主机路由的下一跳地址指向指定出口,可以解决MAC地址老化时,ARP必须等到MAC地址重新被学习或者ARP条目老化才能够对流量转发进行处理问题,从而达到了在MAC地址发生变化时就能够及时对流量转发进行处理的效果。In the embodiment of the present invention, the ARP entry is obtained by the MAC address of the interrupt signal, and the next hop address of the host route corresponding to the entry is directed to the designated egress. Learning or ARP entry aging can deal with traffic forwarding, thus achieving the effect of timely processing traffic forwarding when the MAC address changes.
在阅读并理解了附图和详细描述后,可以明白其他方面。 Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述BRIEF abstract
图1是本发明实施例的一种ARP条目的处理方法的计算机终端的硬件结构框图;1 is a block diagram showing the hardware structure of a computer terminal for processing an ARP entry according to an embodiment of the present invention;
图2是根据本发明实施例的一种ARP条目的处理方法的流程图;2 is a flowchart of a method for processing an ARP entry according to an embodiment of the present invention;
图3是根据本发明实施例的ARP条目的处理方法的应用场景1的示意图;FIG. 3 is a schematic diagram of an application scenario 1 of a method for processing an ARP entry according to an embodiment of the present invention; FIG.
图4是根据本发明实施例的ARP条目的处理方法的应用场景2的示意图;4 is a schematic diagram of an application scenario 2 of a method for processing an ARP entry according to an embodiment of the present invention;
图5是根据本发明实施例的ARP条目的处理方法的应用场景3的示意图;FIG. 5 is a schematic diagram of an application scenario 3 of a method for processing an ARP entry according to an embodiment of the present invention; FIG.
图6是根据本发明实施例的ARP条目的处理方法的应用场景4的示意图;FIG. 6 is a schematic diagram of an application scenario 4 of a method for processing an ARP entry according to an embodiment of the present invention; FIG.
图7是根据本发明实施例的一种ARP条目的处理装置的结构图;FIG. 7 is a structural diagram of an apparatus for processing an ARP entry according to an embodiment of the present invention; FIG.
图8是根据本发明实施例的另一种ARP条目的处理装置的结构图;FIG. 8 is a structural diagram of another apparatus for processing an ARP entry according to an embodiment of the present invention; FIG.
图9是根据本发明实施例的再一种ARP条目的处理装置的结构图;9 is a structural diagram of still another apparatus for processing an ARP entry according to an embodiment of the present invention;
图10是根据本发明实施例的又一种ARP条目的处理装置的结构图;FIG. 10 is a structural diagram of still another apparatus for processing an ARP entry according to an embodiment of the present invention; FIG.
图11是根据本发明实施例的还一种ARP条目的处理装置的结构图。FIG. 11 is a structural diagram of a processing apparatus for an ARP entry according to an embodiment of the present invention.
本发明的较佳实施方式Preferred embodiment of the invention
下文中将参考附图并结合实施例来详细说明本发明的实施方式。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的各种方式可以相互组合。Embodiments of the present invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the various manners in the embodiments may be combined with each other without conflict.
需要说明的是,本文中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first", "second" and the like are used herein to distinguish similar objects, and are not necessarily used to describe a particular order or order.
MAC地址老化时,如果采用立刻触发ARP条目更新或者删除的行为,则会导致如果出现MAC的动荡行为,ARP条目也会出现频繁的添加删除,而ARP条目的失效会引发更严重的路由失效或者协议失效,因此会加剧网络 的路由动荡。因此,相关技术中针对MAC地址老化时,ARP必须等到MAC地址重新被学习或者ARP条目老化才能够对流量转发进行处理的问题,还没有一种比较好的解决方法。If the MAC address aging is triggered, the ARP entry will be added or deleted frequently. If the MAC address is turbulent, the ARP entry will be added and deleted frequently. The invalidation of the ARP entry will cause more serious route invalidation. The agreement expires, so it will intensify the network The route is turbulent. Therefore, in the related art, when the MAC address is aged, the ARP must wait until the MAC address is re-learned or the ARP entry is aged to process the traffic forwarding. There is no better solution.
实施例1Example 1
本申请实施例一所提供的方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在计算机终端上为例,图1是本发明实施例的一种ARP条目的处理方法的计算机终端的硬件结构框图。如图1所示,计算机终端10可以包括一个或多个(图中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU(Micro Controller Unit,微控制器单元)或可编程逻辑器件FPGA(Field Programmable Gate Array,现场可编程门阵列)等的处理装置)、用于存储数据的存储器104、以及用于通信功能的传输装置106。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述电子装置的结构造成限定。例如,计算机终端10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiment provided in Embodiment 1 of the present application can be executed in a mobile terminal, a computer terminal or the like. Taking a computer terminal as an example, FIG. 1 is a block diagram showing the hardware structure of a computer terminal for processing an ARP entry according to an embodiment of the present invention. As shown in FIG. 1, computer terminal 10 may include one or more (only one shown) processor 102 (processor 102 may include, but is not limited to, a Micro Controller Unit (MCU) or A processing device such as a programmable logic device FPGA (Field Programmable Gate Array), a memory 104 for storing data, and a transmission device 106 for communication functions. It will be understood by those skilled in the art that the structure shown in FIG. 1 is merely illustrative and does not limit the structure of the above electronic device. For example, computer terminal 10 may also include more or fewer components than those shown in FIG. 1, or have a different configuration than that shown in FIG.
存储器104可用于存储应用软件的软件程序以及模块,如本发明实施例中的ARP条目的处理方法对应的程序指令/模块,处理器102通过运行存储在存储器104内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104还可包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至计算机终端10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store software programs and modules of the application software, such as program instructions/modules corresponding to the processing method of the ARP entry in the embodiment of the present invention, and the processor 102 executes by executing the software program and the module stored in the memory 104. Various functional applications and data processing, that is, the above methods are implemented. Memory 104 may include high speed random access memory, and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, memory 104 may also include memory remotely located relative to processor 102, which may be coupled to computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
传输装置106可用于经由一个网络接收或者发送数据。上述的网络具体实例可包括计算机终端10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。Transmission device 106 can be used to receive or transmit data via a network. The network specific examples described above may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module for communicating with the Internet wirelessly.
在本实施例中提供了一种运行于计算机终端的ARP条目的处理方法,图 2是根据本发明实施例的一种ARP条目的处理方法的流程图,如图2所示,该流程包括如下步骤:In this embodiment, a method for processing an ARP entry running on a computer terminal is provided. 2 is a flowchart of a method for processing an ARP entry according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps:
步骤S202,检测MAC地址对应的业务中断信号;Step S202, detecting a service interruption signal corresponding to the MAC address;
其中,可选地,上述业务中断信号是由硬件设备上报的。也就是说,当硬件设备中发生MAC地址老化或者MAC地址被学习,会产生业务中断信息。Optionally, the foregoing service interruption signal is reported by the hardware device. That is to say, when the MAC address aging or the MAC address is learned in the hardware device, service interruption information is generated.
步骤S204,在检测到所述业务中断信号时,获取与所述MAC地址对应的ARP条目;Step S204: Acquire an ARP entry corresponding to the MAC address when the service interruption signal is detected;
可选地,在获取与所述MAC地址对应的ARP条目时,根据获取的MAC地址查询ARP的软件表,在软件表的查找过程当中,确定与获取的MAC地址相关的ARP条目。其中,软件表包括一个或多个的ARP条目。Optionally, when the ARP entry corresponding to the MAC address is obtained, the software table of the ARP is queried according to the obtained MAC address, and the ARP entry related to the obtained MAC address is determined during the searching process of the software table. The software table includes one or more ARP entries.
步骤S206,将与所述ARP条目对应的主机路由的下一跳地址指向指定出口。Step S206, pointing the next hop address of the host route corresponding to the ARP entry to the designated exit.
可选地,如果获取的MAC地址是因老化而删除的MAC地址的话,那么所述指定出口可以为黑洞出口,其中,黑洞出口为无法转发业务流量的出口。Optionally, if the obtained MAC address is a MAC address that is deleted due to aging, the designated egress may be a black hole egress, where the black hole egress is an egress that cannot forward traffic.
可选地,与所述ARP条目对应的所述主机路由的报文和/或由所述ARP条目的上一跳所转发的报文会在黑洞出口处被丢弃。Optionally, the packet of the host route corresponding to the ARP entry and/or the packet forwarded by the previous hop of the ARP entry are discarded at the black hole exit.
可选地,由于有些MAC地址的失效并不是由MAC地址老化而表现的MTC地址删除所造成的,而是在变换用于转发流量的端口时造成的暂时失效,因此,如果直接将主机路由指向黑洞出口的话,那么需要在变换端口后将主机路由黑洞出口转向指定端口。这样的过程十分冗余,同时耽误了流量转发,给用户的使用造成了不好的体验。因此,可在将所述ARP条目对应的主机路由的下一跳地址(也就是主机路由的出口)指向指定出口之前,向用户侧设备发送ARP保活报文,如果收到用户侧设备发送的ARP保活报文响应的话,意味着本次的MAC地址的失效并不是由于MAC地址老化所引起的MAC地址删除,而是在变换用于转发流量的端口时造成的暂时失效,那么主机路由会根据报文相应确定主机路由的下一跳地址指向的端口并继续进 行流量转发,而如果没有收到报文响应的话,那么主机路由则按照原先的方法,将出口指向黑洞出口以实现流量转发的丢弃。Optionally, since the failure of some MAC addresses is not caused by the deletion of the MTC address represented by the aging of the MAC address, but the temporary failure caused by changing the port used for forwarding the traffic, if the host route is directed directly If the black hole is exported, you need to transfer the host route blackhole exit to the designated port after changing the port. This process is very redundant, and delays traffic forwarding, causing a bad experience for the user. Therefore, before the next hop address of the host route corresponding to the ARP entry (that is, the egress of the host route) is directed to the designated egress, the ARP keep-alive packet is sent to the user-side device, if the user-side device sends the packet. If the ARP keepalive message responds, it means that the MAC address failure is not due to the MAC address deletion caused by the MAC address aging, but the temporary failure caused by changing the port used to forward traffic. Then the host route will be invalid. According to the packet, determine the port pointed to by the next hop address of the host route and continue to enter The traffic is forwarded, and if no response is received, the host route is directed to the blackhole exit according to the original method to implement traffic forwarding.
可选地,如果获取的MAC地址是被指定端口学习的MAC地址的话,那么所述指定出口可以为指定端口,其中,该指定端口为用于实现转发业务流量的端口。Optionally, if the obtained MAC address is a MAC address learned by the designated port, the designated egress may be a designated port, where the designated port is a port for implementing forwarding service traffic.
可选地,在将所述ARP条目对应的主机路由的下一跳地址指向指定出口之后,将与所述ARP条目对应的所述主机路由的报文和/或由所述ARP条目的上一跳所转发的报文由所述指定端口转发。Optionally, after the next hop address of the host route corresponding to the ARP entry is directed to the designated exit, the message of the host route corresponding to the ARP entry and/or the previous one of the ARP entry is The packet forwarded by the hop is forwarded by the designated port.
需要指出的是,ARP条目的上一跳所转发的报文可以为与主机路由连接的子路由向主机路由发送的报文。It should be noted that the packet forwarded by the last hop of the ARP entry may be a packet sent by the sub-route connected to the host route to the host route.
同时,在本实施例中还提供了以下场景,以便理解本实施例中的技术方案:In the meantime, the following scenarios are also provided in this embodiment, so as to understand the technical solution in this embodiment:
需要指出的是,路由10.10.10.0 255.255.255.0指向ARP条目10.10.10.1,其相关联的MAC地址为00:11:22:33:44:55,出口为端口1。It should be noted that the route 10.10.10.0 255.255.255.0 points to the ARP entry 10.10.10.1, its associated MAC address is 00:11:22:33:44:55, and the exit is port 1.
场景1scene 1
MAC地址00:11:22:33:44:55出现老化。图3是根据本发明实施例的ARP条目的处理方法的应用场景1的示意图。如图3所示,包括以下步骤:MAC address 00:11:22:33:44:55 aging. FIG. 3 is a schematic diagram of an application scenario 1 of a method for processing an ARP entry according to an embodiment of the present invention. As shown in Figure 3, the following steps are included:
S1、ARP条目处理装置收到硬件设备上报的00:11:22:33:44:55的MAC地址被删除的中断信号。The S1 and ARP entry processing devices receive an interrupt signal that the MAC address of the 00:11:22:33:44:55 reported by the hardware device is deleted.
S2、ARP条目处理装置收到00:11:22:33:44:55的MAC地址被删除的消息,查询自己的软件表发现ARP条目10.10.10.1与该MAC地址有关。The S2, ARP entry processing device receives the message that the MAC address of 00:11:22:33:44:55 is deleted, and queries its own software table to find that the ARP entry 10.10.10.1 is related to the MAC address.
S3、ARP条目处理装置设置ARP条目10.10.0.1对应的主机路由的出口指向端口0xFFFFFFFF(不存在的黑洞出口)。S3. The ARP entry processing device sets the exit of the host route corresponding to the ARP entry 10.10.0.1 to port 0xFFFFFFFF (the black hole exit that does not exist).
S4、转发流量命中10.10.10.1的主机路由的报文被丢弃;由10.10.10.0的路由转发的报文,由于其下一跳主机路由10.10.10.1的出口被修改为黑洞出口,则命中10.10.10.0路由的转发流量也被丢弃。S4. Packets of the host route with the traffic destined for 10.10.10.1 are discarded. Packets forwarded by the route 10.10.10.0 are modified to black hole exits because the next hop of the host route 10.10.10.1 is changed to 10.10. The forwarding traffic of the 10.0 route is also discarded.
至此,完成MAC地址失效的异常主机路由的转发流量抑制的动作,因此,所有命中该主机路由,或者下一跳是此主机路由的网段路由转发流量, 均被立刻丢弃。At this point, the action of suppressing the forwarding of the abnormal host route with the MAC address failure is completed. Therefore, all the routes of the host are hit, or the next hop is the network segment forwarding traffic of the host route. They are all discarded immediately.
场景2 Scene 2
图4是根据本发明实施例的ARP条目的处理方法的应用场景2的示意图。如图4所示,包括以下步骤:FIG. 4 is a schematic diagram of an application scenario 2 of a method for processing an ARP entry according to an embodiment of the present invention. As shown in Figure 4, the following steps are included:
S1、失效后的MAC地址00:11:22:33:44:55重新在端口1上被学习到。S1, the MAC address after the failure is 00:11:22:33:44:55 and is learned again on port 1.
S2、ARP条目处理装置收到硬件设备上报的00:11:22:33:44:55的MAC地址在端口1上被学习到的中断信号。The S2 and the ARP entry processing device receive the interrupt signal learned by the MAC address of the 00:11:22:33:44:55 reported by the hardware device on the port 1.
S3、ARP条目处理装置收到00:11:22:33:44:55的MAC地址在端口1上被学习到的消息,查询自己的软件表发现ARP条目10.10.10.1与该MAC地址有关。The S3, ARP entry processing device receives the message that the MAC address of 00:11:22:33:44:55 is learned on port 1, and queries its own software table to find that the ARP entry 10.10.10.1 is related to the MAC address.
S4、ARP条目处理装置设置ARP条目10.10.0.1对应的主机路由的出口指向端口1S4. The ARP entry processing device sets the ARP entry 10.10.0.1 corresponding to the host route to point to port 1
S5、转发流量命中10.10.10.1的主机路由,和由10.10.10.0的路由转发的报文,由于其下一跳主机路由10.10.10.1的出口被修改为端口1,则流量立刻恢复往端口1的转发。S5. The host route that forwards the traffic hits 10.10.10.1 and the packet forwarded by the route 10.10.10.0. Because the egress of the next hop host route 10.10.10.1 is changed to port 1, the traffic is immediately restored to port 1. Forward.
至此,完成MAC地址重新被学习到以及恢复转发的行为。At this point, the behavior of the MAC address being learned again and the forwarding is resumed.
场景3Scene 3
图5是根据本发明实施例的ARP条目的处理方法的应用场景3的示意图。如图5所示,包括以下步骤:FIG. 5 is a schematic diagram of an application scenario 3 of a method for processing an ARP entry according to an embodiment of the present invention. As shown in Figure 5, the following steps are included:
S1、失效后的MAC地址00:11:22:33:44:55漂移到端口2上被学习到。S1, the MAC address after invalidation 00:11:22:33:44:55 drifted to port 2 and was learned.
S2、ARP条目处理装置收到硬件设备上报的00:11:22:33:44:55的MAC地址在端口2上被学习到的中断信号。The S2, the ARP entry processing device receives the interrupt signal learned by the MAC address of the 00:11:22:33:44:55 reported by the hardware device on the port 2.
S3、ARP条目处理装置收到00:11:22:33:44:55的MAC地址在端口2上被学习到的消息,查询自己的软件表发现10.10.10.1与该MAC地址有关。The S3, ARP entry processing device receives the message that the MAC address of 00:11:22:33:44:55 is learned on port 2, and queries its own software table to find that 10.10.10.1 is related to the MAC address.
S4、ARP条目处理装置设置ARP条目10.10.0.1对应的主机路由的出口指向端口2。 S4. The ARP entry processing device sets the exit of the host route corresponding to the ARP entry 10.10.0.1 to point to port 2.
S5、转发流量命中10.10.10.1的主机路由,和由10.10.10.0的路由转发的报文,由于其下一跳主机路由10.10.10.1的出口被修改为端口2,则流量立刻恢复往端口2的转发。S5. The host route that forwards the traffic hits 10.10.10.1 and the packet forwarded by the route 10.10.10.0. Because the egress of the next hop host route 10.10.10.1 is changed to port 2, the traffic is immediately restored to port 2. Forward.
至此,完成MAC地址发生漂移,流量完成向新的端口进行转发的行为。At this point, the MAC address is drifted and the traffic is completely forwarded to the new port.
场景4Scene 4
立刻触发失效后的MAC地址00:11:22:33:44:55相关的ARP条目10.10.10.1保活机制。图6是根据本发明实施例的ARP条目的处理方法的应用场景4的示意图。如图6所示,包括以下步骤:Immediately trigger the invalid MAC address 00:11:22:33:44:55 related ARP entry 10.10.10.1 keepalive mechanism. FIG. 6 is a schematic diagram of an application scenario 4 of a method for processing an ARP entry according to an embodiment of the present invention. As shown in Figure 6, the following steps are included:
S1、ARP条目处理装置收到硬件设备上报的00:11:22:33:44:55的MAC地址被删除的中断信号。The S1 and ARP entry processing devices receive an interrupt signal that the MAC address of the 00:11:22:33:44:55 reported by the hardware device is deleted.
S2、ARP条目处理装置在设置ARP条目10.10.10.1对应的主机路由的出口指向黑洞出口之前,尝试发送ARP保活报文。The S2 and ARP entry processing devices attempt to send ARP keep-alive messages before setting the egress of the host route corresponding to the ARP entry 10.10.10.1 to the blackhole exit.
S3、若收到ARP保活报文的响应报文,则根据响应报文内容修改ARP条目出口,更新主机路由表。S3. If the response packet of the ARP keepalive packet is received, modify the ARP entry exit according to the content of the response packet, and update the host routing table.
S4、若未收到ARP保活报文的响应报文,则先将ARP条目出口指向黑洞出口,然后等待ARP定时器保活机制进行进一步的处理。S4. If the response packet of the ARP keep-alive packet is not received, the ARP entry exit is first directed to the blackhole exit, and then the ARP timer keep-alive mechanism is awaiting further processing.
至此,完成ARP在MAC地址出现失效的时候,立刻触发与失效的MAC相关的ARP进行保活的处理动作。此动作可在切断流量之前再做一次确认判断,尽可能地保证链路正常。At this point, when the completion of the MAC address failure occurs, the ARP immediately triggers the ARP to perform the keep-alive action. This action can make a confirmation before the traffic is cut off to ensure that the link is as normal as possible.
通过上述步骤,解决了MAC地址老化时,ARP必须等到MAC地址重新被学习或者ARP老化才能够对流量转发进行处理问题,从而达到了在MAC地址发生变化时就能够及时对流量转发进行处理的效果。After the MAC address is aged out, the ARP must wait until the MAC address is re-learned or ARP aging to process the traffic forwarding. This can achieve the effect of timely processing the traffic forwarding when the MAC address changes. .
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是较佳的实施方式。基于这样的理解,本发明实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以 是手机,计算机,服务器,或者网络设备等)执行本发明实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A preferred embodiment. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium (such as ROM/RAM, disk). , CD), including a number of instructions to make a terminal device (can It is a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in the embodiments of the present invention.
实施例2Example 2
在本实施例中还提供了一种ARP条目的处理装置,该装置设置为:实现上述实施例及可选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地可以以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In the embodiment, a processing device for the ARP entry is provided, and the device is configured to implement the foregoing embodiment and the optional implementation manner, and details are not described herein. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图7是根据本发明实施例的一种ARP条目的处理装置的结构图,如图7所示,该装置包括:FIG. 7 is a structural diagram of a processing apparatus for an ARP entry according to an embodiment of the present invention. As shown in FIG. 7, the apparatus includes:
检测模块72,设置为:检测MAC地址对应的业务中断信号;The detecting module 72 is configured to: detect a service interruption signal corresponding to the MAC address;
其中,可选地,上述业务中断信号是由硬件设备上报的。也就是说,当硬件设备中发生MAC地址老化或者MAC地址被学习,会产生业务中断信息。Optionally, the foregoing service interruption signal is reported by the hardware device. That is to say, when the MAC address aging or the MAC address is learned in the hardware device, service interruption information is generated.
获取模块74,设置为:在检测到所述业务中断信号时,获取与所述MAC地址对应的ARP条目;The obtaining module 74 is configured to: when detecting the service interruption signal, acquire an ARP entry corresponding to the MAC address;
其中,可选地,在获取与所述MAC地址对应的ARP条目时,根据获取的MAC地址查询ARP的软件表,在软件表的查找过程当中,确定与获取的MAC地址相关的ARP条目。其中,软件表包括一个或多个的ARP条目。Optionally, when the ARP entry corresponding to the MAC address is obtained, the software table of the ARP is queried according to the obtained MAC address, and the ARP entry related to the obtained MAC address is determined during the searching process of the software table. The software table includes one or more ARP entries.
第一指向模块76,设置为:将与所述ARP条目对应的主机路由的下一跳地址指向指定出口。The first pointing module 76 is configured to point the next hop address of the host route corresponding to the ARP entry to the designated exit.
可选地,当所述MAC地址为失效MAC地址时,所述指定出口为黑洞出口,其中,所述黑洞出口为无法转发业务流量的出口。Optionally, when the MAC address is a failed MAC address, the designated egress is a black hole egress, and the black hole egress is an egress that cannot forward service traffic.
图8是根据本发明实施例的另一种ARP条目的处理装置的结构图,如图8所示,该装置在所述指定出口为黑洞出口时,除图7所示的所有模块外还包括:FIG. 8 is a structural diagram of another apparatus for processing an ARP entry according to an embodiment of the present invention. As shown in FIG. 8, the apparatus includes, in addition to all the modules shown in FIG. 7, when the designated exit is a black hole exit. :
丢弃模块82,设置为:将与所述ARP条目对应的所述主机路由的报文和/或由所述ARP条目的上一跳所转发的报文丢弃。 The discarding module 82 is configured to discard the packet routed by the host corresponding to the ARP entry and/or the packet forwarded by the previous hop of the ARP entry.
需要指出的是,ARP条目的上一跳所转发的报文可以为与主机路由连接的子路由向主机路由发送的报文。It should be noted that the packet forwarded by the last hop of the ARP entry may be a packet sent by the sub-route connected to the host route to the host route.
由于有些MAC地址的失效并不是由MAC地址老化而表现的MTC地址删除所造成的,而是在变换用于转发流量的端口时造成的暂时失效,因此,如果直接将主机路由指向黑洞出口的话,那么需要在变换端口后将主机路由黑洞出口转向指定端口。这样的过程十分冗余,同时耽误了流量转发,给用户的使用造成了不好的体验。图9是根据本发明实施例的再一种ARP条目的处理装置的结构图,如图9所示,除图8所示的所有模块外还包括:The failure of some MAC addresses is not caused by the deletion of the MTC address represented by the aging of the MAC address, but the temporary failure caused by changing the port used to forward traffic. Therefore, if the host route is directly directed to the black hole exit, Then you need to transfer the host route blackhole exit to the designated port after changing the port. This process is very redundant, and delays traffic forwarding, causing a bad experience for the user. FIG. 9 is a structural diagram of another apparatus for processing an ARP entry according to an embodiment of the present invention. As shown in FIG. 9, in addition to all the modules shown in FIG. 8, the method further includes:
发送模块92,设置为:向用户侧设备发送ARP保活报文;The sending module 92 is configured to: send an ARP keep-alive message to the user side device;
第二指向模块94,设置为:在没有接收到所述ARP保活报文的响应报文时,将所述ARP条目对应的主机路由的下一跳地址指向所述黑洞出口。The second directional module 94 is configured to: when the response packet of the ARP keep-alive packet is not received, point the next hop address of the host route corresponding to the ARP entry to the black hole exit.
图10是根据本发明实施例的又一种ARP条目的处理装置的结构图,如图10所示,除了图9所示的所有模块中除第二指向模块94之外的模块外,还包括:FIG. 10 is a structural diagram of still another apparatus for processing an ARP entry according to an embodiment of the present invention. As shown in FIG. 10, in addition to the modules other than the second pointing module 94, all of the modules shown in FIG. 9 are included. :
第三指向模块1002,设置为:在接收到所述ARP保活报文的响应报文时,将所述ARP条目对应的主机路由的下一跳地址指向指定端口,其中,所述指定端口为用于实现转发业务流量的端口。The third directional module 1002 is configured to: when receiving the response message of the ARP keepalive message, point the next hop address of the host route corresponding to the ARP entry to the designated port, where the designated port is The port used to implement forwarding traffic.
可选地,当所述MAC地址为被指定端口学习的MAC地址时,所述指定出口为指定端口,其中,所述指定端口为用于实现转发业务流量的端口。Optionally, when the MAC address is a MAC address learned by the designated port, the designated egress is a designated port, where the designated port is a port used to implement forwarding service traffic.
可选地,还可包括:第二指向模块94。Optionally, the second pointing module 94 is further included.
图11是根据本发明实施例的还一种ARP条目的处理装置的结构图,如图11所示,该装置在所述指定出口为学习MAC地址的指定端口时,除图7所示的所有模块外还包括:11 is a structural diagram of a processing apparatus for an ARP entry according to an embodiment of the present invention. As shown in FIG. 11, when the designated egress is a designated port for learning a MAC address, all but the one shown in FIG. Also included outside the module are:
转发模块1102,设置为:在所述第一指向模块76将与所述ARP条目对应的主机路由的下一跳地址指向指定出口之后,将与所述ARP条目对应的所述主机路由的报文和/或由所述ARP条目的上一跳所转发的报文由所述指定端口转发。The forwarding module 1102 is configured to: after the first directional module 76 points the next hop address of the host route corresponding to the ARP entry to the designated egress, the packet routed by the host corresponding to the ARP entry And/or the message forwarded by the last hop of the ARP entry is forwarded by the designated port.
需要说明的是,上述模块可以通过软件或硬件来实现,对于后者,可以 通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述模块以任意组合的形式分别位于不同的处理器中。It should be noted that the above modules can be implemented by software or hardware, and for the latter, This is achieved by, but not limited to, the above modules are all located in the same processor; or the above modules are respectively located in different processors in any combination.
该ARP条目的处理装置可以是与上述ARP条目的处理方法相对应的装置,其中上述方法实施例中所有实现方式均可以适用于该装置的实施例中,也能达到同样的技术效果。The processing device of the ARP entry may be a device corresponding to the processing method of the foregoing ARP entry, and all the implementation manners in the foregoing method embodiments may be applied to the embodiment of the device, and the same technical effect can be achieved.
实施例3Example 3
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:Embodiments of the present invention also provide a storage medium. Optionally, in the embodiment, the foregoing storage medium may be configured to store program code for performing the following steps:
S11,检测MAC地址对应的业务中断信号;S11. Detect a service interruption signal corresponding to the MAC address.
S12,在检测到所述业务中断信号时,获取与所述MAC地址对应的ARP条目;S12. Acquire an ARP entry corresponding to the MAC address when the service interruption signal is detected.
S13,将与所述ARP条目对应的主机路由的下一跳地址指向指定出口。S13. Point the next hop address of the host route corresponding to the ARP entry to the designated exit.
可选地,存储介质还设置为存储用于执行以下步骤的程序代码:Optionally, the storage medium is further arranged to store program code for performing the following steps:
S21,将与所述ARP条目对应的所述主机路由的报文和/或由所述ARP条目的上一跳所转发的报文丢弃。S21. Discard the packet of the host route corresponding to the ARP entry and/or the packet forwarded by the previous hop of the ARP entry.
可选地,存储介质还设置为存储用于执行以下步骤的程序代码:Optionally, the storage medium is further arranged to store program code for performing the following steps:
S31,将与所述ARP条目对应的所述主机路由的报文和/或由所述ARP条目的上一跳所转发的报文由所述指定端口转发。S31. The packet of the host route corresponding to the ARP entry and/or the packet forwarded by the last hop of the ARP entry are forwarded by the designated port.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory. A variety of media that can store program code, such as a disc or a disc.
实施例4Example 4
本发明实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现上述ARP条目的处理方法。The embodiment of the invention further provides a computer readable storage medium storing computer executable instructions, the method for processing the ARP entry being implemented when the computer executable instructions are executed.
显然,本领域的技术人员可以明白,上述的本发明实施例的模块或步骤 可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成不同的集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明实施例不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art can understand the above-mentioned modules or steps of the embodiments of the present invention. It can be implemented by a general-purpose computing device, which can be centralized on a single computing device or distributed over a network of multiple computing devices. Alternatively, they can be implemented by program code executable by the computing device, such that They may be stored in a storage device by a computing device, and in some cases, the steps shown or described may be performed in an order different than that herein, or they may be separately fabricated into different integrated circuit modules. Or by making multiple modules or steps among them into a single integrated circuit module. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如***、设备、装置、器件、处理器等)执行,在执行时,包括方法实施例的步骤之一或其组合。One of ordinary skill in the art will appreciate that all or a portion of the steps of the above-described embodiments can be implemented using a computer program flow, which can be stored in a computer readable storage medium, such as on a corresponding hardware platform (eg, The system, device, device, device, processor, etc. are executed, and when executed, include one or a combination of the steps of the method embodiments.
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。Alternatively, all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
上述实施例中的装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。The devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
上述实施例中的装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。When the device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. The above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
本领域的普通技术人员可以理解,可以对本申请的技术方案进行修改或者等同替换,而不脱离本申请技术方案的精神和范围。本申请的保护范围以权利要求所定义的范围为准。A person skilled in the art can understand that the technical solutions of the present application can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present application. The scope of protection of this application is defined by the scope defined by the claims.
工业实用性Industrial applicability
通过本发明实施例,由于通过将产生中断信号的MAC地址获取ARP条目,并根据该条目对应的主机路由的下一跳指向指定出口,因此,可以解决MAC地址老化时,ARP必须等到MAC地址重新被学习或者ARP老化才能够对流量转发进行处理问题,从而达到了在MAC地址发生变化时就能够及时对流量转发进行处理的效果。 In the embodiment of the present invention, the ARP entry is obtained by the MAC address of the interrupt signal, and the next hop of the host route corresponding to the entry is directed to the designated egress. Therefore, when the MAC address is aged, the ARP must wait until the MAC address is re-established. After learning or ARP aging, the problem of traffic forwarding can be handled, so that the traffic forwarding can be processed in time when the MAC address changes.

Claims (14)

  1. 一种地址解析协议ARP条目的处理方法,包括:A method for processing an address resolution protocol ARP entry includes:
    检测媒体访问控制MAC地址对应的业务中断信号;Detecting a service interruption signal corresponding to the media access control MAC address;
    在检测到所述业务中断信号时,获取与所述MAC地址对应的ARP条目;Obtaining an ARP entry corresponding to the MAC address when the service interruption signal is detected;
    将与所述ARP条目对应的主机路由的下一跳地址指向指定出口。Pointing the next hop address of the host route corresponding to the ARP entry to the designated exit.
  2. 根据权利要求1所述的方法,其中,当所述MAC地址为失效MAC地址时,所述指定出口为黑洞出口,其中,所述黑洞出口为无法转发业务流量的出口。The method of claim 1, wherein when the MAC address is a failed MAC address, the designated exit is a black hole exit, and wherein the black hole exit is an exit that cannot forward traffic.
  3. 根据权利要求2所述的方法,在将所述ARP条目对应的主机路由的下一跳地址指向指定出口之后,所述方法还包括:The method of claim 2, after the next hop address of the host route corresponding to the ARP entry is directed to the designated exit, the method further includes:
    将与所述ARP条目对应的所述主机路由的报文和/或由所述ARP条目的上一跳所转发的报文丢弃。The packet of the host route corresponding to the ARP entry and/or the packet forwarded by the previous hop of the ARP entry are discarded.
  4. 根据权利要求2所述的方法,在将所述ARP条目对应的主机路由的下一跳地址指向所述黑洞出口之前,所述方法还包括:The method of claim 2, before the next hop address of the host route corresponding to the ARP entry is directed to the black hole exit, the method further includes:
    向用户侧设备发送ARP保活报文;Send an ARP keep-alive message to the user-side device.
    在没有接收到所述ARP保活报文的响应报文时,将所述ARP条目对应的主机路由的下一跳地址指向所述黑洞出口。When the response packet of the ARP keepalive packet is not received, the next hop address of the host route corresponding to the ARP entry is directed to the black hole exit.
  5. 根据权利要求4所述的方法,所述方法还包括:The method of claim 4, further comprising:
    在接收到所述ARP保活报文的响应报文时,将所述ARP条目对应的主机路由的下一跳地址指向指定端口,其中,所述指定端口为用于实现转发业务流量的端口。When the response packet of the ARP keepalive packet is received, the next hop address of the host route corresponding to the ARP entry is directed to the designated port, where the designated port is a port for implementing forwarding service traffic.
  6. 根据权利要求1所述的方法,其中,当所述MAC地址为被指定端口学习的MAC地址时,所述指定出口为指定端口,其中,所述指定端口为用于实现转发业务流量的端口。The method of claim 1, wherein the designated outlet is a designated port when the MAC address is a MAC address learned by the designated port, wherein the designated port is a port for implementing forwarding service traffic.
  7. 根据权利要求6所述的方法,在将所述ARP条目对应的主机路由的下一跳地址指向指定出口之后,所述方法还包括:The method of claim 6, after the next hop address of the host route corresponding to the ARP entry is directed to the designated exit, the method further includes:
    将与所述ARP条目对应的所述主机路由的报文和/或由所述ARP条目的上一跳所转发的报文由所述指定端口转发。 The packet routed by the host corresponding to the ARP entry and/or the message forwarded by the last hop of the ARP entry is forwarded by the designated port.
  8. 一种地址解析协议ARP条目的处理装置,包括:An apparatus for processing an address resolution protocol ARP entry includes:
    检测模块,设置为:检测媒体访问控制MAC地址对应的业务中断信号;The detecting module is configured to: detect a service interruption signal corresponding to the media access control MAC address;
    获取模块,设置为:在检测到所述业务中断信号时,获取与所述MAC地址对应的ARP条目;An acquiring module, configured to: when detecting the service interruption signal, acquire an ARP entry corresponding to the MAC address;
    第一指向模块,设置为:将与所述ARP条目对应的主机路由的下一跳地址指向指定出口。The first pointing module is configured to: point the next hop address of the host route corresponding to the ARP entry to the designated exit.
  9. 根据权利要求8所述的装置,其中,当所述MAC地址为失效MAC地址时,所述指定出口为黑洞出口,其中,所述黑洞出口为无法转发业务流量的出口。The apparatus according to claim 8, wherein when the MAC address is a failed MAC address, the designated exit is a black hole exit, and wherein the black hole exit is an exit that cannot forward traffic.
  10. 根据权利要求8所述的装置,所述装置还包括:The apparatus of claim 8 further comprising:
    丢弃模块,设置为:将与所述ARP条目对应的所述主机路由的报文和/或由所述ARP条目的上一跳所转发的报文丢弃。The discarding module is configured to: discard the packet routed by the host corresponding to the ARP entry and/or the packet forwarded by the last hop of the ARP entry.
  11. 根据权利要求9所述的装置,所述装置还包括:The apparatus of claim 9 further comprising:
    发送模块,设置为:向用户侧设备发送ARP保活报文;The sending module is configured to: send an ARP keep-alive message to the user side device;
    第二指向模块,设置为:在没有接收到所述ARP保活报文的响应报文时,将所述ARP条目对应的主机路由的下一跳地址指向所述黑洞出口。The second directional module is configured to: when the response packet of the ARP keep-alive packet is not received, point the next hop address of the host route corresponding to the ARP entry to the black hole exit.
  12. 根据权利要求9所述的装置,所述装置还包括:The apparatus of claim 9 further comprising:
    第三指向模块,设置为:在接收到所述ARP保活报文的响应报文时,将所述ARP条目对应的主机路由的下一跳地址指向指定端口,其中,所述指定端口为用于实现转发业务流量的端口。The third directional module is configured to: when receiving the response message of the ARP keepalive message, point the next hop address of the host route corresponding to the ARP entry to the designated port, where the designated port is used The port that implements forwarding traffic.
  13. 根据权利要求8所述的装置,其中,当所述MAC地址为被指定端口学习的MAC地址时,所述指定出口为指定端口,其中,所述指定端口为用于实现转发业务流量的端口。The device according to claim 8, wherein the designated outlet is a designated port when the MAC address is a MAC address learned by the designated port, wherein the designated port is a port for implementing forwarding service traffic.
  14. 根据权利要求13所述的装置,所述装置还包括:The apparatus of claim 13 further comprising:
    转发模块,设置为:在所述第一指向模块将与所述ARP条目对应的主机路由的下一跳地址指向指定出口之后,将与所述ARP条目对应的所述主机路由的报文和/或由所述ARP条目的上一跳所转发的报文由所述指定端口转发。 a forwarding module, configured to: after the first directional module directs the next hop address of the host route corresponding to the ARP entry to the designated egress, the packet routed by the host corresponding to the ARP entry Or the message forwarded by the last hop of the ARP entry is forwarded by the designated port.
PCT/CN2017/087584 2016-06-21 2017-06-08 Arp entry processing method and apparatus WO2017219868A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610451566.5A CN107528929B (en) 2016-06-21 2016-06-21 ARP (Address resolution protocol) entry processing method and device
CN201610451566.5 2016-06-21

Publications (1)

Publication Number Publication Date
WO2017219868A1 true WO2017219868A1 (en) 2017-12-28

Family

ID=60734998

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/087584 WO2017219868A1 (en) 2016-06-21 2017-06-08 Arp entry processing method and apparatus

Country Status (2)

Country Link
CN (1) CN107528929B (en)
WO (1) WO2017219868A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111224876A (en) * 2018-11-23 2020-06-02 中兴通讯股份有限公司 Message processing method and device
CN113286012A (en) * 2021-05-17 2021-08-20 新华三技术有限公司 ARP (Address resolution protocol) table item maintenance method and device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113923150B (en) * 2021-09-30 2023-08-25 新华三信息安全技术有限公司 Route updating method, device, electronic equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1992672A (en) * 2005-12-27 2007-07-04 中兴通讯股份有限公司 Method for preventing network interruption caused by address aging and time inconformity
CN101114989A (en) * 2006-07-28 2008-01-30 中兴通讯股份有限公司 Method for processing three-layer ethernet switchboard direct connection host computer routing
CN102045200A (en) * 2010-12-24 2011-05-04 武汉烽火网络有限责任公司 Conditional synchronization method for MAC address table entry of distributed switch
WO2012034408A1 (en) * 2010-09-17 2012-03-22 中兴通讯股份有限公司 Method and system for processing media access control address aging
CN102821169A (en) * 2012-08-10 2012-12-12 华为技术有限公司 Method and network device for creating MAC (multi-access computer) address table items in network

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7567573B2 (en) * 2004-09-07 2009-07-28 F5 Networks, Inc. Method for automatic traffic interception
CN100452772C (en) * 2006-05-31 2009-01-14 杭州华三通信技术有限公司 Three-layer forwarding method, device and ARP information table updating method
JP4747118B2 (en) * 2007-03-05 2011-08-17 富士通株式会社 Router, communication guarantee method and communication guarantee program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1992672A (en) * 2005-12-27 2007-07-04 中兴通讯股份有限公司 Method for preventing network interruption caused by address aging and time inconformity
CN101114989A (en) * 2006-07-28 2008-01-30 中兴通讯股份有限公司 Method for processing three-layer ethernet switchboard direct connection host computer routing
WO2012034408A1 (en) * 2010-09-17 2012-03-22 中兴通讯股份有限公司 Method and system for processing media access control address aging
CN102045200A (en) * 2010-12-24 2011-05-04 武汉烽火网络有限责任公司 Conditional synchronization method for MAC address table entry of distributed switch
CN102821169A (en) * 2012-08-10 2012-12-12 华为技术有限公司 Method and network device for creating MAC (multi-access computer) address table items in network

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111224876A (en) * 2018-11-23 2020-06-02 中兴通讯股份有限公司 Message processing method and device
CN111224876B (en) * 2018-11-23 2022-04-29 中兴通讯股份有限公司 Message processing method and device
CN113286012A (en) * 2021-05-17 2021-08-20 新华三技术有限公司 ARP (Address resolution protocol) table item maintenance method and device

Also Published As

Publication number Publication date
CN107528929A (en) 2017-12-29
CN107528929B (en) 2021-05-14

Similar Documents

Publication Publication Date Title
US11316858B2 (en) Fast heartbeat liveness between packet processing engines using media access control security (MACsec) communication
US10448246B2 (en) Network re-convergence point
US9608903B2 (en) Systems and methods for recovery from network changes
EP3110086B1 (en) System and method for detecting network neighbor reachability
CN107547510B (en) Neighbor discovery protocol security table item processing method and device
WO2009009977A1 (en) Master backup switch method for route device and backup system for route device
EP2586163A1 (en) Notifying a controller of a change to a packet forwarding configuration of a network element over a communication channel
WO2016086713A1 (en) Equal-cost multi-path outbound interface update method and apparatus
JP7430224B2 (en) Packet processing methods and gateway devices
WO2017219868A1 (en) Arp entry processing method and apparatus
WO2017157318A1 (en) Link discovery method and apparatus
EP3528438B1 (en) Packet forwarding
WO2017050199A1 (en) Network loop detection method and controller
EP2775663B1 (en) Method and device for recovering customer service
CN108289044B (en) Data forwarding method, link state method for determining static route and network equipment
US11902380B1 (en) Liveness detection for an authenticated client session
US10063675B2 (en) Performing duplicate address detection for an integrated routing and bridging device
WO2019196853A1 (en) Tcp acceleration method and apparatus
WO2022089212A1 (en) Fault handling method and device
US20170070473A1 (en) A switching fabric including a virtual switch
WO2020135666A1 (en) Message processing method and device, and computer storage medium
WO2017054535A1 (en) Traffic forwarding method and apparatus
WO2015117465A1 (en) Fdb updating method, device, node, and system in ring network
US8891509B2 (en) Proxy networking device for a router
WO2018024189A1 (en) Loopback detection method and apparatus

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: 17814606

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17814606

Country of ref document: EP

Kind code of ref document: A1