WO2016177211A1 - 地址解析协议arp表项的同步方法及装置 - Google Patents

地址解析协议arp表项的同步方法及装置 Download PDF

Info

Publication number
WO2016177211A1
WO2016177211A1 PCT/CN2016/077747 CN2016077747W WO2016177211A1 WO 2016177211 A1 WO2016177211 A1 WO 2016177211A1 CN 2016077747 W CN2016077747 W CN 2016077747W WO 2016177211 A1 WO2016177211 A1 WO 2016177211A1
Authority
WO
WIPO (PCT)
Prior art keywords
arp
packet
real
time synchronization
transit
Prior art date
Application number
PCT/CN2016/077747
Other languages
English (en)
French (fr)
Inventor
何伟良
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016177211A1 publication Critical patent/WO2016177211A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/48Message addressing, e.g. address format or anonymous messages, aliases
    • 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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/40Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass for recovering from a failure of a protocol instance or entity, e.g. service redundancy protocols, protocol state redundancy or protocol service redirection

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and an apparatus for synchronizing an address resolution protocol ARP entry.
  • ARP Address Resolution Protocol
  • the existing ARP entry information synchronization is not carried in the Virtual Router Redundancy Protocol (VRRP) backup group, which is implemented by the network management system. Real-time synchronization of items.
  • VRRP Virtual Router Redundancy Protocol
  • the invention provides a method and a device for synchronizing an ARP entry of an address resolution protocol, so as to solve at least the problem that ARP entries between devices in a cluster deployment network cannot be synchronized in real time.
  • a method for synchronizing an address resolution protocol ARP entry including:
  • the initiating device receives the packet of the ARP entry, and determines that the packet of the ARP entry is modified to obtain the first ARP real-time synchronization packet, and the content of the modified packet includes at least one of the following: an ARP table.
  • the group ID of the group the ARP entry type, the ARP entry type, the original ARP entry, the timeout period of the ARP entry, and the interface corresponding to the ARP entry.
  • the initiating device sends the first ARP real-time synchronization packet to the transit device, where the transit device performs the packet modification on the first ARP real-time synchronization packet to obtain a second ARP real-time synchronization packet.
  • the relay device sends the second ARP real-time synchronization packet to the other initiating device or another transit device, and the initiating device or the transit device performs the packet on the second ARP real-time synchronization packet. Analytical processing.
  • determining to modify the packet of the ARP entry to obtain the first ARP real-time synchronization message includes:
  • the device before the initiating device receives the packet of the ARP entry, the device includes:
  • the initiating device sends a registration request message to the primary relay device;
  • the initiating device receives the registration response message of the primary transit device, the initiating device and the primary transit device establish a link successfully, and the initiating device and the primary transit device send a heartbeat message to each other;
  • the initiating device If the initiating device does not receive the registration response message of the primary transit device in the case that the initiating device sends the registration request message to the primary relay device, the initiating device sends the registration response message to the primary transit device. Transmitting, by the relay device, the registration request message;
  • the initiating device sends the registration request message to the standby device in a preset number of times, if the initiating device does not receive the registration response message of the standby device, the initiating device re-directs The primary relay device sends the registration request message.
  • the method includes:
  • the initiating device turns to interact with the standby device
  • the initiating device resends the first ARP real-time synchronization message to the primary relay device or the standby relay device;
  • the primary transit device or the standby transit device synchronizes the first ARP real-time synchronization packet to the initiating device.
  • a method for synchronizing an address resolution protocol ARP entry including:
  • the transit device receives the first ARP real-time synchronization packet sent by the initiating device, where the first ARP real-time synchronization packet is a packet obtained by modifying the packet of the ARP entry received by the initiating device, and the packet is modified.
  • the packet modification includes at least one of the following: the group ID of the ARP entry, the ARP entry type, the ARP entry operation type, the original ARP entry, the ARP entry timeout time, and the ARP entry. Corresponding interface;
  • the transit device performs the packet modification on the first ARP real-time synchronization packet to obtain a second ARP real-time synchronization packet, and the transit device sends the second ARP real-time synchronization packet to another initiating device or The other relay device notifies the initiating device or the transit device to perform the packet parsing process on the second ARP real-time synchronization packet.
  • the transit device performs the packet modification on the first ARP real-time synchronization packet to obtain the second ARP real-time synchronization packet, including:
  • a synchronization device for an address resolution protocol ARP entry including:
  • the first receiving module is configured to send the packet that the device receives the ARP entry.
  • the first modification module is configured to determine that the packet of the ARP entry is modified to obtain the first ARP real-time synchronization packet, where the content of the modified packet includes at least one of the following: the group to which the ARP entry belongs. Group ID, ARP entry type, ARP entry operation type, original ARP entry, ARP entry timeout, and interface corresponding to the ARP entry.
  • the first forwarding module is configured to send, by the initiating device, the first ARP real-time synchronization packet to the transit device, where the transit device performs the packet modification on the first ARP real-time synchronization packet to obtain a second
  • the ARP real-time synchronization message the transit device sends the second ARP real-time synchronization message to another initiating device or another relay device, and notifies the initiating device or the transit device to synchronize the second ARP in real time.
  • the message performs the message parsing process.
  • the first modifying module includes:
  • the first address resetting unit is configured to reset the target IP field in the packet of the ARP entry to an IP address local to the initiating device.
  • the device further includes:
  • a chain-building module configured to send a registration request message to the primary relay device, where the intermediate device includes a primary transit device and a standby transfer device;
  • the initiating device receives the registration response message of the primary transit device, the initiating device and the primary transit device establish a link successfully, and the initiating device and the primary transit device send a heartbeat message to each other;
  • the initiating device If the initiating device does not receive the registration response message of the primary transit device in the case that the initiating device sends the registration request message to the primary relay device, the initiating device sends the registration response message to the primary transit device. Transmitting, by the relay device, the registration request message;
  • the initiating device sends the registration request message to the standby device in a preset number of times, if the initiating device does not receive the registration response message of the standby device, the initiating device re-directs The primary relay device sends the registration request message.
  • the device further includes:
  • a heartbeat module configured to: if it is determined that the heartbeat message caused by the primary transit device is abnormal, the initiating device turns to interact with the standby transfer device;
  • the initiating device resends the first ARP real-time synchronization message to the primary relay device or the standby relay device;
  • the primary transit device or the standby transit device synchronizes the first ARP real-time synchronization packet to the initiating device.
  • a synchronization device for an address resolution protocol ARP entry including:
  • a second receiving module configured to receive, by the transit device, a first ARP real-time synchronization message sent by the initiating device, where
  • the first ARP real-time synchronization packet is a packet obtained by modifying the packet of the ARP entry received by the initiating device, and the content of the packet modified includes at least one of the following: the group to which the ARP entry belongs. Group ID, ARP entry type, ARP entry operation type, original ARP entry, ARP entry timeout, and interface corresponding to the ARP entry.
  • a second modification module configured to: the transit device performs the packet modification on the first ARP real-time synchronization packet to obtain a second ARP real-time synchronization packet;
  • the second forwarding module is configured to send the second ARP real-time synchronization packet to the other initiating device or another transit device, and notify the initiating device or the transit device to perform real-time on the second ARP
  • the synchronization packet performs the packet parsing process.
  • the second modification module includes:
  • the second address reset unit is configured to reset the target IP field in the first ARP real-time synchronization message to an IP address local to the transit device.
  • the initiating device receives the packet of the ARP entry, and determines that the packet of the ARP entry is modified to obtain the first ARP real-time synchronization packet, and the content of the modified packet includes at least one of the following:
  • the ARP entry belongs to the group ID, the ARP entry type, the ARP entry operation type, the original ARP entry, the ARP entry timeout interval, and the ARP entry.
  • the initiator sends the first ARP real-time. Synchronizing the message to the transit device, wherein the transit device performs the packet modification on the first ARP real-time synchronization packet to obtain the second ARP real-time synchronization packet, and the transit device sends the second ARP real-time synchronization packet to the other device.
  • the initiating device or the other transit device notifies the initiating device or the transit device to perform the packet parsing process on the second ARP real-time synchronization packet, which solves the problem that the ARP entries between the devices in the cluster deployment network cannot be synchronized in real time.
  • Real-time synchronization of ARP entries between devices in a cluster deployment network is implemented.
  • FIG. 1 is a flowchart 1 of a method for synchronizing an address resolution protocol ARP entry according to an embodiment of the present invention
  • FIG. 2 is a second flowchart of a method for synchronizing an address resolution protocol ARP entry according to an embodiment of the present invention
  • FIG. 3 is a structural block diagram 1 of a synchronization device for an address resolution protocol ARP entry according to an embodiment of the present invention
  • FIG. 4 is a structural block diagram 2 of a synchronization device for an address resolution protocol ARP entry according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of a cluster networking according to a preferred embodiment of the present invention.
  • FIG. 6 is a flow chart showing normal real-time synchronization in accordance with a preferred embodiment of the present invention.
  • FIG. 7 is a flow chart showing an abnormality recovery according to a preferred embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of an ARP-client and an ARP-server module according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of a two-cluster networking according to a preferred embodiment of the present invention.
  • FIG. 1 is a flowchart 1 of a method for synchronizing an ARP entry of an address resolution protocol according to an embodiment of the present invention. The process includes the following steps:
  • Step S102 The initiating device receives the packet of the ARP entry, and determines that the packet of the ARP entry is modified to obtain the first ARP real-time synchronization packet, and the content of the modified packet includes at least one of the following: ARP The group ID of the ARP entry, the ARP entry type, the ARP entry type, the original ARP entry, the timeout period of the ARP entry, and the interface corresponding to the ARP entry.
  • Step S104 The initiating device sends the first ARP real-time synchronization message to the transit device, where the transit device performs the packet modification on the first ARP real-time synchronization packet to obtain a second ARP real-time synchronization packet, and the transit device
  • the second ARP real-time synchronization packet is sent to another initiating device or another transit device, and the initiating device or the transit device performs the packet parsing process on the second ARP real-time synchronization packet.
  • the initiating device receives the packet of the ARP entry, and determines that the packet of the ARP entry is modified to obtain the first ARP real-time synchronization packet, and the transit device synchronizes the first ARP real-time synchronization report.
  • the message is modified to obtain a second ARP real-time synchronization message, and the transit device sends the second ARP real-time synchronization message to another initiating device or another transit device, and notifies the initiating device or the
  • the transit device performs the packet parsing process on the second ARP real-time synchronization packet, and solves the problem that the ARP entries of the device in the cluster deployment network cannot be synchronized in real time, and the ARP entries between the devices in the cluster deployment network are implemented. Real-time synchronization.
  • determining that the packet of the ARP entry is modified to obtain the first ARP real-time synchronization message includes:
  • the target IP field in the packet of the ARP entry is reset to the IP address local to the initiating device.
  • the initiating device sends a registration request message to the main relay device, where the transit device includes a primary transit device and a standby transfer device;
  • the initiating device receives the registration response message of the primary transit device, the initiating device and the primary transit device establish a successful link, and the initiating device and the primary transit device send a heartbeat message to each other;
  • the initiating device If the initiating device does not receive the registration response message of the primary transit device in the case that the initiating device sends the registration request message to the primary relay device, the initiating device sends the registration response message to the standby device. Registration request message;
  • the initiating device sends the registration request message to the standby device in a preset number of times, the device does not receive the registration request message. In the case of the registration response message of the standby device, the initiating device resends the registration request message to the primary relay device.
  • the initiating device turns to interact with the standby device if the heartbeat packet caused by the primary transit device is abnormal.
  • the device detects whether the primary transit device and the standby transfer device are restored. In the case that the primary transit device or the standby transfer device is restored, the initiation is initiated. The device resends the first ARP real-time synchronization message to the primary transit device or the standby transit device;
  • the primary transit device or the standby transit device synchronizes the first ARP real-time synchronization packet to the initiating device.
  • FIG. 2 is a flowchart 2 of a method for synchronizing an ARP entry of an address resolution protocol according to an embodiment of the present invention. The process includes the following steps:
  • the transit device receives the first ARP real-time synchronization packet sent by the initiating device, where the first ARP real-time synchronization packet is a packet obtained by modifying the packet of the ARP entry received by the initiating device, and the packet is modified.
  • the packet modification includes at least one of the following: the group ID of the ARP entry, the ARP entry type, the ARP entry operation type, the original ARP entry, the ARP entry timeout time, and the ARP entry. Corresponding interface;
  • Step S204 The transit device performs the packet modification on the first ARP real-time synchronization packet to obtain a second ARP real-time synchronization packet, and the transit device sends the second ARP real-time synchronization packet to another initiating device or other
  • the relay device notifies the initiating device or the transit device to perform the packet processing on the second ARP real-time synchronization packet.
  • the transit device receives the first ARP real-time synchronization packet sent by the initiating device, and the transit device performs the packet modification on the first ARP real-time synchronization packet to obtain the second ARP real-time synchronization packet, and the transit device
  • the second ARP real-time synchronization packet is sent to the other initiating device or other transit device, and the initiating device or the transit device is configured to perform the packet parsing process on the second ARP real-time synchronization packet, thereby solving the cluster deployment network.
  • the ARP entries of the device cannot be synchronized in real time.
  • the real-time synchronization of ARP entries between devices in the cluster deployment network is implemented.
  • the transit device performs the packet modification on the first ARP real-time synchronization packet to obtain the second ARP real-time synchronization packet, including:
  • the target IP field in the first ARP real-time synchronization message is reset to the IP address local to the transit device.
  • a synchronization device for an address resolution protocol ARP entry is provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and details are not described herein.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 3 is a structural block diagram 1 of a synchronization apparatus for an address resolution protocol ARP entry according to an embodiment of the present invention. As shown in FIG. 3, the apparatus includes
  • the first receiving module 32 is configured to send a packet that the device receives the ARP entry.
  • the first modification module 34 is configured to determine that the packet of the ARP entry is modified to obtain the first ARP real-time synchronization packet, and the content of the modified packet includes at least one of the following: the group to which the ARP entry belongs. ID, ARP entry type, ARP entry operation type, original ARP entry, ARP entry timeout, and interface corresponding to the ARP entry.
  • the first forwarding module 36 is configured to send the first ARP real-time synchronization packet to the transit device, where the transit device performs the packet modification on the first ARP real-time synchronization packet to obtain a second ARP real-time synchronization report.
  • the transit device sends the second ARP real-time synchronization packet to the other initiating device or the other transit device, and notifies the initiating device or the transit device to perform the packet parsing process on the second ARP real-time synchronization packet.
  • the initiating device receives the packet of the ARP entry, and determines that the packet of the ARP entry is modified to obtain the first ARP real-time synchronization packet, and the transit device synchronizes the first ARP real-time synchronization report.
  • the message is modified to obtain a second ARP real-time synchronization message, and the transit device sends the second ARP real-time synchronization message to another initiating device or another transit device, and notifies the initiating device or the
  • the transit device performs the packet parsing process on the second ARP real-time synchronization packet, and solves the problem that the ARP entries of the device in the cluster deployment network cannot be synchronized in real time, and the ARP entries between the devices in the cluster deployment network are implemented. Real-time synchronization.
  • the first modification module 34 includes:
  • the first address resetting unit is configured to reset the target IP field in the packet of the ARP entry to the IP address local to the initiating device.
  • the device further includes:
  • a chain-building module configured to send a registration request message to the primary relay device when the transit device includes a primary transit device and a standby transit device;
  • the initiating device receives the registration response message of the primary transit device, the initiating device and the primary transit device establish a successful link, and the initiating device and the primary transit device send a heartbeat message to each other;
  • the initiating device If the initiating device does not receive the registration response message of the primary transit device in the case that the initiating device sends the registration request message to the primary relay device, the initiating device sends the registration response message to the standby device. Registration request message;
  • the initiating device sends the registration request message to the standby device in a preset number of times, if the device does not receive the registration response message of the standby device, the initiating device resends the device to the primary relay device.
  • the registration request message If the initiating device sends the registration request message to the standby device in a preset number of times, if the device does not receive the registration response message of the standby device, the initiating device resends the device to the primary relay device. The registration request message.
  • the device further includes:
  • the heartbeat module is configured to: if it is determined that the heartbeat message caused by the primary transit device is abnormal, the initiating device turns to interact with the standby transfer device;
  • the device detects whether the primary transit device and the standby transfer device are restored. In the case that the primary transit device or the standby transfer device is restored, the initiation is initiated. The device resends the first ARP real-time synchronization message to the primary transit device or the standby transit device;
  • the primary transit device or the standby transit device synchronizes the first ARP real-time synchronization packet to the initiating device.
  • FIG. 4 is a structural block diagram 2 of a device for synchronizing an address resolution protocol ARP entry according to an embodiment of the present invention. As shown in FIG. 4, the method includes:
  • the second receiving module 42 is configured to receive, by the transit device, the first ARP real-time synchronization packet sent by the initiating device, where the first ARP real-time synchronization packet is a packet of the ARP entry received by the initiating device, and the packet is modified.
  • the content of the packet modified includes at least one of the following: the group ID of the ARP entry, the ARP entry type, the ARP entry operation type, the original attribution of the ARP entry, and the ARP entry timeout. Time, the interface corresponding to the ARP entry.
  • the second modification module 44 is configured to: the transit device performs the packet modification on the first ARP real-time synchronization packet to obtain a second ARP real-time synchronization packet;
  • the second forwarding module 46 is configured to send the second ARP real-time synchronization packet to the other initiating device or another transit device, and notify the initiating device or the transit device to perform the second ARP real-time synchronization packet.
  • the message is parsed.
  • the transit device receives the first ARP real-time synchronization packet sent by the initiating device, and the transit device performs the packet modification on the first ARP real-time synchronization packet to obtain a second ARP real-time synchronization packet, where the transit device
  • the second ARP real-time synchronization packet is sent to the other initiating device or other transit device, and the initiating device or the transit device is configured to perform the packet parsing process on the second ARP real-time synchronization packet, thereby solving the cluster deployment network.
  • the ARP entries of the device cannot be synchronized in real time.
  • the real-time synchronization of ARP entries between devices in the cluster deployment network is implemented.
  • the second address reset unit is configured to reset the target IP field in the first ARP real-time synchronization message to an IP address local to the transit device.
  • the preferred embodiment of the present invention provides a method for dynamically adding, updating, and deleting ARP entries in a cluster, and then modifying and reconstructing ARP packet fields after the device adds, updates, and deletes ARP entries.
  • the ARP relay device is used to notify the other cluster devices.
  • the ARP transit device also has the function of notifying the ARP entries created by the local device to other devices.
  • the ARP transit device uses dual-node redundancy to improve the reliability.
  • the heartbeat-sensing peer state is used between the transit device and the transit device for disaster recovery.
  • the preferred embodiment defines a type 2 device according to the functional characteristics: an ARP entry operation initiating device and an ARP entry operation forwarding device, and the ARP entry operation forwarding device also has the function that the ARP entry operation initiating device should have.
  • the ARP-client (ARP entry operation initiating device) and the ARP-server (ARP entry operation forwarding device), and the ARP entry operation initiating device are equivalent to the initiating device of the above embodiment, and the ARP table.
  • the item operation relay device is equivalent to the relay device of the above embodiment.
  • the original ARP packet field is modified as follows to meet the requirements for real-time synchronization of adding, updating, and deleting ARP entry information:
  • an ARP entry operation initiation module and an ARP entry operation relay module.
  • the device that enables the ARP entry-initiating module becomes the ARP-initiated device (ARP-client).
  • the ARP-enabled device is the ARP-server. The two devices cannot be enabled at the same time.
  • FIG. 5 is a schematic diagram of a cluster networking according to a preferred embodiment of the present invention. As shown in FIG. 5, the basic settings include:
  • the three basic working modules include: a chain-building maintenance heartbeat module, a real-time synchronization module, and an abnormality protection module, wherein the real-time synchronization module is equivalent to the first modification module 34, the second modification module 44, and the first forwarding of the foregoing embodiment.
  • the module 36, and the second forwarding module 46; the chain-building maintenance heartbeat module and the abnormality protection module are equivalent to the chain-building module and the heartbeat module of the above embodiment.
  • the workflow for registering and maintaining a heartbeat module includes:
  • the ARP-client sends a registration request message to the primary ARP-server.
  • the ARP-client receives the registration response packet of the primary ARP-server, it returns a registration confirmation packet, and the link is successfully established, and the mutual heartbeat message is started.
  • the ARP-client fails to respond to the primary ARP-server for three consecutive requests, it sends a registration request to the standby ARP-server. If the registration is successful, the heartbeat is generated.
  • the ARP-client does not receive the response from the standby ARP-server for three consecutive requests, it will resend the registration request to the primary ARP-server, so that the detection is performed between the active and standby ARP-servers until the registration is successful.
  • active backup ARP-server that is, redundant backup
  • pressure sharing method include:
  • the system has two ARP-servers, assuming ARP-server1 and ARP-server2, if the ARP-server is set to ARP-client, half of the primary ARP-servers set by ARP-client are ARP-server1. The ARP-server set by the other half of the ARP-client is ARP-server2. At the beginning, the redundancy is shared. If one of the ARP-servers is abnormal, all the pressures are assumed by the normal ARP-server. Step 5) After ensuring that the abnormal ARP-server returns to normal, the corresponding client can switch back.
  • FIG. 7 is a schematic flowchart of abnormality recovery according to a preferred embodiment of the present invention.
  • the abnormality protection module workflow includes:
  • the ARP-client will switch to the standby ARP-server and continuously detect whether the active ARP-server is restored.
  • the ARP-client is abnormal and is restored.
  • the ARP-server synchronizes all ARP entries to the ARP-client.
  • FIG. 8 is a schematic structural diagram of an ARP-client and an ARP-server module according to an embodiment of the present invention. As shown in FIG. 8, the method includes:
  • the ARP-client and the ARP-server periodically send heartbeat message maintenance relationships.
  • the key idea of the module is to add the ARP entry type, the ARP entry timeout time, the original ARP entry, and the ARP entry operation type (add, update, and delete). ) Information such as the interface corresponding to the ARP entry.
  • ARP entry synchronization cluster group ID A group number assigned to the interface to be synchronized with the ARP entry.
  • the device sends the ARP entry to the cluster group ID. The same interface.
  • the opcode field of the ARP packet is transformed into three fields: the ARP entry synchronization group ID, the ARP entry type, and the ARP entry operation type. Assuming that the opcode field is A1A2A3A4, A1A2 is the ARP table synchronization group ID, A3 is the ARP entry type, and A4 is the ARP entry operator. The operator corresponding to the addition, update, and delete corresponds to different values.
  • the Target MAC field of the ARP packet is reserved for the upper 3 characters to carry the field to be expanded.
  • the lower 5 characters are the remaining time of the ARP entry timeout.
  • the device sends ARP real-time synchronization update packets to notify other devices to update ARP entries. After receiving the update packet, the device adds an entry if it does not have an ARP entry.
  • the abnormal protection mechanism is established on the heartbeat mechanism.
  • the heartbeat senses whether the state of other devices is normal, and adopts a protection switching action after the abnormality occurs.
  • the specific implementation is as follows:
  • ARP-clinet determines that the primary ARP-server is abnormal, triggering the switchover and interacting with the standby ARP-server.
  • ARP-client determines that the ARP-server is abnormal, and then continuously detects the ARP-server recovery. After re-recovering the interaction, the ARP-clinet sends an ARP real-time packet to each non-synchronous ARP entry. ARP-server.
  • ARP-client is abnormal. After the interaction with the ARP-server is restored, the ARP-server sends all ARP entries to the ARP-client one by one.
  • the module can also be implemented by a linkage method.
  • the module can be linked with the existing and publicly shared (not involved in infringement) interaction mechanism, for example, with VRRP, LDP, etc., through the peer. VRRP and LDP status to determine the status of the peer device.
  • the real-time synchronization module is mainly for reducing the connection of the cluster network by using the second-layer device.
  • Each device in the cluster network communicates with the Layer 2 switching device to form a "star" network. In this case, only one interface needs to interact with the Layer 2 device.
  • the synchronized device only processes the packets whose destination IP address is the ARP-server ip address in the real-time synchronization packet.
  • Embodiments of the present invention also provide a storage medium.
  • the storage medium may be configured to store program code for performing the method steps of the above 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.
  • 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 processor performs the method steps of the foregoing embodiments according to the stored program code in the storage medium.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the initiating device receives the packet of the ARP entry, and determines that the packet of the ARP entry is modified to obtain the first ARP real-time synchronization packet, and the packet modified by the packet is modified.
  • the content includes at least one of the following: the group identity ID of the ARP entry, the ARP entry type, the ARP entry operation type, the original attribution of the ARP entry, the timeout period of the ARP entry, and the interface corresponding to the ARP entry.
  • the device sends the first ARP real-time synchronization message to the transit device, where the transit device performs the modification of the packet to obtain the second ARP real-time synchronization packet, and the transit device replaces the second ARP.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明提供了一种地址解析协议ARP表项的同步方法及装置,其中,该方法包括:发起设备接收ARP表项的报文,确定对该ARP表项的报文进行报文修改得到第一ARP实时同步报文,该发起设备发送该第一ARP实时同步报文给中转设备,其中,该中转设备对该第一ARP实时同步报文进行该报文修改得到第二ARP实时同步报文,该中转设备将该第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知该发起设备或者该中转设备对该第二ARP实时同步报文进行该报文解析处理,解决了集群部署组网中设备间ARP表项不能实时同步问题,实现了集群部署组网中设备间ARP表项的实时同步。

Description

地址解析协议ARP表项的同步方法及装置 技术领域
本发明涉及通信领域,具体而言,涉及一种地址解析协议ARP表项的同步方法及装置。
背景技术
在大数据时代背景下,通过集群部署设备来提高带宽的组网越来越多,为了提高流量切换速率,提高集群系统可靠性,稳定性,需要集群设备间共享地址解析协议(Address Resolution Protocol,简称为ARP)表项,实时做好备份工作。
在相关技术中,已有的ARP表项信息同步不是承载在虚拟路由冗余协议(Virtual Router Redundancy Protocol,简称为VRRP)备份组,就是通过网管来实现,存在集群部署组网中设备间ARP表项的实时同步问题。
针对相关技术中,集群部署组网中设备间ARP表项不能实时同步问题,目前还没有有效的解决技术方案。
发明内容
本发明提供了一种地址解析协议ARP表项的同步方法及装置,以至少解决相关技术中集群部署组网中设备间ARP表项不能实时同步的问题。
根据本发明的一个实施例,提供了一种地址解析协议ARP表项的同步方法,包括:
发起设备接收ARP表项的报文,确定对所述ARP表项的报文进行报文修改得到第一ARP实时同步报文,所述报文修改的报文内容包括以下至少之一:ARP表项所属群组身份标识ID,ARP表项类型,ARP表项操作类型,ARP表项的原始归属,ARP表项超时时间,ARP表项对应的接口;
所述发起设备发送所述第一ARP实时同步报文给中转设备,其中,所述中转设备对所述第一ARP实时同步报文进行所述报文修改得到第二ARP实时同步报文,所述中转设备将所述第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知所述发起设备或者所述中转设备对所述第二ARP实时同步报文进行所述报文解析处理。
在本发明的实施例中,确定对所述ARP表项的报文进行报文修改得到第一ARP实时同步报文包括:
将所述ARP表项的报文中的目标IP字段重置为所述发起设备本地的IP地址。
在本发明的实施例中,发起设备接收ARP表项的报文之前,包括:
在所述中转设备包括主中转设备和备中转设备的情况下,所述发起设备向所述主中转设备发送注册请求报文;
若所述发起设备接收所述主中转设备的注册响应报文的情况下,所述发起设备和所述主中转设备建链成功,所述发起设备和所述主中转设备互发心跳报文;
若所述发起设备在预设的次数向所述主中转设备发送所述注册请求报文的情况下,没有接收到所述主中转设备的注册响应报文的情况下,所述发起设备向所述备中转设备发送所述注册请求报文;
若所述发起设备在预设的次数向所述备中转设备发送所述注册请求报文的情况下,没有接收到所述备中转设备的注册响应报文的情况下,所述发起设备重新向所述主中转设备发送所述注册请求报文。
在本发明的实施例中,所述发起设备发送所述第一ARP实时同步报文给中转设备之后,在所述心跳报文异常的情况下,所述方法包括:
若确定所述主中转设备导致的心跳报文异常,则所述发起设备转向与所述备中转设备交互;
若确定所述主中转设备和所述备中转设备导致的心跳报文异常,则不断探测所述主中转设备和所述备中转设备是否恢复,在所述主中转设备或所述备中转设备恢复的情况下,所述发起设备重新发送所述第一ARP实时同步报文给主中转设备或者所述备中转设备;
若确定所述发起设备导致的心跳报文异常,在所述发起设备恢复的情况下,主中转设备或者所述备中转设备将所述第一ARP实时同步报文同步给所述发起设备。
根据本发明的另一个实施例,还提供了一种地址解析协议ARP表项的同步方法,包括:
中转设备接收发起设备发送的第一ARP实时同步报文,其中,所述第一ARP实时同步报文是所述发起设备接收的ARP表项的报文进行报文修改得到的报文,所述报文修改的报文内容包括以下至少之一:ARP表项所属群组身份标识ID,ARP表项类型,ARP表项操作类型,ARP表项的原始归属,ARP表项超时时间,ARP表项对应的接口;
所述中转设备对所述第一ARP实时同步报文进行所述报文修改得到第二ARP实时同步报文,所述中转设备将所述第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知所述发起设备或者所述中转设备对所述第二ARP实时同步报文进行所述报文解析处理。
在本发明的实施例中,所述中转设备对所述第一ARP实时同步报文进行所述报文修改得到第二ARP实时同步报文包括:
将所述第一ARP实时同步报文中的目标IP字段重置为所述中转设备本地的IP地址。
根据本发明的另一个实施例,还提供了一种地址解析协议ARP表项的同步装置,包括:
第一接收模块,设置为发起设备接收ARP表项的报文;
第一修改模块,设置为确定对所述ARP表项的报文进行报文修改得到第一ARP实时同步报文,所述报文修改的报文内容包括以下至少之一:ARP表项所属群组身份标识ID,ARP表项类型,ARP表项操作类型,ARP表项的原始归属,ARP表项超时时间,ARP表项对应的接口;
第一转发模块,设置为所述发起设备发送所述第一ARP实时同步报文给中转设备,其中,所述中转设备对所述第一ARP实时同步报文进行所述报文修改得到第二ARP实时同步报文,所述中转设备将所述第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知所述发起设备或者所述中转设备对所述第二ARP实时同步报文进行所述报文解析处理。
在本发明的实施例中,所述第一修改模块包括:
第一地址重置单元,设置为将所述ARP表项的报文中的目标IP字段重置为所述发起设备本地的IP地址。
在本发明的实施例中,所述装置还包括:
建链模块,设置为在所述中转设备包括主中转设备和备中转设备的情况下,所述发起设备向所述主中转设备发送注册请求报文;
若所述发起设备接收所述主中转设备的注册响应报文的情况下,所述发起设备和所述主中转设备建链成功,所述发起设备和所述主中转设备互发心跳报文;
若所述发起设备在预设的次数向所述主中转设备发送所述注册请求报文的情况下,没有接收到所述主中转设备的注册响应报文的情况下,所述发起设备向所述备中转设备发送所述注册请求报文;
若所述发起设备在预设的次数向所述备中转设备发送所述注册请求报文的情况下,没有接收到所述备中转设备的注册响应报文的情况下,所述发起设备重新向所述主中转设备发送所述注册请求报文。
在本发明的实施例中,所述装置还包括:
心跳模块,设置为若确定所述主中转设备导致的心跳报文异常,则所述发起设备转向与所述备中转设备交互;
若确定所述主中转设备和所述备中转设备导致的心跳报文异常,则不断探测所述主中转设备和所述备中转设备是否恢复,在所述主中转设备或所述备中转设备恢复的情况下,所述发起设备重新发送所述第一ARP实时同步报文给主中转设备或者所述备中转设备;
若确定所述发起设备导致的心跳报文异常,在所述发起设备恢复的情况下,主中转设备或者所述备中转设备将所述第一ARP实时同步报文同步给所述发起设备。
根据本发明的另一个实施例,还提供了一种地址解析协议ARP表项的同步装置,包括:
第二接收模块,设置为中转设备接收发起设备发送的第一ARP实时同步报文,其中,所 述第一ARP实时同步报文是所述发起设备接收的ARP表项的报文进行报文修改得到的报文,所述报文修改的报文内容包括以下至少之一:ARP表项所属群组身份标识ID,ARP表项类型,ARP表项操作类型,ARP表项的原始归属,ARP表项超时时间,ARP表项对应的接口;
第二修改模块,设置为所述中转设备对所述第一ARP实时同步报文进行所述报文修改得到第二ARP实时同步报文;
第二转发模块,设置为所述中转设备将所述第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知所述发起设备或者所述中转设备对所述第二ARP实时同步报文进行所述报文解析处理。
在本发明的实施例中,所述第二修改模块包括:
第二地址重置单元,设置为将所述第一ARP实时同步报文中的目标IP字段重置为所述中转设备本地的IP地址。
通过本发明,发起设备接收ARP表项的报文,确定对该ARP表项的报文进行报文修改得到第一ARP实时同步报文,该报文修改的报文内容包括以下至少之一:ARP表项所属群组身份标识ID,ARP表项类型,ARP表项操作类型,ARP表项的原始归属,ARP表项超时时间,ARP表项对应的接口,该发起设备发送该第一ARP实时同步报文给中转设备,其中,该中转设备对该第一ARP实时同步报文进行该报文修改得到第二ARP实时同步报文,该中转设备将该第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知该发起设备或者该中转设备对该第二ARP实时同步报文进行该报文解析处理,解决了集群部署组网中设备间ARP表项不能实时同步问题,实现了集群部署组网中设备间ARP表项的实时同步。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据本发明实施例的一种地址解析协议ARP表项的同步方法的流程图一;
图2是根据本发明实施例的一种地址解析协议ARP表项的同步方法的流程图二;
图3是根据本发明实施例的一种地址解析协议ARP表项的同步装置的结构框图一;
图4是根据本发明实施例的一种地址解析协议ARP表项的同步装置的结构框图二;
图5是根据本发明优选实施例的集群组网的示意图;
图6是根据本发明优选实施例的正常实时同步的流程示意图;
图7是根据本发明优选实施例的异常恢复的流程示意图;
图8是根据本发明实施例的ARP-client和ARP-server模块的结构示意图;
图9是根据本发明优选实施例的二集群组网示意图。
具体实施方式
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
在本实施例中提供了一种地址解析协议ARP表项的同步方法,图1是根据本发明实施例的一种地址解析协议ARP表项的同步方法的流程图一,如图1所示,该流程包括如下步骤:
步骤S102,发起设备接收ARP表项的报文,确定对该ARP表项的报文进行报文修改得到第一ARP实时同步报文,该报文修改的报文内容包括以下至少之一:ARP表项所属群组身份标识ID,ARP表项类型,ARP表项操作类型,ARP表项的原始归属,ARP表项超时时间,ARP表项对应的接口;
步骤S104,该发起设备发送该第一ARP实时同步报文给中转设备,其中,该中转设备对该第一ARP实时同步报文进行该报文修改得到第二ARP实时同步报文,该中转设备将该第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知该发起设备或者该中转设备对该第二ARP实时同步报文进行该报文解析处理。
通过上述步骤,发起设备接收ARP表项的报文,确定对所述ARP表项的报文进行报文修改得到第一ARP实时同步报文,所述中转设备对所述第一ARP实时同步报文进行所述报文修改得到第二ARP实时同步报文,所述中转设备将所述第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知所述发起设备或者所述中转设备对所述第二ARP实时同步报文进行所述报文解析处理,解决了集群部署组网中设备间ARP表项不能实时同步问题,实现了集群部署组网中设备间ARP表项的实时同步。
在本实施例中,确定对该ARP表项的报文进行报文修改得到第一ARP实时同步报文包括:
将该ARP表项的报文中的目标IP字段重置为该发起设备本地的IP地址。
在本实施例中,在该中转设备包括主中转设备和备中转设备的情况下,该发起设备向该主中转设备发送注册请求报文;
若该发起设备接收该主中转设备的注册响应报文的情况下,该发起设备和该主中转设备建链成功,该发起设备和该主中转设备互发心跳报文;
若该发起设备在预设的次数向该主中转设备发送该注册请求报文的情况下,没有接收到该主中转设备的注册响应报文的情况下,该发起设备向该备中转设备发送该注册请求报文;
若该发起设备在预设的次数向该备中转设备发送该注册请求报文的情况下,没有接收到 该备中转设备的注册响应报文的情况下,该发起设备重新向该主中转设备发送该注册请求报文。
在本实施例中,在该心跳报文异常的情况下,若确定该主中转设备导致的心跳报文异常,则该发起设备转向与该备中转设备交互;
若确定该主中转设备和该备中转设备导致的心跳报文异常,则不断探测该主中转设备和该备中转设备是否恢复,在该主中转设备或该备中转设备恢复的情况下,该发起设备重新发送该第一ARP实时同步报文给主中转设备或者该备中转设备;
若确定该发起设备导致的心跳报文异常,在该发起设备恢复的情况下,主中转设备或者该备中转设备将该第一ARP实时同步报文同步给该发起设备。
在本实施例中还提供了一种地址解析协议ARP表项的同步方法,图2是根据本发明实施例的一种地址解析协议ARP表项的同步方法的流程图二,如图2所示,该流程包括如下步骤:
步骤S202,中转设备接收发起设备发送的第一ARP实时同步报文,其中,该第一ARP实时同步报文是该发起设备接收的ARP表项的报文进行报文修改得到的报文,该报文修改的报文内容包括以下至少之一:ARP表项所属群组身份标识ID,ARP表项类型,ARP表项操作类型,ARP表项的原始归属,ARP表项超时时间,ARP表项对应的接口;
步骤S204,该中转设备对该第一ARP实时同步报文进行该报文修改得到第二ARP实时同步报文,该中转设备将该第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知该发起设备或者该中转设备对该第二ARP实时同步报文进行该报文处理。
通过上述步骤,中转设备接收发起设备发送的第一ARP实时同步报文,该中转设备对该第一ARP实时同步报文进行该报文修改得到第二ARP实时同步报文,该中转设备将该第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知该发起设备或者该中转设备对该第二ARP实时同步报文进行该报文解析处理,解决了集群部署组网中设备间ARP表项不能实时同步问题,实现了集群部署组网中设备间ARP表项的实时同步。
在本实施例中,该中转设备对该第一ARP实时同步报文进行该报文修改得到第二ARP实时同步报文包括:
将该第一ARP实时同步报文中的目标IP字段重置为该中转设备本地的IP地址。
本实施例中还提供了一种地址解析协议ARP表项的同步装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图3是根据本发明实施例的一种地址解析协议ARP表项的同步装置的结构框图一,如图3所示,该装置包括
第一接收模块32,设置为发起设备接收ARP表项的报文;
第一修改模块34,设置为确定对该ARP表项的报文进行报文修改得到第一ARP实时同步报文,该报文修改的报文内容包括以下至少之一:ARP表项所属群组身份标识ID,ARP表项类型,ARP表项操作类型,ARP表项的原始归属,ARP表项超时时间,ARP表项对应的接口;
第一转发模块36,设置为该发起设备发送该第一ARP实时同步报文给中转设备,其中,该中转设备对该第一ARP实时同步报文进行该报文修改得到第二ARP实时同步报文,该中转设备将该第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知该发起设备或者该中转设备对该第二ARP实时同步报文进行该报文解析处理。
通过上述装置,发起设备接收ARP表项的报文,确定对所述ARP表项的报文进行报文修改得到第一ARP实时同步报文,所述中转设备对所述第一ARP实时同步报文进行所述报文修改得到第二ARP实时同步报文,所述中转设备将所述第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知所述发起设备或者所述中转设备对所述第二ARP实时同步报文进行所述报文解析处理,解决了集群部署组网中设备间ARP表项不能实时同步问题,实现了集群部署组网中设备间ARP表项的实时同步。
在本实施例中,该第一修改模块34包括:
第一地址重置单元,设置为将该ARP表项的报文中的目标IP字段重置为该发起设备本地的IP地址。
在本实施例中,该装置还包括:
建链模块,设置为在该中转设备包括主中转设备和备中转设备的情况下,该发起设备向该主中转设备发送注册请求报文;
若该发起设备接收该主中转设备的注册响应报文的情况下,该发起设备和该主中转设备建链成功,该发起设备和该主中转设备互发心跳报文;
若该发起设备在预设的次数向该主中转设备发送该注册请求报文的情况下,没有接收到该主中转设备的注册响应报文的情况下,该发起设备向该备中转设备发送该注册请求报文;
若该发起设备在预设的次数向该备中转设备发送该注册请求报文的情况下,没有接收到该备中转设备的注册响应报文的情况下,该发起设备重新向该主中转设备发送该注册请求报文。
在本实施例中,该装置还包括:
心跳模块,设置为若确定该主中转设备导致的心跳报文异常,则该发起设备转向与该备中转设备交互;
若确定该主中转设备和该备中转设备导致的心跳报文异常,则不断探测该主中转设备和该备中转设备是否恢复,在该主中转设备或该备中转设备恢复的情况下,该发起设备重新发送该第一ARP实时同步报文给主中转设备或者该备中转设备;
若确定该发起设备导致的心跳报文异常,在该发起设备恢复的情况下,主中转设备或者该备中转设备将该第一ARP实时同步报文同步给该发起设备。
图4是根据本发明实施例的一种地址解析协议ARP表项的同步装置的结构框图二,如图4所示,包括:
第二接收模块42,设置为中转设备接收发起设备发送的第一ARP实时同步报文,其中,该第一ARP实时同步报文是该发起设备接收的ARP表项的报文进行报文修改得到的报文,该报文修改的报文内容包括以下至少之一:ARP表项所属群组身份标识ID,ARP表项类型,ARP表项操作类型,ARP表项的原始归属,ARP表项超时时间,ARP表项对应的接口;
第二修改模块44,设置为该中转设备对该第一ARP实时同步报文进行该报文修改得到第二ARP实时同步报文;
第二转发模块46,设置为该中转设备将该第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知该发起设备或者该中转设备对该第二ARP实时同步报文进行该报文解析处理。
通过上述装置,中转设备接收发起设备发送的第一ARP实时同步报文,该中转设备对该第一ARP实时同步报文进行该报文修改得到第二ARP实时同步报文,该中转设备将该第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知该发起设备或者该中转设备对该第二ARP实时同步报文进行该报文解析处理,解决了集群部署组网中设备间ARP表项不能实时同步问题,实现了集群部署组网中设备间ARP表项的实时同步。
在本实施例中,该第二修改模块44包括:
第二地址重置单元,设置为将该第一ARP实时同步报文中的目标IP字段重置为该中转设备本地的IP地址。
下面结合优选实施例和实施方式对本发明进行详细说明。
本发明优选实施例提供了一种ARP表项在集群部署多设备间实时同步添加、更新和删除的方法,包括:设备添加、更新和删除ARP表项后,以修改、重构ARP报文字段的办法告知ARP中转设备,再由中转设备通知其他集群设备;ARP中转设备也具有将本地创建的ARP表项告知其他设备的功能;ARP中转设备采用双节点冗余分担部署提高可靠性;在非中转设备和中转设备之间采用心跳感知对端状态,用于容灾恢复。相应的,本优选实施例根据功能特点定义了2类设备:ARP表项操作发起设备和ARP表项操作中转设备,ARP表项操作中转设备同时具备ARP表项操作发起设备应有的功能。为方便描述,文中分别以ARP-client(ARP表项操作发起设备)和ARP-server(ARP表项操作中转设备),并且ARP表项操作发起设备相当于上述实施例的发起设备,以及ARP表项操作中转设备相当于上述实施例的中转设备。
在本优选实施例中,通过对原始ARP报文字段做如下应用改动,以满足ARP表项信息的实时同步添加、更新和删除报文需求:
1.对ARP报文“opcode”字段16位分解,高8位为ARP表项所属集群组ID;低8位中的高4位为ARP条目类型;低8位中的低4位为ARP条目操作类型。(这些字段的具体意义和用法在基本流程一节具体阐述)
2.对ARP报文“Target IP”字段重置为ARP-client本地IP。
3.对ARP报文“Target MAC”字段重置为ARP表项超时时间和预留字段,以备扩展。
另外,在本优选实施例中,还在设备上增加2个模块:ARP表项操作发起模块和ARP表项操作中转模块。使能ARP表项操作发起模块的设备即成为ARP表项操作发起设备(ARP-client),使能ARP表项操作中转模块的设备即成为ARP表项操作中转设备(ARP-server),且一台设备不能同时使能这2个模块。
在ARP-client和ARP-server间创建注册建链和维护心跳机制,用于容灾恢复,提高可靠性。
本发明实施例基本的设置和3大基本工作模块如下:
图5是根据本发明优选实施例的集群组网的示意图,如图5所示,该基本设置包括:
1.使能集群部署设备中2台设备作为ARP表项操作中转设备(ARP-server),其余设备使能ARP表项操作发起模块(ARP-client)。
2.每个ARP-client分别和2个ARP-server对接,并将2个ARP-server分别设置为主用ARP-server、备用ARP-server。
3.给需要同步ARP条目的端口分配一个集群组ID。
其中,3大基本工作模块包括:建链维护心跳模块、实时同步模块、异常保护模块,其中,该实时同步模块相当于上述实施例的第一修改模块34,第二修改模块44,第一转发模块36,以及第二转发模块46;建链维护心跳模块、异常保护模块相当于上述实施例的建链模块和心跳模块。
图6是根据本发明优选实施例的正常实时同步的流程示意图,如图6所示,注册并维护心跳模块工作流程包括:
1.ARP-client向主用ARP-server发送注册请求报文;
2.ARP-client如果收到主用ARP-server的注册响应报文,则回一个注册确认报文,建链成功,开始互发心跳报文;
3.如果ARP-client连续3次向主用ARP-server发送请求都得不到响应,则向备用ARP-server发送注册请求,如果注册成功则互发心跳;
4.如果ARP-client连续3次请求得不到备ARP-server的响应,则重新向主用ARP-server发送注册请求,如此在主备ARP-server之间轮流探测,直到注册成功。
需要说明的是,在ARP-client和备用ARP-server维护心跳期间,要不断向主用ARP-server发送注册请求,一旦注册成功便回切。这是一种让主备ARP-server既冗余备份,又压力分担的方法。
关于主备ARP-server即冗余备份,又压力分担方法的进一步描述包括:
因为系统设置了2个ARP-server,假设分别为ARP-server1和ARP-server2,如果在给ARP-client设置ARP-server时,有一半ARP-client设置的主用ARP-server为ARP-server1,另外一半ARP-client设置的ARP-server为ARP-server2,则一开始便是冗余均担的,如果其中一个ARP-server异常,则所有压力全部由正常的ARP-server承担,上述步骤5)就确保了异常的ARP-server恢复正常后,相应的client能够回切。
实时同步模块工作流程:
其中一个ARP-client收到常规的ARP报文,并确定增加ARP表项,则该报文交给ARP表项操作发起模块处理,此类自主学习得到的ARP表项需要标记为非同步ARP表项。
ARP-client将处理后的报文交给ARP-server,ARP-server添加表项,并由ARP表项操作中转模块处理转交另外一个ARP-server和其他ARP-client。被转交的ARP-server和ARP-client添加ARP表项,并标记为同步ARP表项。
如果ARP-client设备的非同步ARP表项发生更新,也需要通过如上中转方式通知其他设备更新。
如果ARP-client设备的非同步ARP条目被删除,也需要通过如上中转方式通知其他设备删除相应表项。
需要说明的是,ARP-server对自主添加的表项也能生成非同步ARP表项,且直接转交给另外一个ARP-server和其他ARP-client。ARP表项发生更新、删除时也能通知其他设备。
图7是根据本发明优选实施例的异常恢复的流程示意图,如图7所示,异常保护模块工作流程包括:
主用ARP-server心跳异常,则ARP-client转向与备用ARP-server交互,并不断探测主用ARP-server是否恢复。
主用ARP-server恢复,则ARP-client转向与主用ARP-server交互,且所有重新与主用ARP-server交互的设备把非同步ARP表项上传给新回复的ARP-server。
ARP-client异常,并恢复,ARP-server将所有ARP表项同步给ARP-client。
在本优选实施例中,图8是根据本发明实施例的ARP-client和ARP-server模块的结构示意图,如图8所示,包括:
一、注册并维护心跳模块
1.采用TLV格式自定义3种报文:注册请求报文、注册响应报文和心跳报文
2.在ARP-server中起TCP连接服务端,并配置server ip地址作为服务ip。特殊处理ARP-server与ARP-client接口,使其具备将报文直接交给模块进程和转发的能力。
3.在ARP-client中配置主、备用ARP-server服务地址,且指定连接接口,特殊处理该接口使其具备将报文直接交给设备模块和转发能力。
4.在ARP-client的注册并维护心跳模块根据前文提及的“主备ARP-server冗余备份”方案向ARP-server建立TCP连接,在建链成功后ARP-client向ARP-server发送注册请求报文,得到响应后再回一个注册响应报文确认关系。
5.确认注册成功后,ARP-client、ARP-server周期性互发心跳报文维护关系。
二、实时同步模块
该模块的关键思路在于:同步报文除了需要携带IP、MAC,还需要携带ARP表项类型、ARP表项超时时间、ARP表项的原始归属、ARP表项的操作类型(添加、更新和删除)和ARP表项对应的接口等信息。
1.首先解释说明文中提到的名词和改造、构造的报文
1)ARP表项同步集群组ID:给需要同步ARP表项接口分配的一个组号,通过同步报文携带给其他设备,其他设备收到报文后将ARP表项添加到集群组ID相同的接口。
2)改造原始ARP请求、应答报文:
将ARP报文的opcode字段分别改造为3个字段:ARP表项同步群组ID、ARP条目类型和ARP条目操作类型。假设opcode字段为A1A2A3A4,则A1A2为ARP表同步群组ID,A3为ARP条目类型,A4为ARP条目操作符,操作符对应增加、更新和删除对应不同的取值。
ARP报文的Target ip改为ARP-client、ARP-server的ip地址,用于被同步设备标记是否非同步ARP。
ARP报文的Target MAC字段,高位3个字符预留,以便携带需要扩充的字段,低位5个字符为ARP条目超时剩余时间。
2.基于上述报文设定,采用如下流程实现实时同步流程
1)设备的ARP处理模块与实时同步模块关联,ARP模块在收到ARP报文,并确定需要生成新的ARP表项时,将报文复制并交给实时同步模块。
2)实时同步模块收到报文后,根据上述报文结构修改成ARP实时同步增加报文,并经过ARP-server对接接口交给ARP-server。
3)ARP-server在收到ARP实时同步增加报文后,自己先添加ARP表项,然后分别经过与各个ARP-client/server连接的接口将报文转交给对端。
4)其他ARP-client/server收到ARP实时同步增加报文后,添加ARP表项。
5)当设备ARP发生更新时,则要按照上述流程发送ARP实时同步更新报文通知其他设备更新ARP表项。设备在收到更新报文后,如果没有ARP表项,则添加表项。
6)当设备ARP表项超时,则无需通知其他设备,因为其他设备已有超时时间,在没有被更新的情况下,它们都会超时。
7)当ARP表项被删除时,需要按照上述流程发送ARP实时删除报文同步删除。
三、异常保护模块
异常保护机制建立在心跳机制上,通过心跳感知其他设备状态是否正常,并在异常出现后采取保护切换动作,具体实现如下:
1)ARP-clinet判断主用ARP-server异常,则触发切换,与备用ARP-server交互。
2)ARP-client判断主备ARP-server都异常,则不断探测ARP-server恢复情况,重新恢复交互后,ARP-clinet通过针对每条非同步ARP表项发送ARP实时增加报文的方法上传到ARP-server。
3)ARP-client异常,恢复与ARP-server的交互后,ARP-server将所有ARP表项通过ARP实时同步增加报文逐条下发给ARP-client。
图9是根据本发明优选实施例的二集群组网示意图,如图9所示,该组网采用了二层设备替代多条物理连线,使组网更加简明,其中,ARP-client、ARP-server的各个模块的功能和作用如下:
一、注册并维护心跳模块,该模块也可以采用联动的方法实现,让该模块与现有的且公开共享的(不涉及侵权)的交互机制联动,例如与VRRP、LDP等联动,通过对端VRRP、LDP状态来判断对端设备的状态。
二、实时同步模块,该优选实施例主要针对通过采用二层设备减少连线的集群组网,
集群组网中各个设备通过二层交换设备通信,形成一个“星型”组网,此时各个设备仅需一个接口与二层设备交互。
在这种组网行态下,ARP-server中转报文时,需要将ARP报文的Target ip改为自己的ip地址。
被同步设备仅处理实时同步报文中Target ip为ARP-server ip地址的报文。
三、异常保护模块,为了提高可靠性,二层设备可部署多台,链路冗余。ARP-client和ARP-server的容灾恢复流程和逻辑与实施例一保持一致。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前 者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例该的方法。
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行上述实施例的方法步骤的程序代码:
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行上述实施例的方法步骤。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
工业实用性
基于本发明实施例提供的上述技术方案,发起设备接收ARP表项的报文,确定对该ARP表项的报文进行报文修改得到第一ARP实时同步报文,该报文修改的报文内容包括以下至少之一:ARP表项所属群组身份标识ID,ARP表项类型,ARP表项操作类型,ARP表项的原始归属,ARP表项超时时间,ARP表项对应的接口,该发起设备发送该第一ARP实时同步报文给中转设备,其中,该中转设备对该第一ARP实时同步报文进行该报文修改得到第二ARP实时同步报文,该中转设备将该第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知该发起设备或者该中转设备对该第二ARP实时同步报文进行该报文解析处理,解决了集群部署组网中设备间ARP表项不能实时同步问题,实现了集群部署组网中设备间ARP表项的实时同步。

Claims (12)

  1. 一种地址解析协议ARP表项的同步方法,包括:
    发起设备接收ARP表项的报文,确定对所述ARP表项的报文进行报文修改得到第一ARP实时同步报文,所述报文修改的报文内容包括以下至少之一:ARP表项所属群组身份标识ID,ARP表项类型,ARP表项操作类型,ARP表项的原始归属,ARP表项超时时间,ARP表项对应的接口;
    所述发起设备发送所述第一ARP实时同步报文给中转设备,其中,所述中转设备对所述第一ARP实时同步报文进行所述报文修改得到第二ARP实时同步报文,所述中转设备将所述第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知所述发起设备或者所述中转设备对所述第二ARP实时同步报文进行所述报文解析处理。
  2. 根据权利要求1所述的方法,其中,确定对所述ARP表项的报文进行报文修改得到第一ARP实时同步报文包括:
    将所述ARP表项的报文中的目标IP字段重置为所述发起设备本地的IP地址。
  3. 根据权利要求1所述的方法,其中,发起设备接收ARP表项的报文之前,包括:
    在所述中转设备包括主中转设备和备中转设备的情况下,所述发起设备向所述主中转设备发送注册请求报文;
    若所述发起设备接收所述主中转设备的注册响应报文的情况下,所述发起设备和所述主中转设备建链成功,所述发起设备和所述主中转设备互发心跳报文;
    若所述发起设备在预设的次数向所述主中转设备发送所述注册请求报文的情况下,没有接收到所述主中转设备的注册响应报文的情况下,所述发起设备向所述备中转设备发送所述注册请求报文;
    若所述发起设备在预设的次数向所述备中转设备发送所述注册请求报文的情况下,没有接收到所述备中转设备的注册响应报文的情况下,所述发起设备重新向所述主中转设备发送所述注册请求报文。
  4. 根据权利要求3所述的方法,其中,所述发起设备发送所述第一ARP实时同步报文给中转设备之后,在所述心跳报文异常的情况下,所述方法包括:
    若确定所述主中转设备导致的心跳报文异常,则所述发起设备转向与所述备中转设备交互;
    若确定所述主中转设备和所述备中转设备导致的心跳报文异常,则不断探测所述主中转设备和所述备中转设备是否恢复,在所述主中转设备或所述备中转设备恢复的情况下,所述发起设备重新发送所述第一ARP实时同步报文给主中转设备或者所述备中转设备;
    若确定所述发起设备导致的心跳报文异常,在所述发起设备恢复的情况下,主中转 设备或者所述备中转设备将所述第一ARP实时同步报文同步给所述发起设备。
  5. 一种地址解析协议ARP表项的同步方法,包括:
    中转设备接收发起设备发送的第一ARP实时同步报文,其中,所述第一ARP实时同步报文是所述发起设备接收的ARP表项的报文进行报文修改得到的报文,所述报文修改的报文内容包括以下至少之一:ARP表项所属群组身份标识ID,ARP表项类型,ARP表项操作类型,ARP表项的原始归属,ARP表项超时时间,ARP表项对应的接口;
    所述中转设备对所述第一ARP实时同步报文进行所述报文修改得到第二ARP实时同步报文,所述中转设备将所述第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知所述发起设备或者所述中转设备对所述第二ARP实时同步报文进行所述报文解析处理。
  6. 根据权利要求5所述的方法,其中,所述中转设备对所述第一ARP实时同步报文进行所述报文修改得到第二ARP实时同步报文包括:
    将所述第一ARP实时同步报文中的目标IP字段重置为所述中转设备本地的IP地址。
  7. 一种地址解析协议ARP表项的同步装置,包括:
    第一接收模块,设置为发起设备接收ARP表项的报文;
    第一修改模块,设置为确定对所述ARP表项的报文进行报文修改得到第一ARP实时同步报文,所述报文修改的报文内容包括以下至少之一:ARP表项所属群组身份标识ID,ARP表项类型,ARP表项操作类型,ARP表项的原始归属,ARP表项超时时间,ARP表项对应的接口;
    第一转发模块,设置为所述发起设备发送所述第一ARP实时同步报文给中转设备,其中,所述中转设备对所述第一ARP实时同步报文进行所述报文修改得到第二ARP实时同步报文,所述中转设备将所述第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知所述发起设备或者所述中转设备对所述第二ARP实时同步报文进行所述报文解析处理。
  8. 根据权利要求7所述的装置,其中,所述第一修改模块包括:
    第一地址重置单元,设置为将所述ARP表项的报文中的目标IP字段重置为所述发起设备本地的IP地址。
  9. 根据权利要求7所述的装置,其中,所述装置还包括:
    建链模块,设置为在所述中转设备包括主中转设备和备中转设备的情况下,所述发起设备向所述主中转设备发送注册请求报文;
    若所述发起设备接收所述主中转设备的注册响应报文的情况下,所述发起设备和所述主中转设备建链成功,所述发起设备和所述主中转设备互发心跳报文;
    若所述发起设备在预设的次数向所述主中转设备发送所述注册请求报文的情况下,没有接收到所述主中转设备的注册响应报文的情况下,所述发起设备向所述备中转设备发送所述注册请求报文;
    若所述发起设备在预设的次数向所述备中转设备发送所述注册请求报文的情况下,没有接收到所述备中转设备的注册响应报文的情况下,所述发起设备重新向所述主中转设备发送所述注册请求报文。
  10. 根据权利要求7所述的装置,其中,所述装置还包括:
    心跳模块,设置为若确定所述主中转设备导致的心跳报文异常,则所述发起设备转向与所述备中转设备交互;
    若确定所述主中转设备和所述备中转设备导致的心跳报文异常,则不断探测所述主中转设备和所述备中转设备是否恢复,在所述主中转设备或所述备中转设备恢复的情况下,所述发起设备重新发送所述第一ARP实时同步报文给主中转设备或者所述备中转设备;
    若确定所述发起设备导致的心跳报文异常,在所述发起设备恢复的情况下,主中转设备或者所述备中转设备将所述第一ARP实时同步报文同步给所述发起设备。
  11. 一种地址解析协议ARP表项的同步装置,包括:
    第二接收模块,设置为中转设备接收发起设备发送的第一ARP实时同步报文,其中,所述第一ARP实时同步报文是所述发起设备接收的ARP表项的报文进行报文修改得到的报文,所述报文修改的报文内容包括以下至少之一:ARP表项所属群组身份标识ID,ARP表项类型,ARP表项操作类型,ARP表项的原始归属,ARP表项超时时间,ARP表项对应的接口;
    第二修改模块,设置为所述中转设备对所述第一ARP实时同步报文进行所述报文修改得到第二ARP实时同步报文;
    第二转发模块,设置为所述中转设备将所述第二ARP实时同步报文发送给其他的发起设备或者其他的中转设备,通知所述发起设备或者所述中转设备对所述第二ARP实时同步报文进行所述报文解析处理。
  12. 根据权利要求11所述的装置,其中,所述第二修改模块包括:
    第二地址重置单元,设置为将所述第一ARP实时同步报文中的目标IP字段重置为所述中转设备本地的IP地址。
PCT/CN2016/077747 2015-08-18 2016-03-29 地址解析协议arp表项的同步方法及装置 WO2016177211A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510508270.8 2015-08-18
CN201510508270.8A CN106470246A (zh) 2015-08-18 2015-08-18 地址解析协议arp表项的同步方法及装置

Publications (1)

Publication Number Publication Date
WO2016177211A1 true WO2016177211A1 (zh) 2016-11-10

Family

ID=57217380

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/077747 WO2016177211A1 (zh) 2015-08-18 2016-03-29 地址解析协议arp表项的同步方法及装置

Country Status (2)

Country Link
CN (1) CN106470246A (zh)
WO (1) WO2016177211A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113923150A (zh) * 2021-09-30 2022-01-11 新华三信息安全技术有限公司 路由更新的方法、装置、电子设备及介质
EP3886381A4 (en) * 2018-11-23 2022-01-19 ZTE Corporation MESSAGE PROCESSING METHOD AND APPARATUS

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852261A (zh) * 2006-05-26 2006-10-25 杭州华为三康技术有限公司 维护邻居表项的方法
CN102647304A (zh) * 2012-05-09 2012-08-22 中兴通讯股份有限公司南京分公司 地址解析协议表的同步方法及装置
US20140029618A1 (en) * 2012-07-27 2014-01-30 Dell Products L.P. Systems and methods for optimizing layer three routing in an information handling system
CN103685166A (zh) * 2012-09-06 2014-03-26 中兴通讯股份有限公司 起始会话协议终端切换主备服务器的方法及装置
CN103825777A (zh) * 2014-02-14 2014-05-28 杭州华三通信技术有限公司 一种dmz服务器切换方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852261A (zh) * 2006-05-26 2006-10-25 杭州华为三康技术有限公司 维护邻居表项的方法
CN102647304A (zh) * 2012-05-09 2012-08-22 中兴通讯股份有限公司南京分公司 地址解析协议表的同步方法及装置
US20140029618A1 (en) * 2012-07-27 2014-01-30 Dell Products L.P. Systems and methods for optimizing layer three routing in an information handling system
CN103685166A (zh) * 2012-09-06 2014-03-26 中兴通讯股份有限公司 起始会话协议终端切换主备服务器的方法及装置
CN103825777A (zh) * 2014-02-14 2014-05-28 杭州华三通信技术有限公司 一种dmz服务器切换方法和装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3886381A4 (en) * 2018-11-23 2022-01-19 ZTE Corporation MESSAGE PROCESSING METHOD AND APPARATUS
CN113923150A (zh) * 2021-09-30 2022-01-11 新华三信息安全技术有限公司 路由更新的方法、装置、电子设备及介质
CN113923150B (zh) * 2021-09-30 2023-08-25 新华三信息安全技术有限公司 路由更新的方法、装置、电子设备及介质

Also Published As

Publication number Publication date
CN106470246A (zh) 2017-03-01

Similar Documents

Publication Publication Date Title
JP5074290B2 (ja) 冗長切替システム、冗長管理装置およびアプリケーション処理装置
EP3114799B1 (en) Method and system for seamless sctp-server failover between sctp servers running on different machines
WO2015000362A1 (zh) 一种业务节点配置方法、业务节点池注册器及系统
CN105745883B (zh) 转发表同步的方法、网络设备和系统
WO2017219779A1 (zh) 基于链路协议的设备主备倒换方法和装置、存储介质
WO2012000234A1 (zh) 链路间快速切换的方法、装置和系统
WO2011157151A2 (zh) 实现容灾备份的方法、设备及系统
CN110971698A (zh) 一种数据转发系统、方法及装置
EP2733907B1 (en) Method, local gateway, and system for local voice survivability
WO2016177231A1 (zh) 基于双主控的主备倒换方法及装置
WO2020057445A1 (zh) 一种通信系统、方法及装置
CN102891833A (zh) 网络容灾方法和系统
WO2016177211A1 (zh) 地址解析协议arp表项的同步方法及装置
JP6571400B2 (ja) ルータ装置、冗長化方法および冗長化プログラム
JP2007208502A (ja) 通信システム、バックアップルータ、その冗長化処理プログラムおよびその冗長化処理方法
JP6383232B2 (ja) 中継システムおよびスイッチ装置
JP5309350B2 (ja) 移動体通信ゲートウェイ装置及び移動体通信ゲートウェイ制御方法
WO2015139633A1 (en) Data transmission method and apparatus
JP2009194787A (ja) ゲートウェイ装置
JP4757670B2 (ja) システム切替方法、その計算機システム及びプログラム
JP4133738B2 (ja) 高速ネットワークアドレス引継ぎ方法、ネットワーク装置及びプログラム
CN106789634B (zh) 基于链路负载双主环境的静态路由管理方法及系统
CN112653610B (zh) 多层虚拟交换机升级方法、装置、电子设备及存储介质
JP2011166245A (ja) ネットワークシステム、ゲートウェイ装置切替方法、第1のトンネル終端ゲートウェイ装置および第2のトンネル終端ゲートウェイ装置
CN114301763A (zh) 分布式集群故障的处理方法及系统、电子设备及存储介质

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

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

Country of ref document: EP

Kind code of ref document: A1