Fault processing method and device based on linkage of VRRP and BFD, equipment and storage medium

By adjusting the heartbeat message detection of VRRP when the BFD module fails, the link failure can still be detected quickly after the BFD module fails, which solves the detection delay problem of VRRP when BFD fails and maintains the availability of highly sensitive networks.

CN122120192APending Publication Date: 2026-05-29SHENZHEN FENGRUNDA TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN FENGRUNDA TECH CO LTD
Filing Date
2026-04-30
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, the Virtual Router Redundancy Protocol (VRRP) cannot quickly detect link failures when the Bidirectional Forwarding Detection (BFD) module fails, causing the fault detection time to degrade from milliseconds to seconds, which cannot meet the network availability requirements of highly sensitive scenarios.

Method used

By adjusting the heartbeat messages of the VRRP module in the event of a BFD module failure, using the target heartbeat message for link detection, and triggering route switching when the detection result is abnormal, VRRP heartbeat detection is upgraded from basic mode to enhanced mode, maintaining millisecond-level link failure detection capability.

Benefits of technology

Even after the BFD module fails, it can still maintain millisecond-level link fault detection capability, avoiding the decline in network fault detection capability due to detection delay, and improving the accuracy of fault detection and resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122120192A_ABST
    Figure CN122120192A_ABST
Patent Text Reader

Abstract

The application discloses a fault processing method and device based on linkage of VRRP and BFD, equipment and storage medium, relates to the technical field of network communication, and comprises the following steps: when detecting that a BFD module is faulty, adjusting heartbeat messages of a VRRP module according to a preset heartbeat detection instruction to obtain target heartbeat messages; performing link detection according to the target heartbeat messages to obtain a detection result; and when the detection result is a link exception, triggering the VRRP module to perform route switching. The technical problem of how to maintain the rapid detection capability of a virtual route redundancy protocol for a link fault in the case of failure of a bidirectional forwarding detection module is solved; the linkage control hub actively takes over the link detection responsibility after the failure of the bidirectional forwarding detection module, upgrades heartbeat detection of the virtual route redundancy protocol from a basic mode to an enhanced mode, and therefore the link fault sensing capability is still maintained in the case of absence of the bidirectional forwarding detection module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communication technology, and in particular to a fault handling method, apparatus, device and storage medium based on VRRP and BFD linkage. Background Technology

[0002] As network scale continues to expand and business continuity requirements increase, network devices need to sense changes in link status and complete route switching within milliseconds to meet the stringent network availability requirements of highly sensitive scenarios such as financial transactions and industrial control.

[0003] In existing technologies, Virtual Router Redundancy Protocol (VRRP) relies on heartbeat detection to determine device faults. Its detection cycle is usually one second, resulting in a large fault detection delay. When the Bidirectional Forwarding Detection (BFD) module fails, VRRP cannot obtain link status information and can only rely on its own basic heartbeat mechanism to continue detection. At this time, the fault detection time degrades from milliseconds to seconds, and it cannot maintain a fast link fault perception capability after the BFD module fails.

[0004] Therefore, how to maintain the virtual routing redundancy protocol's ability to quickly detect link failures when the bidirectional forwarding detection module fails is the technical problem that this application aims to solve.

[0005] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0006] The main objective of this application is to provide a fault handling method, apparatus, device, and storage medium based on VRRP and BFD linkage, aiming to solve the technical problem of how to maintain the rapid detection capability of the virtual routing redundancy protocol for link faults when the bidirectional forwarding detection module fails.

[0007] To achieve the above objectives, this application proposes a fault handling method based on VRRP and BFD linkage. This method is applied to the linkage control center of the fault handling system based on VRRP and BFD linkage. The fault handling system includes the linkage control center, a BFD module, and a VRRP module. The method includes: When a fault is detected in the BFD module, the heartbeat message of the VRRP module is adjusted according to a preset heartbeat detection command to obtain the target heartbeat message. Link detection is performed based on the target heartbeat message to obtain the detection result; When the detection result indicates a link anomaly, the VRRP module is triggered to perform a route switch.

[0008] In one embodiment, the linkage control center includes a buffer unit; Before a fault is detected in the BFD module, the following is also included: The link status data uploaded by the BFD module according to the detection cycle is stored in the cache unit so that the VRRP module can read the link status data from the cache unit; After the VRRP module reads the link state data from the cache unit, it receives the routing state information uploaded by the VRRP module. The routing status information is fed back to the BFD module so that the BFD module can synchronize the routing status information of the VRRP module.

[0009] In one embodiment, before storing the link state data uploaded by the BFD module according to the detection cycle into the cache unit so that the VRRP module can read the link state data from the cache unit, the method further includes: Based on the historical link status data uploaded by the BFD module, the historical link status is obtained; The detection cycle is adjusted based on the historical link status. The link status data of the link to be tested is collected according to the level of the link to be tested and the adjusted testing cycle so that the BFD module can upload the link status data.

[0010] In one embodiment, when a fault is detected in the BFD module, adjusting the heartbeat message of the VRRP module according to a preset heartbeat detection command to obtain a target heartbeat message includes: When a fault is detected in the BFD module, the target period, extended message field and heartbeat detection range are obtained according to the preset heartbeat detection command. The target period is used as the heartbeat detection period of the VRRP module; The heartbeat message of the VRRP module is adjusted according to the extended message field to obtain the target heartbeat message; The target period is used as the heartbeat detection period for the target heartbeat message; The heartbeat detection range is used as the detection range for the target heartbeat message.

[0011] In one embodiment, the step of performing link detection based on the target heartbeat message to obtain the detection result includes: Obtain the heartbeat response message of the target heartbeat message; Based on the heartbeat response message, extract link status data and device load data; The detection result is determined based on the link status data or the device load data.

[0012] In one embodiment, determining the detection result based on the link status data or the device load data includes: The link status is determined based on the link connectivity status data; The equipment status is determined based on the equipment operating status data; When the link status is a link failure or the device status is an overload, the link anomaly is taken as the detection result.

[0013] In one embodiment, after detecting a fault in the BFD module, the method further includes: The BFD module is monitored within a preset window time to obtain monitoring data; Based on the monitoring data, the module status of the BFD module is obtained; When the module status is normal operation, the heartbeat message of the VRRP module is restored according to the preset heartbeat shutdown command.

[0014] Furthermore, to achieve the above objectives, this application also proposes a fault handling device based on the linkage of VRRP and BFD, wherein the fault handling device based on the linkage of VRRP and BFD includes: The adjustment module is used to adjust the heartbeat message of the VRRP module according to a preset heartbeat detection command when a fault is detected in the BFD module, so as to obtain the target heartbeat message. The detection module is used to perform link detection based on the target heartbeat message and obtain the detection result; The switching module is used to trigger the VRRP module to perform route switching when the detection result is a link anomaly.

[0015] Furthermore, to achieve the above objectives, this application also proposes a fault handling device based on VRRP and BFD linkage, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the fault handling method based on VRRP and BFD linkage as described above.

[0016] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the fault handling method based on VRRP and BFD linkage as described above.

[0017] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the fault handling method based on VRRP and BFD linkage as described above.

[0018] The method of this application is applied to the linkage control center of the fault handling system based on VRRP and BFD linkage. The system includes the linkage control center, a BFD module, and a VRRP module. The method includes: when a fault is detected in the BFD module, adjusting the heartbeat message of the VRRP module according to a preset heartbeat detection instruction to obtain a target heartbeat message; performing link detection based on the target heartbeat message to obtain a detection result; and triggering the VRRP module to perform route switching when the detection result indicates a link anomaly. This solves the technical problem of how to maintain the rapid link fault detection capability of the Virtual Router Redundancy Protocol (VRRP) in the event of a failure of the bidirectional forwarding detection module. It enables the linkage control center to actively take over the link detection responsibility after a failure of the bidirectional forwarding detection module, upgrading the heartbeat detection of the VRRP from the basic mode to an enhanced mode, thereby maintaining millisecond-level link fault perception capability even when the bidirectional forwarding detection module is missing. Attached Figure Description

[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart illustrating an embodiment of the fault handling method based on the linkage of VRRP and BFD in this application. Figure 2 This is a flowchart illustrating Embodiment 2 of the fault handling method based on VRRP and BFD linkage in this application; Figure 3 This is a schematic diagram of the module structure of the fault handling device based on the linkage of VRRP and BFD according to an embodiment of this application; Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the fault handling method based on VRRP and BFD linkage in the embodiments of this application.

[0022] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0023] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0024] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0025] The main solution of this application embodiment is: when a fault is detected in the BFD module, the heartbeat message of the VRRP module is adjusted according to a preset heartbeat detection instruction to obtain a target heartbeat message; link detection is performed according to the target heartbeat message to obtain a detection result; when the detection result is a link abnormality, the VRRP module is triggered to perform route switching.

[0026] In this embodiment, for ease of description, the following description will focus on the linkage control center of the fault handling system based on VRRP and BFD linkage as the execution subject.

[0027] In existing technologies, virtual routing redundancy protocols rely on heartbeat detection to determine device faults, and their detection cycle is usually one second, resulting in a large delay in fault detection. When the bidirectional forwarding detection module fails, the virtual routing redundancy protocol cannot obtain link status information and can only rely on its own basic heartbeat mechanism to continue detection. At this time, the fault detection time degrades from milliseconds to seconds, and it cannot maintain a fast link fault perception capability after the bidirectional forwarding detection module fails.

[0028] This application provides a solution that addresses the technical problem of maintaining the rapid link fault detection capability of the Virtual Router Redundancy Protocol (VRRP) in the event of a failure of the bidirectional forwarding detection module. It enables the linkage control center to proactively take over the link detection responsibility after the bidirectional forwarding detection module fails, upgrading the heartbeat detection of the VRRP from the basic mode to the enhanced mode, thereby maintaining millisecond-level link fault perception capability even when the bidirectional forwarding detection module is missing.

[0029] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, such as the linkage control center of the fault handling system based on VRRP and BFD linkage. The following description uses the linkage control center of the fault handling system based on VRRP and BFD linkage as an example to illustrate this embodiment and the following embodiments.

[0030] Based on this, the embodiments of this application provide a fault handling method based on the linkage of VRRP and BFD, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the fault handling method based on the linkage of VRRP and BFD in this application.

[0031] In this embodiment, the fault handling method based on VRRP and BFD linkage is applied to the linkage control center of the fault handling system based on VRRP and BFD linkage. The fault handling system based on VRRP and BFD linkage includes the linkage control center, the BFD module, and the VRRP module.

[0032] It should be noted that the linkage control center is a unified coordination and control unit located between the BFD module and the VRRP module. It is responsible for receiving status data from both sides, issuing detection commands, and executing fault fallback logic. The BFD module is a functional unit responsible for quickly detecting link connectivity and can collect status data such as link delay and packet loss rate at preset intervals. The VRRP module is a functional unit responsible for providing virtual route redundancy backup and maintaining status synchronization between the primary and backup devices through heartbeat messages.

[0033] Specifically, the linkage control center establishes data interaction channels with the BFD module and the VRRP module respectively. The BFD module reports the link status data to the linkage control center, and the VRRP module feeds back its own operating status to the linkage control center. The linkage control center coordinates the collaborative operation of both parties based on the received data.

[0034] The fault handling method based on VRRP and BFD linkage includes steps S10~S30: Step S10: When a fault is detected in the BFD module, the heartbeat message of the VRRP module is adjusted according to the preset heartbeat detection command to obtain the target heartbeat message; It should be noted that the preset heartbeat detection command is a mode switching command issued by the linkage control center to the VRRP module when a fault is detected in the BFD module. It is used to instruct the VRRP module to switch from the basic heartbeat mode to the enhanced heartbeat mode. The heartbeat message is a status announcement message that the VRRP module periodically sends to the peer device to maintain the connection awareness between the primary and backup devices. The target heartbeat message is an adjusted heartbeat message with a shorter cycle, richer information, and a wider detection range.

[0035] Understandably, since the link detection responsibility is missing after the BFD module fails, if the original basic heartbeat message of the VRRP module is used for detection, the fault detection time will degrade from milliseconds to seconds. Therefore, performing step S10 can avoid the decline in link detection capability caused by the BFD module failure, thereby improving the timeliness of fault perception after the BFD module fails.

[0036] In one feasible implementation, step S10 may include: when a fault is detected in the BFD module, obtaining a target period, an extended message field, and a heartbeat detection range according to a preset heartbeat detection instruction; using the target period as the heartbeat detection period of the VRRP module; adjusting the heartbeat message of the VRRP module according to the extended message field to obtain a target heartbeat message; using the target period as the heartbeat detection period of the target heartbeat message; and using the heartbeat detection range as the detection range of the target heartbeat message.

[0037] It should be noted that the target period is the compressed heartbeat message sending interval, compressed from one second to one hundred milliseconds; the extended message field is a newly added data-carrying area in the heartbeat message, used to carry link latency, message loss rate, and device load status information; the heartbeat detection range is the coverage area where the VRRP module performs link detection, including not only the connectivity between the primary and backup devices within the VRRP group, but also the connectivity between the primary and backup devices and the core node; the heartbeat detection period is the time interval between two consecutive heartbeat messages sent by the VRRP module; and the detection range is the link detection area that the heartbeat message can cover.

[0038] Specifically, the linkage control center parses the preset heartbeat detection command into a target period of 100 milliseconds, an extended message field definition, and a command to expand the heartbeat detection range. After receiving these parameters, the VRRP module adjusts its own heartbeat sending period from one second to 100 milliseconds, adds an extended message field to the heartbeat message to carry link delay, message loss rate, and device load information, and expands the sending target of the heartbeat message from only the peer device to the peer device and the core node.

[0039] In this embodiment, by compressing the heartbeat detection period to one hundred milliseconds and extending the heartbeat message with multi-dimensional status information, the problem that the VRRP module cannot obtain detailed link status after the BFD module fails is solved.

[0040] In one feasible implementation, step S10 may include: monitoring the BFD module within a preset window time to obtain monitoring data; obtaining the module status of the BFD module based on the monitoring data; and restoring the heartbeat message of the VRRP module according to a preset heartbeat shutdown command when the module status is normal operation.

[0041] It should be noted that the preset window time is the time interval during which the linkage control center continuously monitors the status of the BFD module, set to ten seconds; the monitoring data is the record of the BFD module's operating status collected by the linkage control center within the preset window time, including whether the process exists and whether the data is reported normally; the module status is the current health status of the BFD module, including both normal module operation and abnormal module operation; the preset heartbeat shutdown command is the mode recovery command issued by the linkage control center to the VRRP module after the BFD module recovers to normal, used to instruct the VRRP module to switch back from enhanced heartbeat mode to basic heartbeat mode.

[0042] Specifically, after detecting a BFD module failure, the linkage control center initiates a monitoring window that lasts for ten seconds. During this window, the process status and data reporting status of the BFD module are collected every second, and the data is aggregated to form monitoring data. If the monitoring data shows that the BFD module process exists and reports detection data normally for five consecutive cycles, the module is determined to be operating normally. The linkage control center sends a preset heartbeat shutdown command to the VRRP module. The VRRP module restores the heartbeat sending cycle from one hundred milliseconds to one second, removes the extended message field from the heartbeat message, and restores the detection scope to only detect the connectivity between the primary and backup devices.

[0043] In this embodiment, by automatically restoring the heartbeat message of the VRRP module after the BFD module returns to normal, the resource waste caused by the long-term coexistence of enhanced heartbeat mode and BFD detection mode is solved. The above is merely a feasible implementation of step S10 provided in this embodiment; this embodiment does not specifically limit the specific implementation of step S10.

[0044] Step S20: Perform link detection based on the target heartbeat message to obtain the detection result; It should be noted that the test results are a judgment on whether the current link can communicate normally, including both normal and abnormal links.

[0045] Understandably, since the target heartbeat message carries richer status information and a shorter detection cycle, performing step S20 can avoid the problem of missing transient faults due to the coarse detection granularity when using traditional heartbeat messages, thereby improving the accuracy of link fault detection.

[0046] In one feasible implementation, step S20 may include: acquiring the heartbeat response message of the target heartbeat message; extracting link status data and device load data based on the heartbeat response message; and determining the detection result based on the link status data or the device load data.

[0047] It should be noted that the heartbeat response message is the response message returned by the peer device after receiving the target heartbeat message. It carries the link awareness information and device operating status of the peer device. The link status data is the parameters related to the link connectivity quality carried in the heartbeat response message, including link latency and packet loss rate. The device load data is the parameters related to the device operating load carried in the heartbeat response message, including CPU utilization and memory usage.

[0048] Specifically, after the VRRP module sends the target heartbeat message to the peer device, the peer device generates a heartbeat response message and returns it. The VRRP module parses the link delay value, message loss rate value, CPU utilization percentage and memory usage percentage from the received response message, combines these values ​​into link status data and device load data, and passes the two sets of data as input to the linkage control center to determine the detection result.

[0049] Furthermore, determining the detection result based on the link status data or the device load data includes: determining the link status based on the link connectivity data; determining the device status based on the device operating status data; and taking the link anomaly as the detection result when the link status is a link fault or the device status is a device overload.

[0050] It should be noted that link status is the health level of the link determined based on link status data, including both normal and faulty links; device status is the health level of the device determined based on device load data, including both normal and overloaded devices.

[0051] Specifically, the linkage control center uses a link latency of 10 milliseconds and a packet loss rate of 1% as fault determination thresholds. When the link latency is greater than 10 milliseconds and lasts for two consecutive detection cycles, or the packet loss rate is greater than or equal to 1% and lasts for three consecutive detection cycles, the link status is determined to be a link fault. The linkage control center uses a CPU utilization rate of 85% and a memory usage rate of 90% as over-limit determination thresholds. When the CPU utilization rate is greater than or equal to 85% and lasts for five seconds, or the memory usage rate is greater than or equal to 90% and lasts for five seconds, the device status is determined to be an overload. If the link status is a link fault or the device status is an overload, the link anomaly is output as the detection result.

[0052] In this embodiment, by simultaneously extracting link status data and device load data from the heartbeat response message, the problem that relying solely on link connectivity cannot identify abnormal forwarding caused by excessive device load is solved.

[0053] The above are merely feasible implementations of step S20 provided in this embodiment. This embodiment does not specifically limit the specific implementation of step S20.

[0054] Step S30: When the detection result indicates a link anomaly, the VRRP module is triggered to perform a route switch. It should be noted that route switching refers to the operation of transferring traffic from the currently active primary route path to a backup route path.

[0055] Specifically, after receiving a detection result indicating a link anomaly, the linkage control center issues a switching command to the VRRP module. The VRRP module selects the optimal backup route based on the current dynamic priority calculation result and transfers traffic from the faulty link to the backup link.

[0056] Understandably, since the detection results only mark the link as abnormal without specifying a specific switching target, proceeding to step S30 can avoid the secondary switching problem caused by switching to a non-optimal backup route, thereby improving the one-time success rate of route switching.

[0057] This embodiment provides a fault handling method based on the linkage of VRRP and BFD. By employing a technique that, upon detecting a failure in the bidirectional forwarding detection module, adjusts the heartbeat message of the Virtual Router Redundancy Protocol module according to a preset heartbeat detection command to obtain a target heartbeat message, and then performs link detection based on this target heartbeat message to trigger route switching, this method solves the technical problem of maintaining the rapid link fault detection capability of the Virtual Router Redundancy Protocol when the bidirectional forwarding detection module fails. Compared with existing technologies, this method enables the linkage control center to actively take over the link detection responsibility after the bidirectional forwarding detection module fails, upgrading the heartbeat detection of the Virtual Router Redundancy Protocol from the basic mode to an enhanced mode, thereby maintaining millisecond-level link fault perception capability even when the bidirectional forwarding detection module is missing.

[0058] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 The fault handling method based on VRRP and BFD linkage includes steps S1 to S3 before step S10: Step S1: The link status data uploaded by the BFD module according to the detection cycle is stored in the cache unit so that the VRRP module can read the link status data from the cache unit; It should be noted that the detection cycle is the time interval between two consecutive collections of link status data by the BFD module, and this interval is dynamically adjusted according to the link status; the cache unit is a high-speed data cache area built into the linkage control center, which can temporarily store the link status data of the most recent three detection cycles.

[0059] Specifically, the BFD module collects link latency, packet loss rate, connectivity duration, and jitter frequency according to the detection cycle, combines these data into link status data, and uploads it to the linkage control center. The linkage control center writes the received link status data into the cache unit, which retains the data from the three most recent detection cycles according to the first-in-first-out principle. When the VRRP module needs to obtain the link status, it sends a read request to the cache unit, and the cache unit returns the currently stored link status data to the VRRP module.

[0060] It is understandable that, since the BFD module and VRRP module have different operating cycles, direct point-to-point data transmission can easily lead to data loss or state inconsistency. Therefore, performing step S1 can avoid the problem of state inconsistency caused by data transmission delay, thereby improving the synchronization accuracy of data interaction between the two parties.

[0061] In one feasible implementation, before step S1, the following steps may be included: obtaining historical link status based on historical link status data uploaded by the BFD module; adjusting the detection period according to the historical link status; and collecting link status data of the link to be detected according to the level of the link to be detected and the adjusted detection period so that the BFD module can upload the link status data.

[0062] It should be noted that historical link status data is a record of link status data uploaded by the BFD module over a period of time, including historical link delay sequences and historical packet loss rate sequences; historical link status is a link stability trend calculated based on historical link status data, including stable state, slightly fluctuating state, and near-failure state; the level of the link to be detected is a category classified according to the importance of the link in the network, including core links and ordinary links.

[0063] Specifically, the linkage control center reads the link delay sequence and packet loss rate sequence of the past ten detection cycles from the cache unit, and uses these sequences as historical link status data. The linkage control center calculates the average value of the historical link delay sequence and the average value of the historical packet loss rate sequence. If the average value is less than five milliseconds and one-thousandth, respectively, the historical link status is determined to be stable. When the historical link status is stable, the detection cycle is adjusted to fifty milliseconds; when the historical link status is slightly fluctuating, it is adjusted to twenty milliseconds; and when the historical link status is close to a fault, it is adjusted to ten milliseconds. The linkage control center obtains the level of the link to be detected. If the level is a core link, the adjusted detection cycle is used for data collection; if the level is a normal link, the collection frequency is appropriately reduced based on the adjusted detection cycle. The BFD module performs link status data collection according to the adjusted detection cycle and link level, and uploads the collection results as link status data.

[0064] In this embodiment, by dynamically adjusting the detection cycle based on historical link status and combining it with link-level differentiated collection frequencies, the problems of wasted network overhead under stable conditions and insufficient detection sensitivity under fluctuating conditions caused by a fixed detection cycle are solved.

[0065] The above are merely feasible implementations of step S1 provided in this embodiment. This embodiment does not specifically limit the specific implementation of step S1.

[0066] Step S2: After the VRRP module reads the link status data from the cache unit, it receives the routing status information uploaded by the VRRP module. It should be noted that the routing status information is the routing-related status data currently maintained by the VRRP module, including the priority value of the virtual router, the status of the primary and backup roles, and the stability indicators of the routing table.

[0067] Specifically, after successfully reading the link status data from the cache unit, the VRRP module packages its current primary / backup role status, priority value, and routing table stability indicators into routing status information; the VRRP module uploads this routing status information to the linkage control center; the linkage control center receives the routing status information and temporarily stores it in its internal register, waiting for subsequent feedback to the BFD module.

[0068] It is understandable that since the BFD module needs to be aware of the state changes of the VRRP module in order to adjust the link detection strategy, if the BFD module cannot obtain the routing state information of the VRRP module, it cannot optimize the detection focus according to the primary / backup switch status. Therefore, performing step S2 can avoid the detection resource mismatch problem caused by the lack of VRRP state awareness of the BFD module, thereby improving the targeting of the BFD module's detection strategy.

[0069] Step S3: Feed back the routing status information to the BFD module so that the BFD module synchronizes the routing status information of the VRRP module.

[0070] It should be noted that routing status information feedback refers to the process by which the linkage control center sends the routing status data received from the VRRP module to the BFD module.

[0071] Specifically, the linkage control center uses the routing status information received in step S2 as feedback data and sends it to the BFD module through the data interaction channel. After receiving the routing status information, the BFD module parses out the primary and backup role status and priority value of the VRRP module. Based on the parsed primary and backup role status, the BFD module marks the direct link between the primary and backup routes as a key monitoring link and dynamically adjusts the detection frequency of the link according to the priority value.

[0072] It is understandable that since the BFD module is originally unable to perceive the role status of the VRRP module, if there is a lack of synchronization of routing status information, the BFD module will continue to detect links according to the original strategy after the VRRP master-slave switch, which may lead to a mismatch between the detection focus and the actual network topology. Therefore, step 3 can avoid the problem of the BFD module wasting detection resources on non-critical links, thereby improving the utilization efficiency of detection resources.

[0073] This embodiment provides a fault handling method based on VRRP and BFD linkage. The link state data uploaded by the BFD module according to the detection cycle is stored in the cache unit so that the VRRP module can read the link state data from the cache unit. After the VRRP module reads the link state data from the cache unit, it receives routing state information uploaded by the VRRP module. The routing state information is then fed back to the BFD module so that the BFD module synchronizes the routing state information of the VRRP module. By employing bidirectional data synchronization and cache unit mediation, the data transmission delay and state inconsistency caused by the asynchronous operation cycles of the BFD and VRRP modules are avoided. This solves the technical problem of the BFD module's inability to perceive changes in the VRRP module's routing state, leading to a mismatch between the detection strategy and the network topology. Thus, dynamic synchronization of the states of both parties is achieved, reducing data interaction latency to less than one millisecond and achieving 100% synchronization accuracy.

[0074] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the fault handling method based on VRRP and BFD linkage in this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0075] This application also provides a fault handling device based on the linkage of VRRP and BFD, please refer to... Figure 3 The fault handling device based on VRRP and BFD linkage includes: Adjustment module 10 is used to adjust the heartbeat message of VRRP module according to preset heartbeat detection command when a fault is detected in BFD module, so as to obtain target heartbeat message; Detection module 20 is used to perform link detection based on the target heartbeat message and obtain the detection result; The switching module 30 is used to trigger the VRRP module to perform route switching when the detection result is a link abnormality.

[0076] The fault handling device based on VRRP and BFD linkage provided in this application, employing the fault handling method based on VRRP and BFD linkage in the above embodiments, can solve the technical problem of how to maintain the rapid detection capability of the Virtual Router Redundancy Protocol for link faults when the bidirectional forwarding detection module fails. Compared with the prior art, the beneficial effects of the fault handling device based on VRRP and BFD linkage provided in this application are the same as those of the fault handling method based on VRRP and BFD linkage provided in the above embodiments, and other technical features in the fault handling device based on VRRP and BFD linkage are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0077] The adjustment module 10 is further configured to store the link status data uploaded by the BFD module according to the detection cycle into the cache unit so that the VRRP module can read the link status data from the cache unit; after the VRRP module reads the link status data from the cache unit, receive the routing status information uploaded by the VRRP module; and feed back the routing status information to the BFD module so that the BFD module can synchronize the routing status information of the VRRP module.

[0078] The adjustment module 10 is further configured to obtain historical link status based on historical link status data uploaded by the BFD module; adjust the detection period according to the historical link status; and collect link status data of the link to be detected according to the level of the link to be detected and the adjusted detection period so that the BFD module can upload the link status data.

[0079] The adjustment module 10 is further configured to, when a fault is detected in the BFD module, obtain a target period, an extended message field, and a heartbeat detection range according to a preset heartbeat detection instruction; use the target period as the heartbeat detection period of the VRRP module; adjust the heartbeat message of the VRRP module according to the extended message field to obtain a target heartbeat message; use the target period as the heartbeat detection period of the target heartbeat message; and use the heartbeat detection range as the detection range of the target heartbeat message.

[0080] The adjustment module 10 is also used to monitor the BFD module within a preset window time and obtain monitoring data; obtain the module status of the BFD module based on the monitoring data; and restore the heartbeat message of the VRRP module according to a preset heartbeat shutdown command when the module status is normal operation.

[0081] The detection module 20 is further configured to acquire the heartbeat response message of the target heartbeat message; extract link status data and device load data based on the heartbeat response message; and determine the detection result based on the link status data or the device load data.

[0082] The detection module 20 is also used to determine the link status based on the link connectivity status data; Based on the device operating status data, the device status is determined; when the link status is a link failure or the device status is that the device load is excessive, the link anomaly is taken as the detection result.

[0083] This application provides a fault handling device based on VRRP and BFD linkage. The fault handling device based on VRRP and BFD linkage includes: at least one processor; and a memory 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 to enable the at least one processor to execute the fault handling method based on VRRP and BFD linkage in the above embodiment 1.

[0084] The following is for reference. Figure 4This document illustrates a structural schematic diagram of a fault handling device based on VRRP and BFD linkage suitable for implementing embodiments of this application. The fault handling device based on VRRP and BFD linkage in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 4 The fault handling device based on VRRP and BFD linkage shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0085] like Figure 4 As shown, the fault handling device based on VRRP and BFD linkage may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the fault handling device based on VRRP and BFD linkage. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the VRRP-based fault handling device linked with BFD to exchange data wirelessly or via wired communication with other devices. Although the figure shows a VRRP-based fault handling device linked with BFD with various systems, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.

[0086] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0087] The fault handling device based on VRRP and BFD linkage provided in this application, employing the fault handling method based on VRRP and BFD linkage in the above embodiments, can solve the technical problem of how to maintain the rapid detection capability of the Virtual Router Redundancy Protocol for link faults when the bidirectional forwarding detection module fails. Compared with the prior art, the beneficial effects of the fault handling device based on VRRP and BFD linkage provided in this application are the same as those of the fault handling method based on VRRP and BFD linkage provided in the above embodiments, and other technical features in this fault handling device based on VRRP and BFD linkage are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0088] It should be understood that the various parts disclosed in this application can be implemented using 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 suitable manner in one or more embodiments or examples.

[0089] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0090] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the fault handling method based on VRRP and BFD linkage in the above embodiments.

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

[0092] The aforementioned computer-readable storage medium may be included in a fault handling device based on VRRP and BFD linkage; or it may exist independently and not be assembled into a fault handling device based on VRRP and BFD linkage.

[0093] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by a fault handling device based on VRRP and BFD linkage, the fault handling device based on VRRP and BFD linkage: when a fault is detected in the BFD module, adjusts the heartbeat message of the VRRP module according to a preset heartbeat detection instruction to obtain a target heartbeat message; performs link detection based on the target heartbeat message to obtain a detection result; and when the detection result indicates a link anomaly, triggers the VRRP module to perform route switching.

[0094] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0095] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0096] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0097] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described fault handling method based on VRRP and BFD linkage. This solves the technical problem of how to maintain the rapid detection capability of the virtual routing redundancy protocol for link faults when the bidirectional forwarding detection module fails. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the fault handling method based on VRRP and BFD linkage provided in the above embodiments, and will not be repeated here.

[0098] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the fault handling method based on VRRP and BFD linkage as described above.

[0099] The computer program product provided in this application can solve the technical problem of how to maintain the rapid detection capability of the Virtual Router Redundancy Protocol for link faults when the bidirectional forwarding detection module fails. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the fault handling method based on VRRP and BFD linkage provided in the above embodiments, and will not be repeated here.

[0100] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A fault handling method based on VRRP and BFD linkage, characterized in that, The fault handling method based on VRRP and BFD linkage is applied to the linkage control center of the fault handling system based on VRRP and BFD linkage. The fault handling system based on VRRP and BFD linkage includes the linkage control center, a BFD module, and a VRRP module. The method includes: When a fault is detected in the BFD module, the heartbeat message of the VRRP module is adjusted according to a preset heartbeat detection command to obtain the target heartbeat message. Link detection is performed based on the target heartbeat message to obtain the detection result; When the detection result indicates a link anomaly, the VRRP module is triggered to perform a route switch. When a fault is detected in the BFD module, the heartbeat message of the VRRP module is adjusted according to a preset heartbeat detection command to obtain the target heartbeat message, including: When a fault is detected in the BFD module, the target period, extended message field and heartbeat detection range are obtained according to the preset heartbeat detection command. The target period is used as the heartbeat detection period of the VRRP module; The heartbeat message of the VRRP module is adjusted according to the extended message field to obtain the target heartbeat message; The target period is used as the heartbeat detection period for the target heartbeat message; The heartbeat detection range is used as the detection range for the target heartbeat message.

2. The method as described in claim 1, characterized in that, The linkage control center includes a cache unit; Before a fault is detected in the BFD module, the following is also included: The link status data uploaded by the BFD module according to the detection cycle is stored in the cache unit so that the VRRP module can read the link status data from the cache unit; After the VRRP module reads the link state data from the cache unit, it receives the routing state information uploaded by the VRRP module. The routing status information is fed back to the BFD module so that the BFD module can synchronize the routing status information of the VRRP module.

3. The method as described in claim 2, characterized in that, Before storing the link state data uploaded by the BFD module according to the detection cycle into the cache unit so that the VRRP module can read the link state data from the cache unit, the method further includes: Based on the historical link status data uploaded by the BFD module, the historical link status is obtained; The detection cycle is adjusted based on the historical link status. The link status data of the link to be tested is collected according to the level of the link to be tested and the adjusted testing cycle so that the BFD module can upload the link status data.

4. The method as described in claim 1, characterized in that, The link detection based on the target heartbeat message, to obtain the detection result, includes: Obtain the heartbeat response message of the target heartbeat message; Based on the heartbeat response message, extract link status data and device load data; The detection result is determined based on the link status data or the device load data.

5. The method as described in claim 4, characterized in that, The step of determining the detection result based on the link status data or the device load data includes: The link status is determined based on the link connectivity status data; The equipment status is determined based on the equipment operating status data; When the link status is a link failure or the device status is an overload, the link anomaly is taken as the detection result.

6. The method as described in claim 1, characterized in that, The process of detecting a fault in the BFD module further includes: The BFD module is monitored within a preset window time to obtain monitoring data; Based on the monitoring data, the module status of the BFD module is obtained; When the module status is normal operation, the heartbeat message of the VRRP module is restored according to the preset heartbeat shutdown command.

7. A fault handling device based on VRRP and BFD linkage, characterized in that, The device includes: The adjustment module is used to adjust the heartbeat message of the VRRP module according to a preset heartbeat detection command when a fault is detected in the BFD module, so as to obtain the target heartbeat message. The detection module is used to perform link detection based on the target heartbeat message and obtain the detection result; The switching module is used to trigger the VRRP module to perform route switching when the detection result is a link anomaly; The adjustment module is further configured to, when a fault is detected in the BFD module, obtain a target period, an extended message field, and a heartbeat detection range according to a preset heartbeat detection instruction; use the target period as the heartbeat detection period of the VRRP module; adjust the heartbeat message of the VRRP module according to the extended message field to obtain a target heartbeat message; use the target period as the heartbeat detection period of the target heartbeat message; and use the heartbeat detection range as the detection range of the target heartbeat message.

8. A fault handling device based on VRRP and BFD linkage, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the fault handling method based on VRRP and BFD linkage as described in any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the fault handling method based on VRRP and BFD linkage as described in any one of claims 1 to 6.