CN115150352A - Method, device, equipment and readable medium for ARP synchronization of cross-link aggregation group - Google Patents
Method, device, equipment and readable medium for ARP synchronization of cross-link aggregation group Download PDFInfo
- Publication number
- CN115150352A CN115150352A CN202210762167.6A CN202210762167A CN115150352A CN 115150352 A CN115150352 A CN 115150352A CN 202210762167 A CN202210762167 A CN 202210762167A CN 115150352 A CN115150352 A CN 115150352A
- Authority
- CN
- China
- Prior art keywords
- arp
- mark position
- terminal equipment
- information table
- setting
- 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.)
- Granted
Links
- 230000002776 aggregation Effects 0.000 title claims abstract description 63
- 238000004220 aggregation Methods 0.000 title claims abstract description 63
- 238000000034 method Methods 0.000 title claims abstract description 56
- 238000012544 monitoring process Methods 0.000 claims abstract description 42
- 230000001360 synchronised effect Effects 0.000 claims abstract description 40
- 238000012545 processing Methods 0.000 claims abstract description 9
- 230000004044 response Effects 0.000 claims description 23
- 230000008569 process Effects 0.000 claims description 20
- 230000032683 aging Effects 0.000 claims description 12
- 238000004590 computer program Methods 0.000 claims description 12
- 238000001914 filtration Methods 0.000 claims description 6
- 238000012217 deletion Methods 0.000 claims description 5
- 230000037430 deletion Effects 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 4
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/10—Mapping addresses of different types
- H04L61/103—Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/24—Multipath
- H04L45/245—Link aggregation, e.g. trunking
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Reducing energy consumption in communication networks
- Y02D30/50—Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate
Abstract
The invention provides a method, a device, equipment and a readable medium for ARP synchronization among equipment in a cross-link aggregation group, wherein the method comprises the following steps: establishing an ARP monitoring process in equipment of a cross-link aggregation group for monitoring the updating of an ARP address table of local end equipment and processing a synchronous ARP message sent by opposite end equipment; establishing an ARP information table in equipment of a cross-link aggregation group for recording ARP information; responding to the monitoring of the monitoring process to actively learn and update ARP of the local terminal equipment across the link aggregation interface, and recording the ARP information in an ARP information table; and responding to the ARP information update 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 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 the devices can be improved.
Description
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
Cross-device link aggregation enables link aggregation among multiple devices, thereby improving 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, thereby enhancing the reliability of the link level and the device level. Therefore, fast switching of traffic among devices in the aggregation link group becomes a central issue for improving reliability. The problem that the flow switching convergence time is too long due to the untimely updating of the ARP synchronization method in the existing cross-link aggregation group equipment, and the CPU overhead is occupied by too much synchronization content is large.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a device, and a readable medium for ARP synchronization between devices in a cross-link aggregation group, which can improve the ARP synchronization frequency, reduce the length of a synchronized packet, and improve the ARP synchronization speed between the devices.
Based on the above object, an aspect of the embodiments of the present invention provides a method for ARP synchronization between devices in a cross-link aggregation group, including the following steps:
establishing an ARP monitoring process in equipment of a cross-link aggregation group for monitoring the updating of an ARP address table of local end equipment and processing a synchronous ARP message sent by opposite end equipment;
establishing an ARP information table in equipment of a cross-link aggregation group for recording ARP information;
responding to the monitoring of the monitoring process to actively learn and update ARP of the local terminal equipment across the link aggregation interface, and recording the ARP information in an ARP information table;
and responding to the ARP information update 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 synchronous information.
According to an embodiment of the present invention, in response to an ARP information update of a local device and/or an opposite device, updating states of the local device and the opposite device in an ARP information table based on information in the ARP information table and sending synchronization information includes:
responding to the refresh of an ARP address table of local end equipment, filtering all ARP entries of a cross-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 local end equipment as 1 and the state mark position of opposite end equipment as null, and informing an ARP synchronization process to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, setting the state flag bit of the local terminal equipment to be 1, setting the state flag bit of the opposite terminal equipment to be 1, and setting the state flag bit of the opposite terminal equipment to be null;
responding to the filtered ARP in an ARP information table, setting the state mark bit of the local terminal equipment to be 1 and setting the state mark bit of the opposite terminal equipment to be 0, setting the state mark bit of the opposite terminal equipment to be null, and informing an ARP synchronization process to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, setting a local terminal equipment state mark position to be 1 and an opposite terminal equipment state mark position to be null, and informing an ARP synchronization process to send ARP synchronization information, wherein the local terminal equipment state mark position is null and the opposite terminal equipment state mark position is 1;
responding to the filtered ARP in an ARP information table, setting a local terminal equipment state mark position to be 1 and an opposite terminal equipment state mark position to be null, and informing an ARP synchronization process to send ARP synchronization information, wherein the local terminal equipment state mark position is null and the opposite terminal equipment state mark position is 0;
responding to the filtered ARP in an ARP information table and setting the local end equipment state mark position to be 0, setting the local end equipment state mark position to be 1 and setting the opposite end equipment state mark position to be null, and informing an ARP synchronization process to send ARP synchronization information;
according to one embodiment of the invention, in response to the ARP information update of the home device and/or the peer device, 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 comprises the following steps:
responding to the local terminal equipment receiving the ARP update message sent by the opposite terminal equipment, and judging whether the cross-link aggregation interface state of the local terminal equipment is up or not;
responding to the state of a cross-link aggregation interface of the local terminal equipment as up, and updating an ARP (address resolution protocol) sent by the opposite terminal equipment into an ARP information table;
responding to the fact that the sent ARP is not in an ARP information table, adding ARP information in the ARP information table, setting the state mark position of local end equipment to be null, setting the state mark position of opposite end equipment to be 1, and adding the ARP in the ARP information table of the local end equipment;
responding to the ARP sent in an ARP information table, setting the state mark position of local end equipment to be null, setting the state mark position of opposite end equipment to be 1, and updating the aging time in the ARP information table of the local end equipment;
responding to the ARP sent in an ARP information table, setting the state mark position of local equipment to be null, setting the state mark position of opposite equipment to be 0, setting the state mark position of opposite equipment to be 1, and updating the aging time in the ARP information table of the local equipment;
responding to the ARP sent in an ARP information table, setting the state mark position of local equipment as 1 and the state mark position of opposite equipment as 0, setting the state mark position of the local equipment as null and the state mark position of the opposite equipment as 1, and updating the aging time in the ARP information table of the local equipment;
responding to the ARP sent in an ARP information table, setting the state mark position of local equipment to be 1, setting the state mark position of opposite equipment to be null, setting the state mark position of the local equipment to be null, setting the state mark position of the opposite equipment to be 1, and updating the aging time in the ARP information table of the local equipment;
responding to the ARP sent in an ARP information table, setting the state mark position of local end equipment as 0, setting the state mark position of opposite end equipment as 1, setting the state mark position of the local end equipment as null, and adding the ARP in the ARP information table of the local end equipment;
responding to the ARP sent in an ARP information table, setting the state mark position of local equipment as 0, setting the state mark position of opposite equipment as null, setting the state mark position of the local equipment as null, setting the state mark position of the opposite equipment as 1, and adding the ARP in the ARP information table of the local equipment;
according to an embodiment of the present invention, in response to an ARP information update of a local device and/or an opposite device, updating states of the local device and the opposite device in an ARP information table based on information in the ARP information table and sending synchronization information includes:
in response to receiving a notification that the local terminal equipment deletes the ARP, filtering all ARP items of the cross-link aggregation interface by the ARP monitoring process, and updating the ARP items into an ARP information table;
responding to the deleted ARP in an ARP information table, setting the state mark position of local end equipment to be null, setting the state mark position of opposite end equipment to be 1, setting the state mark position of the local end equipment to be 0, and sending synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, setting the state mark position of local terminal equipment to be null, setting the state mark position of opposite terminal equipment to be 0, deleting the ARP in the ARP information table, and sending synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, setting the state mark position of local terminal equipment as 1, setting the state mark position of opposite terminal equipment as null, setting the state mark position of local terminal equipment as 0, and sending synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, setting the state mark position of local end equipment as 1 and setting the state mark position of opposite end equipment as 0, deleting the ARP in the ARP information table, and sending synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, setting the state mark position of local terminal equipment as 0 and setting the state mark position of opposite terminal equipment as null, and sending synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, setting the state mark position of local end equipment as 0 and setting the state mark position of opposite end equipment as 1, and sending synchronous information for deleting the ARP;
and responding to the deleted ARP in the ARP information table, setting the state mark position of the local terminal equipment to be 0, setting the state mark position of the opposite terminal equipment to be 0, and deleting the ARP in the ARP information table.
According to an embodiment of the present invention, in response to an ARP information update of a local device and/or an opposite device, updating states of the local device and the opposite device in an ARP information table based on information in the ARP information table and sending synchronization information includes:
responding to the local terminal equipment receiving the ARP deletion message sent by the opposite terminal equipment, and judging whether the cross-link aggregation interface state of the local terminal equipment is up or not;
responding to the state of the cross-link aggregation interface of the local terminal equipment as up, and updating a deletion ARP sent by the opposite terminal equipment into an ARP information table;
responding to the deleted ARP in the ARP information table, setting the state mark position of the local terminal equipment to be null, setting the state mark position of the opposite terminal equipment to be 1, setting the state mark position of the opposite terminal equipment to be 0, and sending an ARP request to the address in the deleted ARP item;
responding to the deleted ARP in the ARP information table, setting the state mark position of the local terminal equipment to be null, setting the state mark position of the opposite terminal equipment to be 0, and sending an ARP request to the address in the deleted ARP item;
responding to the deleted ARP in an ARP information table, setting the state mark position of local terminal equipment as 1, setting the state mark position of opposite terminal equipment as 0 and sending an ARP request to the address in the deleted ARP item, wherein the state mark position of the opposite terminal equipment is null;
in response to the fact that the deleted ARP is in an ARP information table and the state mark position of the local terminal equipment is 0, the state mark position of the opposite terminal equipment is null, and the ARP is deleted in the ARP information table;
and in response to the fact that the deleted ARP is in the ARP information table and the state mark position of the local terminal equipment is 0, the state mark position of the opposite terminal equipment is 1, and the ARP is deleted in the ARP information table.
According to an embodiment of the present invention, further comprising:
and the Arp synchronization process periodically synchronizes the ARP table entry with the local terminal equipment state of 1 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, an MAC address, a vlan ID, port information, a home device status bit and an opposite device status bit.
In another aspect of the embodiments of the present invention, there is also provided an apparatus for ARP synchronization between devices in a cross-link aggregation group, including:
the monitoring module is configured to establish an ARP monitoring process in equipment of the cross-link aggregation group for monitoring updating of an ARP address table of local-end equipment and processing a synchronous ARP message sent by opposite-end equipment;
the establishing module is configured to establish an ARP information table in equipment of the cross-link aggregation group for recording ARP information;
the recording module is configured to respond to the monitoring of the monitoring process that the local-end 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 an embodiment of the present invention, there is also provided a computer apparatus including:
at least one processor; and
a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of any of the methods described above.
In another aspect of the embodiments of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program realizes the steps of any one of the above methods when executed by a processor.
The invention has the following beneficial technical effects: the method for synchronizing the ARP among the 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 is used for monitoring the updating of an ARP address table of local terminal equipment and processing synchronous ARP messages sent by opposite terminal equipment; establishing an ARP information table in equipment of a cross-link aggregation group for recording ARP information; responding to the monitoring of the monitoring process to actively learn and update ARP of the local terminal equipment across the link aggregation interface, and recording the ARP information in an ARP information table; the ARP information of the local terminal equipment and/or the opposite terminal equipment is updated in response to the updating of the ARP information, the states of the local terminal equipment and the opposite terminal equipment in the ARP information table are updated based on the information in the ARP information table, and the synchronous information is sent.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram of a method of ARP synchronization among devices in a cross-link aggregation group, according to one embodiment of the present invention;
FIG. 2 is a schematic diagram of an apparatus for ARP synchronization between devices in a cross-link aggregation group according to one embodiment of the present invention;
FIG. 3 is a schematic diagram of a computer device according to one embodiment of the present invention;
fig. 4 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present 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 are described in further detail with reference to the accompanying drawings.
In view of the above objects, a first aspect of embodiments of the present invention proposes an embodiment of a method for ARP synchronization between devices in a cross-link aggregation group. Fig. 1 shows a schematic flow diagram of the method.
As shown in fig. 1, the method may include the steps of:
s1, establishing an ARP monitoring process in equipment of a cross-link aggregation group for monitoring the updating of an ARP address table of local-end equipment and processing a synchronous ARP message sent by opposite-end equipment. When Switch joins the cross-link aggregation group, an ARP monitoring process needs to be added and started, and the ARP monitoring process is responsible for monitoring the updating of an ARP address table of local terminal equipment and processing the synchronous ARP address information sent by opposite terminal equipment.
S2, an ARP information table is created in the equipment of the cross-link aggregation group and used for recording ARP information. An ARP information table iccpd _ ARP _ syn is created in the database, and the information table records ARP information including IP addresses, mac addresses, vlan ids, port information, a home terminal status bit and an opposite terminal status bit. The home state bit and the peer state bit are both initially null.
S3, responding to the monitoring process that the local terminal equipment actively learns and updates the ARP across the link aggregation interface, and recording ARP information in an ARP information table.
And S4, responding to the ARP information update 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 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 the devices can be improved.
In a preferred embodiment of the present invention, in response to updating of ARP information of the local device and/or the peer device, updating states of the local device and the peer device in the ARP information table based on information in the ARP information table and sending synchronization information includes:
responding to the refresh of an ARP address table of local end equipment, filtering all ARP entries of a cross-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 local end equipment as 1 and the state mark position of opposite end equipment as null, and informing an ARP synchronization process to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, setting the state flag bit of the local terminal equipment to be 1, setting the state flag bit of the opposite terminal equipment to be 1, and setting the state flag bit of the opposite terminal equipment to be null;
responding to the filtered ARP in an ARP information table, setting the state flag bit of the local terminal equipment to be 1 and setting the state flag bit of the opposite terminal equipment to be 0, setting the state flag bit of the opposite terminal equipment to be null, and informing an ARP synchronization process to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, setting a home terminal equipment state mark position to be 1 and an opposite terminal equipment state mark position to be null, and informing an ARP synchronization process to send ARP synchronization information, wherein the home terminal equipment state mark position is set to be 1 and the opposite terminal equipment state mark position is set to be null;
responding to the filtered ARP in an ARP information table, setting a home terminal equipment state mark position to be 1 and an opposite terminal equipment state mark position to be null, and informing an ARP synchronization process to send ARP synchronization information, wherein the home terminal equipment state mark position is null and the opposite terminal equipment state mark position is 0;
responding to the filtered ARP in an ARP information table and setting the local end equipment state mark position as 0, setting the local end equipment state mark position as 1 and setting the opposite end equipment state mark position as null, and informing an ARP synchronization process to send ARP synchronization information;
in a preferred embodiment of the present invention, in response to updating of ARP information of the local device and/or the peer device, updating states of the local device and the peer device in the ARP information table based on information in the ARP information table and sending synchronization information includes:
responding to the local terminal equipment receiving the ARP update message sent by the opposite terminal equipment, and judging whether the cross-link aggregation interface state of the local terminal equipment is up or not;
responding to the state of a cross-link aggregation interface of the local terminal equipment as up, and updating an ARP (address resolution protocol) sent by the opposite terminal equipment into an ARP information table;
responding to the fact that the sent ARP is not in an ARP information table, adding ARP information in the ARP information table, setting the state mark position of local end equipment to be null, setting the state mark position of opposite end equipment to be 1, and adding the ARP in the ARP information table of the local end equipment;
responding to the ARP sent in an ARP information table, setting the state mark position of local end equipment to be null, setting the state mark position of opposite end equipment to be 1, and updating the aging time in the ARP information table of the local end equipment;
responding to the ARP sent in an ARP information table, setting the state mark position of local equipment to be null, setting the state mark position of opposite equipment to be 0, setting the state mark position of opposite equipment to be 1, and updating the aging time in the ARP information table of the local equipment;
responding to the ARP sent in an ARP information table, setting the state mark position of local equipment as 1 and the state mark position of opposite equipment as 0, setting the state mark position of the local equipment as null and the state mark position of the opposite equipment as 1, and updating the aging time in the ARP information table of the local equipment;
responding to the ARP sent in an ARP information table, setting the state mark position of local equipment to be 1, setting the state mark position of opposite equipment to be null, setting the state mark position of the local equipment to be null, setting the state mark position of the opposite equipment to be 1, and updating the aging time in the ARP information table of the local equipment;
responding to the ARP sent in an ARP information table, setting the state mark position of local end equipment as 0, setting the state mark position of opposite end equipment as 1, setting the state mark position of the local end equipment as null, and adding the ARP in the ARP information table of the local end equipment;
responding to the ARP sent in an ARP information table, setting the state mark position of local equipment as 0, setting the state mark position of opposite equipment as null, setting the state mark position of the local equipment as null, setting the state mark position of the opposite equipment as 1, and adding the ARP in the ARP information table of the local equipment;
in a preferred embodiment of the present invention, in response to updating of ARP information of a local device and/or an opposite device, updating states of the local device and the opposite device in an ARP information table based on information in the ARP information table and sending synchronization information includes:
in response to receiving a notification that the local terminal equipment deletes the ARP, filtering all ARP items of the cross-link aggregation interface by the ARP monitoring process, and updating the ARP items into an ARP information table;
responding to the deleted ARP in an ARP information table, setting the state mark position of local end equipment to be null, setting the state mark position of opposite end equipment to be 1, setting the state mark position of the local end equipment to be 0, and sending synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, setting the state mark position of local end equipment as null and setting the state mark position of opposite end equipment as 0, deleting the ARP in the ARP information table, and sending synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, setting the state mark position of local end equipment as 1, setting the state mark position of opposite end equipment as null, setting the state mark position of the local end equipment as 0, and sending synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, setting the state mark position of local terminal equipment as 1 and setting the state mark position of opposite terminal equipment as 0, deleting the ARP in the ARP information table, and sending synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, setting the state mark position of local terminal equipment as 0 and setting the state mark position of opposite terminal equipment as null, and sending synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, setting the state mark position of local end equipment as 0 and setting the state mark position of opposite end equipment as 1, and sending synchronous information for deleting the ARP;
and responding to the deleted ARP in the ARP information table, setting the state mark position of the local terminal equipment to be 0, setting the state mark position of the opposite terminal equipment to be 0, and deleting the ARP in the ARP information table.
In a preferred embodiment of the present invention, in response to updating of ARP information of the local device and/or the peer device, updating states of the local device and the peer device in the ARP information table based on information in the ARP information table and sending synchronization information includes:
responding to the local terminal equipment receiving the ARP deletion message sent by the opposite terminal equipment, and judging whether the cross-link aggregation interface state of the local terminal equipment is up or not;
responding to the state of a cross-link aggregation interface of the local terminal equipment as up, and updating a deleted ARP (address resolution protocol) sent by the opposite terminal equipment into an ARP information table;
responding to the deleted ARP in an ARP information table, setting the state mark position of local end equipment to be null, setting the state mark position of opposite end equipment to be 1, setting the state mark position of the opposite end equipment to be 0, and sending an ARP request to the address in the deleted ARP item;
responding to the deleted ARP in an ARP information table, setting the state mark position of local end equipment to be null, setting the state mark position of opposite end equipment to be 0, setting the state mark position of the opposite end equipment to be 0, and sending an ARP request to the address in the deleted ARP item;
responding to the deleted ARP in an ARP information table, setting the state mark position of local terminal equipment as 1, setting the state mark position of opposite terminal equipment as 0 and sending an ARP request to the address in the deleted ARP item, wherein the state mark position of the opposite terminal equipment is null;
in response to the fact that the deleted ARP is in an ARP information table and the state mark position of the local terminal equipment is 0, the state mark position of the opposite terminal equipment is null, and the ARP is deleted in the ARP information table;
and in response to the fact that the deleted ARP is in the ARP information table and the state mark position of the local terminal equipment is 0, the state mark position of the opposite terminal equipment is 1, and the ARP is deleted in the ARP information table.
In a preferred embodiment of the present invention, the method further comprises:
and the Arp synchronization process periodically synchronizes the ARP table entry with the local terminal equipment state of 1 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 an IP address, a MAC address, a vlan ID, port information, a home device status bit, and a peer device status bit.
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 the devices can be improved.
It should be noted that, as will be understood by those skilled in the art, all or part of the processes in the methods of the above embodiments may be implemented by instructing relevant hardware through a computer program, and the above programs may be stored in a computer-readable storage medium, and when executed, the programs may include the processes of the embodiments of the methods as described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
Furthermore, the method disclosed according to an embodiment of the present invention may also be implemented as a computer program executed by a CPU, and the computer program may be stored in a computer-readable storage medium. The computer program, when executed by the CPU, performs the above-described functions defined in the method disclosed in the embodiments of the present invention.
In view of the above object, according to a second aspect of the embodiments of the present invention, there is provided an apparatus for ARP synchronization between devices in a cross-link aggregation group, as shown in fig. 2, the apparatus 200 includes:
the monitoring module is configured to establish an ARP monitoring process in equipment of the cross-link aggregation group for monitoring updating of an ARP address table of local-end equipment and processing a synchronous ARP message sent by opposite-end equipment;
the establishing module is configured to establish an ARP information table in equipment of the cross-link aggregation group for recording ARP information;
the recording module is configured to respond to the monitoring process that the local terminal equipment actively learns and updates the ARP through the cross-link aggregation interface, and record 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 view of the above object, a third aspect of the embodiments of the present invention provides 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, the instructions when executed by the processor implementing the above method.
In view of 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 illustrating 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 which, when executed by a processor, performs the method as described above.
Furthermore, the methods disclosed according to embodiments 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. Which when executed by a processor performs the above-described functions defined in the methods disclosed in embodiments of the invention.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
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 disclosed embodiments of the present invention.
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 place 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 a general-purpose or special-purpose processor. Also, 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 present 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 of the invention 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 numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits 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 instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also combinations between technical features in the above embodiments or in different embodiments are possible, and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.
Claims (10)
1. A method for ARP synchronization among devices in a cross-link aggregation group is characterized by comprising the following steps:
establishing an ARP monitoring process in equipment of a cross-link aggregation group for monitoring the updating of an ARP address table of local end equipment and processing a synchronous ARP message sent by opposite end equipment;
establishing an ARP information table in equipment of a cross-link aggregation group for recording ARP information;
responding to the monitoring of the monitoring process to actively learn and update ARP of the local terminal equipment across the link aggregation interface, and recording the ARP information in an ARP information table;
and responding to the ARP information update 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 synchronous information.
2. The method of claim 1, wherein, in response to the ARP information update of the local device and/or the peer device, updating the states of the local device and the peer device in the ARP information table based on the information in the ARP information table and sending synchronization information comprises:
responding to the refresh of an ARP address table of local end equipment, filtering all ARP entries of a cross-link aggregation interface by an ARP monitoring process, and updating the ARP entries into an ARP information table;
responding the filtered ARP is not in the ARP information table, adding ARP information in the ARP information table, setting the state mark position of the local terminal equipment to be 1, the state mark position of the opposite terminal equipment is null, and the ARP synchronization process is informed to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, setting the state flag bit of the local terminal equipment to be 1, setting the state flag bit of the opposite terminal equipment to be 1, and setting the state flag bit of the opposite terminal equipment to be null;
responding to the filtered ARP in an ARP information table, setting the state flag bit of the local terminal equipment to be 1 and setting the state flag bit of the opposite terminal equipment to be 0, setting the state flag bit of the opposite terminal equipment to be null, and informing an ARP synchronization process to send ARP synchronization information;
responding to the filtered ARP in an ARP information table, setting a local terminal equipment state mark position to be 1 and an opposite terminal equipment state mark position to be null, and informing an ARP synchronization process to send ARP synchronization information, wherein the local terminal equipment state mark position is null and the opposite terminal equipment state mark position is 1;
responding to the filtered ARP in an ARP information table, setting a local terminal equipment state mark position to be 1 and an opposite terminal equipment state mark position to be null, and informing an ARP synchronization process to send ARP synchronization information, wherein the local terminal equipment state mark position is null and the opposite terminal equipment state mark position is 0;
and responding to the filtered ARP in an ARP information table and setting the local end equipment state mark position as 0, setting the local end equipment state mark position as 1 and setting the opposite end equipment state mark position as null, and informing an ARP synchronization process to send ARP synchronization information.
3. The method according to claim 1, wherein in response to updating of ARP information of the local device and/or the peer device, updating the states of the local device and the peer device in the ARP information table based on information in the ARP information table and sending synchronization information comprises:
responding to the local terminal equipment receiving the ARP updating message sent by the opposite terminal equipment, and judging whether the cross-link aggregation interface state of the local terminal equipment is up or not;
responding to the state of a cross-link aggregation interface of the local terminal equipment as up, and updating an ARP (address resolution protocol) sent by the opposite terminal equipment into an ARP information table;
responding to the fact that the sent ARP is not in an ARP information table, adding ARP information in the ARP information table, setting the state mark position of local end equipment to be null, setting the state mark position of opposite end equipment to be 1, and adding the ARP in the ARP information table of the local end equipment;
responding to the ARP sent in the ARP information table, setting the state mark position of the local terminal equipment to be null, setting the state mark position of the opposite terminal equipment to be 1, and updating the aging time in the ARP information table of the local terminal equipment;
responding to the ARP sent in an ARP information table, setting the state mark position of local equipment to be null, setting the state mark position of opposite equipment to be 0, setting the state mark position of opposite equipment to be 1, and updating the aging time in the ARP information table of the local equipment;
responding to the ARP sent in an ARP information table, setting the state mark position of local terminal equipment as 1 and the state mark position of opposite terminal equipment as 0, setting the state mark position of the local terminal equipment as null and the state mark position of the opposite terminal equipment as 1, and updating the aging time in the ARP information table of the local terminal equipment;
responding to the ARP sent in an ARP information table, setting the state mark position of local equipment to be 1, setting the state mark position of opposite equipment to be null, setting the state mark position of the local equipment to be null, setting the state mark position of the opposite equipment to be 1, and updating the aging time in the ARP information table of the local equipment;
responding to the ARP sent in an ARP information table, setting the state mark position of local end equipment as 0, setting the state mark position of opposite end equipment as 1, setting the state mark position of the local end equipment as null, and adding the ARP in the ARP information table of the local end equipment;
responding to the ARP which is sent in the ARP information table, setting the state mark position of the local terminal equipment to be 0, setting the state mark position of the opposite terminal equipment to be null, setting the state mark position of the local terminal equipment to be null, setting the state mark position of the opposite terminal equipment to be 1, and adding the ARP in the ARP information table of the local terminal equipment.
4. The method of claim 1, wherein, in response to the ARP information update of the local device and/or the peer device, updating the states of the local device and the peer device in the ARP information table based on the information in the ARP information table and sending synchronization information comprises:
in response to receiving a notification that the local terminal equipment deletes the ARP, filtering all ARP items of the cross-link aggregation interface by the ARP monitoring process, and updating the ARP items into an ARP information table;
responding to the deleted ARP in an ARP information table, setting the state mark position of local end equipment to be null, setting the state mark position of opposite end equipment to be 1, setting the state mark position of the local end equipment to be 0, and sending synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, setting the state mark position of local end equipment as null and setting the state mark position of opposite end equipment as 0, deleting the ARP in the ARP information table, and sending synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, setting the state mark position of local end equipment as 1, setting the state mark position of opposite end equipment as null, setting the state mark position of the local end equipment as 0, and sending synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, setting the state mark position of local end equipment as 1 and setting the state mark position of opposite end equipment as 0, deleting the ARP in the ARP information table, and sending synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, setting the state mark position of local terminal equipment as 0 and setting the state mark position of opposite terminal equipment as null, and sending synchronous information for deleting the ARP;
responding to the deleted ARP in an ARP information table, setting the state mark position of local end equipment as 0 and setting the state mark position of opposite end equipment as 1, and sending synchronous information for deleting the ARP;
and in response to the fact that the deleted ARP is in the ARP information table and the state mark position of the local terminal equipment is 0, the state mark position of the opposite terminal equipment is 0, and the ARP is deleted in the ARP information table.
5. The method according to claim 1, wherein in response to updating of ARP information of the local device and/or the peer device, updating the states of the local device and the peer device in the ARP information table based on information in the ARP information table and sending synchronization information comprises:
responding to the local terminal equipment receiving the ARP deletion message sent by the opposite terminal equipment, and judging whether the cross-link aggregation interface state of the local terminal equipment is up or not;
responding to the state of the cross-link aggregation interface of the local terminal equipment as up, and updating a deletion ARP sent by the opposite terminal equipment into an ARP information table;
responding to the deleted ARP in an ARP information table, setting the state mark position of local end equipment to be null, setting the state mark position of opposite end equipment to be 1, setting the state mark position of the opposite end equipment to be 0, and sending an ARP request to the address in the deleted ARP item;
responding to the deleted ARP in an ARP information table, setting the state mark position of local end equipment to be null, setting the state mark position of opposite end equipment to be 0, setting the state mark position of the opposite end equipment to be 0, and sending an ARP request to the address in the deleted ARP item;
responding to the deleted ARP in an ARP information table, setting the state mark position of local terminal equipment as 1, setting the state mark position of opposite terminal equipment as 0 and sending an ARP request to the address in the deleted ARP item, wherein the state mark position of the opposite terminal equipment is null;
in response to the fact that the deleted ARP is in an ARP information table and the state mark position of the local terminal equipment is 0, the state mark position of the opposite terminal equipment is null, and the ARP is deleted in the ARP information table;
and in response to the fact that the deleted ARP is in the ARP information table and the state mark position of the local terminal equipment is 0, the state mark position of the opposite terminal equipment is 1, and the ARP is deleted in the ARP information table.
6. The method of claim 1, further comprising:
and the Arp synchronization process periodically synchronizes the ARP table entry with the local terminal equipment state of 1 in the ARP information table to the opposite terminal equipment by using the update message.
7. 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.
8. An apparatus for ARP synchronization between devices in a cross-link aggregation group, the apparatus comprising:
the system comprises a monitoring module, a link aggregation group management module and a link management module, wherein the monitoring module is configured to establish an ARP monitoring process in equipment of a cross-link aggregation group for monitoring the update of an ARP address table of local terminal equipment and processing a synchronous ARP message sent by opposite terminal equipment;
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 situation that the monitoring process monitors that the local terminal equipment actively learns and updates the ARP across the link aggregation interface, and records 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 information in the ARP information table and send synchronous information.
9. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
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 true CN115150352A (en) | 2022-10-04 |
CN115150352B 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)
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 |
-
2022
- 2022-06-30 CN CN202210762167.6A patent/CN115150352B/en active Active
Patent Citations (4)
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 |
---|---|
CN115150352B (en) | 2023-08-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8582469B2 (en) | Peer-to-peer network including routing protocol enhancement | |
US20070101422A1 (en) | Automated network blocking method and system | |
EP2597818A1 (en) | Cluster management system and method | |
CN112202678A (en) | MAC address synchronization method, system, device and medium | |
CN104580425A (en) | Client data synchronization method and system | |
CN112367182A (en) | Configuration method and device of disaster recovery main and standby equipment | |
CN108509296B (en) | Method and system for processing equipment fault | |
CN113285894B (en) | Identity identification network mobility control method and system based on programmable switch | |
CN115150352B (en) | Method, device, equipment and readable medium for ARP synchronization across link aggregation groups | |
CN111682968B (en) | Network access management method and system for communication equipment | |
EP3886376A1 (en) | Cloud network transmission routing method and system | |
CN109413142B (en) | Method for realizing iSCSI virtual agent under L inux | |
CN114157639B (en) | Method, device and equipment for collecting information of intelligent network card of server and readable medium | |
CN114422427B (en) | Flow balancing method and device, electronic equipment and storage medium | |
CN113448512B (en) | Takeover method, device and equipment for cache partition recovery and readable medium | |
CN102843285A (en) | Distributed link aggregation method and node for realizing same | |
CN113505180A (en) | Method, device and equipment for synchronizing mirror images in multi-cloud platform and readable medium | |
CN111884919B (en) | Method, device, equipment and readable medium for clearing invalid virtual IP | |
US20200341968A1 (en) | Differential Update of Local Cache from Central Database | |
EP4333405A1 (en) | Method and apparatus for information synchronization between switches | |
CN114979061B (en) | Method, device, equipment and medium for responding ARP (address resolution protocol) of intelligent network card | |
CN114124780B (en) | Route issuing method, device, electronic equipment and storage medium | |
CN113079040B (en) | Port migration method and device | |
CN114172762B (en) | Communication method, device, system and readable storage medium | |
KR101088356B1 (en) | A system and method for managing network connectivity disruptions in a multi- homed UPnP device |
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 |