CN115150352B - Method, device, equipment and readable medium for ARP synchronization across link aggregation groups - Google Patents

Method, device, equipment and readable medium for ARP synchronization across link aggregation groups Download PDF

Info

Publication number
CN115150352B
CN115150352B CN202210762167.6A CN202210762167A CN115150352B CN 115150352 B CN115150352 B CN 115150352B CN 202210762167 A CN202210762167 A CN 202210762167A CN 115150352 B CN115150352 B CN 115150352B
Authority
CN
China
Prior art keywords
arp
terminal equipment
information table
state marking
marking position
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210762167.6A
Other languages
Chinese (zh)
Other versions
CN115150352A (en
Inventor
任长雷
袁福利
颜虹
陈翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210762167.6A priority Critical patent/CN115150352B/en
Publication of CN115150352A publication Critical patent/CN115150352A/en
Application granted granted Critical
Publication of CN115150352B publication Critical patent/CN115150352B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method, a device, equipment and a readable medium for ARP synchronization among devices in a cross-link aggregation group, wherein the method comprises the following steps: creating an ARP monitoring process in the device crossing the link aggregation group for monitoring the update of the ARP address table of the local terminal device and processing the synchronous ARP message sent by the opposite terminal device; creating an ARP information table in the device crossing the link aggregation group for recording ARP information; responding to the monitoring process to monitor that the local terminal equipment actively learns and updates ARP across the link aggregation interface, and recording the ARP information in an ARP information table; and responding to the ARP information updating of the local terminal equipment and/or the opposite terminal equipment, updating the states of the local terminal equipment and the opposite terminal equipment in the ARP information table based on the information in the ARP information table, and sending the synchronous information. By using the scheme of the invention, the ARP synchronization frequency can be improved, the length of the synchronous message can be reduced, and the ARP synchronization speed between devices can be improved.

Description

Method, device, equipment and readable medium for ARP synchronization across link aggregation groups
Technical Field
The present invention relates to the field of computers, and more particularly, to a method, apparatus, device, and readable medium for ARP synchronization among devices in a cross-link aggregation group.
Background
The cross-device link aggregation can realize the link aggregation among a plurality of devices, thereby improving the reliability from a single board level to a device level. When a certain link or a certain device fails, the data service is automatically switched to other available links or devices in the aggregation group, so that the link-level and device-level reliability is enhanced. Thus, fast switching of inter-device traffic in an aggregated link group becomes a great importance in improving reliability. The existing ARP synchronization method in the cross-link aggregation group equipment is not updated timely, so that the traffic switching convergence time is too long, and the excessive synchronization content occupies a relatively large CPU overhead.
Disclosure of Invention
In view of the above, an object of the embodiments of the present invention is to provide a method, an apparatus, a device, and a readable medium for ARP synchronization between devices in a cross-link aggregation group, by using the technical solution of the present invention, the ARP synchronization frequency can be improved, the length of a synchronized message can be reduced, and the ARP synchronization speed between devices can be improved.
Based on the above objects, an aspect of an embodiment of the present invention provides a method for ARP synchronization among devices in a cross-link aggregation group, including the steps of:
creating an ARP monitoring process in the device crossing the link aggregation group for monitoring the update of the ARP address table of the local terminal device and processing the synchronous ARP message sent by the opposite terminal device;
creating an ARP information table in the device crossing the link aggregation group for recording ARP information;
responding to the monitoring process to monitor that the local terminal equipment actively learns and updates ARP across the link aggregation interface, and recording the ARP information in an ARP information table;
and responding to the ARP information updating of the local terminal equipment and/or the opposite terminal equipment, updating the states of the local terminal equipment and the opposite terminal equipment in the ARP information table based on the information in the ARP information table, and sending the synchronous information.
According to one embodiment of the present invention, in response to ARP information update of a home terminal device and/or a peer terminal device, updating states of the home terminal device and the peer terminal device in the ARP information table based on information in the ARP information table and transmitting synchronization information includes:
responding to the refreshing of an ARP address table of the local terminal equipment, filtering out all ARP entries crossing the link aggregation interface by an ARP monitoring process, and updating the ARP entries into an ARP information table;
responding to the filtered ARP not in the ARP information table, adding ARP information in the ARP information table, setting the state mark position of the local terminal equipment as 1, setting the state mark position of the opposite terminal equipment as null, and notifying an ARP synchronization process to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local terminal equipment is 1, the state marking bit of the opposite terminal equipment is 1, and the state marking position of the opposite terminal equipment is empty;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local terminal equipment is 1, the state marking bit of the opposite terminal equipment is 0, the state marking position of the opposite terminal equipment is empty, and an ARP synchronization process is notified to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local terminal equipment is empty, the state marking bit of the opposite terminal equipment is 1, the state marking position of the local terminal equipment is 1, the state marking position of the opposite terminal equipment is empty, and the ARP synchronization process is notified to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local terminal equipment is empty, the state marking bit of the opposite terminal equipment is 0, the state marking position of the local terminal equipment is 1, the state marking position of the opposite terminal equipment is empty, and the ARP synchronization process is notified to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local equipment is 0, the state marking position of the local equipment is 1, the state marking position of the opposite equipment is null, and the ARP synchronization process is notified to send ARP synchronization information;
according to one embodiment of the present invention, in response to ARP information update of a home terminal device and/or a peer terminal device, updating states of the home terminal device and the peer terminal device in the ARP information table based on information in the ARP information table and transmitting synchronization information includes:
responding to the ARP update message sent by the opposite terminal equipment received by the local terminal equipment, and judging whether the cross-link aggregation interface state of the local terminal equipment is up or not;
updating ARP sent by the opposite terminal equipment to an ARP information table in response to the condition that the cross-link aggregation interface state of the local terminal equipment is up;
in response to the sent ARP not being in the ARP information table, adding ARP information in the ARP information table, enabling the state marking position of the local terminal equipment to be empty, enabling the state marking position of the opposite terminal equipment to be 1, and adding ARP in the ARP information table of the local terminal equipment;
responding to the sent ARP in an ARP information table, wherein the state marking position of the local terminal equipment is empty, the state marking position of the opposite terminal equipment is 1, and updating the aging time in the ARP information table of the local terminal equipment;
responding to the sent ARP in an ARP information table, wherein the state marking position of the local terminal equipment is empty, the state marking position of the opposite terminal equipment is 0, the state marking position of the opposite terminal equipment is 1, and the aging time is updated in the ARP information table of the local terminal equipment;
responding to the sent ARP in an ARP information table, wherein the state marking position of the local equipment is 1, the state marking position of the opposite equipment is 0, the state marking position of the local equipment is empty, the state marking position of the opposite equipment is 1, and the ageing time is updated in the ARP information table of the local equipment;
responding to the sent ARP in an ARP information table, wherein the state marking position of the local equipment is 1, the state marking position of the opposite equipment is null, the state marking position of the local equipment is null, the state marking position of the opposite equipment is 1, and the ageing time is updated in the ARP information table of the local equipment;
responding to the sent ARP in an ARP information table, wherein the state marking position of the local terminal equipment is 0, the state marking position of the opposite terminal equipment is 1, the state marking position of the local terminal equipment is empty, and ARP is added in the ARP information table of the local terminal equipment;
responding to the sent ARP in an ARP information table, wherein the state marking position of the local equipment is 0, the state marking position of the opposite equipment is null, the state marking position of the local equipment is null, the state marking position of the opposite equipment is 1, and ARP is added in the ARP information table of the local equipment;
according to one embodiment of the present invention, in response to ARP information update of a home terminal device and/or a peer terminal device, updating states of the home terminal device and the peer terminal device in the ARP information table based on information in the ARP information table and transmitting synchronization information includes:
responding to the received notification of deleting ARP by the local terminal equipment, filtering all ARP entries crossing the link aggregation interface by the ARP monitoring process, and updating the ARP entries into an ARP information table;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local equipment is empty, the state marking position of the opposite equipment is 1, the state marking position of the local equipment is 0, and the synchronous information of deleting the ARP is sent;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local terminal equipment is empty, the state marking position of the opposite terminal equipment is 0, deleting the ARP in the ARP information table, and transmitting synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local equipment is 1, the state marking position of the opposite equipment is null, the state marking position of the local equipment is 0, and the synchronous information of deleting the ARP is sent;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local terminal equipment is 1, the state marking position of the opposite terminal equipment is 0, deleting the ARP in the ARP information table, and transmitting synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local terminal equipment is 0, and the state marking position of the opposite terminal equipment is empty, and transmitting synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local terminal equipment is 0, and the state marking position of the opposite terminal equipment is 1, and transmitting synchronous information for deleting the ARP;
and in response to the deleted ARP being in the ARP information table and the home terminal equipment state marking position being 0, the opposite terminal equipment state marking position being 0, deleting the ARP in the ARP information table.
According to one embodiment of the present invention, in response to ARP information update of a home terminal device and/or a peer terminal device, updating states of the home terminal device and the peer terminal device in the ARP information table based on information in the ARP information table and transmitting synchronization information includes:
responding to the received ARP deleting message sent by the opposite terminal equipment, judging whether the cross-link aggregation interface state of the local terminal equipment is up or not;
updating the deleted ARP sent by the opposite terminal equipment to an ARP information table in response to the cross-link aggregation interface state of the local terminal equipment being up;
responding to the deleted ARP in the ARP information table, wherein the state marking position of the local terminal equipment is empty, the state marking position of the opposite terminal equipment is 1, the state marking position of the opposite terminal equipment is 0, and an ARP request is sent to an address in the deleted ARP entry;
responding to the deleted ARP in the ARP information table, wherein the state marking position of the local terminal equipment is empty, the state marking position of the opposite terminal equipment is 0, and an ARP request is sent to an address in the deleted ARP entry;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local terminal equipment is 1, the state marking position of the opposite terminal equipment is null, the state marking position of the opposite terminal equipment is 0, and an ARP request is sent to an address in the deleted ARP entry;
responding to the deleted ARP in the ARP information table, wherein the state marking position of the local terminal equipment is 0, and the state marking position of the opposite terminal equipment is empty, and deleting the ARP in the ARP information table;
and in response to the deleted ARP being in the ARP information table and the home terminal equipment state marking position being 0, the opposite terminal equipment state marking position being 1, deleting the ARP in the ARP information table.
According to one embodiment of the present invention, further comprising:
and the Arp synchronization process periodically synchronizes the ARP table entry with the state 1 of the local terminal equipment in the ARP information table to the opposite terminal equipment by using the update message.
According to one embodiment of the invention, the ARP information table records an IP address, a MAC address, a vlan ID, port information, a home device status bit, and a peer device status bit.
In another aspect of the embodiment of the present invention, there is also provided an apparatus for ARP synchronization among devices in a cross-link aggregation group, where the apparatus includes:
the monitoring module is configured to create an ARP monitoring process in the device crossing the link aggregation group for monitoring the update of the ARP address table of the local terminal device and processing the synchronous ARP message sent by the opposite terminal device;
the creating module is configured to create an ARP information table in the device crossing the link aggregation group for recording ARP information;
the recording module is configured to respond to the monitoring process to monitor that the local terminal equipment actively learns and updates the ARP across the link aggregation interface, and record the ARP information in an ARP information table;
and the updating module is configured to respond to ARP information updating of the local terminal equipment and/or the opposite terminal equipment, update the states of the local terminal equipment and the opposite terminal equipment in the ARP information table based on the information in the ARP information table and send synchronous information.
In another aspect of the embodiments of the present invention, there is also provided a computer apparatus including:
at least one processor; and
and a memory storing computer instructions executable on the processor, the instructions when executed by the processor performing the steps of any of the methods described above.
In another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the methods described above.
The invention has the following beneficial technical effects: the method for synchronizing ARP among devices in the cross-link aggregation group provided by the embodiment of the invention is characterized in that an ARP monitoring process is established in the devices in the cross-link aggregation group and used for monitoring the update of an ARP address table of the local device and processing a synchronous ARP message sent by the opposite device; creating an ARP information table in the device crossing the link aggregation group for recording ARP information; responding to the monitoring process to monitor that the local terminal equipment actively learns and updates ARP across the link aggregation interface, and recording the ARP information in an ARP information table; responding to the ARP information updating of the local terminal equipment and/or the opposite terminal equipment, updating the states of the local terminal equipment and the opposite terminal equipment in the ARP information table based on the information in the ARP information table and sending the synchronous information, thereby improving the synchronous frequency of ARP, reducing the length of synchronous messages and improving the ARP synchronous speed among the equipment.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method of ARP synchronization among devices in a cross-link aggregation group in accordance with one embodiment of the invention;
FIG. 2 is a schematic diagram of an apparatus for ARP synchronization among devices in a cross-link aggregation group in accordance with one embodiment of the present invention;
FIG. 3 is a schematic diagram of a computer device according to one embodiment of the invention;
fig. 4 is a schematic diagram of a computer-readable storage medium according to one embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
With the above object in view, in a first aspect, an embodiment of a method for ARP synchronization among devices in a cross-link aggregation group is provided. Fig. 1 shows a schematic flow chart of the method.
As shown in fig. 1, the method may include the steps of:
s1, an ARP monitoring process is created in the device crossing the link aggregation group and used for monitoring the update of the ARP address table of the local terminal device and processing the synchronous ARP message sent by the opposite terminal device. When the Switch joins the cross-link aggregation group, an ARP monitoring process needs to be additionally started, and the ARP monitoring process is responsible for monitoring the update of the ARP address table of the local device and processing the synchronous ARP address message sent by the peer device.
S2, an ARP information table is created in the device crossing the link aggregation group and is used for recording ARP information. An ARP information table iccpd_arp_syn is created in the database, which records ARP information including IP address, mac address, vlan id, port information, home state bits, and peer state bits. The initial values of the home state bit and the opposite state bit are both null.
And S3, in response to the monitoring process monitoring that the local terminal equipment actively learns and updates the ARP across the link aggregation interface, recording the ARP information in an ARP information table.
S4, responding to the ARP information updating of the local terminal equipment and/or the opposite terminal equipment, updating the states of the local terminal equipment and the opposite terminal equipment in the ARP information table based on the information in the ARP information table, and sending the synchronous information.
By using the scheme of the invention, the ARP synchronization frequency can be improved, the length of the synchronous message can be reduced, and the ARP synchronization speed between devices can be improved.
In a preferred embodiment of the present invention, in response to the ARP information update of the home terminal device and/or the peer terminal device, updating the states of the home terminal device and the peer terminal device in the ARP information table based on the information in the ARP information table and transmitting the synchronization information includes:
responding to the refreshing of an ARP address table of the local terminal equipment, filtering out all ARP entries crossing the link aggregation interface by an ARP monitoring process, and updating the ARP entries into an ARP information table;
responding to the filtered ARP not in the ARP information table, adding ARP information in the ARP information table, setting the state mark position of the local terminal equipment as 1, setting the state mark position of the opposite terminal equipment as null, and notifying an ARP synchronization process to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local terminal equipment is 1, the state marking bit of the opposite terminal equipment is 1, and the state marking position of the opposite terminal equipment is empty;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local terminal equipment is 1, the state marking bit of the opposite terminal equipment is 0, the state marking position of the opposite terminal equipment is empty, and an ARP synchronization process is notified to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local terminal equipment is empty, the state marking bit of the opposite terminal equipment is 1, the state marking position of the local terminal equipment is 1, the state marking position of the opposite terminal equipment is empty, and the ARP synchronization process is notified to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local terminal equipment is empty, the state marking bit of the opposite terminal equipment is 0, the state marking position of the local terminal equipment is 1, the state marking position of the opposite terminal equipment is empty, and the ARP synchronization process is notified to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local equipment is 0, the state marking position of the local equipment is 1, the state marking position of the opposite equipment is null, and the ARP synchronization process is notified to send ARP synchronization information;
in a preferred embodiment of the present invention, in response to the ARP information update of the home terminal device and/or the peer terminal device, updating the states of the home terminal device and the peer terminal device in the ARP information table based on the information in the ARP information table and transmitting the synchronization information includes:
responding to the ARP update message sent by the opposite terminal equipment received by the local terminal equipment, and judging whether the cross-link aggregation interface state of the local terminal equipment is up or not;
updating ARP sent by the opposite terminal equipment to an ARP information table in response to the condition that the cross-link aggregation interface state of the local terminal equipment is up;
in response to the sent ARP not being in the ARP information table, adding ARP information in the ARP information table, enabling the state marking position of the local terminal equipment to be empty, enabling the state marking position of the opposite terminal equipment to be 1, and adding ARP in the ARP information table of the local terminal equipment;
responding to the sent ARP in an ARP information table, wherein the state marking position of the local terminal equipment is empty, the state marking position of the opposite terminal equipment is 1, and updating the aging time in the ARP information table of the local terminal equipment;
responding to the sent ARP in an ARP information table, wherein the state marking position of the local terminal equipment is empty, the state marking position of the opposite terminal equipment is 0, the state marking position of the opposite terminal equipment is 1, and the aging time is updated in the ARP information table of the local terminal equipment;
responding to the sent ARP in an ARP information table, wherein the state marking position of the local equipment is 1, the state marking position of the opposite equipment is 0, the state marking position of the local equipment is empty, the state marking position of the opposite equipment is 1, and the ageing time is updated in the ARP information table of the local equipment;
responding to the sent ARP in an ARP information table, wherein the state marking position of the local equipment is 1, the state marking position of the opposite equipment is null, the state marking position of the local equipment is null, the state marking position of the opposite equipment is 1, and the ageing time is updated in the ARP information table of the local equipment;
responding to the sent ARP in an ARP information table, wherein the state marking position of the local terminal equipment is 0, the state marking position of the opposite terminal equipment is 1, the state marking position of the local terminal equipment is empty, and ARP is added in the ARP information table of the local terminal equipment;
responding to the sent ARP in an ARP information table, wherein the state marking position of the local equipment is 0, the state marking position of the opposite equipment is null, the state marking position of the local equipment is null, the state marking position of the opposite equipment is 1, and ARP is added in the ARP information table of the local equipment;
in a preferred embodiment of the present invention, in response to the ARP information update of the home terminal device and/or the peer terminal device, updating the states of the home terminal device and the peer terminal device in the ARP information table based on the information in the ARP information table and transmitting the synchronization information includes:
responding to the received notification of deleting ARP by the local terminal equipment, filtering all ARP entries crossing the link aggregation interface by the ARP monitoring process, and updating the ARP entries into an ARP information table;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local equipment is empty, the state marking position of the opposite equipment is 1, the state marking position of the local equipment is 0, and the synchronous information of deleting the ARP is sent;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local terminal equipment is empty, the state marking position of the opposite terminal equipment is 0, deleting the ARP in the ARP information table, and transmitting synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local equipment is 1, the state marking position of the opposite equipment is null, the state marking position of the local equipment is 0, and the synchronous information of deleting the ARP is sent;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local terminal equipment is 1, the state marking position of the opposite terminal equipment is 0, deleting the ARP in the ARP information table, and transmitting synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local terminal equipment is 0, and the state marking position of the opposite terminal equipment is empty, and transmitting synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local terminal equipment is 0, and the state marking position of the opposite terminal equipment is 1, and transmitting synchronous information for deleting the ARP;
and in response to the deleted ARP being in the ARP information table and the home terminal equipment state marking position being 0, the opposite terminal equipment state marking position being 0, deleting the ARP in the ARP information table.
In a preferred embodiment of the present invention, in response to the ARP information update of the home terminal device and/or the peer terminal device, updating the states of the home terminal device and the peer terminal device in the ARP information table based on the information in the ARP information table and transmitting the synchronization information includes:
responding to the received ARP deleting message sent by the opposite terminal equipment, judging whether the cross-link aggregation interface state of the local terminal equipment is up or not;
updating the deleted ARP sent by the opposite terminal equipment to an ARP information table in response to the cross-link aggregation interface state of the local terminal equipment being up;
responding to the deleted ARP in the ARP information table, wherein the state marking position of the local terminal equipment is empty, the state marking position of the opposite terminal equipment is 1, the state marking position of the opposite terminal equipment is 0, and an ARP request is sent to an address in the deleted ARP entry;
responding to the deleted ARP in the ARP information table, wherein the state marking position of the local terminal equipment is empty, the state marking position of the opposite terminal equipment is 0, and an ARP request is sent to an address in the deleted ARP entry;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local terminal equipment is 1, the state marking position of the opposite terminal equipment is null, the state marking position of the opposite terminal equipment is 0, and an ARP request is sent to an address in the deleted ARP entry;
responding to the deleted ARP in the ARP information table, wherein the state marking position of the local terminal equipment is 0, and the state marking position of the opposite terminal equipment is empty, and deleting the ARP in the ARP information table;
and in response to the deleted ARP being in the ARP information table and the home terminal equipment state marking position being 0, the opposite terminal equipment state marking position being 1, deleting the ARP in the ARP information table.
In a preferred embodiment of the present invention, further comprising:
and the Arp synchronization process periodically synchronizes the ARP table entry with the state 1 of the local terminal equipment in the ARP information table to the opposite terminal equipment by using the update message.
In a preferred embodiment of the present invention, the ARP information table records the IP address, MAC address, vlan ID, port information, home device status bits, and peer device status bits.
By using the scheme of the invention, the ARP synchronization frequency can be improved, the length of the synchronous message can be reduced, and the ARP synchronization speed between devices can be improved.
It should be noted that, it will be understood by those skilled in the art that all or part of the procedures in implementing the methods of the above embodiments may be implemented by a computer program to instruct related hardware, and the above program may be stored in a computer readable storage medium, and the program may include the procedures of the embodiments of the above methods when executed. Wherein the storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like. The computer program embodiments described above may achieve the same or similar effects as any of the method embodiments described above.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a CPU, which may be stored in a computer-readable storage medium. When executed by a CPU, performs the functions defined above in the methods disclosed in the embodiments of the present invention.
In view of the above object, a second aspect of the embodiments of the present invention proposes an apparatus for ARP synchronization among devices in a cross-link aggregation group, as shown in fig. 2, an apparatus 200 includes:
the monitoring module is configured to create an ARP monitoring process in the device crossing the link aggregation group for monitoring the update of the ARP address table of the local terminal device and processing the synchronous ARP message sent by the opposite terminal device;
the creating module is configured to create an ARP information table in the device crossing the link aggregation group for recording ARP information;
the recording module is configured to respond to the monitoring process to monitor that the local terminal equipment actively learns and updates the ARP across the link aggregation interface, and record the ARP information in an ARP information table;
and the updating module is configured to respond to ARP information updating of the local terminal equipment and/or the opposite terminal equipment, update the states of the local terminal equipment and the opposite terminal equipment in the ARP information table based on the information in the ARP information table and send synchronous information.
Based on the above object, a third aspect of the embodiments of the present invention proposes a computer device. Fig. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention. As shown in fig. 3, an embodiment of the present invention includes the following means: at least one processor 21; and a memory 22, the memory 22 storing computer instructions 23 executable on the processor, which when executed by the processor implement the above method.
Based on the above object, a fourth aspect of the embodiments of the present invention proposes a computer-readable storage medium. Fig. 4 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. As shown in fig. 4, the computer-readable storage medium 31 stores a computer program 32 that, when executed by a processor, performs the method as described above.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. The above-described functions defined in the methods disclosed in the embodiments of the present invention are performed when the computer program is executed by a processor.
Furthermore, the above-described method steps and system units may also be implemented using a controller and a computer-readable storage medium storing a computer program for causing the controller to implement the above-described steps or unit functions.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general purpose or special purpose computer or general purpose or special purpose processor. Further, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The foregoing embodiment of the present invention has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and many other variations of the different aspects of the embodiments of the invention as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.

Claims (9)

1. A method for ARP synchronization among devices in a cross-link aggregation group, comprising the steps of:
creating an ARP monitoring process in the device crossing the link aggregation group for monitoring the update of the ARP address table of the local terminal device and processing the synchronous ARP message sent by the opposite terminal device;
creating an ARP information table in the device crossing the link aggregation group for recording ARP information;
responding to the monitoring process to monitor that the local terminal equipment actively learns and updates ARP across the link aggregation interface, and recording the ARP information in an ARP information table;
in response to the ARP information update of the local terminal device and/or the opposite terminal device, updating the states of the local terminal device and the opposite terminal device in the ARP information table based on the information in the ARP information table and transmitting the synchronous information,
wherein updating the states of the home terminal device and the opposite terminal device in the ARP information table based on the information in the ARP information table and transmitting the synchronization information in response to the ARP information update of the home terminal device and/or the opposite terminal device comprises:
responding to the refreshing of an ARP address table of the local terminal equipment, filtering out all ARP entries crossing the link aggregation interface by an ARP monitoring process, and updating the ARP entries into an ARP information table;
responding to the filtered ARP not in the ARP information table, adding ARP information in the ARP information table, setting the state mark position of the local terminal equipment as 1, setting the state mark position of the opposite terminal equipment as null, and notifying an ARP synchronization process to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local terminal equipment is 1, the state marking bit of the opposite terminal equipment is 1, and the state marking position of the opposite terminal equipment is empty;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local terminal equipment is 1, the state marking bit of the opposite terminal equipment is 0, the state marking position of the opposite terminal equipment is empty, and an ARP synchronization process is notified to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local terminal equipment is empty, the state marking bit of the opposite terminal equipment is 1, the state marking position of the local terminal equipment is 1, the state marking position of the opposite terminal equipment is empty, and the ARP synchronization process is notified to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local terminal equipment is empty, the state marking bit of the opposite terminal equipment is 0, the state marking position of the local terminal equipment is 1, the state marking position of the opposite terminal equipment is empty, and the ARP synchronization process is notified to send ARP synchronization information;
and responding to the filtered ARP in the ARP information table and the state marking bit of the local equipment is 0, setting the state marking position of the local equipment as 1, setting the state marking position of the opposite equipment as null, and informing an ARP synchronization process to send ARP synchronization information.
2. The method of claim 1, wherein alternatively, in response to the ARP information update of the home device and/or the peer device, updating the states of the home device and the peer device in the ARP information table and transmitting synchronization information based on information in the ARP information table comprises:
responding to the ARP update message sent by the opposite terminal equipment received by the local terminal equipment, and judging whether the cross-link aggregation interface state of the local terminal equipment is up or not;
updating ARP sent by the opposite terminal equipment to an ARP information table in response to the condition that the cross-link aggregation interface state of the local terminal equipment is up;
in response to the sent ARP not being in the ARP information table, adding ARP information in the ARP information table, enabling the state marking position of the local terminal equipment to be empty, enabling the state marking position of the opposite terminal equipment to be 1, and adding ARP in the ARP information table of the local terminal equipment;
responding to the sent ARP in an ARP information table, wherein the state marking position of the local terminal equipment is empty, the state marking position of the opposite terminal equipment is 1, and updating the aging time in the ARP information table of the local terminal equipment;
responding to the sent ARP in an ARP information table, wherein the state marking position of the local terminal equipment is empty, the state marking position of the opposite terminal equipment is 0, the state marking position of the opposite terminal equipment is 1, and the aging time is updated in the ARP information table of the local terminal equipment;
responding to the sent ARP in an ARP information table, wherein the state marking position of the local equipment is 1, the state marking position of the opposite equipment is 0, the state marking position of the local equipment is empty, the state marking position of the opposite equipment is 1, and the ageing time is updated in the ARP information table of the local equipment;
responding to the sent ARP in an ARP information table, wherein the state marking position of the local equipment is 1, the state marking position of the opposite equipment is null, the state marking position of the local equipment is null, the state marking position of the opposite equipment is 1, and the ageing time is updated in the ARP information table of the local equipment;
responding to the sent ARP in an ARP information table, wherein the state marking position of the local terminal equipment is 0, the state marking position of the opposite terminal equipment is 1, the state marking position of the local terminal equipment is empty, and ARP is added in the ARP information table of the local terminal equipment;
and responding to the sent ARP in the ARP information table, wherein the state marking position of the local equipment is 0, the state marking position of the opposite equipment is null, the state marking position of the local equipment is null, the state marking position of the opposite equipment is 1, and ARP is added in the ARP information table of the local equipment.
3. The method of claim 1, wherein alternatively, in response to the ARP information update of the home device and/or the peer device, updating the states of the home device and the peer device in the ARP information table and transmitting synchronization information based on information in the ARP information table comprises:
responding to the received notification of deleting ARP by the local terminal equipment, filtering all ARP entries crossing the link aggregation interface by the ARP monitoring process, and updating the ARP entries into an ARP information table;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local equipment is empty, the state marking position of the opposite equipment is 1, the state marking position of the local equipment is 0, and the synchronous information of deleting the ARP is sent;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local terminal equipment is empty, the state marking position of the opposite terminal equipment is 0, deleting the ARP in the ARP information table, and transmitting synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local equipment is 1, the state marking position of the opposite equipment is null, the state marking position of the local equipment is 0, and the synchronous information of deleting the ARP is sent;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local terminal equipment is 1, the state marking position of the opposite terminal equipment is 0, deleting the ARP in the ARP information table, and transmitting synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local terminal equipment is 0, and the state marking position of the opposite terminal equipment is empty, and transmitting synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local terminal equipment is 0, and the state marking position of the opposite terminal equipment is 1, and transmitting synchronous information for deleting the ARP;
and in response to the deleted ARP being in the ARP information table and the home terminal equipment state marking position being 0, the opposite terminal equipment state marking position being 0, deleting the ARP in the ARP information table.
4. The method of claim 1, wherein alternatively, in response to the ARP information update of the home device and/or the peer device, updating the states of the home device and the peer device in the ARP information table and transmitting synchronization information based on information in the ARP information table comprises:
responding to the received ARP deleting message sent by the opposite terminal equipment, judging whether the cross-link aggregation interface state of the local terminal equipment is up or not;
updating the deleted ARP sent by the opposite terminal equipment to an ARP information table in response to the cross-link aggregation interface state of the local terminal equipment being up;
responding to the deleted ARP in the ARP information table, wherein the state marking position of the local terminal equipment is empty, the state marking position of the opposite terminal equipment is 1, the state marking position of the opposite terminal equipment is 0, and an ARP request is sent to an address in the deleted ARP entry;
responding to the deleted ARP in the ARP information table, wherein the state marking position of the local terminal equipment is empty, the state marking position of the opposite terminal equipment is 0, and an ARP request is sent to an address in the deleted ARP entry;
responding to the deleted ARP in an ARP information table, wherein the state marking position of the local terminal equipment is 1, the state marking position of the opposite terminal equipment is null, the state marking position of the opposite terminal equipment is 0, and an ARP request is sent to an address in the deleted ARP entry;
responding to the deleted ARP in the ARP information table, wherein the state marking position of the local terminal equipment is 0, and the state marking position of the opposite terminal equipment is empty, and deleting the ARP in the ARP information table;
and in response to the deleted ARP being in the ARP information table and the home terminal equipment state marking position being 0, the opposite terminal equipment state marking position being 1, deleting the ARP in the ARP information table.
5. The method as recited in claim 1, further comprising:
and the Arp synchronization process periodically synchronizes the ARP table entry with the state 1 of the local terminal equipment in the ARP information table to the opposite terminal equipment by using the update message.
6. The method of claim 1, wherein the ARP information table records an IP address, a MAC address, a vlan ID, port information, a home device status bit, and a peer device status bit.
7. An apparatus for ARP synchronization among devices in a cross-link aggregation group, the apparatus comprising:
the monitoring module is configured to create an ARP monitoring process in the device crossing the link aggregation group for monitoring the update of the ARP address table of the local terminal device and processing the synchronous ARP message sent by the opposite terminal device;
a creation module configured to create an ARP information table in a device across a link aggregation group for recording ARP information;
the recording module is configured to respond to the monitoring process to monitor that the local terminal equipment actively learns and updates the ARP across the link aggregation interface, and record the ARP information in an ARP information table;
an updating module configured to update states of the home terminal device and the opposite terminal device in the ARP information table based on information in the ARP information table and transmit synchronization information in response to ARP information update of the home terminal device and/or the opposite terminal device,
wherein updating the states of the home terminal device and the opposite terminal device in the ARP information table based on the information in the ARP information table and transmitting the synchronization information in response to the ARP information update of the home terminal device and/or the opposite terminal device comprises:
responding to the refreshing of an ARP address table of the local terminal equipment, filtering out all ARP entries crossing the link aggregation interface by an ARP monitoring process, and updating the ARP entries into an ARP information table;
responding to the filtered ARP not in the ARP information table, adding ARP information in the ARP information table, setting the state mark position of the local terminal equipment as 1, setting the state mark position of the opposite terminal equipment as null, and notifying an ARP synchronization process to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local terminal equipment is 1, the state marking bit of the opposite terminal equipment is 1, and the state marking position of the opposite terminal equipment is empty;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local terminal equipment is 1, the state marking bit of the opposite terminal equipment is 0, the state marking position of the opposite terminal equipment is empty, and an ARP synchronization process is notified to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local terminal equipment is empty, the state marking bit of the opposite terminal equipment is 1, the state marking position of the local terminal equipment is 1, the state marking position of the opposite terminal equipment is empty, and the ARP synchronization process is notified to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, wherein the state marking bit of the local terminal equipment is empty, the state marking bit of the opposite terminal equipment is 0, the state marking position of the local terminal equipment is 1, the state marking position of the opposite terminal equipment is empty, and the ARP synchronization process is notified to send ARP synchronization information;
and responding to the filtered ARP in the ARP information table and the state marking bit of the local equipment is 0, setting the state marking position of the local equipment as 1, setting the state marking position of the opposite equipment as null, and informing an ARP synchronization process to send ARP synchronization information.
8. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method of any one of claims 1-6.
9. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method of any one of claims 1-6.
CN202210762167.6A 2022-06-30 2022-06-30 Method, device, equipment and readable medium for ARP synchronization across link aggregation groups Active CN115150352B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210762167.6A CN115150352B (en) 2022-06-30 2022-06-30 Method, device, equipment and readable medium for ARP synchronization across link aggregation groups

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210762167.6A CN115150352B (en) 2022-06-30 2022-06-30 Method, device, equipment and readable medium for ARP synchronization across link aggregation groups

Publications (2)

Publication Number Publication Date
CN115150352A CN115150352A (en) 2022-10-04
CN115150352B true CN115150352B (en) 2023-08-04

Family

ID=83410703

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210762167.6A Active CN115150352B (en) 2022-06-30 2022-06-30 Method, device, equipment and readable medium for ARP synchronization across link aggregation groups

Country Status (1)

Country Link
CN (1) CN115150352B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111740899A (en) * 2020-07-13 2020-10-02 中国联合网络通信集团有限公司 ARP request message forwarding method, cross-device link aggregation group and network device
CN111865779A (en) * 2020-07-13 2020-10-30 中国联合网络通信集团有限公司 Route synchronization method and cross-device link aggregation group
CN112202678A (en) * 2020-09-11 2021-01-08 苏州浪潮智能科技有限公司 MAC address synchronization method, system, device and medium
CN113839862A (en) * 2021-09-16 2021-12-24 苏州浪潮智能科技有限公司 Method, system, terminal and storage medium for synchronizing ARP information between MCLAG neighbors

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111740899A (en) * 2020-07-13 2020-10-02 中国联合网络通信集团有限公司 ARP request message forwarding method, cross-device link aggregation group and network device
CN111865779A (en) * 2020-07-13 2020-10-30 中国联合网络通信集团有限公司 Route synchronization method and cross-device link aggregation group
CN112202678A (en) * 2020-09-11 2021-01-08 苏州浪潮智能科技有限公司 MAC address synchronization method, system, device and medium
CN113839862A (en) * 2021-09-16 2021-12-24 苏州浪潮智能科技有限公司 Method, system, terminal and storage medium for synchronizing ARP information between MCLAG neighbors

Also Published As

Publication number Publication date
CN115150352A (en) 2022-10-04

Similar Documents

Publication Publication Date Title
CN109274592B (en) MAC address table item processing method and device and computer readable medium
JP2010045760A (en) Connection recovery device for redundant system, method and processing program
CN112367254B (en) Cross-device link aggregation method and device and electronic device
CN112202678A (en) MAC address synchronization method, system, device and medium
CN101521616A (en) Method and system for neighbor migration in Border Gateway Protocol (BGP) distributed system
CN112367182B (en) Configuration method and device of disaster recovery main and standby equipment
CN102202004A (en) Routing error processing method and device and routing equipment
CN115150352B (en) Method, device, equipment and readable medium for ARP synchronization across link aggregation groups
CN113590049B (en) Storage volume cross-node cloning method, device, equipment and readable medium
CN107547374A (en) One kind polymerization reason treating method and apparatus
CN105871737A (en) Communication flow control device used for communication between redundant networks
CN113821342B (en) Method, device, equipment and readable medium for balancing cluster websocket service load
EP3886376A1 (en) Cloud network transmission routing method and system
CN111585860A (en) Method, device, storage medium and equipment for loop network convergence
CN113949658B (en) Table entry processing method, system, device, electronic equipment and storage medium
CN114157639B (en) Method, device and equipment for collecting information of intelligent network card of server and readable medium
CN113448512B (en) Takeover method, device and equipment for cache partition recovery and readable medium
JP2018107744A (en) Communication node, communication system, communication method, and program
CN115022345B (en) Method, device, equipment and readable medium for synchronizing switch data
CN104780063A (en) Login method and device for node equipment
CN114205207B (en) Network management method and device
CN111818192B (en) Communication method of gateway cluster, network equipment and gateway cluster system
CN113839801B (en) Method and device for switching operation state, main and standby management system and network system
CN117729117A (en) Multi-computer cluster topological relation determination method, device, electronic equipment and storage medium
CN117014362A (en) Method and device for updating forwarding table and multi-chassis link aggregation system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant