Redundant state switching method, VPP forwarding device, storage medium and product
By transmitting redundant state announcement information between VPP devices and initiating ping detection, actively switching redundant states according to reply, the problem of low flexibility in redundant state switching of existing VPP devices is solved, and the reliability and high availability of VPP device clusters are improved.
Patent Information
- Application Number
- CN202411810971.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-28
AI Technical Summary
The redundant state switching of existing VPP devices is low in flexibility, which leads to inability to switch communication networks in time when failure, affecting the high availability and reliability of VPP device clusters.
By transmitting redundant state announcement information between VPP devices and launching ping detection to the access host, actively switching the redundant state according to the ping detection reply, thereby achieving more flexible and accurate redundant state switching.
It improves the flexibility and accuracy of redundant state switching of VPP devices, enhances the reliability and high availability of VPP device clusters, and avoids the problem of mismatch in switching timing caused by the heartbeat signal that cannot reflect the actual communication situation.
Smart Images

Figure CN119728534A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a redundant state switching method, a VPP forwarding device, a computer-readable storage medium, and a computer program product. Background Art
[0002] In the field of cloud computing technology, in order to achieve forwarding of tens of millions of times, VPP (Vector Packet Processing) devices are usually deployed. VPP (Vector Packet Processing) devices forward message data based on VRRP (Virtual Router Redundancy Protocol). That is, a VPP device is elected as the master device in the local area network, and other VPP devices are used as slave devices. VPP devices are all equipped with a master-slave redundancy mechanism to ensure the high availability of VPP devices.
[0003] At present, the redundant state is usually switched by transmitting a heartbeat signal between the active device and the standby device, that is, the VPP device can only switch the redundant state passively. However, since the heartbeat signal cannot reflect the actual communication status of the VPP device, the timing of the redundant state switching of the VPP cannot match the actual switching demand, so that the abnormal VPP device is continuously in the active state, and the corresponding communication network is continuously in a faulty state, and thus the high availability requirements of the VPP active and standby groups cannot be met, which seriously affects the reliability of the VPP device. Therefore, the current VPP device redundant state switching has low switching flexibility, and thus the reliability of the VPP device cluster is poor. Summary of the invention
[0004] Based on this, it is necessary to provide a redundant state switching method, VPP forwarding device, computer-readable storage medium and computer program product to improve the switching flexibility of VPP device redundant state switching and thereby improve the reliability of VPP device cluster in response to the above technical problems.
[0005] In a first aspect, the present application provides a redundant state switching method, which is applied to a first VPP forwarding device, including:
[0006] Determine, according to the current redundancy state, redundancy state notification information to be transmitted between the first VPP forwarding device and the second VPP forwarding device, wherein the first VPP forwarding device and the second VPP forwarding device are in the same local area network;
[0007] Initiate a ping probe to an access host according to the redundant status notification information, and receive a ping probe reply from the access host;
[0008] The current redundancy state is switched according to the ping probe reply.
[0009] In one embodiment, determining, according to the current redundancy state, the redundancy state notification information to be transmitted between the first VPP forwarding device and the second VPP forwarding device includes:
[0010] If the current redundancy state is an active state, generating redundancy state notification information sent by the first VPP forwarding device to the second VPP forwarding device according to the current redundancy state;
[0011] If the current redundancy state is a standby state, receiving redundancy state notification information sent by the second VPP forwarding device to the first VPP forwarding device.
[0012] In one of the embodiments, before initiating a ping probe to the access host according to the redundant status notification information and receiving a ping probe reply from the access host, the method further includes:
[0013] The redundant status notification information is periodically sent to the second VPP forwarding device.
[0014] In one of the embodiments, initiating a ping probe to the access host according to the redundant status notification information includes at least one of the following:
[0015] Initiate a ping probe to the access host when no status confirmation information based on the redundant status notification information feedback is received within a preset time period;
[0016] In case of a timeout in receiving the redundant status notification information, a ping probe is initiated to the access host.
[0017] In one embodiment, the current redundancy state includes an active state and a standby state; and switching the current redundancy state according to the ping probe reply includes at least one of the following:
[0018] According to the ping detection reply, switching the active state to the standby state;
[0019] According to the ping probe reply, the standby state is switched to the active state.
[0020] In one embodiment, after switching the current redundancy state according to the ping probe reply, the method further includes:
[0021] Obtaining the redundancy status of all VPP forwarding devices in the local area network after switching;
[0022] The communication priority of the first VPP forwarding device is adjusted according to the redundancy state after the switching.
[0023] In a second aspect, the present application further provides a VPP forwarding device, including:
[0024] A confirmation module, configured to determine, according to a current redundancy state, redundant state notification information to be transmitted between the first VPP forwarding device and the second VPP forwarding device, wherein the first VPP forwarding device and the second VPP forwarding device are in the same local area network;
[0025] A transmission module, configured to initiate a ping probe to an access host according to the redundant status notification information, and receive a ping probe reply from the access host;
[0026] A switching module is used to switch the current redundancy state according to the ping detection reply.
[0027] In one embodiment, the confirmation module is further used to:
[0028] If the current redundancy state is an active state, generating redundancy state notification information transmitted by the first VPP forwarding device to the second VPP forwarding device according to the current redundancy state;
[0029] If the current redundancy state is a standby state, receiving redundancy state notification information transmitted by the second VPP forwarding device to the first VPP forwarding device.
[0030] In one embodiment, the VPP forwarding device is further used for:
[0031] The redundant status notification information is periodically sent to the second VPP forwarding device.
[0032] In one embodiment, the transmission module is further used for:
[0033] Initiate a ping probe to the access host when no status confirmation information based on the redundant status notification information feedback is received within a preset time period;
[0034] In case of a timeout in receiving the redundant status notification information, a ping probe is initiated to the access host.
[0035] In one embodiment, the current redundancy state includes an active state and a standby state; the switching module is further configured to:
[0036] According to the ping detection reply, switching the active state to the standby state;
[0037] According to the ping probe reply, the standby state is switched to the active state.
[0038] In one embodiment, the VPP forwarding device is further used for:
[0039] Obtaining the redundancy status of all VPP forwarding devices in the local area network after switching;
[0040] The communication priority of the first VPP forwarding device is adjusted according to the redundancy state after the switching.
[0041] In a third aspect, the present application further provides a VPP forwarding device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0042] According to a current redundancy state, redundant state notification information transmitted between the first VPP forwarding device and the second VPP forwarding device is determined, wherein the first VPP forwarding device and the second VPP forwarding device are in the same local area network; according to the redundant state notification information, a ping probe is initiated to an access host, and a ping probe reply from the access host is received; according to the ping probe reply, the current redundant state is switched.
[0043] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0044] According to a current redundancy state, redundant state notification information transmitted between the first VPP forwarding device and the second VPP forwarding device is determined, wherein the first VPP forwarding device and the second VPP forwarding device are in the same local area network; according to the redundant state notification information, a ping probe is initiated to an access host, and a ping probe reply from the access host is received; according to the ping probe reply, the current redundant state is switched.
[0045] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0046] According to a current redundancy state, redundant state notification information transmitted between the first VPP forwarding device and the second VPP forwarding device is determined, wherein the first VPP forwarding device and the second VPP forwarding device are in the same local area network; according to the redundant state notification information, a ping probe is initiated to an access host, and a ping probe reply from the access host is received; according to the ping probe reply, the current redundant state is switched.
[0047] The above-mentioned redundant state switching method, VPP forwarding device, computer-readable storage medium and computer program product first determine the current redundant state of the first VPP forwarding device, and then determine the redundant state notification information transmitted between the first VPP forwarding device and the second VPP forwarding device in the same local area network based on the current redundant state. Since the redundant state notification information is sent by the primary device in the local area network, that is, there is a primary device of the local area network in the first VPP forwarding device and the second VPP forwarding device, a ping detection is initiated to the access host of the first VPP forwarding device through the redundant state notification information to receive the ping detection reply of the access host, and finally the current redundant state of the first VPP forwarding device is switched through the ping detection reply of the access host, that is, the first VPP forwarding device switches the redundant state according to the redundant state transmitted by the primary device in the local area network. The ping detection reply can accurately reflect the communication status of the first VPP forwarding device, and thus the purpose of actively switching the current redundant status of the first VPP forwarding device according to the ping detection reply can be achieved, rather than relying on the heartbeat signal to perform passive switching of the redundant status. Therefore, the technical defect that the heartbeat signal cannot reflect the actual communication status of the VPP device, resulting in the inability to match the actual switching demand for the redundant status switching timing of the VPP, and thus making it easy to have the low high availability of the VPP primary and standby groups occurs is overcome. Therefore, the switching flexibility of the redundant status switching of the VPP device is improved, thereby improving the reliability of the VPP device cluster. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1A schematic diagram of a flow chart of a redundant state switching method in an embodiment;
[0050] Figure 2 is a flow chart of a redundant state switching method in another embodiment;
[0051] Figure 3 A timing diagram of state transition of a VRRP module in a first VPP forwarding device in a redundant state switching method in an embodiment;
[0052] Figure 4 is a structural block diagram of a VPP forwarding device in an embodiment;
[0053] Figure 5 FIG. 4 is an internal structure diagram of a VPP forwarding device in an embodiment. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0055] First of all, it should be understood that the application of VRRP technology in network devices is becoming more and more extensive, which can achieve high availability of network devices. Specifically, through VRRP technology, a network device can be elected as the main device in the local area network, which can also be called Master, and other network devices in the local area network can be selected as backup devices, which can also be called Backup devices. By setting the redundant state mechanism of the main and backup devices, the redundant state can be switched when the main device of the local area network fails, so as to ensure the continuity of business and the normal operation of the VPP main and backup groups. It can be understood that the implementation of the VRRP module in VPP is mainly carried out in accordance with the basic principles of the VRRP protocol, that is, the main device will periodically send VRRP notification messages. For the backup device, if it does not receive the notification message within a period of time, the backup device will consider that the main device has failed, and then its own The redundant state is switched to the main state and starts to take over the forwarding work of the original main device, that is, the backup device will passively decide whether to switch the redundant state according to the notification message received, and for the main device, it will also passively switch the redundant state according to the feedback of the heartbeat signal, that is, when it is impossible to send a heartbeat packet to the backup device or receive a heartbeat response from the backup device, the main state is switched to the backup state. It can be seen that the current VPP device can only passively switch the redundant state. However, since the heartbeat signal cannot reflect the actual communication situation of the VPP device, the redundant state switching of the VPP cannot actually match the actual switching demand, which makes it easy for the VPP main and standby groups to have low high availability. Therefore, there is an urgent need for a redundant state switching method that improves the switching flexibility of the redundant state switching of the VPP device and thereby improves the reliability of the VPP device cluster.
[0056] In one embodiment, Figure 1As shown, a redundant state switching method is provided. This embodiment takes the method applied to a VPP forwarding device as an example. The terminal includes but is not limited to a router, a switch, and a firewall. The VPP forwarding device includes a confirmation module, a transmission module, and a switching module. The confirmation module is used to determine redundant state notification information transmitted between a first VPP forwarding device and a second VPP forwarding device according to a current redundant state, wherein the first VPP forwarding device and the second VPP forwarding device are in the same local area network, the transmission module is used to initiate a ping probe to an access host according to the redundant state notification information, and receive a ping probe reply from the access host, and the switching module is used to switch the current redundant state according to the ping probe reply. Through information interaction among the confirmation module, the transmission module, and the switching module, during the process of executing redundant state switching on the first VPP forwarding device, first, according to the current redundant state, it is determined that the first VPP forwarding device and the second VPP forwarding device are in the same local area network. The redundant state notification information transmitted between the first VPP forwarding device and the second VPP forwarding device in a local area network, and then based on the redundant state notification information, a ping probe is initiated to the access host, and finally the current redundant state is switched according to the ping probe reply, so that the purpose of the first VPP forwarding device actively switching the redundant state based on the ping probe reply can be achieved. Therefore, it can overcome the technical defect that the redundant state switching of the VPP cannot match the actual switching demand due to the inability of the heartbeat signal to reflect the actual communication situation of the VPP device, and thus the high availability of the VPP primary and standby groups is low. Therefore, the switching flexibility of the redundant state switching is improved, and the reliability of the VPP device cluster is improved. It can be understood that this method can also be applied to servers, and can also be applied to systems including terminals and servers, and is implemented through the interaction between terminals and servers. In this embodiment, the method includes the following steps 202 to 206. Among them:
[0057] Step 202: Determine redundant state notification information to be transmitted between a first VPP forwarding device and a second VPP forwarding device according to a current redundant state, wherein the first VPP forwarding device and the second VPP forwarding device are in the same local area network.
[0058] It should be noted that the first VPP forwarding device and the second VPP forwarding device are different VPP forwarding devices in the same local area network. It can be understood that since the redundant state notification information can be transmitted between the first VPP forwarding device and the second VPP forwarding device, and the redundant state notification information is used to characterize the redundant state of the main device in the local area network, one of the first VPP forwarding device and the second VPP forwarding device exists as the main device, and the other VPP forwarding device exists as the backup device, wherein the first VPP forwarding device can be one, and the second VPP forwarding device can be one or more. Specifically, the first VPP forwarding device is the main device and the second VPP forwarding device is the backup device, or the first VPP forwarding device is the backup device and there is a main device in the second VPP forwarding device. Whether the first VPP forwarding device is the main device or the backup device can be determined based on the current redundant state.
[0059] It should be noted that the redundant status notification information is used to characterize the redundant status of the main device in the same local area network. It can be understood that when the first VPP forwarding device has the current redundant status, the first virtual path device can determine the redundant status notification information transmitted between the first VPP forwarding device and the second VPP forwarding device. For example, in an implementable manner, assuming that the first VPP forwarding device is the main device, the first VPP forwarding device will generate redundant status notification information transmitted between the first VPP forwarding device and the second VPP forwarding device based on the current redundant status, and then the first VPP forwarding device will periodically send redundant status notification information to the second VPP forwarding device as a backup device.
[0060] As an example, step 202 includes: when a current redundancy state is detected, determining redundant state notification information to be transmitted between a first VPP forwarding device and a second VPP forwarding device according to the current redundancy state, wherein the first VPP forwarding device and the second VPP forwarding device are in the same local area network.
[0061] Step 204: Initiate a ping probe to the access host according to the redundant state notification information, and receive a ping probe reply from the access host.
[0062] It should be noted that, in the case where the identity of the first VPP forwarding device is different, the feedback conditions that the redundant state notification information needs to meet are different, and thus a preset feedback condition can be set, and the satisfaction of the preset feedback condition by the redundant state notification information can be used as a condition for triggering the initiation of a ping probe to the access host, that is, the VRRP (Virtual Router Redundancy Protocol) module of the first VPP forwarding device can be improved to introduce a feedback mechanism and a ping probe mechanism. After determining the redundant state notification information, it is determined whether to trigger the ping probe mechanism based on the feedback between the redundant state notification information and the feedback mechanism, wherein the ping probe is used to trigger the detection of the communication status between the first VPP forwarding device and the access host, and the communication status between the first VPP forwarding device and the access host can be reflected by the time limit of the data packet sending and receiving function, for example, the time limit can be 3s, 4s or 5s.
[0063] As an example, step 204 includes: when the redundant state notification information meets a preset feedback condition, initiating a ping detection to the access host in real time according to the redundant state notification information.
[0064] Step 206: Switch the current redundancy state according to the ping probe reply.
[0065] It should be noted that after receiving the ping probe initiated by the first VPP forwarding device, the access host will make a corresponding ping probe reply, wherein the ping probe reply is used to reply to the communication detection status between the first VPP forwarding device and the access host, and then the first VPP forwarding device can switch the current redundant state based on the ping probe reply information.
[0066] As an example, step 206 includes: switching the current redundancy state according to the ping probe reply.
[0067] In the above redundant state switching method, the current redundant state of the first VPP forwarding device is first determined, and then based on the current redundant state, the redundant state notification information transmitted between the first VPP forwarding device and the second VPP forwarding device in the same local area network is determined. Since the redundant state notification information is sent by the master device in the local area network, that is, there is a master device of the local area network in the first VPP forwarding device and the second VPP forwarding device, a ping detection is initiated to the access host of the first VPP forwarding device through the redundant state notification information, and finally the current redundant state of the first VPP forwarding device is switched through the ping detection reply of the access host, that is, the first VPP forwarding device initiates a ping detection to the access host according to the redundant state notification information transmitted by the master device in the local area network, and The ping detection reply of the access host is received, and finally the first VPP forwarding device actively switches the current redundant state according to the ping detection reply. Since the ping detection reply can accurately reflect the communication status of the first VPP forwarding device, the purpose of actively switching the current redundant state of the first VPP forwarding device according to the ping detection reply can be achieved, rather than relying on the heartbeat signal for passive switching of the redundant state. Therefore, the technical defect that the heartbeat signal cannot reflect the actual communication status of the VPP device, resulting in the inability to match the actual switching demand for the redundant state switching timing of the VPP, which makes it easy to have low high availability of the VPP primary and standby groups, is overcome. Therefore, the switching flexibility of the redundant state switching of the VPP device is improved, thereby improving the reliability of the VPP device cluster.
[0068] In one embodiment, Figure 2 As shown, determining redundant state notification information to be transmitted between the first VPP forwarding device and the second VPP forwarding device includes:
[0069] Step 302: If the current redundancy state is the active state, redundant state notification information is generated and sent from the first VPP forwarding device to the second VPP forwarding device according to the current redundancy state.
[0070] It should be noted that, when the current redundant state of the first VPP forwarding device is the active state, the first VPP forwarding device serves as the active device of the local area network, and the first VPP forwarding device serves as the sender of the redundant state notification information, that is, the first VPP forwarding device has the redundant state notification information transmitted between the first VPP forwarding device and the second VPP forwarding device, and then the second VPP forwarding device confirms the redundant state notification information to determine whether to trigger the detection of the communication status between the first VPP forwarding device and the access host. It can be understood that a timer for detecting whether the redundant state notification information feedback request exceeds the detection time limit can be added to the first VPP forwarding device. For example, when the first VPP forwarding device serves as the active device, when the active device detects that the feedback of the VRRP message (redundant state notification information) received from the second VPP forwarding device has timed out, the ping detection is started.
[0071] As an example, step 302 includes: if the current redundancy state is the active state, encapsulating the current redundancy state into redundancy state notification information sent by the first VPP forwarding device to the second VPP forwarding device.
[0072] Step 304: If the current redundancy state is a standby state, receiving redundancy state notification information sent by the second VPP forwarding device to the first VPP forwarding device.
[0073] It should be noted that, when the current redundant state of the first VPP forwarding device is the standby state, the first VPP forwarding device serves as a standby device of the local area network, and the second VPP forwarding device serves as a sender of the redundant state notification information, that is, the second VPP forwarding device has redundant state notification information transmitted between the first VPP forwarding device and the second VPP forwarding device, and then the second VPP forwarding device sends the redundant state notification information, so that the first VPP forwarding device can decide whether to trigger the detection of the communication status between the first VPP forwarding device and the access host after receiving the redundant state notification information.
[0074] As an example, step 304 includes: if the current redundancy state is a standby state, receiving redundancy state notification information sent by the second VPP forwarding device to the first VPP forwarding device.
[0075] In this embodiment, when the current redundancy status of the first VPP forwarding device is different, the first VPP forwarding device will obtain the redundant status notification information transmitted between the first VPP forwarding device and the second VPP forwarding device in different identities, that is, when the first VPP forwarding device acts as the main device of the local area network, it will generate the redundant status notification information transmitted between the first VPP forwarding device and the second VPP forwarding device by itself, and when the first VPP forwarding device acts as the backup device of the local area network, it will receive the redundant status notification information generated by the second VPP forwarding device and transmitted between the first VPP forwarding device and the second VPP forwarding device, thereby ensuring that the first VPP forwarding device can determine whether the current redundant status can be switched when participating in the forwarding of data packets in different identities, so as to lay a foundation for improving the switching flexibility of redundant status switching and further improving the reliability of the VPP device cluster.
[0076] In one embodiment, before initiating a ping probe to the access host according to the redundant state notification information and receiving a ping probe reply from the access host, the method further includes:
[0077] Periodically send redundant status notification information to the second VPP forwarding device.
[0078] It should be noted that, in the case where the first VPP forwarding device is used as the master device, the triggering of the ACK mechanism requires the second VPP forwarding device to receive the redundant state notification information before it can be performed. Therefore, if the first VPP forwarding device is used as the master device, it is necessary to actively transmit the first state notification information to the second VPP forwarding device after generating the first state notification information transmitted between the first VPP forwarding device and the second VPP forwarding device. For example, in an implementable manner, for the second VPP forwarding device in the standby state, after receiving the redundant state notification information sent by the master device, it will check whether the redundant state notification information is passed, and after the redundant state notification information is detected to be passed, it will reply a VRRP message with a type field value of 2 as ACK, and then if the first VPP forwarding device receives the ACK message, it can be confirmed that the communication link of the interface is normal. For example, the interval time of the VRRP notification message is set to 1s. If the second VPP forwarding device receives the VRRP notification message sent by the first VPP forwarding device, it will reply a VRRP message with a type of 2 as ACK.
[0079] As an example, the redundant state notification information is periodically sent to the second VPP forwarding device.
[0080] In this embodiment, when the first VPP forwarding device is used as the main device of the local area network, in order to trigger the active switching of the current redundant state, the first VPP forwarding device will actively send redundant state notification information to the second VPP forwarding device periodically after generating redundant state notification information, and determine whether to trigger the detection of the communication status between the first VPP forwarding device and the access host based on the reflection of the redundant state notification information by the second VPP forwarding device. Therefore, it lays a foundation for improving the switching flexibility of the redundant state switching when the first VPP forwarding device is used as the main device, thereby improving the reliability of the VPP device cluster.
[0081] In one embodiment, a ping probe is initiated to the access host according to the redundant state notification information, including at least one of the following items:
[0082] In the case where no status confirmation information based on the redundant status notification information feedback is received within a preset time period, a ping detection is initiated to the access host; in the case where the receiving of the redundant status notification information times out, a ping detection is initiated to the access host.
[0083] It should be noted that, when the first VPP forwarding device is a device with different identities in the local area network, the way in which it triggers the initiation of a ping probe to the access host is different. It can be understood that the ACK mechanism is triggered by the redundant status notification information of the active device, and the standby device is the information confirmer who receives the redundant status notification information. Furthermore, when the first VPP forwarding device is the active device, the first VPP forwarding device is the receiver of the status confirmation information corresponding to the status notification information, and when the first VPP forwarding device is the standby device, the first VPP forwarding device is the sender of the status confirmation information corresponding to the status notification information. Therefore, the conditions for triggering the initiation of a ping probe to the access host are different.
[0084] As an example, when no status confirmation information based on the first status notification information feedback is received within a preset time period, a ping probe is initiated to the access host; when the receiving time of the redundant status notification information exceeds the preset receiving time threshold, a ping probe is initiated to the access host.
[0085] In this embodiment, when the first VPP forwarding device is used as the main device, a ping detection is initiated to the access host according to the time when the first VPP forwarding device receives the status confirmation information fed back by the second VPP forwarding device. When the first VPP forwarding device is used as the backup device, a ping detection is initiated to the access host according to the time when the first VPP forwarding device receives the redundant status notification information sent by the second VPP forwarding device. This ensures that the first VPP forwarding device can trigger the initiation of a ping detection to the access host when the identity is different. Therefore, it lays a foundation for improving the switching flexibility of redundant status switching, thereby improving the reliability of the VPP device cluster.
[0086] In one embodiment, the current redundancy state includes an active state and a standby state; switching the current redundancy state according to the ping probe reply includes at least one of the following:
[0087] According to the ping detection reply, the active state is switched to the standby state; according to the ping detection reply, the standby state is switched to the active state.
[0088] It should be noted that, when the identity of the first VPP forwarding device is different, its current redundancy state is also different, that is, the current redundancy state includes the active state and the standby state. It can be understood that, when the first VPP forwarding device sends or receives the status confirmation information normally, it indicates that the data packet sending and receiving functions between the VPP forwarding devices in the current local area network are normal, and then the first VPP forwarding device does not need to switch the current redundancy state. Therefore, the ping detection reply can be understood as the result of instructing the first virtual device to switch the current redundancy state. For example, in an implementable manner, the reception timeout of the VRRPACK message is set to 3s. When the active device does not receive the VRRP ACK message replied by the standby device within 3s, a ping detection is initiated to the connected user host. If the corresponding ping reply is received within 3s, it means that the packet sending and receiving functions of the VPP forwarding device are normal, and the active state can continue to be maintained. If the ping detection times out, it means that the communication link of the VPP forwarding device is abnormal. At this time, the active device should actively switch to the standby state and notify the standby device to switch to the active state.
[0089] As an example, according to the ping detection reply, the active state is switched to the standby state, and a switching instruction is sent to the second VPP forwarding device, so that the second VPP forwarding device switches the standby state to the active state based on the switching instruction; according to the ping detection reply, the switching instruction sent by the second VPP forwarding device is received, and according to the switching instruction, the standby state is switched to the active state.
[0090] In this embodiment, when the first VPP forwarding device is used as the main device, the first VPP forwarding device will actively switch the current redundant state according to the ping detection reply, and when the first VPP forwarding device is used as the backup device, the first VPP forwarding device will actively switch the current redundant state based on the switching instruction sent by the main device, thereby ensuring that the first VPP forwarding device can actively switch the current redundant state when it has different identities, so the switching flexibility of the redundant state switching is further improved, that is, the reliability of the VPP device cluster is further improved.
[0091] In one embodiment, after switching the current redundancy state according to the ping probe reply, the method further includes:
[0092] Obtain the redundancy status of all VPP forwarding devices in the local area network after switching; and adjust the communication priority of the first VPP forwarding device according to the redundancy status after switching.
[0093] It should be noted that, in a local area network, when a VPP forwarding device adjusts its redundant state, the communication priorities of different VPP forwarding devices in the local area network will change. For example, in one feasible method, after the first VPP forwarding device is switched from the active state to the standby state, the communication priority of the first VPP forwarding device will be reduced. After the first VPP forwarding device is switched from the standby state to the active state, the communication priority of the first VPP forwarding device will be increased. Therefore, the communication priority of the first VPP forwarding device is closely related to the redundant state of all VPP forwarding devices in the local area network after switching.
[0094] As an example, the redundancy status of all VPP forwarding devices in the local area network after switching is obtained; according to the redundancy status after switching, the adjusted communication priority of the first VPP forwarding device is queried, and the current priority of the first VPP forwarding device is adjusted to the adjusted communication priority.
[0095] In this embodiment, after the redundant state of the local area network is adjusted, the redundant state of all VPP forwarding devices in the local area network after switching can be obtained in real time, and the communication priority of the first VPP forwarding device can be adjusted according to the redundant state after switching, thereby ensuring the normal communication of the local area network. Therefore, while improving the switching flexibility of the redundant state switching and thus improving the reliability of the VPP device cluster, the communication stability of the local area network where the first VPP forwarding device is located is improved.
[0096] In one practicable manner, referring to Figure 3 , Figure 3To show the state transition timing diagram of the VRRP module in the first VPP forwarding device, it can be understood that the first VPP forwarding device has different switching processes for redundant state switching when the current redundant state is different. Among them, switching from the active state to the standby state requires that the state confirmation information received has timed out and the ping detection access host has timed out, and the communication priority of the VPP forwarding device in the active state is higher. Switching from the standby state to the active state requires that the redundant state notification information received has timed out, and the VPP forwarding device in the standby state has successfully pinged the access host.
[0097] Through the redundant state switching method provided by this embodiment, the first VPP forwarding device initiates a ping probe to the access host according to the redundant state notification information transmitted by the main device in the local area network, and receives the ping probe reply of the access host. Finally, the first VPP forwarding device actively switches the current redundant state according to the ping probe reply. Since the ping probe reply can accurately reflect the communication status of the first VPP forwarding device, the purpose of actively switching the current redundant state of the first VPP forwarding device according to the ping probe reply can be achieved, rather than relying on the heartbeat signal to perform passive switching of the redundant state. Therefore, the technical defect that the heartbeat signal cannot reflect the actual communication status of the VPP device, resulting in the inability to match the actual switching demand for the redundant state switching timing of the VPP, thereby making it easy to have a low high availability of the VPP primary and standby groups, is overcome. Therefore, the switching flexibility of the redundant state switching of the VPP device is improved, thereby improving the reliability of the VPP device cluster.
[0098] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0099] Based on the same inventive concept, the embodiment of the present application also provides a VPP forwarding device for implementing the redundant state switching method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more VPP forwarding device embodiments provided below can refer to the limitations of the redundant state switching method above, and will not be repeated here.
[0100] In an exemplary embodiment, Figure 4 As shown, a VPP forwarding device is provided, which is applied to a first VPP forwarding device, including: a confirmation module 401, a transmission module 402 and a switching module 403, wherein:
[0101] The confirmation module 401 is used to determine the redundant state notification information transmitted between the first VPP forwarding device and the second VPP forwarding device according to the current redundant state, wherein the first VPP forwarding device and the second VPP forwarding device are in the same local area network;
[0102] The transmission module 402 is used to initiate a ping probe to the access host according to the redundant state notification information, and receive a ping probe reply from the access host;
[0103] The switching module 403 is used to switch the current redundancy state according to the ping detection reply.
[0104] In one embodiment, the confirmation module 401 is further used for:
[0105] If the current redundancy state is the active state, redundant state notification information is generated from the first VPP forwarding device to the second VPP forwarding device according to the current redundancy state; if the current redundancy state is the standby state, redundant state notification information is received from the second VPP forwarding device to the first VPP forwarding device.
[0106] In one embodiment, the VPP forwarding device is further used for:
[0107] The redundant status notification information is periodically sent to the second VPP forwarding device.
[0108] In one embodiment, the transmission module 402 is further configured to:
[0109] Initiate a ping probe to the access host when no status confirmation information based on the redundant status notification information feedback is received within a preset time period;
[0110] In case of a timeout in receiving the redundant status notification information, a ping probe is initiated to the access host.
[0111] In one embodiment, the current redundancy state includes an active state and a standby state; the switching module 403 is further used to:
[0112] According to the ping detection reply, the active state is switched to the standby state; according to the ping detection reply, the standby state is switched to the active state.
[0113] In one embodiment, the VPP forwarding device is further used for:
[0114] Obtaining the redundancy status of all VPP forwarding devices in the local area network after switching; and adjusting the communication priority of the first VPP forwarding device according to the redundancy status after switching.
[0115] Each module in the above-mentioned VPP forwarding device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the VPP forwarding device in the form of hardware, or can be stored in the memory in the VPP forwarding device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0116] In an exemplary embodiment, a VPP forwarding device is provided, and its internal structure diagram can be as follows: Figure 5 As shown. The VPP forwarding device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the VPP forwarding device is used to provide computing and control capabilities. The memory of the VPP forwarding device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the VPP forwarding device is used to exchange information between the processor and an external device. The communication interface of the VPP forwarding device is used to communicate with an external terminal in a wired or wireless manner. When the computer program is executed by the processor, a redundant state switching method is implemented. Those skilled in the art can understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the VPP forwarding device to which the solution of the present application is applied. The specific VPP forwarding device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0117] In one embodiment, a VPP forwarding device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0118] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0119] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0120] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0121] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0122] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A redundant state switching method, characterized in that: Applied to a first VPP forwarding device, the method includes: Determine, according to the current redundancy state, redundancy state notification information to be transmitted between the first VPP forwarding device and the second VPP forwarding device, wherein the first VPP forwarding device and the second VPP forwarding device are in the same local area network; Initiate a ping probe to an access host according to the redundant status notification information, and receive a ping probe reply from the access host; The current redundancy state is switched according to the ping probe reply.
2. The method according to claim 1, characterized in that The step of determining, according to the current redundancy state, redundant state notification information to be transmitted between the first VPP forwarding device and the second VPP forwarding device includes: If the current redundancy state is an active state, generating redundancy state notification information sent by the first VPP forwarding device to the second VPP forwarding device according to the current redundancy state; If the current redundancy state is a standby state, receiving redundancy state notification information sent by the second VPP forwarding device to the first VPP forwarding device.
3. The method according to claim 2, characterized in that Before initiating a ping probe to the access host according to the redundant status notification information and receiving a ping probe reply from the access host, the method further includes: The redundant status notification information is periodically sent to the second VPP forwarding device.
4. The method according to claim 3, characterized in that The initiating a ping probe to the access host according to the redundant state notification information includes at least one of the following: Initiate a ping probe to the access host when no status confirmation information based on the redundant status notification information feedback is received within a preset time period; In case of a timeout in receiving the redundant status notification information, a ping probe is initiated to the access host.
5. The method according to claim 4, characterized in that The current redundancy state includes an active state and a standby state; and the switching of the current redundancy state according to the ping detection reply includes at least one of the following: According to the ping detection reply, switching the active state to the standby state; According to the ping probe reply, the standby state is switched to the active state.
6. The method according to claim 1, characterized in that After switching the current redundancy state according to the ping probe reply, the method further includes: Obtaining the redundancy status of all VPP forwarding devices in the local area network after switching; The communication priority of the first VPP forwarding device is adjusted according to the redundancy state after the switching.
7. A VPP forwarding device, characterized in that: The device comprises: A confirmation module, configured to determine, according to a current redundancy state, redundant state notification information to be transmitted between the first VPP forwarding device and the second VPP forwarding device, wherein the first VPP forwarding device and the second VPP forwarding device are in the same local area network; A transmission module, configured to initiate a ping probe to an access host according to the redundant status notification information, and receive a ping probe reply from the access host; A switching module is used to switch the current redundancy state according to the ping detection reply.
8. A VPP forwarding device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Dual hot standby switching method and device
CN112231154A
Virtual router management method, equipment, system and storage medium
CN115134232A
Equipment switching method and device, storage medium and electronic equipment
CN116016133A