Synchronization Method, Device and Storage Medium for Address Resolution Protocol Entries

By synchronizing the aging time of ARP table entries between the main control board and the service board, the business interruption problem caused by inconsistent aging time is solved, and the stability of the business board operation service is achieved.

CN116192796BActive Publication Date: 2025-05-30BEIJING HILLSTONE NETWORKS INFORMATION TECHCO
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310193411.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-02
Publication Date
2025-05-30
Estimated Expiration
2043-03-02

AI Technical Summary

Technical Problem

Due to the inconsistent aging time of the ARP table entries of the main control board and the business board, the problem of business interruption is caused.

Method used

By obtaining the request sent by the target service board to the main control board, parsing the request and determining whether the target ARP table entry exists in the main control board, obtaining the current aging time of the table entry, and encapsulating it into the response and sending it to the service board. When a historical ARP table entry exists in the business board, update the newly synchronized ARP table entry and the current aging time to the historical table entry.

Benefits of technology

Ensure that the aging time of the ARP table entries of the main control board and the business board is consistent, avoid business interruptions, and improve the stability of the business board operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116192796B_ABST
    Figure CN116192796B_ABST
Patent Text Reader

Abstract

The present application discloses a method, apparatus, and storage medium for synchronizing address resolution protocol entries. The method includes: obtaining a first request sent by a target service board to a master board, parsing the first request to obtain a target entry name, and determining whether there is a target address resolution protocol entry corresponding to the target entry name in the master board; in the case where there is a target address resolution protocol entry, obtaining the current aging time; encapsulating the target address resolution protocol entry and the current aging time into a first response, and sending the first response to the target service board; determining whether there is a historical address resolution protocol entry in the target service board; in the case where there is a historical address resolution protocol entry, synchronizing the target address resolution protocol entry to the historical address resolution protocol entry, and updating the aging time to the current aging time. Through the present application, the problem of service interruption caused by different aging times of the master board and the service board in the related art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of firewalls, and more particularly, to a method, apparatus, and storage medium for synchronizing Address Resolution Protocol (ARP) table entries. Background Art

[0002] A distributed firewall (compared with a centralized firewall) consists of a main control board and multiple service boards. In the related art, the ARP (Address Resolution Protocol) synchronization between the main control board and the service boards is completed by the original ARP packets. However, the aging time of the ARP table entries on the main control board is not included in the original ARP packets. Therefore, in the scenario where a service board is restarted or a new service board is inserted, if the aging time of a certain ARP table entry on the main control board has been reduced from the initially set ARP aging time of the system (e.g., 1200 seconds) to 300 seconds, after the service board is restarted, the service packets will trigger the service board to send an ARP request to the main control board. At this time, since this ARP table entry exists on the main control board, the main control board will directly reply with an ARP response. After receiving the ARP response, the service board will create or update the ARP table entry and set the aging time of this ARP table entry to the aging time set by the system (or the aging time configured on the interface), which is 1200 seconds. In this way, the aging times of this ARP table entry on the main control board and the service board are inconsistent (the current aging time on the main control board is 300 seconds, and the current aging time on the service board is 1200 seconds). After 300 seconds, the ARP table entry on the main control board is aged and deleted, while the ARP table entry on the service board still has 900 seconds of remaining aging time.

[0003] This situation where the ARP table entries on the main control board and the service board are inconsistent may cause problems in some scenarios. For example: At this time, if an external network device modifies the interface IP address, the current ARP table entry on the service board may be incorrect. Before the incorrect ARP table entry on the service board ages, the services related to this ARP table entry will be unavailable. (Even if the external device sends a gratuitous ARP packet to the firewall, the service will still be unavailable because the gratuitous ARP can only be used to update existing ARP table entries, and all ARP packets sent from the outside are processed by the main control board, but at this time, this ARP table entry no longer exists on the main control board (it has been aged and deleted).)

[0004] When the aging time of the ARP entry on the main control board reaches the final aging moment, an ARP request will be sent to the external network device. If the aging time of the ARP entry on the service board also reaches the final aging moment and an ARP request is sent to the main control board, the main control board will directly reply to the service board that this ARP entry exists. In this case, the service board will continue to retain this ARP entry and set its aging time to the aging time set by the system (or the aging time configured on the interface), which is 1200 seconds. If the external network device does not respond to the ARP request sent by the main control board finally, the ARP entry on the main control board will be deleted, but the ARP entry on the service board will continue to exist and the aging time will be 1200 seconds. The existence of old and incorrect ARP entries on the service board may cause service interruption.

[0005] However, since the ARP synchronization between the main control board and the service board is completed through the original ARP packets, when the ARP entry on the main control board is deleted, the service board cannot be notified to delete the ARP entry. Instead, the ARP entries on the main control board and the service board age and are deleted respectively. Since the ARP entries on the main control board and the service board age and are deleted respectively, it is possible that the ARP entry on the main control board has been deleted, but there are still old ARP entries on the service board. The existence of old and incorrect ARP entries on the service board may cause service interruption.

[0006] Regarding the problem of service interruption caused by different aging times of the main control board and the service board in the related technology, no effective solution has been proposed yet. Summary of the Invention

[0007] The main purpose of this application is to provide a method, device and storage medium for synchronizing address resolution protocol entries, so as to solve the problem of service interruption caused by different aging times of the main control board and the service board in the related technology.

[0008] To achieve the above object, according to one aspect of the present application, a method for synchronizing address resolution protocol entries is provided. The method includes: obtaining a first request sent by a target service board to a master board, parsing the first request to obtain a target entry name, and determining whether there is a target address resolution protocol entry corresponding to the target entry name in the master board, where the first request is used by the target service board to request the master board to obtain the target address resolution protocol entry; in the case where there is a target address resolution protocol entry in the master board, obtaining the current aging time of the target address resolution protocol entry; encapsulating the target address resolution protocol entry and the current aging time into a first response, and sending the first response to the target service board, where the first response is used by the master board to send the target address resolution protocol entry to the target service board; determining whether there is a historical address resolution protocol entry in the target service board; in the case where there is a historical address resolution protocol entry in the target service board, synchronizing the target address resolution protocol entry to the historical address resolution protocol entry, and updating the aging time of the historical address resolution protocol entry to the current aging time.

[0009] Optionally, after determining whether there is a target address resolution protocol entry corresponding to the target entry name in the master board, the method further includes: in the case where there is no target address resolution protocol entry in the master board, sending a second request to a target network device, where the second request is used by the master board to request the target network device to obtain the target address resolution protocol entry; obtaining a second response sent by the target network device to the master board, where the second response is used by the target network device to send the target address resolution protocol entry to the master board; obtaining the target address resolution protocol entry from the second response, and creating the target address resolution protocol entry in the master board; obtaining the current aging time of the target address resolution protocol entry, and encapsulating the target address resolution protocol entry and the current aging time into a third response, where the third response is used by the master board to send the target address resolution protocol entry to the target service board; broadcasting the third response to all service boards.

[0010] Optionally, after determining whether there is a historical address resolution protocol entry in the target service board, the method further includes: in the case where there is no historical address resolution protocol entry in the target service board, creating the target address resolution protocol entry; setting the aging time of the target address resolution protocol entry to the current aging time.

[0011] Optionally, before encapsulating the target address resolution protocol entry and the current aging time into the first response, the method further includes: determining whether the current aging time is less than or equal to the aging time threshold; in the case where the current aging time is greater than the aging time threshold, performing the step of encapsulating the target address resolution protocol entry and the current aging time into the first response; in the case where the current aging time is less than or equal to the aging time threshold, sending a third request to the target network device, where the third request is used for the master control board to request the target network device to obtain the target address resolution protocol entry; determining whether the master control board receives a fourth response sent by the target network device, where the fourth response is used for the target network device to send the target address resolution protocol entry to the master control board; in the case of receiving the fourth response, performing the step of encapsulating the target address resolution protocol entry and the current aging time into the first response.

[0012] Optionally, after determining whether the master control board receives the fourth response sent by the target network device, the method further includes: in the case of not receiving the fourth response, deleting the target address resolution protocol entry on the master control board; deleting the target address resolution protocol entries on all service boards.

[0013] Optionally, before deleting the target address resolution protocol entry on the master control board, the method further includes: obtaining the target duration from the current moment to the time when the third request is sent; determining whether the target duration is greater than or equal to the response duration threshold; in the case where the target duration is greater than or equal to the response duration threshold, performing the step of deleting the target address resolution protocol entry on the master control board.

[0014] Optionally, before obtaining the first request sent by the target service board to the master control board, the method further includes: determining whether each address resolution protocol entry on the master control board is deleted; in the case where there is a deleted address resolution protocol entry on the master control board, deleting the address resolution protocol entries corresponding to the deleted address resolution protocol entry on all service boards.

[0015] To achieve the above object, according to another aspect of the present application, a synchronization device for address resolution protocol entries is provided. The device includes: a first acquisition unit, configured to acquire a first request sent by a target service board to a master control board, resolve the first request to obtain a target entry name, and determine whether there is a target address resolution protocol entry corresponding to the target entry name in the master control board, where the first request is used by the target service board to request the master control board to obtain the target address resolution protocol entry; a second acquisition unit, configured to acquire the current aging time of the target address resolution protocol entry when the target address resolution protocol entry exists in the master control board; a packaging unit, configured to package the target address resolution protocol entry and the current aging time into a first response, and send the first response to the target service board, where the first response is used by the master control board to send the target address resolution protocol entry to the target service board; a first judgment unit, configured to judge whether there is a historical address resolution protocol entry in the target service board; a synchronization unit, configured to synchronize the target address resolution protocol entry to the historical address resolution protocol entry and update the aging time of the historical address resolution protocol entry to the current aging time when the historical address resolution protocol entry exists in the target service board.

[0016] Through the present application, the following steps are adopted: acquiring a first request sent by a target service board to a master control board, resolving the first request to obtain a target entry name, and determining whether there is a target address resolution protocol entry corresponding to the target entry name in the master control board, where the first request is used by the target service board to request the master control board to obtain the target address resolution protocol entry; acquiring the current aging time of the target address resolution protocol entry when the target address resolution protocol entry exists in the master control board; packaging the target address resolution protocol entry and the current aging time into a first response, and sending the first response to the target service board, where the first response is used by the master control board to send the target address resolution protocol entry to the target service board; judging whether there is a historical address resolution protocol entry in the target service board; synchronizing the target address resolution protocol entry to the historical address resolution protocol entry and updating the aging time of the historical address resolution protocol entry to the current aging time when the historical address resolution protocol entry exists in the target service board, thereby solving the problem of service interruption caused by different aging times of the master control board and the service board in the related art. By packaging the current aging time of the master control board when the master control board sends a response to the target service board, it is ensured that the aging times of the master control board and the service board are consistent, avoiding service interruption, and thus achieving the effect of improving the stability of the service board in running services. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which form a part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions thereof of this application are used to explain this application and do not constitute an improper limitation to this application. In the drawings:

[0018] Figure 1 is a flowchart of a method for synchronizing address resolution protocol entries provided by an embodiment of the present application;

[0019] Figure 2 is a flowchart of message transmission provided by an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of a device for synchronizing address resolution protocol entries provided by an embodiment of the present application;

[0021] Figure 4 is a schematic diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0022] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the drawings and in conjunction with the embodiments.

[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so as to describe the embodiments of the present application herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0025] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in the present disclosure are all information and data that have been authorized by the user or fully authorized by all parties.

[0026] The present invention will be described below in conjunction with preferred implementation steps. Figure 1It is a flowchart of the method for synchronizing the address resolution protocol entry provided by the embodiment of the present application. As Figure 1 shown, the method includes the following steps:

[0027] Step S101: Obtain a first request sent by a target service board to the master board, parse the first request to obtain a target entry name, and determine whether there is a target address resolution protocol entry corresponding to the target entry name in the master board. The first request is used by the target service board to request the master board to obtain the target address resolution protocol entry.

[0028] Specifically, the service board is a module that runs various services by forwarding and transmitting packets in a distributed firewall. The master board is a transfer module responsible for uniformly scheduling the packet transmission between each service board and the network security device. The target address resolution protocol entry, that is, the target ARP entry, is a transmission protocol table for obtaining the physical address through the IP address. When a traffic packet is forwarded, it needs to obtain the physical address of the destination IP address. Therefore, it is necessary to obtain the target ARP entry to parse the physical address before completing the packet transmission step.

[0029] For example, Figure 2 It is a flowchart of the packet transmission provided by the embodiment of the present application. As Figure 2 shown, the target address resolution protocol entry is ARP entry A. The target service board needs to send a packet to the network security device with the IP address 3.3.3.3. The target service board needs to send a first request to the master board to obtain the physical address of the network security device with the IP address 3.3.3.3, and this physical address is stored in ARP entry A.

[0030] Step S102: When there is a target address resolution protocol entry in the master board, obtain the current aging time of the target address resolution protocol entry.

[0031] Specifically, the aging time refers to the retention time of the address resolution protocol entry on the master board or the service board. For example, the initial aging time of ARP entry A is 1200 seconds. After 900 seconds of the creation of ARP entry A on the master board, the current aging time of ARP entry A is 300 seconds. When the master board receives the first request, it needs to query whether there is ARP entry A on the master board. If it exists, the target service board can directly obtain the required physical address from the master board. However, in order to ensure that the aging times of the master board and the target service board are the same, when it is determined that there is ARP entry A in the master board, the current aging time of ARP entry A is obtained.

[0032] Step S103: Package the target address resolution protocol entry and the current aging time into the first response, and send the first response to the target service board, where the first response is used for the master control board to send the target address resolution protocol entry to the target service board.

[0033] Specifically, as Figure 2 shown, after the master control board receives the first request from the target service board, if the master control board has the ARP entry A, it directly sends the first response to the target service board. In the board message encapsulation structure of the ARP packet in the first response, in addition to carrying the ARP entry A, the current aging time of the ARP entry A on the master control board is also carried.

[0034] For example, in the scenario where the target service board is restarted or a new service board is inserted, if the aging time of a certain ARP entry on the master control board has been reduced from the initially set ARP aging time of the system (for example: 1200 seconds) to 300 seconds at this time, after the target service board is restarted, the service packet triggers the target service board to send a first request to the master control board. At this time, since the master control board has this ARP entry, it will directly reply and send the first response, and the current aging time of 300 seconds of the ARP entry of the master control board is carried in the board message encapsulation structure of the first response. After the service board receives the first response, it will create or update the ARP entry, and set the aging time of this ARP entry to the aging time of 300 seconds carried in the first response of the master control board. In this way, the aging times of the ARP entries of the master control board and the service board are equal (both are 300 seconds), and the ARP entries of the master control board and the service board will finally be synchronized and aged and deleted, and there will no longer be a problem that the aging times of the ARP entries of the master control board and the service board are inconsistent, resulting in service interruption finally.

[0035] Step S104: Determine whether there is a historical address resolution protocol entry in the target service board.

[0036] Specifically, after the target service board receives the first response, it needs to determine whether there is a historical ARP entry A retained in the target service board. If so, it directly updates the historical ARP entry A on the target service board according to the ARP entry A in the first response. If not, it creates an ARP entry A on the target service board and synchronizes the ARP information in the first response to the newly created ARP entry A on the target service board.

[0037] Step S105: In the case where there is a historical address resolution protocol entry in the target service board, synchronize the target address resolution protocol entry to the historical address resolution protocol entry, and update the aging time of the historical address resolution protocol entry to the current aging time.

[0038] Specifically, after each service board receives an ARP response, it creates (when this ARP entry did not exist originally) or updates the ARP entry on the service board (when this ARP entry existed originally), and sets the aging time of this ARP entry to the current aging time carried in the ARP response of the master control board.

[0039] For example, there is a historical ARP entry A on the target service board. Synchronize the physical address of the network security device with the IP address 3.3.3.3 in the first response to the historical ARP entry A. The aging time of the historical ARP entry A is 1200 seconds, and the current aging time in the first response is 300 seconds. If the aging time of the historical ARP entry A is not updated, the aging times of the master control board and the target service board will be inconsistent, ultimately resulting in the inability to transmit packets. Therefore, it is necessary to update the aging time of the historical ARP entry A from 1200 seconds to the current aging time of 300 seconds.

[0040] The method for synchronizing the address resolution protocol entries provided in the embodiments of the present application obtains a first request sent by a target service board to a master control board, parses the first request to obtain a target entry name, and determines whether there is a target address resolution protocol entry corresponding to the target entry name in the master control board. The first request is used for the target service board to request the master control board to obtain the target address resolution protocol entry; in the case where there is a target address resolution protocol entry in the master control board, obtain the current aging time of the target address resolution protocol entry; encapsulate the target address resolution protocol entry and the current aging time into a first response, and send the first response to the target service board, where the first response is used for the master control board to send the target address resolution protocol entry to the target service board; determine whether there is a historical address resolution protocol entry in the target service board; in the case where there is a historical address resolution protocol entry in the target service board, synchronize the target address resolution protocol entry to the historical address resolution protocol entry, and update the aging time of the historical address resolution protocol entry to the current aging time, solving the problem of service interruption caused by different aging times of the master control board and the service board in the related art. By encapsulating the current aging time of the master control board when the master control board sends a response to the target service board, it ensures that the aging times of the master control board and the service board are consistent, avoids service interruption, and thus achieves the effect of improving the stability of the service board in running services.

[0041] There may also be no Address Resolution Protocol (ARP) table entry requested by the target service board in the main control board. Optionally, in the ARP table entry synchronization method provided in the embodiments of the present application, after determining whether there is an ARP table entry corresponding to the target table name in the main control board, the method further includes: in the case where there is no ARP table entry in the main control board, sending a second request to the target network device, where the second request is used for the main control board to request the target network device to obtain the ARP table entry; obtaining a second response sent by the target network device to the main control board, where the second response is used for the target network device to send the ARP table entry to the main control board; obtaining the ARP table entry from the second response and creating an ARP table entry in the main control board; obtaining the current aging time of the ARP table entry, and encapsulating the ARP table entry and the current aging time into a third response, where the third response is used for the main control board to send the ARP table entry to the target service board; and broadcasting the third response to all service boards.

[0042] Specifically, the target network security device may be a packet transmission device in a non-distributed firewall such as a router, for example Figure 2 As shown, if there is no ARP table entry A on the main control board, a second request needs to be sent to the target network device to obtain the physical address required by the target service board. After receiving the second request, the target network security device sends the ARP table entry A to the main control board through the second response. Since there is no ARP table entry A on the main control board, at this time, an ARP table entry A needs to be created on the main control board according to the second response, and the current aging time is determined. The ARP table entry A on the main control board and the current aging time are encapsulated into a third response, and the third response is broadcast to all service boards. By sending a request to the target network security device when there is no ARP table entry in the main control board, and then broadcasting the obtained ARP table entry to all service boards, the normal operation of the packet transmission service on the service board is guaranteed.

[0043] It should be noted that after the main control board receives the second response sent back by the target network security device, if there is a newly created ARP table entry with an empty physical address on the main control board, it means that the second response sent by the target network security device is safe and not a malicious response. At this time, the third response is broadcast to all service boards. If there is no newly created ARP table entry with an empty physical address on the main control board, it means that the second response sent by the target network security device may be a malicious response. At this time, the second response message needs to be ignored and discarded.

[0044] Optionally, in the method for synchronizing the address resolution protocol entries provided in the embodiments of the present application, after determining whether there are historical address resolution protocol entries in the target service board, the method further includes: creating a target address resolution protocol entry when there are no historical address resolution protocol entries in the target service board; setting the aging time of the target address resolution protocol entry to the current aging time.

[0045] Specifically, the mapping relationship between all physical addresses and IP addresses in the target service board also needs to be stored in the ARP entry. Therefore, if the target service board receives the first response or the third response and there is no target ARP entry on the target service board, an ARP entry A is created on the target service board, so that the ARP information in the first response or the third response can be synchronized to the ARP entry A on the target service board.

[0046] To ensure that the aging times on the master control board and the service board are consistent, it is necessary to determine whether there is a response from the target ARP entry on the master control board on the network security device. Optionally, in the method for synchronizing the address resolution protocol entries provided in the embodiments of the present application, before encapsulating the target address resolution protocol entry and the current aging time into the first response, the method further includes: determining whether the current aging time is less than or equal to the aging time threshold; when the current aging time is greater than the aging time threshold, performing the step of encapsulating the target address resolution protocol entry and the current aging time into the first response; when the current aging time is less than or equal to the aging time threshold, sending a third request to the target network device, where the third request is used for the master control board to request the target network device to obtain the target address resolution protocol entry; determining whether the master control board receives a fourth response sent by the target network device, where the fourth response is used for the target network device to send the target address resolution protocol entry to the master control board; when the fourth response is received, performing the step of encapsulating the target address resolution protocol entry and the current aging time into the first response.

[0047] Specifically, when the aging time of the ARP entry on the master control board is 0, that is, when the current aging time is less than or equal to the aging time threshold, the master control board will actively send a third request to the external network security device. At this time, if the aging time of the ARP entry on the service board is also about to be 0 and a first request is sent to the master control board, the master control board will not respond to the first request of the service board temporarily, but will wait until an effective fourth response from the external network security device arrives and then respond to the first request of the service board. At this time, if the master control board does not receive an effective fourth response all the time, the target ARP entry on the master control board will be deleted. On the service board, if the first response from the master control board is not received all the time, the target ARP entry will also be deleted. Thus, the ARP entries on the master control board and the service board are ensured to be consistent.

[0048] The main control board determines whether to save the target Address Resolution Protocol (ARP) table entry on the main control board based on whether the fourth response is received. Optionally, in the ARP table entry synchronization method provided in the embodiments of the present application, after determining whether the main control board has received the fourth response sent by the target network device, the method further includes: deleting the target ARP table entry on the main control board when the fourth response is not received; deleting the target ARP table entry on all service boards.

[0049] Specifically, whenever the aging time of the ARP table entry on the main control board is about to reach 0, a third request needs to be sent to each network security device. Only after determining that the third request has received a response from the network security device can it be shown that the ARP table entry still needs to be retained. Therefore, when the main control board does not receive the fourth response, it means that each network security device does not need to apply this ARP table entry. Then, when the aging time of the ARP table entry on the main control board reaches 0, the ARP table entry on the main control board is deleted. At the same time, when the service board does not receive the first response or the third response from the main control board, the ARP table entry on the service board is also deleted. By timely deleting the ARP table entries that have not received the fourth response, the memory of the main control board and the service board is saved.

[0050] Determining whether the fourth response is received needs to be determined according to whether the target duration exceeds the response time threshold. Optionally, in the ARP table entry synchronization method provided in the embodiments of the present application, before deleting the target ARP table entry on the main control board, the method further includes: obtaining the target duration from the current moment to the time when the third request is sent; determining whether the target duration is greater than or equal to the response duration threshold; and when the target duration is greater than or equal to the response duration threshold, performing the step of deleting the target ARP table entry on the main control board.

[0051] Specifically, the response time threshold can be set to 60 seconds. After the main control board sends the third request, it is continuously determined whether the target duration is greater than or equal to 60 seconds in real time. If the fourth response is still not received after being greater than or equal to 60 seconds, it means that no network security device needs to apply the target ARP table entry. At this time, the target ARP table entry on the main control board is deleted.

[0052] After actively deleting the ARP table entry on the main control board, the corresponding ARP table entry on the service board also needs to be deleted. Optionally, in the ARP table entry synchronization method provided in the embodiments of the present application, before obtaining the first request sent by the target service board to the main control board, the method further includes: determining whether each ARP table entry on the main control board has been deleted; and when there is a deleted ARP table entry on the main control board, deleting the ARP table entries corresponding to the deleted ARP table entry on all service boards.

[0053] Specifically, regardless of the reason for deletion, any ARP entry on the main control board needs to send a message to delete this ARP entry to all service boards, notifying all service boards to delete this ARP entry. This is to avoid the situation where the ARP entry on the main control board has been deleted, but there are still old ARP entries on some service boards. By deleting the ARP entry on the service board corresponding to the deleted ARP entry on the main control board, it is ensured that the ARP entries on the main control board and the service boards are consistent, avoiding service interruption caused by inconsistent ARP entries.

[0054] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0055] The embodiment of the present application also provides a synchronization device for address resolution protocol entries. It should be noted that the synchronization device for address resolution protocol entries in the embodiment of the present application can be used to execute the synchronization method for address resolution protocol entries provided in the embodiment of the present application. The following introduces the synchronization device for address resolution protocol entries provided in the embodiment of the present application.

[0056] Figure 3 It is a schematic diagram of the synchronization device for address resolution protocol entries provided in the embodiment of the present application. As Figure 3 shown, the device includes:

[0057] A first acquisition unit 10, configured to acquire a first request sent by a target service board to the main control board, parse the first request to obtain a target entry name, and determine whether there is a target address resolution protocol entry corresponding to the target entry name in the main control board, where the first request is used by the target service board to request the main control board to obtain the target address resolution protocol entry;

[0058] A second acquisition unit 20, configured to acquire the current aging time of the target address resolution protocol entry when there is a target address resolution protocol entry in the main control board;

[0059] An encapsulation unit 30, configured to encapsulate the target address resolution protocol entry and the current aging time into a first response, and send the first response to the target service board, where the first response is used by the main control board to send the target address resolution protocol entry to the target service board;

[0060] A first judgment unit 40, configured to judge whether there is a historical address resolution protocol entry in the target service board;

[0061] A synchronization unit 50, configured to synchronize a target address resolution protocol entry to a historical address resolution protocol entry and update the aging time of the historical address resolution protocol entry to the current aging time when there is a historical address resolution protocol entry in a target service board.

[0062] The address resolution protocol entry synchronization device provided in an embodiment of this application includes: a first acquisition unit 10, configured to acquire a first request sent by a target service board to a master control board, parse the first request to obtain a target entry name, and determine whether there is a target address resolution protocol entry corresponding to the target entry name in the master control board, where the first request is used for the target service board to request the master control board to obtain a target address resolution protocol entry; a second acquisition unit 20, configured to acquire the current aging time of the target address resolution protocol entry when there is a target address resolution protocol entry in the master control board; a packaging unit 30, configured to package the target address resolution protocol entry and the current aging time into a first response and send the first response to the target service board, where the first response is used for the master control board to send the target address resolution protocol entry to the target service board; a first judgment unit 40, configured to judge whether there is a historical address resolution protocol entry in the target service board; a synchronization unit 50, configured to synchronize the target address resolution protocol entry to the historical address resolution protocol entry and update the aging time of the historical address resolution protocol entry to the current aging time when there is a historical address resolution protocol entry in the target service board, thus solving the problem of service interruption caused by different aging times of the master control board and the service board in the related art. By packaging the current aging time of the master control board when the master control board sends a response to the target service board, it is ensured that the aging times of the master control board and the service board are consistent, avoiding service interruption, and thus achieving the effect of improving the stability of the service board in running services.

[0063] Optionally, in the address resolution protocol entry synchronization device provided in an embodiment of this application, the device further includes: a first sending unit, configured to send a second request to a target network device when there is no target address resolution protocol entry in the master control board, where the second request is used for the master control board to request the target network device to obtain a target address resolution protocol entry; a third acquisition unit, configured to acquire a second response sent by the target network device to the master control board, where the second response is used for the target network device to send the target address resolution protocol entry to the master control board; a fourth acquisition unit, configured to acquire the target address resolution protocol entry from the second response and establish the target address resolution protocol entry in the master control board; a fifth acquisition unit, configured to acquire the current aging time of the target address resolution protocol entry and package the target address resolution protocol entry and the current aging time into a third response, where the third response is used for the master control board to send the target address resolution protocol entry to the target service board; a broadcasting unit, configured to broadcast the third response to all service boards.

[0064] Optionally, in the address resolution protocol entry synchronization device provided in the embodiments of the present application, the device further includes: a creation unit, configured to create a target address resolution protocol entry when there is no historical address resolution protocol entry in the target service board; a setting unit, configured to set the aging time of the target address resolution protocol entry to the current aging time.

[0065] Optionally, in the address resolution protocol entry synchronization device provided in the embodiments of the present application, the device further includes: a second determination unit, configured to determine whether the current aging time is less than or equal to an aging time threshold; a first execution unit, configured to, when the current aging time is greater than the aging time threshold, perform the step of encapsulating the target address resolution protocol entry and the current aging time into a first response; a second sending unit, configured to, when the current aging time is less than or equal to the aging time threshold, send a third request to the target network device, where the third request is for the master control board to request the target network device to obtain the target address resolution protocol entry; a third determination unit, configured to determine whether the master control board receives a fourth response sent by the target network device, where the fourth response is for the target network device to send the target address resolution protocol entry to the master control board; a second execution unit, configured to, when receiving the fourth response, perform the step of encapsulating the target address resolution protocol entry and the current aging time into a first response.

[0066] Optionally, in the address resolution protocol entry synchronization device provided in the embodiments of the present application, the device further includes: a first deletion unit, configured to delete the target address resolution protocol entry on the master control board when the fourth response is not received; a second deletion unit, configured to delete the target address resolution protocol entries on all service boards.

[0067] Optionally, in the address resolution protocol entry synchronization device provided in the embodiments of the present application, the device further includes: a sixth acquisition unit, configured to acquire a target duration from the current moment to the time when the third request is sent; a fourth determination unit, configured to determine whether the target duration is greater than or equal to a response duration threshold; a third execution unit, configured to, when the target duration is greater than or equal to the response duration threshold, perform the step of deleting the target address resolution protocol entry on the master control board.

[0068] Optionally, in the address resolution protocol entry synchronization device provided in the embodiments of the present application, the device further includes: a fifth determination unit, configured to determine whether each address resolution protocol entry on the master control board is deleted; a third deletion unit, configured to, when there is a deleted address resolution protocol entry on the master control board, delete the corresponding address resolution protocol entries on all service boards.

[0069] The synchronization device for the address resolution protocol entry includes a processor and a memory. The above-mentioned first acquisition unit 10, second acquisition unit 20, encapsulation unit 30, first judgment unit 40, and synchronization unit 50, etc. are all stored in the memory as program units, and the processor executes the above program units stored in the memory to implement corresponding functions.

[0070] The processor contains a kernel, and the kernel retrieves the corresponding program units from the memory. One or more kernels can be set, and the stability of the service board running services can be improved by adjusting the kernel parameters.

[0071] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory includes at least one memory chip.

[0072] An embodiment of the present invention provides a computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, it implements the synchronization method for the address resolution protocol entry.

[0073] An embodiment of the present invention provides a processor, which is used to run a program. When the program runs, it executes the synchronization method for the address resolution protocol entry.

[0074] Figure 4 It is a schematic diagram of an electronic device provided according to an embodiment of the present application. As Figure 4 shown, the device 401 includes a processor, a memory, and a program stored on the memory and executable on the processor. When the processor executes the program, it implements the following steps: the synchronization method for the address resolution protocol entry. The device in this article can be a server, a PC, a PAD, a mobile phone, etc.

[0075] The present application also provides a computer program product, which is suitable for executing a program initialized with the following method steps when executed on a data processing device: the synchronization method for the address resolution protocol entry.

[0076] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0077] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the flows and / or blocks in the flowchart and / or block diagram can also be implemented. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a means for implementing the functions specified in one flow Figure 1 or more flows and / or blocks Figure 1 or a means for implementing the functions specified in one block or more blocks.

[0078] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction means that implements the functions specified in one flow Figure 1 or more flows and / or blocks Figure 1 or a means for implementing the functions specified in one block or more blocks.

[0079] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one flow Figure 1 or more flows and / or blocks Figure 1 or a means for implementing the functions specified in one block or more blocks.

[0080] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and a memory.

[0081] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of computer-readable media.

[0082] A computer-readable medium includes permanent and non-permanent, removable and non-removable media and can implement information storage by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transitory media that can be used to store information that can be accessed by a computing device. As defined herein, a computer-readable medium does not include transitory computer-readable media such as modulated data signals and carrier waves.

[0083] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0084] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, system or computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.

[0085] The above are only embodiments of the present application and are not used to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.

Claims

1. A method for synchronizing entries of an address resolution protocol, characterized in that, it includes: Obtain a first request sent by a target service board to a master board, parse the first request to obtain a target entry name, and determine whether there is a target address resolution protocol entry corresponding to the target entry name in the master board, where the first request is used by the target service board to request the master board to obtain a target address resolution protocol entry; When there is a target address resolution protocol entry in the master board, obtain the current aging time of the target address resolution protocol entry; Encapsulate the target address resolution protocol entry and the current aging time into a first response, and send the first response to the target service board, where the first response is used by the master board to send the target address resolution protocol entry to the target service board; Determine whether there is a historical address resolution protocol entry in the target service board; When there is a historical address resolution protocol entry in the target service board, synchronize the target address resolution protocol entry to the historical address resolution protocol entry, and update the aging time of the historical address resolution protocol entry to the current aging time.

2. The method according to claim 1, characterized in that, after determining whether there is a target address resolution protocol entry corresponding to the target entry name in the master board, the method further includes: When there is no target address resolution protocol entry in the master board, send a second request to a target network device, where the second request is used by the master board to request the target network device to obtain a target address resolution protocol entry; Obtain a second response sent by the target network device to the master board, where the second response is used by the target network device to send the target address resolution protocol entry to the master board; Obtain a target address resolution protocol entry from the second response, and create the target address resolution protocol entry in the master board; Obtain the current aging time of the target address resolution protocol entry, and encapsulate the target address resolution protocol entry and the current aging time into a third response, where the third response is used by the master board to send the target address resolution protocol entry to the target service board; Broadcast the third response to all service boards.

3. The method according to claim 1, characterized in that, after determining whether there is a historical address resolution protocol entry in the target service board, the method further includes: When there is no historical address resolution protocol entry in the target service board, create a target address resolution protocol entry; Set the aging time of the target address resolution protocol entry to the current aging time.

4. The method according to claim 1, characterized in that, before encapsulating the target address resolution protocol entry and the current aging time into a first response, the method further includes: Determine whether the current aging time is less than or equal to an aging time threshold; When the current aging time is greater than the aging time threshold, perform the step of encapsulating the target address resolution protocol entry and the current aging time into a first response; When the current aging time is less than or equal to the aging time threshold, send a third request to a target network device, where the third request is for the main control board to request the target network device to obtain a target address resolution protocol entry; Determine whether the main control board receives a fourth response sent by the target network device, where the fourth response is for the target network device to send the target address resolution protocol entry to the main control board; When the fourth response is received, perform the step of encapsulating the target address resolution protocol entry and the current aging time into a first response.

5. The method according to claim 4, wherein, after determining whether the main control board receives the fourth response sent by the target network device, the method further includes: when the fourth response is not received, delete the target address resolution protocol entry on the main control board; delete the target address resolution protocol entries on all service boards.

6. The method according to claim 5, wherein, before deleting the target address resolution protocol entry on the main control board, the method further includes: obtain a target duration from the current moment to the time when the third request is sent; determine whether the target duration is greater than or equal to a response duration threshold; when the target duration is greater than or equal to the response duration threshold, perform the step of deleting the target address resolution protocol entry on the main control board.

7. The method according to claim 1, wherein, before obtaining a first request sent by a target service board to the main control board, the method further includes: determine whether each address resolution protocol entry on the main control board is deleted; when there is a deleted address resolution protocol entry on the main control board, delete the address resolution protocol entries corresponding to the deleted address resolution protocol entry on all service boards.

8. A synchronization device for address resolution protocol entries, wherein, comprising: a first acquisition unit, configured to acquire a first request sent by a target service board to the main control board, parse the first request to obtain a target entry name, and determine whether there is a target address resolution protocol entry corresponding to the target entry name in the main control board, where the first request is for the target service board to request the main control board to obtain a target address resolution protocol entry; a second acquisition unit, configured to acquire the current aging time of the target address resolution protocol entry when there is the target address resolution protocol entry in the main control board; an encapsulation unit, configured to encapsulate the target address resolution protocol entry and the current aging time into a first response, and send the first response to the target service board, where the first response is for the main control board to send the target address resolution protocol entry to the target service board; A first judgment unit, configured to judge whether there is a historical Address Resolution Protocol entry in the target service board; A synchronization unit, configured to, when there is the historical Address Resolution Protocol entry in the target service board, synchronize the target Address Resolution Protocol entry to the historical Address Resolution Protocol entry, and update the aging time of the historical Address Resolution Protocol entry to the current aging time.

9. A non-volatile storage medium, characterized in that the non-volatile storage medium stores a program, wherein when the program runs, it controls the device where the non-volatile storage medium is located to execute the synchronization method of the Address Resolution Protocol entry according to any one of claims 1 to 7.

10. An electronic device, characterized in that it includes one or more processors and a memory, the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the synchronization method of the Address Resolution Protocol entry according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for preventing packet loss in data transmission, and medium

    CN111092962A

  • Method for preventing network interruption caused by address aging and time inconformity

    CN1992672A