A cloud scenario gateway cluster master-slave switching method and system based on SDN
By introducing VRRP and BFD technology into SDN technology, combined with the SDN controller, the active and standby switchover of the cloud scenario gateway cluster is realized, which solves the problem of data loss when the gateway fails and improves system stability and user experience.
Patent Information
- Application Number
- CN202211702415.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2042-12-29
AI Technical Summary
In existing SDN technology, smooth and seamless switching cannot be achieved when the gateway fails, resulting in data loss and affecting user experience.
An SDN-based cloud scenario gateway cluster active/standby switching method is used to perform detection and failover through two egress gateways. VRRP and BFD technology are combined to introduce an SDN controller to participate in the election to ensure smooth switching of traffic.
It achieves smooth switching of communication inside and outside the gateway, avoids data loss, and improves system stability and user experience.
Smart Images

Figure CN116248581B
Abstract
Description
Technical Field
[0001] The present invention relates to the field related to network communication technology, and in particular to a method and system for master-slave switching of a cloud scenario gateway cluster based on SDN. Background Art
[0002] With the popularization of the Internet, the reliability of the basic network has become the focus of users' attention. It is very important for end users to ensure that network transmission is not interrupted. Therefore, VRRP technology is often used in the egress gateway or edge network of cloud scenarios to prevent IP data traffic loss in certain situations, that is, after an egress gateway fails, it can still maintain connectivity with the external network.
[0003] Software Defined Network (SDN) is a new type of innovative network architecture and a way to implement network virtualization. Its core technology, OpenFlow, separates the control plane from the data plane of network devices, thereby achieving flexible control of network traffic and making the network as a pipeline more intelligent.
[0004] SDN separates control from forwarding, and implements centralized control of the entire network through the controller, realizes universal forwarding hardware, and intelligent centralized control, which greatly improves the innovation and flexibility of the network. However, in the existing SDN technology, the reliability of the SDN forwarding gateway has not been considered. Once the SDN gateway fails and there is no backup gateway to replace it, the network inside the gateway will not be able to communicate with the outside of the gateway. Even if there is a backup gateway, it can only be switched manually, and the response speed is slow. This will lead to the inability to achieve smooth and seamless switching, data loss, and affect basic services, resulting in a poor user experience.
[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0006] The embodiments of the present invention provide a cloud scenario gateway cluster master-slave switching method, system, storage medium and electronic device based on SDN, so as to at least solve the technical problem in the prior art that the gateway cannot achieve smooth and seamless switching in the network inside the gateway and the communication outside the gateway, resulting in data loss.
[0007] According to one aspect of an embodiment of the present invention, a method for active-standby switching of a cloud scenario gateway cluster based on SDN is provided, comprising: the cloud scenario gateway cluster is composed of two egress gateways, including three connection ports, wherein the egress gateway includes a first egress gateway and a second egress gateway, the first egress gateway and the second egress network have priorities, and the three connection ports include a management port, a service port, and an external network port; the management port is used to connect to an SDN controller, the service port is used to establish a VXLAN channel with a host in the cloud, and the external network port is used to connect to an external network; when the SDN controller manages the egress gateway, it subscribes to role events, and when the priorities of the first egress network and the second egress gateway change, the SDN controller subscribes to role events through Netcon f channel to the SDN controller; the egress gateway adds an external network port to support the BFDecho function, and the destination mac of the message encapsulates the mac address of the external network gateway for detecting the external network port; when the SDN controller carries access to the external network service, the bidirectional forwarding detection BFD configuration is added and sent down, so that the direct link between the egress gateway and the external network gateway is fault detected; when the BFD detection fails, it is reported to the SDN controller through the Netconf channel; the routing fault tolerance protocol VRRP is deployed on the service port. When the configuration is initialized, a random egress gateway is configured with a high priority to make it the main router Master. When the Master service port fails, the backup router Slave can be directly upgraded to Master.
[0008] Optionally, the method also includes: when the SDN controller senses that the Master is lost and the Slave is also lost, determining that the cloud scenario gateway cluster is faulty, or the SDN controller cluster is faulty; setting the service working status of the cloud scenario gateway cluster to False, and not performing other processing; if the Slave management port is normal and the BFD session status of the external network port is normal, it means that the current status of the Slave is normal, and the SDN controller sends the configuration through Netconf to upgrade the priority of VRRP, so that the Slave preempts the Master and becomes the new Master, ensuring that the traffic remains normal when subsequent services change.
[0009] Optionally, when the Master is connected to the SDN controller normally and the external network port fails, the method further includes: if the connection status of the Slave is abnormal, it means that the cloud scene gateway cluster fails, and the service working status of the cloud scene gateway cluster is set to False, and no other processing is performed; if the connection status of the Slave is normal, continue the first subsequent processing, including: if the BFD session of the Slave's external network port is abnormal, it means that the cloud scene gateway cluster fails, and the service working status of the cloud scene gateway cluster is set to False, and no other processing is performed; if the BFD session of the Slave's external network port is normal, continue the second subsequent processing, including: if the service port link of the Slave is abnormal, it means that the cloud scene gateway cluster fails, and the service working status of the cloud scene gateway cluster is set to False, and no other processing is performed; if the service port link of the Slave is normal, it means that the Slave is carrying the service normally; the SDN controller sends configuration through Netconf to upgrade the priority of VRRP, so that the Slave preempts the Master and becomes the new Master, ensuring that the traffic is still normal when the subsequent service changes.
[0010] Optionally, when the SDN controller receives a role change message from the Slave, the method includes: confirming that the old Master is disconnected and the BFD session status of the external network port of the new Master is Down, indicating a cluster failure, setting the service working status of the cluster to False, and performing no other processing;
[0011] Confirm that the old Master is disconnected, the BFD session status of the new Master's external network port is UP, and the service port link of the new Slave is abnormal, which indicates that the cloud scene gateway cluster is faulty. Set the service working status of the cloud scene gateway cluster to False and do not perform other processing;
[0012] Confirm that the old master is disconnected, the BFD session status of the new master's external network port is UP, the service port link of the new slave is normal, and the service port link of the new slave is normal. In the dual-active state, the old master fails and the new master service is normal. The controller forcibly shuts down the old master to ensure that the virtual IP falls only on the new master, and the service traffic is switched to the new master for forwarding;
[0013] Confirm that the old Master is still connected and whether the old Master is still the Master. If it is no longer the Master, it indicates that it is a normal master-slave switchover and the new Master information is recorded. If the old Master is still the Master, it indicates that the cloud scenario gateway cluster has entered a dual-master state and the SDN controller intervenes to decide on the Master so that the traffic can be quickly restored.
[0014] Optionally, when the cloud scenario gateway cluster enters a dual-master state, the method includes: checking that the BFD session status of the old Master's external network port is normal and the service port link of the old Master is normal, indicating that the old Master has not failed, and the SDN controller forcibly shuts down the Slave to ensure that the virtual IP only falls on the old Master, the service traffic is still forwarded from the original Master, an alarm is sent, and the heartbeat link between the master and the slave is checked.
[0015] Optionally, when the cloud scenario gateway cluster enters a dual-master state, the method includes: checking that the BFD session status of the old Master's external network port is abnormal, or the service port link of the old Master is abnormal, the BFD session status of the new Master's external network port is UP, the service port link of the new Slave is normal, the old Master fails, and the new Master's service is normal, the controller forcibly shuts down the old Master, ensures that the virtual IP only falls on the new Master, and switches the service traffic to the new Master for forwarding.
[0016] Optionally, when the cloud scenario gateway cluster enters a dual-master state, the method includes: checking that the BFD session status of the external network port of the old Master is abnormal, or the service port link of the old Master is abnormal, and the BFD session status of the external network port of the new Master is Down, indicating that the cloud scenario gateway cluster fails, and the service working status of the cloud scenario gateway cluster is set to False, and no other processing is performed.
[0017] Optionally, when the cloud scenario gateway cluster enters a dual-master state, the method includes: checking that the BFD session status of the old Master's external network port is abnormal, or the service port link of the old Master is abnormal, the BFD session status of the new Master's external network port is UP, and the service port link of the new Slave is abnormal, indicating that the cloud scenario gateway cluster fails, and the service working status of the cloud scenario gateway cluster is set to False, and no other processing is performed.
[0018] Optionally, the method includes: when an abnormality suddenly occurs at the external network port of the first export gateway, the SDN controller receives a BFD Session Down event reported by the first export gateway, checks that the connection status of the Slave second export gateway is normal, the external network port BFD session is normal, and the service port link is also normal, indicating that the Slave can carry the service normally, and the SDN controller sends configuration through Netconf to increase the VRRP priority of the second export gateway and immediately preempt it, so that the second export gateway becomes the Master, the first export gateway becomes the Slave, and the traffic of the cloud host accessing the external network is sent through the second export gateway, and the service traffic quickly returns to normal.
[0019] According to one aspect of an embodiment of the present invention, a cloud scenario gateway cluster active-standby switching system based on SDN is provided, including: the cloud scenario gateway cluster, consisting of two egress gateways, including three connection ports, wherein the egress gateway includes a first egress gateway and a second egress gateway, the first egress gateway and the second egress network have priorities, and the three connection ports include a management port, a service port, and an external network port; the management port is used to connect to an SDN controller, the service port is used to establish a VXLAN channel with a host in the cloud, and the external network port is used to connect to an external network; when the SDN controller manages the egress gateway, it subscribes to role events, and when the priorities of the first egress network and the second egress gateway change, it reports to the SDN controller through the Netconf channel; the egress gateway adds an external network port to support BFD The echo function is enabled, and the destination MAC of the message encapsulates the MAC address of the external network gateway for detecting the external network port. When the SDN controller carries access to the external network service, the bidirectional forwarding detection BFD configuration is added and sent down to detect the fault of the direct link between the egress gateway and the external network gateway. When the BFD detection fails, it is reported to the SDN controller through the Netconf channel. The routing fault tolerance protocol VRRP is deployed on the service port. During the initialization configuration, a random egress gateway is configured with a high priority to make it the master router Master. When the Master service port fails, the backup router Slave can be directly upgraded to Master.
[0020] In an embodiment of the present invention, a cloud scenario gateway cluster is composed of two egress gateways, including three connection ports, wherein the egress gateway includes a first egress gateway and a second egress gateway, the first egress gateway and the second egress network have priorities, and the three connection ports include a management port, a service port, and an external network port; the management port is used to connect to the SDN controller, the service port is used to establish a VXLAN channel with a host in the cloud, and the external network port is used to connect to an external network; when the SDN controller manages the egress gateway, it subscribes to role events, and when the priorities of the first egress network and the second egress gateway change, it is reported to the SDN controller through the Netconf channel; the egress gateway adds an external network port to support BFD echo function, and the destination MAC of the message encapsulates the MAC address of the external network gateway for detecting the external network port; when the SDN controller carries access to the external network service, the bidirectional forwarding detection BFD configuration is added and sent down, so that the fault detection of the direct link between the egress gateway and the external network gateway is performed; when the BFD detection fails, it is reported to the SDN controller through the Netconf channel; the routing fault tolerance protocol VRRP is deployed at the service port, and during the initialization configuration, a high priority is randomly selected for an egress gateway to be configured to make it the master router Master. When the Master service port fails, the backup router Slave can be directly upgraded to Master. That is, the present invention mainly detects multiple links of the active and standby cluster of the cloud scenario egress gateway, combines technologies such as VRRP and BFD, and introduces a third-party SDN controller to participate in the cluster active and standby election, proposes an effective election method, improves system stability, and thus solves the technical problem in the prior art that the gateway cannot achieve smooth and seamless switching in the network inside the gateway and the communication outside the gateway, resulting in data loss. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0022] Figure 1 It is a flow chart of an optional SDN-based cloud scenario gateway cluster master-slave switching method;
[0023] Figure 2 This is an optional SDN-based deployment diagram of a cloud scenario gateway cluster active-standby switching system;
[0024] Figure 3 It is a flow chart of an optional SDN-based cloud scenario gateway cluster master-slave switching method (I);
[0025] Figure 4 It is a flow chart of an optional SDN-based cloud scenario gateway cluster master-slave switching method (II);
[0026] Figure 5 It is a flow chart of an optional SDN-based cloud scenario gateway cluster master-slave switching method (III);
[0027] Figure 6 This is an optional SDN-based cloud scenario gateway cluster master-slave switching system deployment diagram (II). DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a sequence of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] In order to better understand the contents of this plan, some of the contents are explained as follows:
[0031] SDN is an architecture that abstracts the network into control planes and forwarding planes, making the network agile and flexible. With the rise of cloud, SDN provides flexible network support for various cloud services and application loads. At the same time, the differences in details brought about by various virtualization technologies have led to huge challenges for SDN in terms of the asymmetry of information stored in each virtualization control plane, how to synchronize and uniformly manage information on multiple control planes, and how to implement cross-regional routing.
[0032] BFD is a bidirectional forwarding detection mechanism that can provide millisecond-level detection and achieve rapid detection of links. BFD can achieve rapid routing convergence and ensure rapid switching of service traffic paths by working with upper-layer routing protocols. It is often used in high-reliability networks.
[0033] VRRP is a routing fault-tolerant protocol, also known as a backup routing protocol. When the next hop of the host fails, it can quickly switch to the backup router to ensure the continuity and reliability of network communication.
[0034] A group of routers running VRRP form a virtual router to the outside world, one of which is in the Master state (i.e., the main router, providing services to the outside world), and the others are in the Backup state (i.e., the backup routers, which generally do not provide services to the outside world). VRRP uses an election mechanism to determine the status of the router (Master or Backup). Routers running VRRP will send and receive VRRP announcement messages, which contain their own VRRP priority information. VRRP conducts elections by comparing the priorities of routers. The router with a higher priority will become the main router, and the other routers will be backup routers. The IP address of the virtual router will be controlled by the main router, which is responsible for forwarding data packets destined for the virtual IP address. Once the main router is unavailable, VRRP will re-elect and place the virtual IP address on the new Master, thereby implementing a dynamic failover mechanism.
[0035] With the popularization of the Internet, the reliability of the basic network has become the focus of users' attention. It is very important for end users to ensure that network transmission is not interrupted. Therefore, VRRP technology is often used in the egress gateway or edge network of cloud scenarios to prevent IP data traffic loss in certain situations, that is, after an egress gateway fails, it can still maintain connectivity with the external network.
[0036] In this embodiment, a method for switching between active and standby gateway clusters in a cloud scenario based on SDN is provided. Figure 1 is a flow chart of a method for switching a cloud scenario gateway cluster based on SDN according to an embodiment of the present invention. Figure 1 As shown, the SDN-based cloud scenario gateway cluster master-slave switching method process includes the following steps:
[0037] Step S102, the cloud scene gateway cluster consists of two egress gateways, including three connection ports, wherein the egress gateway includes a first egress gateway and a second egress gateway, the first egress gateway and the second egress gateway have priorities, and the three connection ports include a management port, a service port, and an external network port.
[0038] Step S104, the management port is used to connect to the SDN controller, the service port is used to establish a VXLAN channel with the host in the cloud, and the external network port is used to connect to the external network.
[0039] Step S106, when the SDN controller manages the egress gateway, it subscribes to the role event, and when the priorities of the first egress network and the second egress gateway change, it reports to the SDN controller through the Netconf channel.
[0040] Step S108: The egress gateway adds an external network port to support the BFD echo function, and the destination MAC of the message encapsulates the MAC address of the external network gateway for detecting the external network port.
[0041] Step S110, when the SDN controller carries access to the external network service, a bidirectional forwarding detection BFD configuration is added and issued to perform fault detection on the direct link between the egress gateway and the external network gateway; when the BFD detection fails, it is reported to the SDN controller through the Netconf channel.
[0042] Step S112, deploying the routing fault tolerance protocol VRRP on the service port. During the initial configuration, randomly select an egress gateway with a high priority to make it the master router Master. When the Master service port fails, the backup router Slave can be directly upgraded to Master.
[0043] In this embodiment, two egress gateways form an egress gateway cluster. The egress gateway has three ports, one of which is used to connect to the SDN controller, called the management port. One port is used to establish a VXLAN channel with the host in the cloud, that is, the internal service port, called the service port. There is also a port for connecting to the external network, that is, the external service port, called the external network port. The controller sends configurations to egress gateway 1 and egress gateway 2 through netconf, and the service port is configured with VRRP. The priority of egress gateway 1 is high, and the priority of egress gateway 2 is low. After the configuration is completed, the egress gateway cluster conducts an election. Since the priority of egress gateway 1 is high, egress gateway 1 is the Master, egress gateway 2 is the Slave, and the virtual IP (VIP) falls on the service port of egress gateway 1. The host in the cloud establishes a tunnel with the VIP of the egress gateway, and the traffic from the cloud host to the external network is sent to the VIP in the next hop, that is, forwarded by the Master.
[0044] Once the Master fails, the VRRP heartbeat is disconnected, and the role of egress gateway 2 is automatically upgraded from Slave to the new Master. The VIP falls on the business port of egress gateway 2. The traffic from the cloud host to the external network is sent to egress gateway 2 where the VIP is located, and is sent out through egress gateway 2 to ensure business stability.
[0045] Through the embodiments provided by the present application, the cloud scenario gateway cluster is composed of two egress gateways, including three connection ports, wherein the egress gateway includes a first egress gateway and a second egress gateway, the first egress gateway and the second egress network have priorities, and the three connection ports include a management port, a service port, and an external network port; the management port is used to connect to the SDN controller, the service port is used to establish a VXLAN channel with the host in the cloud, and the external network port is used to connect to the external network; when the SDN controller manages the egress gateway, it subscribes to role events, and when the priority of the first egress network and the second egress gateway changes, it is reported to the SDN controller through the Netconf channel; the egress gateway adds an external network port to support BFD echo function, and the destination MAC of the message encapsulates the MAC address of the external network gateway for detecting the external network port; when the SDN controller carries access to the external network service, the bidirectional forwarding detection BFD configuration is added and sent down, so that the fault detection of the direct link between the egress gateway and the external network gateway is performed; when the BFD detection fails, it is reported to the SDN controller through the Netconf channel; the routing fault tolerance protocol VRRP is deployed at the service port, and during the initialization configuration, a high priority is randomly selected for an egress gateway to be configured to make it the master router Master. When the Master service port fails, the backup router Slave can be directly upgraded to Master. That is, the present invention mainly detects multiple links of the active and standby cluster of the cloud scenario egress gateway, combines technologies such as VRRP and BFD, and introduces a third-party SDN controller to participate in the cluster active and standby election, proposes an effective election method, improves system stability, and thus solves the technical problem in the prior art that the gateway cannot achieve smooth and seamless switching in the network inside the gateway and the communication outside the gateway, resulting in data loss.
[0046] Optionally, the method may further include: when the SDN controller senses that the Master is lost and the Slave is also lost, determining that the cloud scenario gateway cluster is faulty, or the SDN controller cluster is faulty; setting the service working status of the cloud scenario gateway cluster to False, and not performing other processing; if the Slave management port is normal and the BFD session status of the external network port is normal, it means that the current status of the Slave is normal, and the SDN controller sends the configuration through Netconf to upgrade the priority of VRRP, so that the Slave preempts the Master and becomes the new Master, ensuring that the traffic remains normal when subsequent services change.
[0047] Optionally, when the Master is connected to the SDN controller normally and the external network port fails, the method may further include: if the connection status of the Slave is abnormal, it indicates that the cloud scene gateway cluster has failed, and the business working status of the cloud scene gateway cluster is set to False, and no other processing is performed; if the connection status of the Slave is normal, continue the first subsequent processing.
[0048] Optionally, if the connection status of the Slave is normal, continuing the first subsequent processing may include: if the BFD session of the Slave's external network port is abnormal, it means that the cloud scene gateway cluster has a fault, and the business working status of the cloud scene gateway cluster is set to False, and no other processing is performed; if the BFD session of the Slave's external network port is normal, continuing the second subsequent processing.
[0049] Optionally, if the BFD session of the Slave's external network port is normal, continuing the second subsequent processing may include: if the Slave's service port link is abnormal, it means that the cloud scene gateway cluster has failed, and the service working status of the cloud scene gateway cluster is set to False, and no other processing is performed; if the Slave's service port link is normal, it means that the Slave is carrying the service normally; the SDN controller sends the configuration through Netconf, upgrades the priority of VRRP, so that the Slave preempts the Master and becomes the new Master, ensuring that the traffic remains normal when subsequent services change.
[0050] Optionally, when the SDN controller receives a role change message from the Slave, the method may include: confirming that the old Master is disconnected and the BFD session status of the new Master's external network port is Down, indicating a cluster failure, setting the cluster's service working status to False, and performing no other processing.
[0051] Optionally, the method may include: confirming that the old Master is lost, the BFD session status of the new Master's external network port is UP, and the service port link of the new Slave is abnormal, which indicates that the cloud scene gateway cluster has a fault, and the service working status of the cloud scene gateway cluster is set to False, and no other processing is performed.
[0052] Optionally, the method may include: confirming that the old Master is disconnected, the BFD session status of the new Master's external network port is UP, the service port link of the new Slave is normal, the service port link of the new Slave is normal, in the dual-master state, the old Master fails, the new Master service is normal, the controller forcibly shuts down the old Master, ensures that the virtual IP only falls on the new Master, and switches the service traffic to the new Master for forwarding.
[0053] Optionally, the method may include: confirming that the old Master is not lost, whether the role of the old Master is still the Master, if it is no longer the Master role, it indicates that it is a normal master-slave switch, and recording new Master information; if the role of the old Master is still the Master, it indicates that the cloud scenario gateway cluster has entered a dual-master state, and the SDN controller intervenes, decides on the Master, and quickly restores traffic.
[0054] In this embodiment, the controller determines whether the device management port is faulty by disconnecting the Netconf channel between the controller and the egress gateway (hereinafter referred to as disconnection).
[0055] Among them, the controller adds a new flag (cluster business working status) to indicate whether the export gateway cluster can work normally. If the cluster cannot work normally (the value is False), an alarm needs to be sent urgently, and when a new business is launched, an error needs to be returned immediately to let users know that the business is abnormal, so as to conduct emergency troubleshooting.
[0056] Optionally, when the cloud scenario gateway cluster enters a dual-master state, the method includes: checking that the BFD session status of the old Master's external network port is normal and the service port link of the old Master is normal, indicating that the old Master has not failed, and the SDN controller forcibly shuts down the Slave to ensure that the virtual IP only falls on the old Master, the service traffic is still forwarded from the original Master, an alarm is sent, and the heartbeat link between the master and the slave is checked.
[0057] Optionally, when the cloud scenario gateway cluster enters a dual-master state, the method may include: checking that the BFD session status of the old Master's external network port is abnormal, or the service port link of the old Master is abnormal, the BFD session status of the new Master's external network port is UP, the service port link of the new Slave is normal, the old Master fails, and the new Master's service is normal, the controller forcibly shuts down the old Master, ensures that the virtual IP only falls on the new Master, and switches the service traffic to the new Master for forwarding.
[0058] Optionally, when the cloud scenario gateway cluster enters a dual-master state, the method may include: checking that the BFD session status of the old Master's external network port is abnormal, or the service port link of the old Master is abnormal, and the BFD session status of the new Master's external network port is Down, indicating that the cloud scenario gateway cluster is faulty, and the service working status of the cloud scenario gateway cluster is set to False, and no other processing is performed.
[0059] Optionally, when the cloud scenario gateway cluster enters a dual-master state, the method may include: checking that the BFD session status of the old Master's external network port is abnormal, or the service port link of the old Master is abnormal, the BFD session status of the new Master's external network port is UP, and the service port link of the new Slave is abnormal, indicating that the cloud scenario gateway cluster fails, and the service working status of the cloud scenario gateway cluster is set to False, and no other processing is performed.
[0060] Optionally, the method may include: when an abnormality suddenly occurs at the external network port of the first export gateway, the SDN controller receives a BFD Session Down event reported by the first export gateway, checks that the connection status of the Slave second export gateway is normal, the external network port BFD session is normal, and the service port link is also normal, indicating that the Slave can carry the service normally, and the SDN controller sends configuration through Netconf to increase the VRRP priority of the second export gateway and immediately preempt it, so that the second export gateway becomes the Master, the first export gateway becomes the Slave, and the traffic of the cloud host accessing the external network is sent through the second export gateway, and the service traffic quickly returns to normal.
[0061] According to one aspect of an embodiment of the present invention, a cloud scenario gateway cluster active-standby switching system based on SDN is provided, which may include: the cloud scenario gateway cluster, consisting of two egress gateways, including three connection ports, wherein the egress gateway includes a first egress gateway and a second egress gateway, the first egress gateway and the second egress network have priorities, and the three connection ports include a management port, a service port, and an external network port; the management port is used to connect to an SDN controller, the service port is used to establish a VXLAN channel with a host in the cloud, and the external network port is used to connect to an external network; when the SDN controller manages the egress gateway, it subscribes to role events, and when the priorities of the first egress network and the second egress gateway change, it reports to the SDN controller through the Netconf channel; the egress gateway adds an external network port to support BFD The echo function is enabled, and the destination MAC of the message encapsulates the MAC address of the external network gateway for detecting the external network port. When the SDN controller carries access to the external network service, the bidirectional forwarding detection BFD configuration is added and sent down to detect the fault of the direct link between the egress gateway and the external network gateway. When the BFD detection fails, it is reported to the SDN controller through the Netconf channel. The routing fault tolerance protocol VRRP is deployed on the service port. During the initialization configuration, a random egress gateway is configured with a high priority to make it the master router Master. When the Master service port fails, the backup router Slave can be directly upgraded to Master.
[0062] As an optional embodiment, the present application also provides a cloud scenario gateway cluster master-slave switching method based on SDN. The specific content of the solution is as follows.
[0063] like Figure 2 As shown in the figure, the deployment diagram of the cloud scenario gateway cluster active-standby switching system.
[0064] The egress gateway cluster is composed of two egress gateways. The egress gateway has three ports, one of which is used to connect to the SDN controller, called the management port. One port is used to establish a VXLAN channel with the host in the cloud, that is, the internal service port, which will be called the service port. Another port is used to connect to the external network, that is, the external service port is called the external network port. The controller sends configurations to egress gateway 1 (equivalent to the first egress gateway) and egress gateway 2 (equivalent to the second egress gateway) through netconf. VRRP is configured on the service port. The priority of egress gateway 1 is high, and that of egress gateway 2 is low. After the configuration is completed, the egress gateway cluster conducts an election. Since the priority of egress gateway 1 is high, egress gateway 1 is the Master, egress gateway 2 is the Slave, and the virtual IP (VIP) falls on the service port of egress gateway 1. The host in the cloud establishes a tunnel with the VIP of the egress gateway. The traffic from the cloud host to the external network is sent to the VIP in the next hop, that is, forwarded by the Master.
[0065] Once the Master fails, the VRRP heartbeat is disconnected, and the role of egress gateway 2 is automatically upgraded from Slave to the new Master. The VIP falls on the business port of egress gateway 2. The traffic from the cloud host to the external network is sent to egress gateway 2 where the VIP is located, and is sent out through egress gateway 2 to ensure business stability.
[0066] In this embodiment, 1. When the controller manages the egress gateway, it subscribes to role events. When the role of the egress gateway changes, it reports to the controller through the Netconf channel.
[0067] 2. The egress gateway adds an external network port to support the BFD echo function, and the destination MAC of the message encapsulates the MAC address of the external network gateway for detecting the external network port; when the controller carries access to the external network service, on the basis of the original configuration, the BFD detection configuration is added and issued, so that fault detection can be performed on the direct link between the egress gateway and the external network gateway; when the BFD detection fails, it is reported to the controller through the Netconf channel.
[0068] 3. VRRP is still deployed on the service port. During the initial configuration, a random egress gateway is selected and configured with a high priority to make it the Master. When the Master service port fails, the Slave can be directly upgraded to the Master.
[0069] 4. The controller determines whether the device management port is faulty by disconnecting the Netconf channel between the controller and the egress gateway (hereinafter referred to as loss of connection).
[0070] 5. The controller adds a new flag (cluster business working status) to indicate whether the egress gateway cluster can work normally. If the cluster cannot work normally (the value is False), an alarm needs to be sent urgently, and when a new business is launched, an error needs to be returned immediately to let users know that the business is abnormal, so as to conduct emergency troubleshooting.
[0071] like Figure 3 As shown in FIG. 1 , a flow chart of a method for switching between active and standby gateway clusters in a cloud scenario based on SDN (I). Figure 3 As shown in the figure, when the controller senses that the Master is disconnected, it first confirms whether the Slave is also disconnected. If the Slave is also disconnected, it means that the entire egress gateway cluster is faulty, or the controller cluster is faulty. At this time, an emergency alarm is required, and the service working status of the cluster is set to False, and no other processing is performed. If the Slave management port is normal and the BFD session status of the external network port is normal, it means that the current status of the Slave is normal. The controller sends the configuration through Netconf to increase the priority of VRRP, so that the Slave preempts the Master and becomes the new Master, ensuring that the traffic remains normal when the subsequent business changes.
[0072] like Figure 4 As shown in FIG. 2 , a flow chart of a method for switching between active and standby gateway clusters in a cloud scenario based on SDN (II) is shown. Figure 4 As shown in the figure, the connection between the Master and the controller is normal, but when the external network port fails, the processing flow is as follows:
[0073] A) Check whether the connection status of the slave is normal. If it is not normal, it means that the cluster is faulty. Set the business working status of the cluster to False and do not perform other processing. If it is normal, continue with the subsequent processing.
[0074] B) Check whether the BFD session of the slave's external network port is normal. If it is not normal, it means that the cluster is faulty. Set the service working status of the cluster to False and do not perform other processing. If it is normal, continue with the subsequent processing.
[0075] C) Check whether the service port link of the slave is normal. If it is not normal, it means that the cluster is faulty. Set the service working status of the cluster to False and do not perform other processing. If it is normal, continue with the subsequent processing.
[0076] D) At this point, it means that the slave can carry services normally. The controller sends configurations through Netconf to increase the priority of VRRP, so that the slave can seize the master and become the new master, ensuring that traffic remains normal when subsequent services change.
[0077] like Figure 5 As shown in FIG. 3 , a flow chart of a method for switching between active and standby gateway clusters in a cloud scenario based on SDN is shown in FIG. Figure 5 As shown in the figure, when the controller receives the Slave role change message, it needs to quickly confirm whether it is a dual-active state or a normal active-standby switch. The specific processing flow is as follows:
[0078] Step A) confirm whether the old Master is disconnected. If so, proceed to step F); otherwise, proceed to step B);
[0079] Step B) Check whether the old Master is still the Master. If it is no longer the Master, it means that the master-slave switch is normal. You only need to record the new Master information. If the old Master is still the Master, it means that the cluster has entered a dual-master state. The controller needs to intervene to decide the Master and quickly restore the traffic. Go to step C);
[0080] Step C) Check whether the BFD session of the old Master's external network port is normal. If the session status is Down, go to step F); otherwise, go to step D);
[0081] Step D) Check whether the service port link of the old Master is normal. If not, proceed to step F). Otherwise, proceed to step E).
[0082] Step E) In the dual-master state, it means that the old master has not failed. The controller forcibly shuts down the slave to ensure that the virtual IP falls only on the old master and the business traffic is still forwarded from the original master. Send an alarm and check the heartbeat link between the master and slave;
[0083] Step F) The old Master fails. Confirm whether the new Master is normal. Check whether the BFD session of the new Master's external network port is normal. If the session status is Down, it means that the cluster has failed. Set the cluster's service working status to False and do nothing else. Otherwise, go to step G);
[0084] Step G) Check whether the service port link of the new Master is normal. If it is not normal, it means that the cluster is faulty, and the service working status of the cluster is set to False without any other processing. Otherwise, go to step H);
[0085] Step H) In the dual-master state, the old master fails and the new master service is normal. The controller forcibly shuts down the old master to ensure that the virtual IP falls only on the new master and the service traffic is switched to the new master for forwarding. Send an alarm and check the master.
[0086] Through the solution provided by this embodiment, 1) when the external network port link fails, the active-standby switch can be performed, thereby improving the reliability of the system; 2) when the management port link fails, the active-standby switch can be performed to ensure that new services are not affected; 3) when the cluster has dual actives, it can automatically recover; 4) cluster failures are quickly perceived; 5) there is no need to add separate equipment, and the cost and complexity of the network are not increased.
[0087] The master-slave switching method of the cloud scenario gateway cluster based on SDN takes the external network port failure of the Master as an example. Figure 6 As described above, a deployment diagram of a cloud scenario gateway cluster master-slave switching system based on SDN (II). Figure 6 As shown:
[0088] In this embodiment, a schematic diagram of the deployment of a cloud scenario gateway cluster based on SDN is shown in FIG. Figure 2 As shown in the figure, the controller manages egress gateway 1 (equivalent to the first egress gateway) and egress gateway 2 (equivalent to the second egress gateway), subscribes to the role time, and reports to the controller through the Netconf channel when the role of the egress gateway changes. At the same time, VRRP is configured on the egress gateway service port through Netconf, and a high priority of 100 is set on egress gateway 1 and a low priority of 80 is set on egress gateway 2.
[0089] 2. Egress Gateway 1 and Egress Gateway 2 negotiate VRRP to determine that the Master is Egress Gateway 1 and the Slave is Egress Gateway 2, and report the roles to the controller through Netconf. The controller records the role information.
[0090] 3. The user adds an extranet service. The controller sends BFD echo configuration to the extranet ports on egress gateway 1 and egress gateway 2 at the same time, detects the extranet gateway IP address, and reports the detection result to the controller.
[0091] 4. The cloud host accesses the external network through egress gateway 1.
[0092] 5. If Figure 6As shown in the figure, the external network port of egress gateway 1 suddenly became abnormal. The controller received the BFD Session Down event reported by egress gateway 1. Checking the connection status of Slave (egress gateway 2) is normal, the BFD session of the external network port is normal, and the service port link is also normal, indicating that Slave can carry services normally. Therefore, the controller sends down the configuration through Netconf, increases the VRRP priority of egress gateway 2 to 120 and immediately seizes it, making egress gateway 2 become Master and egress gateway 1 become Slave. The traffic from the cloud host to the external network is sent out through egress gateway 2, and the service traffic quickly returns to normal.
[0093] Through the solution provided in this embodiment, regardless of whether a failure occurs in the management port, business port or external network port, effective master-slave switching can be performed, and when dual masters appear in the device, the dual masters can be automatically broken, reducing packet loss time and improving system stability.
[0094] In this embodiment, an effective election method is proposed to improve system stability by detecting multiple links of the active and standby cluster of the cloud scenario egress gateway, combining technologies such as VRRP and BFD, and introducing a third-party SDN controller to participate in the cluster active and standby election:
[0095] 1. The controller uses BFD detection configuration to detect faults in the direct link between the egress gateway and the external network gateway and participates in decision-making, effectively solving the problem of abnormal traffic when the Master and controller are connected normally but the external network port fails;
[0096] 2. When there are two active servers in the cluster, the controller performs functional evaluation through BFD and device connection status, participates in decision-making, and effectively solves the problem of abnormal dual-active server traffic.
[0097] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0098] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0099] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0100] S1, the cloud scenario gateway cluster consists of two egress gateways, including three connection ports, wherein the egress gateway includes a first egress gateway and a second egress gateway, the first egress gateway and the second egress gateway have priorities, and the three connection ports include a management port, a service port, and an external network port.
[0101] S2, the management port is used to connect to the SDN controller, the service port is used to establish a VXLAN channel with the host in the cloud, and the external network port is used to connect to the external network.
[0102] S3, when the SDN controller manages the egress gateway, it subscribes to the role event. When the priority of the first egress network and the second egress gateway changes, it reports to the SDN controller through the Netconf channel.
[0103] S4: The egress gateway adds an external network port to support the BFD echo function, and the destination MAC of the message encapsulates the MAC address of the external network gateway for detecting the external network port.
[0104] S5: When the SDN controller carries the external network service, the bidirectional forwarding detection BFD configuration is added and delivered to detect the fault of the direct link between the egress gateway and the external network gateway; when the BFD detection fails, it is reported to the SDN controller through the Netconf channel.
[0105] S6, deploy the routing fault tolerance protocol VRRP on the service port. During the initial configuration, randomly select an egress gateway and configure it with a high priority to make it the master router Master. When the Master service port fails, the backup router Slave can be directly upgraded to Master.
[0106] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0107] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0108] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0109] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0110] S1, the cloud scenario gateway cluster consists of two egress gateways, including three connection ports, wherein the egress gateway includes a first egress gateway and a second egress gateway, the first egress gateway and the second egress gateway have priorities, and the three connection ports include a management port, a service port, and an external network port.
[0111] S2, the management port is used to connect to the SDN controller, the service port is used to establish a VXLAN channel with the host in the cloud, and the external network port is used to connect to the external network.
[0112] S3, when the SDN controller manages the egress gateway, it subscribes to the role event. When the priority of the first egress network and the second egress gateway changes, it reports to the SDN controller through the Netconf channel.
[0113] S4: The egress gateway adds an external network port to support the BFD echo function, and the destination MAC of the message encapsulates the MAC address of the external network gateway for detecting the external network port.
[0114] S5: When the SDN controller carries the external network service, the bidirectional forwarding detection BFD configuration is added and delivered to detect the fault of the direct link between the egress gateway and the external network gateway; when the BFD detection fails, it is reported to the SDN controller through the Netconf channel.
[0115] S6, deploy the routing fault tolerance protocol VRRP on the service port. During the initial configuration, randomly select an egress gateway and configure it with a high priority to make it the master router Master. When the Master service port fails, the backup router Slave can be directly upgraded to Master.
[0116] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0117] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0118] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A cloud scenario gateway cluster master-slave switching method based on SDN, characterized in that: include: The cloud scenario gateway cluster is composed of two egress gateways, including three connection ports, wherein the egress gateway includes a first egress gateway and a second egress gateway, the first egress gateway and the second egress network have priorities, and the three connection ports include a management port, a service port, and an external network port; The management port is used to connect to the SDN controller, the service port is used to establish a VXLAN channel with the host in the cloud, and the external network port is used to connect to the external network; When the SDN controller manages the egress gateway, it subscribes to the role event, and when the priorities of the first egress network and the second egress gateway change, it reports to the SDN controller through the Netconf channel; The egress gateway adds an external network port to support the BFD echo function, and the destination MAC of the message encapsulates the MAC address of the external network gateway for detecting the external network port; when the SDN controller carries access to the external network service, a bidirectional forwarding detection BFD configuration is added and issued to perform fault detection on the direct link between the egress gateway and the external network gateway; when the BFD detection fails, it is reported to the SDN controller through the Netconf channel; Deploy the routing fault tolerance protocol VRRP on the service port. During the initial configuration, randomly select an egress gateway with a high priority to make it the master router. When the service port of the Master fails, the backup router Slave can be directly upgraded to the Master. When the SDN controller receives the role change message of the Slave, it confirms that the old Master is disconnected and the BFD session status of the new Master's external network port is Down, which indicates a cluster failure. The service working status of the cluster is set to False without any other processing. Confirm that the old Master is disconnected, the BFD session status of the new Master's external network port is UP, and the service port link of the new Slave is abnormal, which indicates that the cloud scene gateway cluster is faulty. Set the service working status of the cloud scene gateway cluster to False and do not perform other processing; Confirm that the old master is disconnected, the BFD session status of the new master's external network port is UP, the service port link of the new slave is normal, and the service port link of the new slave is normal. In the dual-active state, the old master fails and the new master service is normal. The controller forcibly shuts down the old master to ensure that the virtual IP falls only on the new master, and the service traffic is switched to the new master for forwarding; Confirm that the old master is still connected and that it is still the master. If it is no longer the master, it indicates that the master-slave switchover is normal. Record the new master information. If the role of the old Master is still the Master, it means that the cloud scenario gateway cluster has entered a dual-master state. The SDN controller intervenes and decides on the Master to quickly restore traffic.
2. The method according to claim 1, characterized in that: The method further comprises: When the SDN controller senses that the Master is disconnected and the Slave is also disconnected, it is determined that the cloud scenario gateway cluster is faulty or the SDN controller cluster is faulty; Set the business working status of the cloud scenario gateway cluster to False, and do no other processing; If the Slave management port is normal and the BFD session status of the external network port is normal, it means that the current status of the Slave is normal. The SDN controller sends configurations through Netconf to upgrade the priority of VRRP, so that the Slave seizes the Master and becomes the new Master, ensuring that the traffic remains normal when subsequent services change.
3. The method according to claim 1, characterized in that When the connection between the Master and the SDN controller is normal and the external network port fails, the method further includes: If the connection status of the Slave is abnormal, it means that the cloud scene gateway cluster is faulty, and the business working status of the cloud scene gateway cluster is set to False without any other processing; If the connection status of the Slave is normal, continue with the first subsequent processing, including: If the BFD session of the external network port of the Slave is abnormal, it indicates that the cloud scene gateway cluster is faulty, and the service working state of the cloud scene gateway cluster is set to False without any other processing; If the external network port BFD session of the slave is normal, the second subsequent process is continued, including: If the service port link of the Slave is abnormal, it means that the cloud scene gateway cluster is faulty, and the service working status of the cloud scene gateway cluster is set to False without any other processing; If the service port link of the Slave is normal, it means that the Slave is carrying the service normally; the SDN controller sends configurations through Netconf to upgrade the priority of VRRP, so that the Slave preempts the Master and becomes the new Master, ensuring that the traffic remains normal when the subsequent service changes.
4. The method according to claim 1, characterized in that: When the cloud scenario gateway cluster enters a dual-active state, the method includes: Check that the BFD session status of the old Master's external network port is normal, and the old Master's service port link is normal, indicating that the old Master has not failed. The SDN controller forcibly shuts down the Slave to ensure that the virtual IP only falls on the old Master, the service traffic is still forwarded from the original Master, an alarm is sent, and the heartbeat link between the master and the slave is checked.
5. The method according to claim 4, characterized in that When the cloud scenario gateway cluster enters a dual-active state, the method includes: If the BFD session status of the old master's external network port is abnormal or the link of the old master's service port is abnormal, the BFD session status of the new master's external network port is Up, the link of the new slave's service port is normal, the old master fails, and the new master's service is normal, the controller forcibly shuts down the old master to ensure that the virtual IP falls only on the new master and the service traffic is switched to the new master for forwarding.
6. The method according to claim 5, characterized in that When the cloud scenario gateway cluster enters a dual-active state, the method includes: If the BFD session status of the external network port of the old Master is abnormal, or the service port link of the old Master is abnormal, and the BFD session status of the external network port of the new Master is Down, it means that the cloud scenario gateway cluster fails. The service working status of the cloud scenario gateway cluster is set to False, and no other processing is performed.
7. The method according to claim 6, characterized in that When the cloud scenario gateway cluster enters a dual-active state, the method includes: If the BFD session status of the old Master's external network port is abnormal or the link of the old Master's service port is abnormal, the BFD session status of the new Master's external network port is UP and the link of the new Slave's service port is abnormal, it means that the cloud scenario gateway cluster is faulty. Set the service working status of the cloud scenario gateway cluster to False and do not perform other processing.
8. The method according to claim 1, characterized in that The method comprises: When an abnormality suddenly occurs at the external network port of the first egress gateway, the SDN controller receives the BFD Session Down event reported by the first egress gateway, and checks that the connection status of the second egress gateway of the slave is normal, the BFD session of the external network port is normal, and the service port link is also normal, indicating that the slave can carry the service normally. The SDN controller sends down the configuration through Netconf, increases the VRRP priority of the second egress gateway and immediately seizes it, so that the second egress gateway becomes the Master and the first egress gateway becomes the Slave. The traffic of the cloud host accessing the external network is sent through the second egress gateway, and the service traffic quickly returns to normal.
9. A cloud scenario gateway cluster master-slave switching system based on SDN, characterized in that: include: The cloud scenario gateway cluster is composed of two egress gateways, including three connection ports, wherein the egress gateway includes a first egress gateway and a second egress gateway, the first egress gateway and the second egress network have priorities, and the three connection ports include a management port, a service port, and an external network port; The management port is used to connect to the SDN controller, the service port is used to establish a VXLAN channel with the host in the cloud, and the external network port is used to connect to the external network; When the SDN controller manages the egress gateway, it subscribes to the role event, and when the priorities of the first egress network and the second egress gateway change, it reports to the SDN controller through the Netconf channel; The egress gateway adds an external network port to support the BFD echo function, and the destination MAC of the message encapsulates the MAC address of the external network gateway for detecting the external network port; when the SDN controller carries access to the external network service, a bidirectional forwarding detection BFD configuration is added and issued to perform fault detection on the direct link between the egress gateway and the external network gateway; when the BFD detection fails, it is reported to the SDN controller through the Netconf channel; Deploy the routing fault tolerance protocol VRRP on the service port. During the initial configuration, randomly select an egress gateway with a high priority to make it the master router. When the service port of the Master fails, the backup router Slave can be directly upgraded to the Master. When the SDN controller receives the role change message of the Slave, it confirms that the old Master is disconnected and the BFD session status of the new Master's external network port is Down, which indicates a cluster failure. The service working status of the cluster is set to False without any other processing. Confirm that the old Master is disconnected, the BFD session status of the new Master's external network port is UP, and the service port link of the new Slave is abnormal, which indicates that the cloud scene gateway cluster is faulty. Set the service working status of the cloud scene gateway cluster to False and do not perform other processing; Confirm that the old master is disconnected, the BFD session status of the new master's external network port is UP, the service port link of the new slave is normal, and the service port link of the new slave is normal. In the dual-active state, the old master fails and the new master service is normal. The controller forcibly shuts down the old master to ensure that the virtual IP falls only on the new master, and the service traffic is switched to the new master for forwarding; Confirm that the old master is still connected and that it is still the master. If it is no longer the master, it indicates that the master-slave switchover is normal. Record the new master information. If the role of the old Master is still the Master, it means that the cloud scenario gateway cluster has entered a dual-master state. The SDN controller intervenes and decides to be the Master, so that the traffic can be restored quickly.
