CN109088818B - Equipment linkage switching method and device - Google Patents

Equipment linkage switching method and device Download PDF

Info

Publication number
CN109088818B
CN109088818B CN201810796098.4A CN201810796098A CN109088818B CN 109088818 B CN109088818 B CN 109088818B CN 201810796098 A CN201810796098 A CN 201810796098A CN 109088818 B CN109088818 B CN 109088818B
Authority
CN
China
Prior art keywords
switching
group
linkage
master device
notification message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810796098.4A
Other languages
Chinese (zh)
Other versions
CN109088818A (en
Inventor
车渝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN201810796098.4A priority Critical patent/CN109088818B/en
Publication of CN109088818A publication Critical patent/CN109088818A/en
Application granted granted Critical
Publication of CN109088818B publication Critical patent/CN109088818B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides a method and a device for linkage switching of equipment, relates to the technical field of communication, and is used for solving the problem of network interruption caused by the fact that linkage switching cannot be realized between main equipment and standby equipment deployed by different protocols. The scheme of the embodiment of the application comprises the following steps: the method comprises the steps that a first master device switches services to a first slave device, then the first master device sends a switching notification message to other devices in a linkage switching group, the switching notification message is used for notifying the other devices in the linkage switching group to carry out linkage switching, the linkage switching group at least comprises a first backup group deployed through a first protocol and a second backup group deployed through a second protocol, the first backup group at least comprises the first master device and a first slave device, and the second backup group at least comprises the second master device and a second slave device.

Description

Equipment linkage switching method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for switching devices in a linked manner.
Background
In a common networking scheme, a primary/standby mode is generally adopted to deploy network element devices (such as switches, routers, firewalls, and the like) so as to avoid network interruption caused by a single-machine fault. At present, a backup group formed by a group of routers can be used as a Virtual Router through a Virtual Router Redundancy Protocol (VRRP), a master device is selected from the backup group according to the VRRP priority, routers in the backup group except the master device are slave devices, and when the master device fails, the slave devices take over the service of the master device.
Besides using the VRRP protocol, each vendor may also implement the deployment of the active/standby mode using a proprietary protocol. In the actual network deployment process, a heterogeneous network may be adopted, that is, the network may be deployed by using devices of different manufacturers, for example, switch 1 and switch 2 are virtualized by VRRP as a virtual switch, switch 1 is a master device, switch 2 is a slave device, firewall 1 and firewall 2 are virtualized by a private protocol as a virtual firewall, firewall 1 is a master device, firewall 2 is a slave device, and the switch may be interconnected with the virtual address of the firewall through the VRRP virtual address. The switch 1 is connected with the physical interface of the firewall 1 through the physical interface of the switch, and the switch 2 is connected with the physical interface of the firewall 2 through the physical interface of the switch.
The physical interfaces of the switch 1 and the switch 2 deployed by the VRRP protocol are both in an active (active) state, and the physical interfaces of the firewall 1 and the firewall 2 deployed by the private protocol. If the switch 1 switches the service to the switch 2 due to the failure of its own physical interface, the firewall 1 can switch the service to the firewall 2 after detecting the disconnection of the physical connection with the switch 1. However, when the switch 1 switches the service to the switch 2 because of the interface failure, the physical connection between the firewall 1 and the switch 1 is normal, and the firewall 1 cannot be triggered to switch the service to the firewall 2, and if the backup device deployed through the private protocol, that is, the firewall 2, cannot receive the data from the switch 2 through the physical interface, the network may be interrupted. For example, if the physical interface of the firewall 2 is in an inactive (inactive) state or the firewall 2 is in an inactive state, data transmitted by the switch 2 cannot be received through the physical interface, which may cause network interruption.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for device linkage switching, so as to solve a problem of network interruption caused by that linkage switching cannot be implemented between active and standby devices deployed by using different protocols. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a method for switching devices in a linkage manner, including:
the first master device switches the service to the first slave device;
the method comprises the steps that a first main device sends a switching notification message to other devices in a linkage switching group, the switching notification message is used for notifying the other devices in the linkage switching group to carry out linkage switching, the linkage switching group at least comprises a first backup group deployed through a first protocol and a second backup group deployed through a second protocol, the first backup group at least comprises the first main device and a first slave device, and the second backup group at least comprises a second main device and a second slave device.
In a possible implementation manner, after the first master device switches the service to the first slave device, the method further includes:
and the first master equipment adds 1 to the switching flag bit stored by the first master equipment.
In one possible implementation manner, the sending, by the first master device, a switching notification message to other devices in the coordinated switching group includes:
and when the first master device determines that the switching flag bit stored by the first master device changes, the switching notification message is sent to other devices in the linkage switching group.
In a possible implementation manner, the switching notification message at least includes an identifier of the coordinated switching group and a latest switching flag stored in the first master device.
In a second aspect, an embodiment of the present application provides a method for switching devices in linkage, including:
the method comprises the steps that a second main device receives a switching notification message sent by a first main device, wherein the switching notification message is used for notifying other devices in a linkage switching group to carry out linkage switching, the linkage switching group at least comprises a first backup group deployed through a first protocol and a second backup group deployed through a second protocol, the first backup group comprises the first main device and a first slave device, and the second backup group comprises the second main device and a second slave device;
and the second master device switches the service to the second slave device according to the switching notification message.
In a possible implementation manner, the handover notification message at least includes an identifier of the coordinated handover group and a handover flag.
In a possible implementation manner, the switching, by the second master device, a service to the second slave device according to the switching notification message includes:
the second master device judges whether the identifier of the linkage switching group to which the second master device belongs is consistent with the identifier of the linkage switching group in the switching notification message;
if the switching flag bit is consistent with the switching flag bit, judging whether the switching flag bit stored by the switching notification message is smaller than the switching flag bit carried in the switching notification message;
and if the number of the service requests is smaller than the preset value, the second master device switches the service to the second slave device.
In a possible implementation manner, after the second master device switches the service to the second slave device, the method further includes:
and the first master equipment updates the switching zone bit stored by the first master equipment into the switching zone bit carried in the switching notification message.
In a third aspect, an embodiment of the present application provides an apparatus for switching devices in linkage, including:
the switching module is used for switching the service to the first slave equipment;
the device comprises a sending module and a linkage switching group, wherein the sending module is used for sending a switching notification message to other devices in the linkage switching group, the switching notification message is used for notifying the other devices in the linkage switching group to perform linkage switching, the linkage switching group at least comprises a first backup group deployed through a first protocol and a second backup group deployed through a second protocol, the first backup group at least comprises a first main device and a first slave device, and the second backup group at least comprises a second main device and a second slave device.
In one possible implementation, the apparatus further includes: a storage module;
and the storage module is used for adding 1 to the switching flag bit stored by the storage module after the switching module switches the service to the first slave device.
In a possible implementation manner, the sending module is specifically configured to send the switching notification message to other devices in the linkage switching group when it is determined that the switching flag bit stored in the storage module changes.
In a possible implementation manner, the switching notification message at least includes an identifier of the linked switching group and a latest switching flag stored in the storage module.
In a fourth aspect, an embodiment of the present application provides an apparatus for switching devices in linkage, including:
a receiving module, configured to receive a switching notification message sent by a first master device, where the switching notification message is used to notify other devices in a linkage switching group to perform linkage switching, where the linkage switching group at least includes a first backup group deployed through a first protocol and a second backup group deployed through a second protocol, the first backup group includes the first master device and a first slave device, and the second backup group includes a second master device and a second slave device;
and the switching module is used for switching the service to the second slave equipment according to the switching notification message received by the receiving module.
In a possible implementation manner, the handover notification message at least includes an identifier of the coordinated handover group and a handover flag.
In one possible implementation, the apparatus further includes: a storage module;
the switching module is specifically configured to determine whether an identifier of a linkage switching group to which the device belongs is consistent with an identifier of a linkage switching group in the switching notification message; if the switching flag bit is consistent with the switching flag bit, judging whether the switching flag bit stored in the storage module is smaller than the switching flag bit carried in the switching notification message; and if the number of the slave devices is less than the preset threshold, switching the service to the second slave device.
In a possible implementation manner, the storage module is further configured to update the switching flag bit stored in the storage module to the switching flag bit carried in the switching notification message.
In a fifth aspect, an embodiment of the present application provides an electronic device, including: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: the method for realizing linkage switching of the equipment in the first aspect or the second aspect.
In a sixth aspect, the present application further provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method for switching between device linkages in the first aspect or the second aspect.
In a seventh aspect, the present application further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the method for switching the devices in linkage according to the first aspect or the second aspect.
According to the method for switching the devices in the linkage manner, after the first master device switches the service to the first slave device, the first master device can send the switching notification message to the other devices in the linkage switching group to notify the other devices in the linkage switching group to perform linkage switching, and then the second master device in the linkage switching group can switch the service to the second slave device according to the switching notification message after receiving the notification message.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a communication system according to an embodiment of the present application;
fig. 2 is a flowchart of a method for switching device linkage according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of another method for switching device linkage according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an apparatus for switching devices in linkage according to an embodiment of the present disclosure;
FIG. 5 is a schematic structural diagram of another apparatus for switching in linkage according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The inventor discovers that when studying the prior art: in the prior art, when a service of a master device in a first backup group is switched to a slave device, if a physical interface of the slave device connected to the first backup group in a slave device of a second backup group is in an inactive state, a network interruption may be caused. Therefore, in the embodiment of the present application, when the service of the master device in the first backup group is switched to the slave device, the service of the master device in the second backup group is also switched to the slave device, so that a physical interface of the slave device connected to the first backup group in the slave device of the second backup group is switched to an active state, so as to be able to receive the service packet transmitted by the slave device of the first backup group.
The method for switching the devices in a linkage manner can be applied to a communication system, the communication system comprises at least two backup groups using different protocols, and each backup group comprises a master device and at least one slave device. The method of linkage switching is generally applied between two backup groups, physical connection exists between main devices of two different backup groups, two slave devices in two different backup groups are connected in pairs, wherein a slave device in one backup group is in an inactive state or a physical interface thereof is in an inactive state.
Illustratively, the communication system includes a first backup group using a first protocol and a second backup group using a second protocol, the first backup group including a first master device and a second slave device, the second backup group including a second master device and a second slave device. The first master device and the second master device can be connected through a physical interface, the first slave device and the second slave device can be connected through a physical interface, the physical interfaces of the first master device and the first slave device are both in an activated state, the physical interface of the second master device is in an activated state, the physical interface of the second slave device is in an inactivated state, the first backup group and the second backup group can be interconnected through the virtual address of the first backup group and the virtual address of the second backup group, when the service of the first master device is switched to the first slave device, the second master device needs to be switched in a linkage mode, namely, the second master device switches the service to the second slave device.
Illustratively, taking the first protocol as a VRRP protocol and the second protocol as an Intelligent Resilient Framework (IRF) protocol as an example, as shown in fig. 1, the first backup group includes a switch (switch)1 and a switch 2, the switch 1 is a first master device, the switch 2 is a first slave device, the second backup group includes a firewall (firewall)1 and a firewall 2, the firewall 1 is a second master device, and the firewall 2 is a second slave device.
The switch 1 and the switch 2 have their own physical interface and IP address, respectively, for example, the network Protocol (IP) address of the switch 1 is: 10.0.0.2/24, and the IP address of switch 2 is 10.0.0.3/24. The backup group of switch 1 and switch 2 is a virtual switch, and a virtual IP address can be configured for the virtual switch through the VRRP protocol, for example, the virtual IP address is 10.0.0.10/24.
Firewall 1 and firewall 2 form a virtual firewall with an IRF redundant port by the IRF protocol, illustratively having an IP address of 10.0.0.1/24.
The virtual switch can be interconnected with the IRF redundant port of the virtual firewall through the virtual IP address, the physical interface of the switch 1 is connected with the physical interface of the firewall 1, the physical interface of the switch 2 is connected with the physical interface of the firewall 2, wherein the physical interfaces of the switch 1 and the switch 2 are both in an activated state, in a backup group formed by the IRF protocol, only the physical interface of the main equipment is in an activated state, namely the physical interface of the firewall 1 is in an activated state, and the physical interface of the firewall 2 is in an inactivated state.
It can be understood that although there is a physical connection between the switch 2 and the firewall 2, the firewall 2 cannot communicate with the switch 2 through its own physical interface because the physical interface of the firewall 2 is in an inactive state. If the subsequent firewall 1 service is switched to the firewall 2, that is, the firewall 2 becomes the master device, the physical interface of the firewall 2 is switched to the active state.
It should be noted that, if the switch 1 switches the service to the switch 2 due to its own interface down, the firewall 1 connected to the switch 1 can switch the service to the firewall 2 after detecting the interface down of the switch 1, but if the switch 1 is not triggered to switch due to its own interface down, the physical connection between the firewall 1 and the switch 1 still exists, and the firewall 1 does not know that the switch 1 has performed service switching, so the firewall 1 will not switch the service to the firewall 2, and at this time, the physical interface of the firewall 2 is still in an inactive state, and cannot communicate with the switch 2 through its own physical interface, resulting in a problem of network interruption. In order to solve the problem, an embodiment of the present application provides a method for device linkage switching, where after a first master device switches a service to a first slave device, the first master device may send a switching notification message to other devices in a linkage switching group, and then a second master device receives the switching notification message, and may switch the service to a second slave device according to the switching notification message. By adopting the method, after the master device in one backup group switches the service to the slave device, other devices in the linkage switching group can be informed through the switching notification message, and then other backup groups in the linkage switching group can be triggered to switch the service of the master device to the slave device, so that linkage switching is realized, and the problem of network interruption caused by the fact that two backup groups deployed by using different protocols cannot realize linkage switching is avoided.
The following describes a method for switching devices in linkage according to an embodiment of the present application.
With reference to the communication system shown in fig. 1, an embodiment of the present invention provides a method for switching devices in a linkage manner, where as shown in fig. 2, the method includes:
s201, the first master device switches the service to the first slave device.
Before the method is executed, a linkage switching group may be set according to a networking situation, where the linkage switching group includes at least a first backup group deployed by a first protocol and a second backup group deployed by a second protocol. The first backup group at least comprises a first main device and a first slave device, and the second backup group at least comprises a second main device and a second slave device.
It can be understood that after the first master device switches the service to the first slave device, the first slave device will take over the service carried by the first master device, and at this time, the master device in the first backup group will be changed to the first slave device.
Illustratively, in conjunction with fig. 1, the first protocol may be a VRRP protocol, and accordingly, the first master device may be switch 1 and the first slave device may be switch 2. The second protocol may be an IRF protocol, and accordingly, the second master device may be a firewall 1 and the second slave device may be a firewall 2.
Alternatively, the first protocol may be an IRF protocol, and accordingly, the first master device may be a firewall 1 and the first slave device may be a firewall 2. The second protocol may be a VRRP protocol and correspondingly, the second master device may be switch 1 and the second slave device may be switch 2.
S202, the first master device sends a switching notification message to other devices in the linkage switching group.
And the switching notification message is used for notifying other equipment in the linkage switching group to carry out linkage switching. The switching notification message may be encapsulated in an IP message and sent to other devices in the coordinated switching group in a multicast manner.
S203, the second master device receives the handover notification message sent by the first master device.
It should be noted that fig. 2 only shows the step in which the second master device receives the handover notification message, and the first slave device, the second master device, and the second slave device may all receive the handover notification message, and the process of device linkage handover is not triggered after the first slave device and the second slave device receive the handover request message.
And S204, the second master device switches the service to the second slave device according to the switching notification message.
After receiving the switching notification message, the second master device may determine that the master-slave switching has occurred in the first backup group according to the switching notification message, and then the second master device performs the linkage switching to switch the service to the second slave device.
By adopting the method for switching the devices in linkage manner provided by the embodiment of the application, after the first master device switches the service to the first slave device, the first master device can send the switching notification message to the other devices in the linkage switching group to notify the other devices in the linkage switching group to perform linkage switching, and then the second master device in the linkage switching group can switch the service to the second slave device according to the switching notification message after receiving the notification message.
In the following, on the basis of fig. 2, with reference to the application scenario shown in fig. 1, a method for switching devices in linkage according to an embodiment of the present application is described in detail, in this embodiment, a first backup group includes the switch 1 and the switch 2 in fig. 1, and a second backup group includes the firewall 1 and the firewall 2 in fig. 1 as an example, as shown in fig. 3, the method includes:
and S301, the switch 1 switches the service to the switch 2.
Optionally, the switching reason may be that the VRRP priority of the devices in the first backup group is updated, and the updated VRRP priority of the switch 2 is higher than the VRRP priority of the switch 1. Or, the switching reason is that part of the service modules of the switch 1 are abnormal. Of course the reason for handover is not limited to the two listed above.
The switch 1 can switch the service to the switch 2 through the VRRP switching process, that is, the switch 2 is switched to the master device.
S302, the switch 1 adds 1 to the switch flag bit (switch flags) stored in the switch 1.
Each device in the linkage switching group stores a switching zone bit, and the switching zone bit is added with 1 every time switching occurs. Optionally, the switching flag bit stored in each device in the linkage switching group is 0.
For example, if the switch 1 has a switch flag bit of 0 before switching, the switch flag bit may be updated to 1 in S302.
And S303, when the switch 1 determines that the switch flag bit stored in the switch 1 changes, sending a switch notification message to other equipment in the linkage switch group.
The switching notification message sent by the switch 1 at least includes an identifier (switching over area identity) of the linked switching group and a latest switching flag bit stored in the switch 1, where the identifier of the linked switching group is a linked switching group number. Optionally, the handover notification message may further carry a protocol version number (version) and a packet type (type).
As an example, the handover notification message may be sent over multicast 224.2.2.2 after being encapsulated in a header in an IP message, with protocol number 115. The handover notification message specifically includes the following fields:
|version|Type|Switchover union group ID|Switchover Flag|
wherein, version is a protocol version number, which may be 1.
The Type is a message Type, and may be an advertisement (advertisement) message, and a field corresponding to the message Type may be set to 1, and the field indicates that the message Type is an advertisement message.
The Switchover unity group ID is a linkage switching group number, and the value range may be 1 to 255.
The Switchover Flag is a switching Flag, the initial value is 0, and the switching Flag is incremented by 1 every time the switch is performed.
Optionally, version may be 0 th to 3 th bytes in the handover notification message, Type is 4 th to 7 th bytes of the handover notification message, the switch over area group ID is 8 th to 15 th bytes of the handover notification message, and the switch Flag is 16 th to 31 th bytes of the handover notification message.
It should be noted that each device in the same coordinated switching group is configured with the same identifier of the coordinated switching, for example, switch 1, switch 2, firewall 1, and firewall 2 in fig. 1 form a coordinated switching group 1, and then the number of the configured coordinated switching group in switch 1, switch 2, firewall 1, and firewall 2 in fig. 1 is all 1, and exemplarily, switch intersection group 1 may be configured on switch 1.
Optionally, after receiving the switching notification message, the switch 2 may update the switching flag bit stored in itself to the switching flag bit carried in the switching notification message, for example, update the switching flag bit stored in itself from 0 to 1.
S304, the firewall 1 receives the switching notification message sent by the switch 1.
S305, the firewall 1 determines whether the identifier of the linked switching group to which the firewall itself belongs is consistent with the identifier of the linked switching group in the switching notification message.
If yes, executing S306; if not, the handover notification message may be ignored.
S306, the firewall 1 determines whether the switch flag bit stored in itself is smaller than the switch flag bit carried in the switch notification message.
If yes, go to S307; if not, the handover notification message may be ignored.
For example, if the switch flag bit stored in the master/slave switching group is 0 and the switch flag bit carried in the switch notification message is 1, it may be determined that master/slave switching has occurred in another backup group in the linked switching group.
S307, the firewall 1 switches the service to the firewall 2.
The firewall 1 may switch the service to the firewall 2 through the IRF process, that is, the firewall 2 is switched to the master device.
S308, the firewall 1 updates the switch flag bit stored in itself to the switch flag bit carried in the switch notification message.
It should be noted that, the firewall 1 updates the switch flag bit stored in itself to the switch flag bit carried in the switch notification message through the IRF process, and since the backup group formed by the IRF protocol may be regarded as a joint device, each device in the backup group may be regarded as a component unit of the joint device, the joint device may run one IRF process, and it may be understood that each device in the backup group uses the same IRF process, so that the IRF process may make the switch flag bit stored in the firewall 2 consistent with the switch flag bit stored in the firewall 1, and may also be understood that the firewall 1 and the firewall 2 share the same switch flag bit.
In the embodiment of the present application, a new notification message (i.e. a switching notification message) is added, after a primary/secondary switching occurs due to a non-interface failure, by using the method for device linkage switching provided in the embodiment of the present application, the switch 1 may send a switching notification message to other devices in a linkage switching group, after the firewall 1 serving as a primary device receives the switching notification message, if it is determined that the linkage switching group number stored by itself is the same as the linkage switching group number to which itself belongs and the switching flag bit stored by itself is smaller than the switching flag bit carried by the switching notification message, it is determined that the primary/secondary switching occurs in other backup groups in the linkage switching group to which itself belongs, and when the firewall 1 knows that the primary/secondary switching occurs in other backup groups, the service may be switched to the firewall 2, and the physical interface of the firewall 2 will become an active state, two backup groups in the linkage switching group can still communicate, and the condition of network interruption is avoided.
It should be noted that, in fig. 3, the main-standby switching between the switches in fig. 1 is triggered to perform the main-standby switching between the firewalls. On the contrary, if the active switching between the firewalls occurs first, the method for performing the linkage switching between the switches is similar to the method described above, that is, after the firewall 1 switches the service to the firewall 2, the firewall 1 adds 1 to the stored switching flag bit and sends a switching notification message to other devices in the linkage switching group, and after receiving the switching notification message, the switch 1 can switch the service to the switch 2 according to the switching notification message.
Therefore, by the method, if the master backup group and the standby backup group are switched and the other backup group is also switched in a linkage manner under the condition of combining the VRRP protocol and the IRF protocol to form the network, the problem of network interruption caused by incapability of switching in a linkage manner is solved, and the network availability is improved.
Corresponding to the above method embodiment, an embodiment of the present application provides an apparatus for switching devices in an interlocking manner, where the apparatus may be a first master device in the above embodiment, or a chip in the first master device, as shown in fig. 4, and the apparatus includes: a switching module 401 and a sending module 402.
A switching module 401, configured to switch a service to a first slave device.
A sending module 402, configured to send a switching notification message to other devices in the linkage switching group, where the switching notification message is used to notify the other devices in the linkage switching group to perform linkage switching, and the linkage switching group at least includes a first backup group deployed through a first protocol and a second backup group deployed through a second protocol, where the first backup group at least includes a first master device and a first slave device, and the second backup group at least includes a second master device and a second slave device.
The switching notification message at least comprises an identifier of the linkage switching group and the latest switching zone bit stored by the storage module.
Optionally, the apparatus further comprises: a storage module 403;
the storage module 403 is configured to add 1 to the switch flag bit stored in the switching module 401 after the switching module 401 switches the service to the first slave device.
Optionally, the sending module 402 is specifically configured to send a switching notification message to other devices in the coordinated switching group when it is determined that the switching flag stored in the storage module 403 changes.
Corresponding to the above method embodiment, an embodiment of the present application further provides another device for switching devices in an interlocking manner, where the device may be the second master device in the above embodiment, or a chip in the second master device, as shown in fig. 5, the device includes: a receiving module 501 and a switching module 502.
A receiving module 501, configured to receive a switching notification message sent by a first master device, where the switching notification message is used to notify other devices in a linkage switching group to perform linkage switching, where the linkage switching group at least includes a first backup group deployed through a first protocol and a second backup group deployed through a second protocol, the first backup group includes the first master device and a first slave device, and the second backup group includes a second master device and a second slave device;
a switching module 502, configured to switch the service to the second slave device according to the switching notification message received by the receiving module 501.
The switching notification message at least comprises an identifier and a switching flag bit of the linkage switching group.
Optionally, the apparatus further comprises: a storage module 503;
a switching module 502, specifically configured to determine whether an identifier of a linkage switching group to which the device belongs is consistent with an identifier of a linkage switching group in the switching notification message; if yes, judging whether the switching flag bit stored in the storage module 503 is smaller than the switching flag bit carried in the switching notification message; and if the current time is less than the preset time, switching the service to the second slave equipment.
Optionally, the storage module 503 is further configured to update the switching flag bit stored in the storage module itself to the switching flag bit carried in the switching notification message.
The embodiment of the present application further provides an electronic device, which may be the first master device in the foregoing embodiments, or may be the second master device, and exemplarily may be the switch 1 or the firewall 1 in fig. 1, as shown in fig. 6, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
in the case where the electronic device is a first master device, the processor 601 is configured to implement the steps performed by the first master device in the above method embodiment when executing the program stored in the memory 603.
In the case that the electronic device is a second host device, the processor 601 is configured to implement the steps performed by the second host device in the above method embodiment when executing the program stored in the memory 603.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any one of the above-mentioned methods for switching devices in linkage.
In yet another embodiment provided by the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method for linked switching of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (9)

1. A method for switching equipment in linkage mode is characterized by comprising the following steps:
the first master device switches the service to the first slave device;
the first master device sends a switching notification message to other devices in a linkage switching group, wherein the switching notification message is used for notifying other devices in the linkage switching group to perform linkage switching, the linkage switching group at least comprises a first backup group deployed through a first protocol and a second backup group deployed through a second protocol, the first backup group at least comprises the first master device and the first slave device, the second backup group at least comprises a second master device and a second slave device, the first master device is connected with the second master device through a physical interface, and the first slave device is connected with the second slave device through a physical interface; the physical interfaces of the first master device and the first slave device are both in an active state, the physical interface of the second master device is in an active state, and the physical interface of the second slave device is in an inactive state;
the switching notification message at least includes the identifier of the linkage switching group and the latest switching flag bit stored in the first master device, so that the second master device switches the service to the second slave device when determining that the identifier of the linkage switching group to which the second master device belongs is consistent with the identifier of the linkage switching group in the switching notification message and the switching flag bit stored in the second master device is smaller than the flag bit carried in the switching notification message.
2. The method of claim 1, wherein after the first master device switches traffic to a first slave device, the method further comprises:
and the first master equipment adds 1 to the switching flag bit stored by the first master equipment.
3. The method of claim 2, wherein sending a switch notification message to other devices in the coordinated switch group by the first master device comprises:
and when the first master device determines that the switching flag bit stored by the first master device changes, the switching notification message is sent to other devices in the linkage switching group.
4. A method for switching equipment in linkage mode is characterized by comprising the following steps:
the method comprises the steps that a second main device receives a switching notification message sent by a first main device, wherein the switching notification message is used for notifying other devices in a linkage switching group to carry out linkage switching, the linkage switching group at least comprises a first backup group deployed through a first protocol and a second backup group deployed through a second protocol, the first backup group comprises the first main device and a first slave device, the second backup group comprises the second main device and a second slave device, the first main device is connected with the second main device through a physical interface, and the first slave device is connected with the second slave device through a physical interface; the physical interfaces of the first master device and the first slave device are both in an active state, the physical interface of the second master device is in an active state, and the physical interface of the second slave device is in an inactive state; the switching notification message at least comprises an identifier and a switching flag bit of the linkage switching group;
the second master device switches the service to the second slave device according to the switching notification message;
the second master device switches the service to the second slave device according to the switching notification message, including:
the second master device judges whether the identifier of the linkage switching group to which the second master device belongs is consistent with the identifier of the linkage switching group in the switching notification message;
if the switching flag bit is consistent with the switching flag bit, judging whether the switching flag bit stored by the switching notification message is smaller than the switching flag bit carried in the switching notification message;
and if the number of the service requests is smaller than the preset value, the second master device switches the service to the second slave device.
5. The method of claim 4, wherein after the second master device switches traffic to a second slave device, the method further comprises:
and the first master equipment updates the switching zone bit stored by the first master equipment into the switching zone bit carried in the switching notification message.
6. An apparatus for switching devices in linkage, the apparatus comprising:
the switching module is used for switching the service to the first slave equipment;
a sending module, configured to send a switching notification message to other devices in a linkage switching group, where the switching notification message is used to notify the other devices in the linkage switching group to perform linkage switching, where the linkage switching group at least includes a first backup group deployed through a first protocol and a second backup group deployed through a second protocol, the first backup group at least includes a first master device and a first slave device, the second backup group at least includes a second master device and a second slave device, the first master device is connected to the second master device through a physical interface, and the first slave device is connected to the second slave device through a physical interface; the physical interfaces of the first master device and the first slave device are both in an active state, the physical interface of the second master device is in an active state, and the physical interface of the second slave device is in an inactive state;
the switching notification message at least includes the identifier of the linkage switching group and the latest switching flag bit stored in the first master device, so that the second master device switches the service to the second slave device when determining that the identifier of the linkage switching group to which the second master device belongs is consistent with the identifier of the linkage switching group in the switching notification message and the switching flag bit stored in the second master device is smaller than the flag bit carried in the switching notification message.
7. The apparatus of claim 6, further comprising a storage module;
the storage module is used for storing the switching flag bit;
the sending module is specifically configured to send the switching notification message to other devices in the linkage switching group when it is determined that the switching flag bit stored in the storage module changes.
8. A device for switching equipment in linkage manner is characterized by comprising:
a receiving module, configured to receive a switching notification message sent by a first master device, where the switching notification message is used to notify other devices in a linkage switching group to perform linkage switching, where the linkage switching group at least includes a first backup group deployed through a first protocol and a second backup group deployed through a second protocol, the first backup group includes the first master device and a first slave device, the second backup group includes a second master device and a second slave device, the first master device is connected to the second master device through a physical interface, and the first slave device is connected to the second slave device through a physical interface; the physical interfaces of the first master device and the first slave device are both in an active state, the physical interface of the second master device is in an active state, and the physical interface of the second slave device is in an inactive state; the switching notification message at least comprises an identifier and a switching flag bit of the linkage switching group;
a switching module, configured to switch a service to the second slave device according to the switching notification message received by the receiving module;
the device further comprises: a storage module;
the switching module is specifically configured to determine whether an identifier of a linkage switching group to which the device belongs is consistent with an identifier of a linkage switching group in the switching notification message; if the switching flag bit is consistent with the switching flag bit, judging whether the switching flag bit stored in the storage module is smaller than the switching flag bit carried in the switching notification message; and if the number of the slave devices is less than the preset threshold, switching the service to the second slave device.
9. An electronic device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: -carrying out the method steps of any one of claims 1 to 3, or-carrying out the method steps of any one of claims 4 to 5.
CN201810796098.4A 2018-07-19 2018-07-19 Equipment linkage switching method and device Active CN109088818B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810796098.4A CN109088818B (en) 2018-07-19 2018-07-19 Equipment linkage switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810796098.4A CN109088818B (en) 2018-07-19 2018-07-19 Equipment linkage switching method and device

Publications (2)

Publication Number Publication Date
CN109088818A CN109088818A (en) 2018-12-25
CN109088818B true CN109088818B (en) 2021-07-30

Family

ID=64837932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810796098.4A Active CN109088818B (en) 2018-07-19 2018-07-19 Equipment linkage switching method and device

Country Status (1)

Country Link
CN (1) CN109088818B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111385170B (en) * 2020-03-18 2021-06-11 杭州迪普科技股份有限公司 Interface state synchronization system and method thereof
CN114430310A (en) * 2020-10-29 2022-05-03 南京中兴新软件有限责任公司 Information processing method and device, broadband access server and storage medium
CN113660123B (en) * 2021-08-16 2024-02-13 杭州网易数之帆科技有限公司 Virtual switch upgrading method, device, electronic equipment and storage medium
CN113794631B (en) * 2021-08-20 2023-04-07 新华三信息安全技术有限公司 Port redundancy processing method, device, equipment and machine-readable storage medium
CN114301842B (en) * 2021-12-30 2024-03-15 山石网科通信技术股份有限公司 Route searching method and device, storage medium, processor and network system
CN114978987B (en) * 2022-05-17 2023-08-29 北京交通大学 Server Redundancy Backup Method

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7197660B1 (en) * 2002-06-26 2007-03-27 Juniper Networks, Inc. High availability network security systems
KR100703488B1 (en) * 2004-06-01 2007-04-03 삼성전자주식회사 Method and apparatus for state transition backup router in a router redundancy system
CN100531209C (en) * 2006-01-16 2009-08-19 杭州华三通信技术有限公司 Method and system for realizing synchronization of major and auxiliary state
CN101094102B (en) * 2007-07-18 2010-06-02 杭州华三通信技术有限公司 Main and standby switching method and route standby system for route device
CN102256250A (en) * 2011-07-08 2011-11-23 杭州华三通信技术有限公司 Wireless terminal information synchronization method in wireless local area network and equipment thereof
CN102523358A (en) * 2012-01-12 2012-06-27 江苏电力信息技术有限公司 Call center communication access system based on concentrated voice access NGN (Next Generation Network) soft switch network
US9590900B2 (en) * 2012-08-08 2017-03-07 Cisco Technology, Inc. Protocol for supporting gateways with redundant routers in a shared domain
CN103095600B (en) * 2013-02-07 2015-09-16 杭州华三通信技术有限公司 A kind of method of the load balancing based on Trill network and routing device
CN105119822A (en) * 2015-09-08 2015-12-02 烽火通信科技股份有限公司 Backup group management method and system based on VRRP (Virtual Router Redundancy Protocol)

Also Published As

Publication number Publication date
CN109088818A (en) 2018-12-25

Similar Documents

Publication Publication Date Title
CN109088818B (en) Equipment linkage switching method and device
CN109889411B (en) Data transmission method and device
US20190200400A1 (en) Network function processing method and related device
CN111372272A (en) Method and device for recovering abnormity of wireless bridging network
CN109462533B (en) Link switching method, link redundancy backup network and computer readable storage medium
WO2019184923A1 (en) Information backup method and related device
EP3316555A1 (en) Mac address synchronization method, device and system
CN111262665A (en) Data communication method, device, controller and system
CN112583708B (en) Connection relation control method and device and electronic equipment
WO2020057445A1 (en) Communication system, method, and device
CN110022236B (en) Message forwarding method and device
CN111585797A (en) Ethernet link switching method, device, equipment and computer readable storage medium
US9967137B2 (en) System and method for protecting virtual circuits in dynamic multi-domain environment
CN111131035A (en) Data transmission method and device
CN112887201A (en) VRRP (virtual router redundancy protocol) -based interface updating method and device and storage medium
CN115314336A (en) User online method of vBRAS and related equipment
CN109039680B (en) Method and system for switching main Broadband Network Gateway (BNG) and standby BNG and BNG
CN107104837B (en) Method and control device for path detection
US10122588B2 (en) Ring network uplink designation
CN115701031A (en) Service processing method and related device
CN116248581B (en) Cloud scene gateway cluster master-slave switching method and system based on SDN
WO2020177471A1 (en) Message transmission method, apparatus and storage medium
CN115086219B (en) Virtual router determining method, device and computer readable storage medium
CN115941587B (en) Multi-homing routing method, device, edge equipment and storage medium
CN113014481B (en) Method, device, equipment and storage medium for transmitting link state notification

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant