Switch information synchronization method, device, equipment and medium

By obtaining and comparing physical address information and address resolution protocol information with heartbeat signals in the switch, the synchronization mechanism is automatically triggered, and the network performance problems caused by inconsistency between switches are solved, and information consistency and network stability are improved.

CN119652903APending Publication Date: 2025-03-18SHENZHEN FENGRUNDA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411727354.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

In the switch MLAG protocol application scenario, inconsistent synchronization of MAC and ARP information will lead to incorrect routing of network traffic, affecting network performance. How to ensure that this information remains consistent among multiple switches is a technical challenge.

Method used

By obtaining the original physical address information and address resolution protocol information, obtaining the heartbeat signal and performing consistency checks. When an inconsistency is detected, the synchronization mechanism is triggered, and a synchronization request instruction is sent to the switch, so that it synchronizes information and feedbacks the confirmation signal, and information synchronization is completed.

Benefits of technology

By regularly checking and synchronizing MAC and ARP information, synchronous requests are automatically triggered to ensure consistency of information, improve network stability and reliability, and prevent packet error routing and network performance degradation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119652903A_ABST
    Figure CN119652903A_ABST
Patent Text Reader

Abstract

The invention discloses a switch information synchronization method and device, equipment and a medium, and relates to the technical field of Internet testing, and the method comprises the steps: obtaining original physical address information and original address resolution protocol information, obtaining a heartbeat signal, carrying out the consistency check of the original physical address information and the original address resolution protocol information with the heartbeat signal, and obtaining a switch information synchronization result; and when the detection result is that the original physical address information is different from the heartbeat signal or the original address resolution protocol information is different from the heartbeat signal, a synchronization mechanism is triggered, and a synchronization request instruction is sent to the switch, so that the switch performs information synchronization, feeds back a confirmation signal, receives the confirmation signal and completes information synchronization. And the synchronization request is automatically triggered by periodically checking and synchronizing MAC and ARP information through heartbeat signals, so that the information consistency is ensured, and the network stability and reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet testing technology, and in particular to a switch information synchronization method, device, equipment and medium. Background Art

[0002] In the application scenario of the switch MLAG (Multiple Link Aggregation Group) protocol, the synchronization of MAC and ARP information is a key factor in ensuring network performance and reliability.

[0003] However, in actual deployment, existing solutions still have shortcomings. When multiple switches share a link aggregation group, if their MAC address tables are not synchronized, or if the ARP cache information is inconsistent between different switches, network traffic may be routed incorrectly, thus affecting overall network performance. Therefore, in an environment that requires high stability and load balancing, how to ensure that this information remains consistent between multiple switches has become a technical challenge. Summary of the invention

[0004] The main purpose of the present application is to provide a switch information synchronization method, device, equipment and medium, aiming to solve the technical problem of how to improve the reliability of switch information synchronization.

[0005] To achieve the above object, the present application proposes a switch information synchronization method, the method comprising:

[0006] Obtain original physical address information and original address resolution protocol information;

[0007] Acquire a heartbeat signal, where the heartbeat signal includes updated physical address information of the switch and updated address resolution protocol information of the switch;

[0008] Performing a consistency check on the original physical address information, the original address resolution protocol information and the heartbeat signal to obtain a detection result;

[0009] When the detection result is that the original physical address information is different from the heartbeat signal or the original address resolution protocol information is different from the heartbeat signal, a synchronization mechanism is triggered to send a synchronization request instruction to the switch, so that the switch performs information synchronization and feeds back a confirmation signal;

[0010] The confirmation signal is received to complete information synchronization.

[0011] In one embodiment, the step of performing consistency check on the original physical address information, the original address resolution protocol information, and the heartbeat signal to obtain a detection result includes:

[0012] Obtaining a consistency check interval, wherein the interval is configured according to network conditions and requirements of each switch;

[0013] The original physical address information and the original address resolution protocol information are compared with the updated physical address information of the switch and the updated address resolution protocol information of the switch in the heartbeat signal according to the time interval to obtain a detection result.

[0014] In one embodiment, the step of comparing the original physical address information and the original address resolution protocol information with the updated physical address information of the switch and the updated address resolution protocol information of the switch in the heartbeat signal according to the time interval to obtain the detection result further includes:

[0015] When the detection result is that the original physical address information is different from the heartbeat signal or the original address resolution protocol information is different from the heartbeat signal, a detection report is generated, wherein the detection report records the location of the switch with inconsistent information.

[0016] In one embodiment, when the detection result is that the original physical address information is different from the heartbeat signal or the original address resolution protocol information is different from the heartbeat signal, triggering a synchronization mechanism and sending a synchronization request instruction to the switch so that the switch performs information synchronization and feeds back a confirmation signal includes:

[0017] When the detection result is that the original physical address information is different from the physical address information in the heartbeat signal, or the original address resolution protocol information is different from the address resolution protocol information in the heartbeat signal, a synchronization mechanism is triggered;

[0018] A synchronization request instruction is sent to the switch whose position is recorded in the detection report, so that the switch receiving the synchronization request instruction updates the physical address information or the address resolution protocol information according to the heartbeat signal, and after the information synchronization is completed, the switch sends a confirmation signal to confirm that the information has been successfully synchronized.

[0019] In one embodiment, the step of receiving the confirmation signal and completing information synchronization includes:

[0020] After receiving the confirmation signal, checking whether the information synchronization has been completed;

[0021] After the detection information synchronization is completed, the latest physical address information and address resolution protocol information are updated to restore the normal operation of the network;

[0022] A result report is generated, which records the process and results of the information synchronization.

[0023] In one embodiment, the step of detecting whether information synchronization has been completed after receiving the confirmation signal further includes:

[0024] When it is detected that the updated physical address information or the updated address resolution protocol information of the switch is different from the heartbeat signal, the fault recovery mechanism is triggered to work through the preset backup path and automatic switching function.

[0025] In one embodiment, after the detection information synchronization is completed, the step of updating the latest physical address information and address resolution protocol information to restore the normal operation of the network includes:

[0026] After detecting that the information synchronization is completed, the physical address information and the address resolution protocol information are updated to the latest status;

[0027] Verify whether network traffic is correctly routed according to updated physical address information and address resolution protocol information, and obtain verification results;

[0028] When the verification result is stable operation and correct routing, restore the normal operation of the network.

[0029] In addition, to achieve the above purpose, the present application also proposes a switch information synchronization device, the switch information synchronization device comprising:

[0030] An acquisition module, used to acquire original physical address information and original address resolution protocol information;

[0031] The acquisition module is further used to acquire a heartbeat signal, wherein the heartbeat signal includes updated physical address information of the switch and updated address resolution protocol information of the switch;

[0032] A detection module, used for performing consistency check on the original physical address information, the original address resolution protocol information and the heartbeat signal to obtain a detection result;

[0033] A sending module, configured to trigger a synchronization mechanism and send a synchronization request instruction to the switch when the detection result is that the original physical address information is different from the heartbeat signal or the original address resolution protocol information is different from the heartbeat signal, so that the switch performs information synchronization and feeds back a confirmation signal;

[0034] The receiving module is used to receive the confirmation signal and complete information synchronization.

[0035] In addition, to achieve the above purpose, the present application also proposes a medium, which is a computer-readable medium, and stores a computer program on the medium. When the computer program is executed by a processor, the steps of the switch information synchronization method described above are implemented.

[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the switch information synchronization method described above are implemented.

[0037] This application obtains the original physical address information and the original address resolution protocol information, obtains the heartbeat signal, performs a consistency check on the original physical address information and the original address resolution protocol information and the heartbeat signal, and obtains the test result. When the test result is that the original physical address information is different from the heartbeat signal or the original address resolution protocol information is different from the heartbeat signal, the synchronization mechanism is triggered to send a synchronization request instruction to the switch so that the switch synchronizes the information and feeds back a confirmation signal, receives the confirmation signal, and completes the information synchronization. The heartbeat signal is used to regularly check and synchronize MAC and ARP information, automatically trigger synchronization requests, ensure information consistency, and improve network stability and reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0039] Figure 1 This is a flow chart of the first embodiment of the switch information synchronization method of the present application;

[0040] Figure 2 This is a flow chart of the second embodiment of the switch information synchronization method of the present application;

[0041] Figure 3 This is a flow chart of the third embodiment of the switch information synchronization method of the present application;

[0042] Figure 4 This is a schematic diagram of the module structure of the switch information synchronization device according to an embodiment of the present application;

[0043] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the switch information synchronization method in the embodiment of the present application.

[0044] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0045] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0046] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0047] The main solution of the embodiment of the present application is: by obtaining the original physical address information and the original address resolution protocol information, obtaining the heartbeat signal, checking the consistency of the original physical address information and the original address resolution protocol information with the heartbeat signal, and obtaining the detection result; when the detection result is that the original physical address information is different from the heartbeat signal or the original address resolution protocol information is different from the heartbeat signal, triggering the synchronization mechanism, sending a synchronization request instruction to the switch, so that the switch synchronizes the information and feeds back a confirmation signal, receiving the confirmation signal, and completing the information synchronization.

[0048] Based on this, the embodiment of the present application provides a switch information synchronization method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the switch information synchronization method of the present application.

[0049] In this embodiment, the switch information synchronization method includes steps S10 to S50:

[0050] Step S10, obtaining original physical address information and original address resolution protocol information.

[0051] It should be noted that in the switch MLAG protocol, each switch records the MAC addresses it observes and their corresponding port information to form a MAC address table, that is, physical address information. Similarly, the original address resolution protocol information contains the mapping of IP addresses to MAC addresses, which is essential for implementing IP-based packet forwarding. In order to maintain the consistency of the entire MLAG system, snapshots of this information, the so-called original data, must be obtained regularly.

[0052] The operation of obtaining this raw data can be achieved through the software API or command line interface (CLI), depending on the switch's operating system. For example, an administrator or automated script can execute commands to export current MAC address information and ARP cache information, such as show mac-address-table and show arp. After executing these commands, the switch will return all currently stored MAC address entries and their corresponding port information, as well as all known ARP entries.

[0053] Step S20, obtaining a heartbeat signal, where the heartbeat signal includes updated physical address information of the switch and updated address resolution protocol information of the switch.

[0054] It should be noted that in the switch MLAG protocol, a mechanism called "heartbeat" is used to ensure the consistency of MAC address information and ARP cache information between switches. This mechanism allows switches to periodically send heartbeat signals, which contain updated physical address information and address resolution protocol information. The heartbeat signal is not only used to detect whether a connection exists, but more importantly, it is used to synchronize network status information between switches to ensure network stability and efficiency.

[0055] When a heartbeat signal is received, the latest MAC address information and ARP cache information contained therein are compared with the information stored in the heartbeat signal. If any differences are found, such as new MAC address entries, removed entries, or changed entries, the MAC address table and ARP cache are updated according to the received heartbeat signal. The purpose of this is to ensure that all switches participating in MLAG have the same information and avoid problems caused by inconsistent information, such as data packets being incorrectly routed or causing network performance degradation.

[0056] In addition, the heartbeat signal can also contain confirmation information, indicating that the previously sent update has been successfully received and applied. If the sender does not receive the confirmation information, it can resend the heartbeat signal until the confirmation information is received.

[0057] Step S30, performing consistency check on the original physical address information, the original address resolution protocol information and the heartbeat signal to obtain a detection result.

[0058] It is important to understand that during this process, each switch will periodically receive heartbeat signals from other switches, which contain the latest MAC address table and ARP cache information. When receiving the heartbeat signal, the switch will compare its own MAC address table and ARP cache with the received information to detect whether there is a difference between the two.

[0059] Specifically, consistency checking involves understanding whether the MAC address table and ARP cache entries stored by the local switch exactly match the information reported by the remote switch. For example, if the local switch's MAC address table is missing a newly added entry, or has an entry that no longer exists, it will be marked as inconsistent. Similarly, for the ARP cache, any new entries that do not exist locally, or entries that are still retained locally but have actually been removed, will also be considered inconsistent. To achieve this, the switch analyzes each update in the heartbeat signal, including new, deleted, and modified MAC address entries and ARP cache entries. If an inconsistency is detected, the switch will record the specific inconsistency and prepare to trigger a synchronization mechanism to update its own MAC address table and ARP cache to make them consistent with the information in the heartbeat signal.

[0060] Step S40, when the detection result is that the original physical address information is different from the heartbeat signal or the original address resolution protocol information is different from the heartbeat signal, the synchronization mechanism is triggered to send a synchronization request instruction to the switch, so that the switch synchronizes the information and feeds back a confirmation signal.

[0061] It should be noted that when the detection results show that the original physical address information or the original address resolution protocol information is inconsistent with the information in the received heartbeat signal, the system will immediately start the synchronization mechanism. This mechanism is designed to quickly correct the information differences between switches to ensure that the MAC address table and ARP cache information within the entire MLAG system are consistent.

[0062] Specifically, the switch that first detects the inconsistency will generate a synchronization request instruction. This instruction contains specific information that needs to be synchronized, such as which MAC address entries need to be added, deleted, or updated, and which ARP cache entries need to be synchronized. Subsequently, the instruction is sent to other switches participating in MLAG. After receiving the synchronization request instruction, the receiving switch will update its local MAC address table and ARP cache according to the instruction content. After the update is complete, the receiving switch will send a confirmation signal to the switch that sent the synchronization request, indicating that the information has been synchronized. This confirmation signal is very important to prevent duplicate synchronization, and it also serves as a sign of the success of the synchronization process.

[0063] Step S50, receiving a confirmation signal and completing information synchronization.

[0064] It should be noted that after completing the synchronization of the MAC address table and ARP cache information, the switch will receive confirmation signals from other switches. These confirmation signals indicate that the information synchronization has been successfully performed and all related switches now have the same and latest MAC address table and ARP cache information.

[0065] Further, when the switch receives the confirmation signal, it updates its internal status information to indicate that the synchronization has been completed. This step is critical to ensure that all switches are in the same state. Only when all switches confirm the results of the synchronization can the information in the entire system be considered consistent. In addition, the confirmation signal also helps to establish a reliable communication channel to ensure the integrity of information transmission in a complex network environment. Once all confirmation signals are received, the information synchronization is officially completed. At this point, it is determined that all switches participating in the MLAG protocol have the same MAC address table and ARP cache information, which helps prevent incorrect routing of data packets or other network problems caused by information asynchrony. This process not only enhances the stability of the network, but also improves the performance of the network, because all switches can correctly process and forward data traffic, reducing unnecessary delays and errors.

[0066] This embodiment provides a switch information synchronization method, which obtains the original physical address information and the original address resolution protocol information, obtains the heartbeat signal, performs consistency check on the original physical address information and the original address resolution protocol information and the heartbeat signal, and obtains the detection result. When the detection result is that the original physical address information is different from the heartbeat signal or the original address resolution protocol information is different from the heartbeat signal, the synchronization mechanism is triggered, and a synchronization request instruction is sent to the switch to enable the switch to synchronize the information and feedback a confirmation signal, and the confirmation signal is received to complete the information synchronization. The MAC and ARP information are regularly checked and synchronized through the heartbeat signal, and the synchronization request is automatically triggered to ensure information consistency and improve network stability and reliability.

[0067] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later. Figure 2 The switch information synchronization method step S30 further includes steps S301 to S302:

[0068] Step S301, obtaining a consistency check time interval, wherein the time interval is configured according to the network conditions and requirements of each switch.

[0069] It should be noted that the consistency check interval refers to the frequency at which the switch performs consistency checks on the MAC address table and ARP cache information. This parameter can be flexibly configured according to the actual conditions and specific requirements of the network in which each switch is located. The choice of the time interval has an important impact on network performance because it directly determines the speed and accuracy of information synchronization between network devices.

[0070] When configuring the interval for consistency checks, network administrators need to consider several key factors. The first is the characteristics of network traffic. If the network traffic is very dense and changes frequently, a shorter check interval may be required to ensure the consistency of information. On the other hand, if the network is relatively static and the traffic does not change much, the check interval can be appropriately extended to reduce resource consumption. The second is the network scale and topology. For large networks or environments with complex topologies, more frequent consistency checks may be necessary to cope with various possible failures. For smaller network environments, the check interval can be adjusted according to actual conditions. In addition, the performance of network devices is also a consideration. Under high load conditions, frequent consistency checks may increase the burden on the switch.

[0071] Therefore, when configuring the time interval, the processing power of the switch and the system resource status should be considered to balance the frequency of consistency checks and the workload of the device. Finally, network administrators also need to consider business needs and service level agreements (SLAs) to ensure that the frequency of consistency checks meets the requirements of business continuity and service quality.

[0072] Step S302: Compare the original physical address information and the original address resolution protocol information with the updated physical address information of the switch and the updated address resolution protocol information of the switch in the heartbeat signal according to the time interval to obtain a detection result.

[0073] It should be noted that during this process, each switch will compare its original physical address information and ARP cache information with the updated information contained in the received heartbeat signal. The purpose of this process is to detect whether there are any inconsistencies. Specifically, the switch will check whether its local MAC address table entries are consistent with the MAC address information in the received heartbeat signal, including checking whether there are new, deleted or modified entries. Similarly, the switch will check whether its ARP cache information matches the information in the heartbeat signal. If any inconsistencies are found, such as missing entries in the local MAC address table or ARP cache or entries that should not exist, the switch will record these differences.

[0074] Further, step S302 also includes: when the detection result is that the original physical address information is different from the heartbeat signal or the original address resolution protocol information is different from the heartbeat signal, a detection report is generated, wherein the detection report records the location of the switch with inconsistent information. When it is detected that the original physical address information or ARP cache information is inconsistent with the information in the received heartbeat signal, the switch will generate a detailed detection report. This report will record the location of all switches with inconsistent information and other relevant information. This can help network administrators quickly locate the problem, understand which switches need to be synchronized and updated, and take appropriate measures to solve the problem.

[0075] Further, after step S302, it also includes: when the detection result is that the original physical address information is different from the MAC address information in the heartbeat signal, or the original address resolution protocol information is different from the ARP cache information in the heartbeat signal, triggering the synchronization mechanism. Sending a synchronization request instruction to the switch whose position is recorded in the above detection report, so that the switch receiving the above synchronization request instruction updates the MAC address information or ARP cache information according to the heartbeat signal, and after the information synchronization is completed, the switch sends a confirmation signal to confirm that the information has been successfully synchronized. When the detection result shows that the original physical address information or ARP cache information is inconsistent with the information in the heartbeat signal, the system automatically triggers the synchronization mechanism. The purpose of this mechanism is to quickly correct the information differences between the switches and ensure that the MAC address table and ARP cache information in the entire MLAG system are consistent. First, the system will generate a detection report to record the location and related details of all switches where inconsistent information is detected. Then, based on this report, the system will send synchronization request instructions to the switches at these locations. These instructions contain specific information that needs to be synchronized, such as MAC address entries and ARP cache entries that need to be added, deleted or updated. The switch that receives the synchronization request instruction will update its local MAC address table and ARP cache information according to the instruction content. During the update process, the switch will adjust its local storage according to the latest information in the heartbeat signal to achieve consistency with the sender. After the update is completed, the switch will send a confirmation signal to the switch that initiated the synchronization request, indicating that the information has been synchronized.

[0076] This embodiment obtains the time interval of the consistency check, and compares the original physical address information and the original address resolution protocol information with the updated physical address information of the switch and the updated address resolution protocol information of the switch in the heartbeat signal according to the time interval to obtain the detection result. The MAC and ARP information are compared by the timed consistency check, and synchronization is triggered when they do not match, so as to ensure information consistency and improve network stability.

[0077] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above description, and will not be described in detail later. Figure 3 The switch information synchronization method step S50 further includes steps S501 to S503:

[0078] Step S501: After receiving the confirmation signal, check whether the information synchronization has been completed.

[0079] It should be noted that this step verifies that all necessary updates have been performed correctly and that all switches participating in the synchronization have applied the latest information. When confirmation signals are received, check whether these signals cover all items in the previously sent synchronization requests. If all requested updates are confirmed, then the information synchronization is considered complete. At this point, the system will update its internal state, marking the synchronization operation as completed, and may record the successful synchronization event for later auditing or troubleshooting.

[0080] Furthermore, step S501 also includes triggering the fault recovery mechanism to work through the preset backup path and automatic switching function when it is detected that the updated physical address information or the updated address resolution protocol information of the switch is inconsistent with the heartbeat signal. When it is detected that the updated physical address information or the address resolution protocol information is inconsistent with the information in the received heartbeat signal, the switch will immediately trigger the fault recovery mechanism. The design purpose of this mechanism is to quickly restore the normal operation of the network through pre-configured backup paths and automatic switching functions. Specifically, when inconsistency is detected, the system will automatically select a pre-configured backup path. The existence of the backup path is to provide an alternative communication line when the main network path fails, ensuring that the data flow can continue to be transmitted smoothly. At the same time, the system will automatically activate the switching function to immediately transfer the network traffic to the backup path, thereby avoiding network interruption caused by inconsistent information.

[0081] If not all acknowledgments are received within the expected time, or if the acknowledgments received indicate that some updates were not successfully applied, the switch will resend the synchronization request until all information is correctly synchronized. This ensures that information consistency is eventually achieved even in the event of poor network conditions or problems with some switches.

[0082] Step S502: After the detection information synchronization is completed, the latest physical address information and address resolution protocol information are updated to restore the normal operation of the network.

[0083] It should be noted that after receiving all necessary confirmation signals indicating that all relevant switches have successfully updated their MAC address tables and ARP caches, the system will apply this latest information to actual network traffic processing.

[0084] Specifically, the switch will replace the original MAC address table entries and ARP cache entries and use the latest information that has just been synchronized. This means that any newly received data packets will be processed according to the updated information, ensuring that the data packets can be correctly forwarded to the destination. In addition, by updating the latest information, packet loss or routing errors caused by inconsistent information can be avoided, thereby improving the stability and performance of the network.

[0085] Further, step S502 also includes: after detecting that the information synchronization is completed, updating the physical address information and the address resolution protocol information to the latest state. Then verify whether the network traffic is correctly routed according to the updated physical address information and the address resolution protocol information to obtain a verification result. In order to verify whether the network traffic is correctly routed as expected, the switch monitors the actual traffic behavior. This includes checking whether the data packet is correctly forwarded to the target device, and whether any abnormal situation occurs, such as packet loss or wrong routing. In this way, it can be confirmed whether the updated physical address information and the address resolution protocol information effectively improve the operation of the network. When the verification result is that the stable operation is correctly routed, the normal operation of the network is restored. If the verification result shows that the network traffic is indeed correctly routed according to the updated information, it can be confirmed that the information synchronization process is successful and the network has been restored to a normal operating state.

[0086] Step S503: Generate a result report, which records the process and results of information synchronization.

[0087] It should be noted that the generated result report will record the process and results of information synchronization in detail to ensure that network administrators can fully understand the synchronization operation. The result report will cover the status before synchronization, the synchronization process, the synchronization results, and the summary and suggestions. The status before synchronization is the status of the original physical address information and ARP cache information of each switch before the start, as well as the detected inconsistencies. The synchronization process is each step of the synchronization operation, including when the synchronization mechanism is started, which switches are sent synchronization request instructions, how the switches respond, and when they send back confirmation signals.

[0088] The synchronization result is that once all switches confirm that the information has been successfully synchronized, the report will record the final status, that is, the MAC address information and ARP cache information held by all switches have been updated to the latest status. Summary and suggestions are based on the above information. The report will summarize the success or failure of this synchronization operation and make suggestions for improvement. For example, if it is detected that some switches are responding slowly, the report may suggest checking the network conditions of these devices or optimizing certain parameters in the synchronization mechanism.

[0089] The report will also include results that verify that network traffic is being routed correctly based on the updated information, confirming that the synchronization has achieved the expected results. In addition, the report will also point out any anomalies, such as delayed responses or failed synchronization attempts.

[0090] This embodiment detects whether information synchronization has been completed after receiving a confirmation signal, and after detecting that information synchronization is completed, updates the latest physical address information and address resolution protocol information, restores the normal operation of the network, and generates a result report. After receiving a confirmation signal, the synchronization is detected to be completed, the MAC and ARP information is updated, the network operation is restored, and a result report is generated to ensure information consistency and network stability.

[0091] This application also provides a switch information synchronization device, please refer to Figure 4 , the device comprises:

[0092] The acquisition module 10 is used to acquire original physical address information and original address resolution protocol information.

[0093] The acquisition module 10 is further used to acquire a heartbeat signal, where the heartbeat signal includes updated physical address information of the switch and updated address resolution protocol information of the switch.

[0094] The detection module 20 is used to perform consistency check on the original physical address information, the original address resolution protocol information and the heartbeat signal to obtain a detection result.

[0095] The sending module 30 is used to trigger the synchronization mechanism and send a synchronization request instruction to the switch when the detection result is that the original physical address information is different from the heartbeat signal or the original address resolution protocol information is different from the heartbeat signal, so that the switch synchronizes the information and feeds back a confirmation signal.

[0096] The receiving module 40 is used to receive a confirmation signal and complete information synchronization.

[0097] The switch information synchronization device provided by the present application adopts the switch information synchronization method in the above embodiment, which can solve the technical problem of how to improve the reliability of switch information synchronization. Compared with the prior art, the beneficial effects of the switch information synchronization device provided by the present application are the same as the beneficial effects of the switch information synchronization method provided by the above embodiment, and other technical features in the switch information synchronization device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0098] In one embodiment, the detection module 20 is also used to obtain the time interval for consistency check, where the time interval is configured according to the network conditions and requirements of each switch; the original physical address information and the original address resolution protocol information are compared with the updated physical address information of the switch and the updated address resolution protocol information of the switch in the heartbeat signal according to the time interval to obtain the detection result.

[0099] In one embodiment, the detection module 20 is further used to generate a detection report when the detection result is that the original physical address information is different from the heartbeat signal or the original address resolution protocol information is different from the heartbeat signal, wherein the detection report records the location of the switch with inconsistent information.

[0100] In one embodiment, the sending module 30 is also used to trigger the synchronization mechanism when the detection result is that the original physical address information is different from the MAC address information in the heartbeat signal, or the original address resolution protocol information is different from the ARP cache information in the heartbeat signal; send a synchronization request instruction to the switch whose location is recorded in the detection report, so that the switch that receives the synchronization request instruction updates the MAC address information or ARP cache information according to the heartbeat signal, and after the information synchronization is completed, the switch sends a confirmation signal to confirm that the information has been successfully synchronized.

[0101] In one embodiment, the receiving module 40 is also used to detect whether the information synchronization has been completed after receiving the confirmation signal; after detecting that the information synchronization is completed, update the latest physical address information and address resolution protocol information to restore the normal operation of the network; and generate a result report, which records the process and results of the information synchronization.

[0102] In one embodiment, the receiving module 40 is further used to trigger the fault recovery mechanism to work through the preset backup path and automatic switching function when it is detected that the updated physical address information or the updated address resolution protocol information of the switch is different from the heartbeat signal.

[0103] In one embodiment, the receiving module 40 is also used to update the physical address information and the address resolution protocol information to the latest status after detecting that the information synchronization is completed; verify whether the network traffic is correctly routed according to the updated physical address information and the address resolution protocol information to obtain a verification result; when the verification result is that the correct routing is stable, the normal operation of the network is restored.

[0104] The present application provides a switch information synchronization device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the switch information synchronization method in the above-mentioned embodiment 1.

[0105] Reference below Figure 5 , which shows a schematic diagram of the structure of a switch information synchronization device suitable for implementing the embodiment of the present application. The switch information synchronization device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The switch information synchronization device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0106] like Figure 5As shown, the switch information synchronization device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the switch information synchronization device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the switch information synchronization device to communicate with other devices wirelessly or by wire to exchange data. Although the switch information synchronization device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0107] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0108] The switch information synchronization device provided by the present application adopts the switch information synchronization method in the above embodiment, which can solve the technical problem of how to improve the reliability of switch information synchronization. Compared with the prior art, the beneficial effects of the switch information synchronization device provided by the present application are the same as the beneficial effects of the switch information synchronization method provided by the above embodiment, and other technical features in the switch information synchronization device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0109] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0110] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0111] The present application provides a computer-readable medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the switch information synchronization method in the above embodiment.

[0112] The computer-readable medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0113] The computer-readable medium may be included in the switch information synchronization device; or may exist independently without being assembled into the switch information synchronization device.

[0114] The computer-readable medium carries one or more programs. When the one or more programs are executed by the switch information synchronization device, the switch information synchronization device can write computer program codes for performing the operations of the present application in one or more programming languages ​​or a combination thereof. The programming languages ​​include object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, through the Internet using an Internet service provider).

[0115] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0116] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0117] The readable medium provided by the present application is a computer-readable medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned switch information synchronization method, and can solve the technical problem of how to improve the reliability of switch information synchronization. Compared with the prior art, the beneficial effects of the computer-readable medium provided by the present application are the same as the beneficial effects of the switch information synchronization method provided by the above-mentioned embodiment, and will not be repeated here.

[0118] The present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the switch information synchronization method as described above are implemented.

[0119] The computer program product provided by the present application can solve the technical problem of how to improve the reliability of switch information synchronization. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the switch information synchronization method provided by the above embodiment, which will not be repeated here.

[0120] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A switch information synchronization method, characterized in that: The method comprises: Obtain original physical address information and original address resolution protocol information; Acquire a heartbeat signal, where the heartbeat signal includes updated physical address information of the switch and updated address resolution protocol information of the switch; Performing a consistency check on the original physical address information, the original address resolution protocol information and the heartbeat signal to obtain a detection result; When the detection result is that the original physical address information is different from the heartbeat signal or the original address resolution protocol information is different from the heartbeat signal, a synchronization mechanism is triggered to send a synchronization request instruction to the switch, so that the switch performs information synchronization and feeds back a confirmation signal; The confirmation signal is received to complete information synchronization.

2. The method according to claim 1, characterized in that The step of performing consistency check on the original physical address information, the original address resolution protocol information and the heartbeat signal to obtain a detection result includes: Obtaining a consistency check interval, wherein the interval is configured according to network conditions and requirements of each switch; The original physical address information and the original address resolution protocol information are compared with the updated physical address information of the switch and the updated address resolution protocol information of the switch in the heartbeat signal according to the time interval to obtain a detection result.

3. The method according to claim 2, characterized in that The step of comparing the original physical address information and the original address resolution protocol information with the updated physical address information of the switch and the updated address resolution protocol information of the switch in the heartbeat signal according to the time interval to obtain the detection result further includes: When the detection result is that the original physical address information is different from the heartbeat signal or the original address resolution protocol information is different from the heartbeat signal, a detection report is generated, wherein the detection report records the location of the switch with inconsistent information.

4. The method according to claim 3, characterized in that When the detection result is that the original physical address information is different from the heartbeat signal or the original address resolution protocol information is different from the heartbeat signal, the step of triggering a synchronization mechanism and sending a synchronization request instruction to the switch so that the switch performs information synchronization and feeds back a confirmation signal includes: When the detection result is that the original physical address information is different from the physical address information in the heartbeat signal, or the original address resolution protocol information is different from the address resolution protocol information in the heartbeat signal, a synchronization mechanism is triggered; A synchronization request instruction is sent to the switch whose position is recorded in the detection report, so that the switch receiving the synchronization request instruction updates the physical address information or the address resolution protocol information according to the heartbeat signal, and after the information synchronization is completed, the switch sends a confirmation signal to confirm that the information has been successfully synchronized.

5. The method according to claim 1, characterized in that The step of receiving the confirmation signal and completing information synchronization includes: After receiving the confirmation signal, checking whether the information synchronization has been completed; After the detection information synchronization is completed, the latest physical address information and address resolution protocol information are updated to restore the normal operation of the network; A result report is generated, which records the process and results of the information synchronization.

6. The method according to claim 5, characterized in that The step of detecting whether information synchronization has been completed after receiving the confirmation signal further includes: When it is detected that the updated physical address information or the updated address resolution protocol information of the switch is different from the heartbeat signal, the fault recovery mechanism is triggered to work through the preset backup path and automatic switching function.

7. The method according to claim 5, characterized in that After the detection information synchronization is completed, the step of updating the latest physical address information and address resolution protocol information to restore the normal operation of the network includes: After detecting that the information synchronization is completed, the physical address information and the address resolution protocol information are updated to the latest status; Verify whether network traffic is correctly routed according to updated physical address information and address resolution protocol information, and obtain verification results; When the verification result is stable operation and correct routing, restore the normal operation of the network.

8. A switch information synchronization device, characterized in that: The device comprises: An acquisition module, used to acquire original physical address information and original address resolution protocol information; The acquisition module is further used to acquire a heartbeat signal, wherein the heartbeat signal includes updated physical address information of the switch and updated address resolution protocol information of the switch; A detection module, used for performing consistency check on the original physical address information, the original address resolution protocol information and the heartbeat signal to obtain a detection result; A sending module, configured to trigger a synchronization mechanism and send a synchronization request instruction to the switch when the detection result is that the original physical address information is different from the heartbeat signal or the original address resolution protocol information is different from the heartbeat signal, so that the switch performs information synchronization and feeds back a confirmation signal; The receiving module is used to receive the confirmation signal and complete information synchronization.

9. A switch information synchronization device, characterized in that: The device comprises: a memory, a processor, and a switch information synchronization program stored in the memory and executable on the processor, wherein the switch information synchronization program is configured to implement the steps of the switch information synchronization method according to any one of claims 1 to 7.

10. A medium, characterized in that The medium stores a switch information synchronization program, and when the switch information synchronization program is executed by the processor, the steps of the switch information synchronization method according to any one of claims 1 to 7 are implemented.