CN107276846B - Gateway disaster tolerance method, device and storage medium - Google Patents

Gateway disaster tolerance method, device and storage medium Download PDF

Info

Publication number
CN107276846B
CN107276846B CN201710423016.7A CN201710423016A CN107276846B CN 107276846 B CN107276846 B CN 107276846B CN 201710423016 A CN201710423016 A CN 201710423016A CN 107276846 B CN107276846 B CN 107276846B
Authority
CN
China
Prior art keywords
gateway
gateway device
network
address
connection information
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
CN201710423016.7A
Other languages
Chinese (zh)
Other versions
CN107276846A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710423016.7A priority Critical patent/CN107276846B/en
Publication of CN107276846A publication Critical patent/CN107276846A/en
Application granted granted Critical
Publication of CN107276846B publication Critical patent/CN107276846B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/252Store and forward routing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a gateway disaster recovery method, a device and a storage medium; the embodiment of the invention adopts the steps that heartbeat packets are sent to other gateway devices and a switch in a gateway device cluster, the heartbeat packets sent by the other gateway devices are received, when the heartbeat packets sent by the other gateway devices are not received in a preset time period, the other gateway devices are determined to have faults, first network outlet addresses configured on the other gateway devices are obtained, and the first network outlet addresses are distributed to normal gateway devices in the gateway device cluster for taking over; according to the scheme, the gateway devices in the gateway device cluster can mutually send heartbeat packets to detect the fault gateway devices in the cluster, and when the fault gateway devices are detected, other normal gateway devices in the cluster can take over the first network outlet addresses on the fault gateway devices, so that the problem that services are not used due to the fault of the gateway devices is solved, and the service loss is greatly reduced.

Description

Gateway disaster tolerance method, device and storage medium
Technical Field
The invention relates to the technical field of communication, in particular to a gateway disaster recovery method, a gateway disaster recovery device and a storage medium.
Background
The Gateway (Gateway) is also called an internetwork connector and a protocol converter. The gateway realizes network interconnection above a network layer, is the most complex network interconnection equipment and is only used for interconnection of two networks with different high-level protocols. The gateway can be used for interconnection of both wide area networks and local area networks. A gateway is a computer system or device that acts as a switch-operative. The gateway is a translator used between two systems that differ in communication protocol, data format or language, or even in an entirely different architecture.
At present, in the field of communications, communications between two networks may be implemented through a gateway device cluster, for example, data communications between an intranet and an extranet may be implemented through the gateway device cluster. However, in some cases, services are not available due to frequent failures of some gateway devices within the cluster of gateway devices, resulting in significant traffic loss.
Disclosure of Invention
Embodiments of the present invention provide a gateway disaster recovery method, apparatus, and storage medium, which can reduce service loss caused by a gateway device failure.
The embodiment of the invention provides a gateway disaster recovery method, which is suitable for gateway equipment in a gateway equipment cluster, and comprises the following steps:
sending heartbeat packets to other gateway devices and switches in the gateway device cluster;
receiving heartbeat packets sent by other gateway devices;
when the heartbeat packets sent by the other gateway equipment are not received within a preset time period, determining that the other gateway equipment fails;
acquiring a first network outlet address configured on the other gateway equipment;
and allocating the first network outlet address to a normal gateway device in the gateway device cluster to take over.
Correspondingly, another gateway disaster recovery method is provided in an embodiment of the present invention, which is applicable to a network switch, and includes:
receiving a heartbeat packet sent by target gateway equipment in a gateway equipment cluster;
when a heartbeat packet sent by target gateway equipment is not received within a preset time period, determining that the target gateway equipment fails;
sending traffic data to other gateway equipment based on the routing of the address issued by the other gateway equipment so that the other gateway equipment can forward the traffic data to a corresponding network switch; the address includes a first network egress address or a second network ingress address on the target gateway device.
Correspondingly, an embodiment of the present invention further provides a gateway disaster recovery apparatus, which is applicable to a gateway device in a gateway device cluster, and includes:
the heartbeat sending unit is used for sending heartbeat packets to other gateway devices and the switch in the gateway device cluster;
a heartbeat receiving unit, configured to receive a heartbeat packet sent by the other gateway device;
the failure determining unit is used for determining that the other gateway equipment fails when the heartbeat packet sent by the other gateway equipment is not received within a preset time period;
an address obtaining unit, configured to obtain a first network egress address configured on the other gateway device;
and the allocation unit is used for allocating the first network outlet address to a normal gateway device in the gateway device cluster to take over.
Correspondingly, an embodiment of the present invention further provides another gateway disaster recovery device, which is applicable to a network switch, and includes:
the heartbeat receiving unit is used for receiving a heartbeat packet sent by target gateway equipment in the gateway equipment cluster;
the device comprises a fault determining unit, a judging unit and a judging unit, wherein the fault determining unit is used for determining that the target gateway equipment has a fault when a heartbeat packet sent by the target gateway equipment is not received within a preset time period;
the data sending unit is used for sending the traffic data to other gateway equipment based on the routing of the address issued by the other gateway equipment so that the other gateway equipment can forward the traffic data to a corresponding network switch; the address includes a first network egress address or a second network ingress address on the target gateway device.
Correspondingly, the embodiment of the present invention further provides a storage medium, where the storage medium stores instructions, and the instructions, when executed by a processor, implement the steps of any of the methods provided in the embodiment of the present invention.
The embodiment of the invention adopts the steps that heartbeat packets are sent to other gateway devices and a switch in a gateway device cluster, the heartbeat packets sent by the other gateway devices are received, when the heartbeat packets sent by the other gateway devices are not received in a preset time period, the other gateway devices are determined to have faults, first network outlet addresses configured on the other gateway devices are obtained, and the first network outlet addresses are distributed to normal gateway devices in the gateway device cluster for taking over; according to the scheme, the gateway devices in the gateway device cluster can mutually send heartbeat packets to detect the fault gateway devices in the cluster, and when the fault gateway devices are detected, other normal gateway devices in the cluster can take over the first network outlet addresses on the fault gateway devices, so that the problem that services are not used due to the fault of the gateway devices is solved, and the service loss is greatly reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1a is a schematic flowchart of a gateway disaster recovery method according to an embodiment of the present invention;
fig. 1b is a schematic diagram of sending heartbeat packets by multicast between LDs according to an embodiment of the present invention;
FIG. 1c is a schematic diagram of long connection synchronization provided by an embodiment of the present invention;
FIG. 2a is a schematic structural diagram of a network data interaction system according to an embodiment of the present invention;
fig. 2b is another schematic diagram of a gateway disaster recovery method according to an embodiment of the present invention;
FIG. 2c is a schematic structural diagram of a network data interaction system according to an embodiment of the present invention;
fig. 3a is a schematic structural diagram of a gateway disaster recovery device according to an embodiment of the present invention;
fig. 3b is a schematic structural diagram of a gateway disaster recovery device according to an embodiment of the present invention;
fig. 3c is a schematic structural diagram of a gateway disaster recovery device according to an embodiment of the present invention;
fig. 3d is a schematic diagram illustrating a fourth structure of a gateway disaster recovery device according to an embodiment of the present invention;
fig. 3e is a schematic structural diagram of a fifth example of a gateway disaster recovery device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a sixth disaster recovery device for a gateway according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
The embodiment of the invention provides a gateway disaster recovery method, a gateway disaster recovery device and a storage medium. The details will be described below separately.
The first embodiment,
This embodiment will be described from the perspective of a gateway disaster recovery apparatus, where the gateway disaster recovery apparatus is specifically in a gateway device cluster, and the gateway device may be a device providing a gateway function, such as a server providing the gateway function.
A gateway disaster recovery method is suitable for gateway equipment in a gateway equipment cluster, and comprises the following steps: the method comprises the steps of sending heartbeat packets to other gateway devices and switches in a gateway device cluster, receiving the heartbeat packets sent by the other gateway devices, determining that the other gateway devices are in failure when the heartbeat packets sent by the other gateway devices are not received in a preset time period, obtaining a first network outlet address configured on the other gateway devices, and allocating the first network outlet address to a normal gateway device in the gateway device cluster for taking over.
As shown in fig. 1a, a specific flow of the gateway disaster recovery method may be as follows:
101. and sending heartbeat packets to other gateway devices and the switch in the gateway device cluster.
In this embodiment, the gateway device may include a device that provides a Network Address Translation (NAT) gateway function, for example, an LD (server that provides a NAT gateway function), and the like.
The method for sending the heartbeat packet may include a multicast sending method, and the like, for example, the heartbeat packet may be sent to other gateway devices or switches in the network management device cluster in a multicast manner, and at this time, the heartbeat packet is a multicast packet.
The other gateway devices may be gateway devices other than the other gateway devices in the gateway device cluster. For example, when the gateway device cluster includes the gateway device 1 and the gateway device 2 … …, the gateway device 1 may multicast and send heartbeat packets to the gateway device 2 and the gateway device 3 … …, respectively, the gateway device 2 may multicast and send heartbeat packets to the gateway device 1 and the gateway device 3 … …, and the gateway device i may send heartbeat packets to the gateway device 1 … …, the gateway device i +1 … …, and the like.
Referring to fig. 1b, taking the gateway device as an LD as an example, a process of receiving a heartbeat packet multicast by the gateway devices in the cluster. As shown in fig. 1b, LD1 may send heartbeat packets to LD2, LD3, and LD4 by multicast, and LD2, LD3, and LD4 may also send heartbeat packets to LD1 by multicast; as shown in fig. 1b, the LDs send heartbeat packets by UDP (User Datagram Protocol) multicast, where the heartbeat packets are UDP multicast packets.
The method of this embodiment may further send a heartbeat packet to the switch, where the switch may include: the switch in the network to which the gateway device is connected, for example, the network to which the gateway device is connected is the first network and the second network, respectively, in this case, the switch may include a switch in the first network and/or the second network. The first network may be a Wide Area Network (WAN), such as a public network, an extranet, etc., and correspondingly, the second network may be a Local Area Network (LAN), such as a private network, an intranet, etc.
Alternatively, the heartbeat packet may be sent to a switch that is hung down from the gateway device, for example, the heartbeat packet may be multicast sent to a switch that is hung down from the gateway device in the first network or the second network.
Optionally, this embodiment may also send heartbeat packets to other gateway devices and switches in the gateway device cluster at intervals, where the interval may be set according to actual requirements, such as 1s, 2s, and so on.
102. And receiving the heartbeat packet sent by the other gateway equipment.
In this embodiment, the time sequence of steps 101 and 102 is not limited by the sequence number, and the sending of the heartbeat packet and the receiving of the heartbeat packet may be performed simultaneously or sequentially.
For example, the gateway device 1 may receive heartbeat packets multicast by the gateway device 2 and the gateway device 3 … …, respectively, the gateway device 2 may receive heartbeat packets multicast by the gateway device 1 and the gateway device 3 … …, respectively, the gateway device i may receive heartbeat packets multicast by the gateway device 1 … …, the gateway device i +1 … …, respectively, and the like.
103. And when the heartbeat packet sent by the other gateway equipment is not received within a preset time period, determining that the other gateway equipment fails.
Since a gateway device stops sending heartbeat packets to other gateway devices when a certain gateway device sends a failure, if a heartbeat packet sent by a certain gateway device is not received within a preset time period, the gateway device may be considered to have a failure.
The preset time period can be set according to actual requirements, such as 1 minute, 2 minutes, and the like.
For example, when the gateway device 1 does not receive the heartbeat packet sent by other gateway devices in the cluster, such as the gateway device 2 and the gateway device 3, in a preset time period, it may be determined that the other gateway devices, such as the gateway device 2 and the gateway device 3, have a fault; similarly, when the gateway device i does not receive other gateway devices in the cluster, such as the gateway device 1, the gateway device n, and the like, in a preset time period, it may be determined that the other gateway devices, such as the gateway device 1, the gateway device n, and the like, have a fault.
104. And acquiring the first network outlet address configured on the other gateway equipment.
For example, when the gateway device 1 determines that the gateway device 2 has a failure, the first network egress address locally configured by the gateway device 2 may be acquired.
The first network egress address is an egress address of a first network to which the gateway device is connected in a cluster, for example, when the first network is an external network, the first network egress address may be an external gateway network address, such as an external NAT gateway IP (i.e., TVS VIP).
Alternatively, the first network egress address may be configured in only one gateway device, that is, each gateway device in the cluster configures a respective first network egress address, such as a TVS VIP, locally.
105. The first network egress address is assigned to a normal gateway device takeover in the cluster of gateway devices.
If a certain gateway device fails and other normal gateway devices need to take over the exit address of the failed gateway device, the first network exit address configured on the failed gateway device needs to be acquired, and then the first network exit address configured on the failed gateway device is allocated to the normal gateway device in the cluster to take over.
For example, when configured on a failed gateway device includes multiple first network egress addresses, such as TVS VIP1, TVS VIP2, TVS VIP3, multiple first network egress addresses, such as TVS VIP, may be assigned to normal gateway device takeover within the cluster. Such as assigning TVS VIP1 to normal gateway device 1 takeover, TVS VIP2 to self-takeover, TVS VIP3 to normal gateway device 3 takeover, and so on.
The specific allocation mode can be set according to actual requirements, and each gateway device in the cluster can adopt the same allocation mode to ensure that the allocation schemes of the gateway devices in the cluster are consistent.
Specifically, the step of "assigning the first network egress address to a normal gateway device takeover in the gateway device cluster" may include:
when the gateway equipment is normal gateway equipment, determining a target first network outlet address which needs to be taken over by the gateway equipment from the first network outlet addresses;
configuring the target first network egress address locally at the gateway device;
a route for the target first network egress address is issued to the first network switch.
The first network switch is a switch in the first network, such as an external network access switch.
For example, when the gateway device i does not receive the heartbeat packet sent by the gateway device k within a preset time period, the gateway device i determines that the gateway device k fails, and may acquire the first network outlet address configured on the gateway device k, such as TVS VIP1, TVS VIP2, TVS VIP3 … … TVS VIPm; the gateway device i determines a first network egress address that a normal gateway device needs to take over according to a preset allocation manner, for example, determines a target first network egress address (e.g., TVS VIPj) that the gateway device i itself needs to take over, at this time, the gateway device i may locally configure the target first network egress address (e.g., TVS VIPj), and then, issues a route of the target first network egress address (e.g., TVS VIPj) to a switch in the first network.
In this embodiment, an OSPF (Open Shortest Path First) dynamic routing protocol may be adopted to issue a route of a First network egress address (e.g., TVS VIPj) to a switch.
Alternatively, when the first network switch determines that the gateway device to which the first network switch belongs has a failure, the traffic data may be sent to the gateway device that takes over the first network egress address (e.g., TVS VIP) of the failed gateway device, and the traffic data may be converted to the corresponding second network switch by the egress address taking over gateway device. That is, after issuing the route of the target first network egress address, the gateway disaster recovery method in this embodiment may further include:
receiving the traffic data sent by the first network switch based on the route;
and acquiring a local connection information list for data forwarding, and forwarding the traffic data to the corresponding second network switch based on the local connection information list.
The traffic data may carry a source address, a source port, protocol information, a destination address, a destination port, etc., and the destination address may be a destination first network egress address. After receiving the traffic data, the gateway device may query a corresponding data forwarding connection according to the destination address, the destination port, and the connection information list, and then forward the traffic data to a corresponding second network switch through the queried connection, and forward the traffic data to the final network device through the second network switch.
For example, when the first network is an external network and the second network is an internal network, the traffic data may carry a quintuple (server _ ip, server _ port, proto, vip, vport); the extranet switch may send the data to the gateway device that takes over the vip, and the gateway device converts the vip and vport into rs _ ip and rsport, then queries the connection information list to obtain forwarding connection of the traffic data to the intranet server rs, and forwards the traffic data to the corresponding intranet switch through the queried connection.
The connection information may be port information, protocol information, and address information corresponding to the connection, and for example, the connection information may include a source address, a source port, protocol information, a destination address, and a destination port corresponding to the connection.
For example, when the first network is an extranet and the second network is an intranet, and the extranet server (server) returns traffic data to the intranet server (rs), the connection information may include: and connecting corresponding quintuple (server _ ip, server _ port, proto, vip and vport), wherein the server _ ip is the address of an external network server, namely a source address, the server _ port is the port of an external network service, namely a source port, proto is protocol data, vip is a destination address, and vport is a destination port.
When the intranet server (rs) accesses the extranet server (server), the connection information may include: and connecting corresponding quintuple (rs _ ip, rs _ port, proto, server _ ip, server _ port), wherein rs _ ip is the address of the intranet server, namely a source address, rs _ port is the port of the intranet server, proto is protocol data, server _ ip is the address of the extranet server, namely a destination address, and server _ port is the port of the extranet service, namely a destination port.
The connection may be a long connection, which refers to a connection that has a time-to-live exceeding a preset time from completion of the establishment, such as a connection that has a time-to-live exceeding 5 seconds from completion of the establishment to the present.
Optionally, in order to enable the normal gateway device to implement data forwarding of the faulty gateway device, the connection information of the gateway devices in the cluster may be synchronized in this embodiment. That is, the gateway disaster recovery method in this embodiment may further include:
sending the connection information on the gateway equipment to other gateway equipment, and receiving the connection information sent by other gateway equipment;
and updating a local connection information list according to the connection information sent by the other gateway equipment.
For example, the gateway device may perform connection information synchronization with other gateway devices in a multicast manner, and refer to fig. 1c, which is a schematic diagram of connection synchronization in which the gateway device is an LD and the connection is a long connection.
After the connection information synchronization, the local connection information lists of the gateway devices in the cluster can be kept consistent, so that when a certain gateway device fails, other gateway devices can forward data normally, and the availability and stability of gateway services are improved.
Optionally, in order to ensure that the data of the second network is forwarded to the first network when the gateway device fails, the method of this embodiment may further include:
issuing a route for a second network entry address to a second network switch, the second network switch including the second network switch under the failed gateway device, the second network entry address including a second network entry address on the failed gateway device;
receiving the traffic data sent by the second network switch based on the route;
and forwarding the traffic data sent by the second network machine to the corresponding first network switch.
The second network entry address is an entry address of a second network in cluster connection with the gateway device, where the second network may be a local area network, such as an intranet and a private network, and at this time, the second network entry address may be an intranet entry address, such as an intranet entry IP (i.e., a TSV VIP) in an NAT gateway.
Typically, a second network entry address, such as a TSV VIP, is configured on each gateway device in the same gateway device cluster, and therefore, when a gateway device fails, the remaining normal gateway devices may issue a route for the second network entry address, such as the TSV VIP, on the failed gateway device to a second network switch under the failed gateway device. The second network switch under the faulty gateway device may send second network data to other normal gateway devices based on the route, and the other normal gateway devices may forward the second network data to the corresponding first network switch after receiving the second network data, thereby achieving the corresponding devices in the first network.
The traffic data sent by the second network switch may carry a source address, a source port, protocol information, a destination address, a destination port, and the like.
For example, when the first network is an external network and the second network is an internal network, and when the internal network server (rs) accesses the external network server (server), the internal network server sends traffic data to the corresponding normal gateway device, where the traffic data carries quintuple (rs _ ip, rs _ port, proto, server _ ip, and server _ port), and the normal gateway device can replace rs _ ip and rs _ port with vip and vport, then query for a connection for data forwarding based on vip, vport, server _ ip, and server _ port, and send the data to the corresponding external network switch through the queried connection, thereby achieving the corresponding external network server (server).
As can be seen from the above, in the embodiment of the present invention, heartbeat packets are sent to other gateway devices and switches in a gateway device cluster, and the heartbeat packets sent by the other gateway devices are received, when the heartbeat packets sent by the other gateway devices are not received within a preset time period, it is determined that the other gateway devices are failed, a first network egress address configured on the other gateway devices is obtained, and the first network egress address is allocated to a normal gateway device in the gateway device cluster to take over. According to the scheme, the heartbeat packets can be mutually sent by the gateway devices in the gateway device cluster to detect the fault gateway devices in the cluster, and when the fault gateway devices are detected, other normal gateway devices in the cluster can take over the first network outlet addresses on the fault gateway devices, so that the problem that services are not used due to the faults of the gateway devices is solved, the service loss is greatly reduced, and the disaster recovery switching efficiency is improved.
Example II,
The method described in the first embodiment is described in further detail below.
As shown in fig. 2a, the present embodiment provides a network data interaction system, which includes: the system comprises a gateway equipment cluster, a first network switch and a second network switch; the gateway device cluster may be a device providing a gateway function, such as a server (LD) providing a NAT gateway function, and is connected to the first network switch through the first network and connected to the second network switch through the second network.
The gateway disaster recovery method of the present invention will be further described based on the network data interaction system shown in fig. 2 a.
As shown in fig. 2b, a gateway disaster recovery method may specifically include the following processes:
201. and each gateway device sends heartbeat packets to other gateway devices, the first network switch and the second network switch in the gateway device cluster respectively.
The first network may be an external network, the second network may be an internal network, the first network switch may be an external network access switch, and the second network switch may be an internal network access switch.
In practical applications, the gateway device may implement sending the heartbeat packet to the first network switch and the second network switch through the open source software, for example, sending the heartbeat packet to the switches through the QUAGGA.
The QUAGGA may also implement an OSPF dynamic routing protocol for issuing routes of the first network egress address and the second network ingress address configured on the gateway device, such as routes of the TVS VIP and the TSV VIP configured on the gateway device.
For example, the QUAGGA module routes VIPs configured on the local LD via the OSPF protocol, which stops sending heartbeat packets when the LD fails, which ensures that the failed LD is removed from the cluster within 10s, so that incoming traffic from the intranet access switch is cut to other LDs in the cluster.
In practical applications, the gateway device may further send the heartbeat packet to other gateway devices through the address management module, for example, the heartbeat packet may be sent to other gateway devices through the LIP _ MANAGER.
202. For each gateway device, when the heartbeat packets sent by other gateway devices are not received within a preset time period, determining that the other gateway devices are in failure.
Since a gateway device stops sending heartbeat packets to other gateway devices when a certain gateway device sends a failure, if a heartbeat packet sent by a certain gateway device is not received within a preset time period, the gateway device may be considered to have a failure.
For example, the LIP _ MANAGER in the gateway device manages the TVS VIP configured on the LD, sends the heartbeat of the multicast packet at regular time, and when one LD stops sending the heartbeat packet, clusters are removed within 10s, and at this time, the TVS VIP on the LD is taken over by other LDs.
203. The gateway equipment acquires the first network outlet address on the failed gateway equipment, and determines the target first network outlet address which needs to be taken over by the gateway equipment and other normal gateway equipment when the gateway equipment is normal.
The first network egress address is an egress address of the first network, for example, when the first network is an external network, the first network egress address may be an external gateway network address, such as an external NAT gateway network egress IP (i.e., TVS VIP).
If a certain gateway device fails and other normal gateway devices need to take over the exit address of the failed gateway device, the first network exit address configured on the failed gateway device needs to be acquired, and then the first network exit address configured on the failed gateway device is allocated to the normal gateway device in the cluster to take over.
For example, when configured on a failed gateway device that includes multiple TVS VIPs, multiple first network egress addresses, such as TVS VIPs, may be assigned to normal gateway device takeover within the cluster. For example, assigning TVS VIP1 and TVS VIP4 to normal gateway device 1 take over, TVS VIP2 to self take over, TVS VIP3 to normal gateway device 3 take over, and so on.
The specific allocation mode can be set according to actual requirements, and each gateway device in the cluster can adopt the same allocation mode to ensure that the allocation schemes of the gateway devices in the cluster are consistent.
204. The gateway device locally configures a target first network egress address, issues a route of the target first network egress address to the first network switch, and issues a route of a target second network ingress address on the failed gateway device to the second network switch.
Since the first network egress address, such as the TVS VIP, is generally configured on one gateway device, and the first network egress addresses on the gateway devices in the cluster are different, when a gateway device fails, if the gateway device needs to take over the service on the failed gateway device, the first network egress address on the failed gateway device is locally configured on the takeover device. The second network entry address, such as the TSV VIP, is typically allocated to each gateway device in the device cluster, and the second network entry addresses of each gateway device in the cluster are the same, so that no reconfiguration is required.
In practical applications, the gateway device may issue the route through open source software such as QUAGGA.
In this embodiment, an OSPF (Open Shortest Path First) dynamic routing protocol may be adopted to issue a route of a First network egress address (e.g., TVS VIPj) to a switch.
For example, the target first network egress address that the gateway device needs to take over is TVS VIP1, the gateway device may configure the TVS VIP1 locally and then post the route of the TVS VIP1 to the first network switch.
205. For the first network switch, when the first network switch does not receive the heartbeat packet sent by the gateway equipment in the cluster within a preset time period, determining that the network equipment fails.
206. The first network switch sends a flow data packet of the first network to the corresponding normal gateway device based on the route of the target first network exit address issued by the gateway device.
The traffic packet may carry a source address, a source port, protocol information, a destination address, a destination port, etc., and the destination address may be a destination first network egress address.
After receiving the traffic data packet, the first network switch may send the traffic data packet to other normal gateway devices that take over the destination first network egress address carried by the traffic data packet.
For example, when a traffic packet carries the TVS VIP1, the first network switch sends the traffic packet to the normal gateway device that takes over the TVS VIP1 based on the routing of the TVS VIP 1.
207. The normal gateway device forwards the traffic packet to the corresponding second network switch based on the local connection information list.
The connection information may be port information, protocol information, and address information corresponding to the connection, and for example, the connection information may include a source address, a source port, protocol information, a destination address, and a destination port corresponding to the connection.
For example, when the first network is an extranet and the second network is an intranet, and the extranet server (server) returns traffic data to the intranet server (rs), the connection information may include: and connecting corresponding quintuple (server _ ip, server _ port, proto, vip and vport), wherein the server _ ip is the address of an external network server, namely a source address, the server _ port is the port of an external network service, namely a source port, proto is protocol data, vip is a destination address, and vport is a destination port.
When the intranet server (rs) accesses the extranet server (server), the connection information may include: and connecting corresponding quintuple (rs _ ip, rs _ port, proto, server _ ip, server _ port), wherein rs _ ip is the address of the intranet server, namely a source address, rs _ port is the port of the intranet server, proto is protocol data, server _ ip is the address of the extranet server, namely a destination address, and server _ port is the port of the extranet service, namely a destination port.
The connection may be a long connection, which refers to a connection that has a time-to-live exceeding a preset time from completion of the establishment, such as a connection that has a time-to-live exceeding 5 seconds from completion of the establishment to the present.
Optionally, in order to enable the normal gateway device to implement data forwarding of the faulty gateway device, the connection information of the gateway devices in the cluster may be synchronized in this embodiment.
For example, each gateway device may send connection information on the gateway device to the other gateway device, receive connection information sent by the other gateway device, and update a local connection information list according to the connection information sent by the other gateway device. Therefore, after the connection information is synchronized, the local connection information lists of the gateway devices in the cluster can be kept consistent, and when a certain gateway device fails, other gateway devices can forward data normally, so that the availability and stability of gateway services are improved.
208. And for the second network switch, when the second network switch does not receive the heartbeat packet sent by the gateway equipment in the cluster within a preset time period, determining that the network equipment fails.
209. The second network switch may send the traffic data packet of the second network to the corresponding normal gateway device based on the route of the second network entry address on the failed gateway device issued by the gateway device.
For example, the second network switch may send the second network traffic packet to the corresponding normal gateway device based on the TSV VIP2 routing issued by the normal gateway device.
210. And the normal gateway equipment sends the flow data packet of the second network to the corresponding first network switch.
The traffic data packet of the second network may carry a source address, a source port, protocol information, a destination address, a destination port, and the like. For example, when the first network is an external network and the second network is an internal network, and when the internal network server (rs) accesses the external network server (server), the internal network server sends traffic data to the corresponding normal gateway device, where the traffic data carries quintuple (rs _ ip, rs _ port, proto, server _ ip, and server _ port), and the normal gateway device can replace rs _ ip and rs _ port with vip and vport, then query for a connection for data forwarding based on vip, vport, server _ ip, and server _ port, and send the data to the corresponding external network switch through the queried connection, thereby achieving the corresponding external network server (server).
Referring to fig. 2c, based on the above description, this embodiment further provides another network data interaction system, where the system includes a NAT gateway cluster, an extranet access switch, and an intranet access switch, where the NAT gateway cluster is located between the extranet and the intranet, and is connected to the extranet and the intranet respectively. The NAT gateway cluster includes a plurality of servers, i.e., LDs, that provide NAT gateway functionality. Wherein, the LD includes: QUAGGA module, connection synchronization module, and address management module LIP _ MANAGER. The method comprises the following specific steps:
the QUAGGA module is used for sending heartbeat packets to the external network access switch and the internal network access switch, realizing open source software, realizing an OSPF dynamic routing protocol, and issuing the routing of the VIP configured on the LD, such as issuing the routing of the TVS VIP and the TSV VIP on the LD through the OSPF dynamic routing protocol.
When the LD has a fault, the QUAGGA stops sending heartbeat packets, and the OSPF protocol ensures that the faulty LD is removed from the cluster within 10s, so that the incoming traffic from the intranet access switch is switched to other LDs in the cluster.
And the connection synchronization module is used for sending the local connection information of the gateway equipment to other gateway equipment so as to synchronize the connection information of each gateway equipment in the cluster, so that when a certain gateway equipment fails, other normal gateway equipment can take over the service of the failed gateway equipment.
The address management module LIP _ MANAGER is configured to send heartbeat packets to other gateway devices in the cluster, for example, the LIP _ MANAGER module may send multicast packets at regular time to keep a live state, and when an LD fails, the module may stop sending multicast packets to ensure that the cluster is rejected within 10s, and at this time, a TVS VIP on the LD may be taken over by a normal LD in the cluster, so that traffic incoming from an external network access switch may be switched to the LD taking over the VIP. For example, the TVS VIP on the failed LD may be assigned to the normal LD takeover within the cluster.
The connection synchronization module is configured to implement synchronization of connection information of LDs in the cluster, for example, long connection information synchronization of LDs in the cluster can be implemented. The connection synchronization module can synchronize the long connection on the LD with the multicast packet regularly, so that after a certain time, the long connection information on all the LDs in the whole NAT cluster basically tends to be stable and keeps consistent.
The external network access switch is used for determining that the LD has a fault when a heartbeat packet sent by the LD is not received in a preset time period, sending an external network flow data packet to the corresponding normal LD based on the route of the TVS VIP on the fault LD issued by the normal LD, and forwarding the external network flow data packet to the corresponding internal network access switch by the normal LD based on the local connection information list, so that when the LD in the cluster has a fault, the flow data can be normally forwarded by replacing the fault LD with other normal LDs.
The intranet access switch is used for determining that the LD has a fault when a heartbeat packet sent by the LD is not received in a preset time period, sending an intranet flow data packet to the corresponding normal LD based on a TSV VIP route issued by the normal LD on the fault LD, and forwarding the intranet flow data packet to the corresponding extranet access switch by the normal LD, so that when the LD in the cluster has a fault, the normal LD can be used for replacing the fault LD to normally forward flow data.
Therefore, in the embodiment of the present invention, the failed gateway device in the cluster can be detected by mutually sending heartbeat packets by the gateway devices in the gateway device cluster, and when the failed gateway device is detected, other normal gateway devices in the cluster can take over data forwarding on the failed gateway device, so that the problem of service disuse caused by the failure of the gateway device is solved, the service loss is greatly reduced, and the efficiency of disaster recovery switching and the availability and stability of the gateway service are improved.
Example III,
In order to better implement the above method, an embodiment of the present invention further provides a gateway disaster recovery apparatus, which is suitable for a gateway device in a gateway device cluster, and as shown in fig. 3a, the gateway disaster recovery apparatus includes: the heartbeat transmitting unit 301, the heartbeat receiving unit 302, the failure determining unit 303, the address obtaining unit 304, and the assigning unit 305 are as follows:
(1) a heartbeat transmitting unit 301;
a heartbeat sending unit 301, configured to send a heartbeat packet to other gateway devices and switches in the gateway device cluster.
In this embodiment, the gateway device may include a device that provides a Network Address Translation (NAT) gateway function, for example, an LD (server that provides a NAT gateway function), and the like.
For example, the heartbeat sending unit 301 may send the heartbeat packet to other gateway devices or switches in the network management device cluster in a multicast manner, where the heartbeat packet is a multicast packet.
The other gateway devices may be gateway devices other than the other gateway devices in the gateway device cluster.
The switch may include: the switch in the network to which the gateway device is connected, for example, the network to which the gateway device is connected is the first network and the second network, respectively, in this case, the switch may include a switch in the first network and/or the second network.
The first network may be a Wide Area Network (WAN), such as a public network, an extranet, etc., and correspondingly, the second network may be a Local Area Network (LAN), such as a private network, an intranet, etc.
(2) A heartbeat receiving unit 302;
a heartbeat receiving unit 302, configured to receive a heartbeat packet sent by the other gateway device.
(3) A failure determination unit 303;
a failure determining unit 303, configured to determine that a failure occurs in the other gateway device when the heartbeat packet sent by the other gateway device is not received within a preset time period.
Since a gateway device stops sending heartbeat packets to other gateway devices when a certain gateway device sends a failure, if a heartbeat packet sent by a certain gateway device is not received within a preset time period, the gateway device may be considered to have a failure.
The preset time period can be set according to actual requirements, such as 1 minute, 2 minutes, and the like.
(4) An address acquisition unit 304;
an address obtaining unit 304, configured to obtain the first network egress address configured on the other gateway device.
The first network egress address is an egress address of a first network to which the gateway device is connected in a cluster, for example, when the first network is an external network, the first network egress address may be an external gateway network address, such as an external NAT gateway IP (i.e., TVS VIP).
Alternatively, the first network egress address may be configured in only one gateway device, that is, each gateway device in the cluster configures a respective first network egress address, such as a TVS VIP, locally.
(5) The distribution unit 305;
an assigning unit 305, configured to assign the first network egress address to a normal gateway device takeover in the gateway device cluster.
The specific allocation mode can be set according to actual requirements, and each gateway device in the cluster can adopt the same allocation mode to ensure that the allocation schemes of the gateway devices in the cluster are consistent.
For example, referring to fig. 3b, the allocation unit 305 may include:
an address determining subunit 3051, configured to determine, when the gateway device is a normal gateway device, a target first network egress address that the gateway device needs to take over from the first network egress address;
a configuration subunit 3052, configured to configure the target first network egress address locally at the gateway device;
a route issuing subunit 3053, configured to issue a route of the target first network egress address to the first network switch.
Alternatively, when the first network switch determines that the gateway device to which the first network switch belongs has a failure, the traffic data may be sent to the gateway device that takes over the first network egress address (e.g., TVS VIP) of the failed gateway device, and the traffic data may be converted to the corresponding second network switch by the egress address taking over gateway device. Referring to fig. 3c, the present embodiment may further include:
a data receiving unit 306, configured to receive traffic data sent by the first network switch based on the route after the route issuing subunit 3053 issues the route of the target first network egress address;
a first data forwarding unit 307, configured to acquire a local connection information list for data forwarding, and forward the traffic data to the corresponding second network switch based on the local connection information list.
The connection information may be port information, protocol information, and address information corresponding to the connection, and for example, the connection information may include a source address, a source port, protocol information, a destination address, and a destination port corresponding to the connection. The connection may be a long connection, which refers to a connection that has a time-to-live exceeding a preset time from completion of the establishment, such as a connection that has a time-to-live exceeding 5 seconds from completion of the establishment to the present.
Optionally, in order to enable the normal gateway device to implement data forwarding of the faulty gateway device, the gateway disaster recovery apparatus in this embodiment may synchronize connection information of the gateway devices in the cluster, referring to fig. 3d, where the gateway disaster recovery apparatus in this embodiment further includes: a connection synchronization unit 308, configured to send connection information on the gateway device to the other gateway device, and receive the connection information sent by the other gateway device; and updating a local connection information list according to the connection information sent by the other gateway equipment.
Optionally, referring to fig. 3e, the gateway disaster recovery device in this embodiment may further include:
a route issuing unit 309, configured to issue, after the failure determining unit determines that the other gateway device fails, a route of a second network entry address to a second network switch, where the second network switch includes a second network switch under the failed gateway device, and the second network entry address includes a second network entry address on the failed gateway device;
a second data forwarding unit 310, configured to receive the traffic data sent by the second network switch based on the route, and forward the traffic data sent by the second network switch to the corresponding first network switch.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
The gateway disaster recovery apparatus may specifically integrate a gateway device, and the gateway device may be a server or the like providing a gateway function.
As can be seen from the above, in the embodiment of the present invention, the heartbeat sending unit 301 is adopted to send heartbeat packets to other gateway devices and switches in the gateway device cluster, the heartbeat receiving unit 302 is used to receive the heartbeat packets sent by the other gateway devices, when the heartbeat packets sent by the other gateway devices are not received within a preset time period, the failure determining unit 303 determines that the other gateway devices are failed, the address obtaining unit 304 is used to obtain the first network egress address configured on the other gateway devices, and the allocating unit 305 is used to allocate the first network egress address to the normal gateway device in the gateway device cluster for taking over; according to the scheme, the gateway devices in the gateway device cluster can mutually send heartbeat packets to detect the fault gateway devices in the cluster, and when the fault gateway devices are detected, other normal gateway devices in the cluster can take over the first network outlet addresses on the fault gateway devices, so that the problem that services are not used due to the fault of the gateway devices is solved, and the service loss is greatly reduced.
Example four,
In order to better implement the above method, an embodiment of the present invention further provides another gateway disaster recovery apparatus, which is suitable for a network switch, such as a first network switch and a second gateway switch, and as shown in fig. 4, the gateway disaster recovery apparatus includes:
a heartbeat receiving unit 401, configured to receive a heartbeat packet sent by a target gateway device in a gateway device cluster;
a failure determining unit 402, configured to determine that a failure occurs in a target gateway device when a heartbeat packet sent by the target gateway device is not received within a preset time period;
a data sending unit 403, configured to send traffic data to another gateway device based on a route of an address issued by the other gateway device, so that the other gateway device forwards the traffic data to a corresponding network switch; the address includes a first network egress address or a second network ingress address on the target gateway device.
For example, the data sending unit 403 may be configured to send the traffic data packet to the other gateway device based on a route of a first network egress address issued by the other gateway device, where the first network egress address is a first network egress address, such as a TVS VIP, on the target gateway device, that is, the failed gateway device.
For another example, the data sending unit 403 may also be configured to send the traffic data packet to another gateway device based on a route of a second network entry address issued by the other gateway device, where the second network entry address is a second network entry address, such as a TSV VIP, on the target gateway device, that is, the failed gateway device.
The traffic data may carry a source address, a source port, protocol information, a destination address, a destination port, and the like, for example, the destination address may be a destination first network egress address.
For example, when the first network is an external network and the second network is an internal network, and when the internal network server (rs) accesses the external network server (server), the internal network server sends traffic data to the corresponding normal gateway device, where the traffic data carries a quintuple (rs _ ip, rs _ port, proto, server _ ip, and server _ port).
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
The gateway disaster recovery device can be integrated into a network switch, and the network switch can be an internal network access switch, an external network access switch and the like.
As can be seen from the above, in the embodiments of the present invention, the heartbeat packet is sent to the switch by the gateway device in the gateway device cluster, so that the switch can detect the faulty gateway device in the cluster, and when the switch detects the faulty gateway device, data forwarding can be performed by other normal gateway devices in the cluster, thereby solving the problem that the service is not used due to the fault of the gateway device, greatly reducing the loss of service, and improving the efficiency of disaster recovery switching and the availability and stability of the gateway service.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The gateway disaster recovery method and device provided by the embodiment of the present invention are described in detail above, and a specific example is applied in the text to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (13)

1. A gateway disaster recovery method is suitable for gateway devices in a gateway device cluster, each gateway device in the gateway device cluster comprises an address management module and a connection synchronization module, and the method is characterized by comprising the following steps:
sending heartbeat packets to other gateway devices in a gateway device cluster through an address management module in the gateway device, and sending heartbeat packets to a switch, wherein the other gateway devices also send heartbeat packets to the switch, so that when the switch does not receive the heartbeat packets sent by the other gateway devices within a preset time period, the other gateway devices are determined to be in fault;
receiving heartbeat packets sent by address management modules in other gateway devices;
when the heartbeat packet sent by the address management module in the other gateway equipment is not received within a preset time period, determining that the other gateway equipment fails;
acquiring a first network outlet address configured on the other gateway device, wherein the first network outlet address is an outlet address of a first network connected with the gateway device in a cluster manner;
and allocating the first network egress address to a normal gateway device in the gateway device cluster for taking over so that the normal gateway device issues a route of the first network egress address to the switch, and after determining that the other gateway device fails, the switch sends traffic data to the normal gateway device based on the route, and the normal gateway device forwards the traffic data to a corresponding second network switch based on a local connection information list, where the connection information list is obtained after the normal gateway device updates a local connection information list based on the connection synchronization module receiving the connection information sent by the other gateway device.
2. The gateway disaster recovery method of claim 1 wherein assigning said first network egress address to a normal gateway device takeover in said cluster of gateway devices comprises:
when the gateway equipment is normal gateway equipment, determining a target first network outlet address which needs to be taken over by the gateway equipment from the first network outlet addresses;
configuring the target first network egress address locally at the gateway device;
and issuing the route of the target first network exit address to the first network switch.
3. The gateway disaster recovery method according to claim 2, wherein after issuing the route of the target first network egress address, the gateway disaster recovery method further comprises:
receiving traffic data sent by the first network switch based on the route;
and acquiring a local connection information list for data forwarding, and forwarding the flow data to the corresponding second network switch based on the local connection information list.
4. The gateway disaster recovery method according to claim 3, further comprising:
sending the connection information on the gateway equipment to other gateway equipment, and receiving the connection information sent by other gateway equipment;
and updating a local connection information list according to the connection information sent by the other gateway equipment.
5. The gateway disaster recovery method according to any one of claims 1 to 4, wherein after determining that said other gateway device has failed, said gateway disaster recovery method further comprises:
issuing a route for a second network entry address to a second network switch, the second network switch including a second network switch under the failed gateway device, the second network entry address including a second network entry address on the failed gateway device;
receiving traffic data sent by the second network switch based on the route;
and forwarding the traffic data sent by the second network switch to the corresponding first network switch.
6. A gateway disaster recovery method is suitable for a network switch, and is characterized by comprising the following steps:
receiving heartbeat packets sent by target gateway equipment and other gateway equipment in a gateway equipment cluster through an address management module, wherein the target gateway equipment and the other gateway equipment mutually send the heartbeat packets through the address management module, and when the target gateway equipment does not receive the heartbeat packets sent by the other gateway equipment within a preset time period, determining that the other gateway equipment fails;
when the heartbeat packets sent by the other gateway equipment are not received within a preset time period, determining that the other gateway equipment fails;
sending traffic data to the normal gateway device based on the route of the address issued by the normal gateway device in the gateway device cluster, so that the normal gateway device forwards the traffic data to a corresponding second network switch; the address includes a first network exit address or a second network entry address on the other gateway device, the first network exit address is an exit address configured on the other gateway device and allocated to a normal gateway device for taking over, the first network exit address is an exit address of a first network connected by the gateway device cluster, the normal gateway device forwards the traffic data to a corresponding second network switch based on a local connection information list, and the connection information list is obtained after the normal gateway device updates the local connection information list based on the connection synchronization module receiving the connection information sent by the other gateway device.
7. A gateway disaster recovery device is suitable for gateway devices in a gateway device cluster, wherein each gateway device in the gateway device cluster comprises an address management module and a connection synchronization module, and the device is characterized by comprising:
the heartbeat sending unit is used for sending heartbeat packets to other gateway devices in the gateway device cluster through the address management module in the gateway device and sending heartbeat packets to the switch, wherein the other gateway devices also send heartbeat packets to the switch, so that when the switch does not receive the heartbeat packets sent by the other gateway devices within a preset time period, the switch determines that the other gateway devices are in failure;
the heartbeat receiving unit is used for receiving heartbeat packets sent by the address management modules in the other gateway devices;
the failure determining unit is used for determining that the other gateway equipment fails when the heartbeat packet sent by the address management module in the other gateway equipment is not received within a preset time period;
an address obtaining unit, configured to obtain a first network exit address configured on the other gateway device, where the first network exit address is an exit address of a first network connected to the gateway device cluster;
an allocating unit, configured to allocate the first network egress address to a normal gateway device in the gateway device cluster to take over, so that the normal gateway device issues a route of the first network egress address to the switch, and after determining that the other gateway device fails, the switch sends traffic data to the normal gateway device based on the route, and the normal gateway device forwards the traffic data to a corresponding second network switch based on a local connection information list, where the connection information list is obtained after the normal gateway device updates the local connection information list based on the connection information received by the connection synchronization module and sent by the other gateway device.
8. The gateway disaster recovery device of claim 7 wherein said distribution unit comprises:
an address determining subunit, configured to determine, when the gateway device is a normal gateway device, a target first network egress address that the gateway device needs to take over from the first network egress address;
a configuration subunit, configured to configure the target first network egress address locally at the gateway device;
and the route issuing subunit is used for issuing the route of the target first network exit address to the first network switch.
9. The gateway disaster recovery device of claim 8, further comprising:
a data receiving unit, configured to receive traffic data sent by the first network switch based on a route after the route distribution subunit distributes the route of the target first network egress address;
and the first data forwarding unit is used for acquiring a local connection information list for data forwarding and forwarding the flow data to the corresponding second network switch based on the local connection information list.
10. The gateway disaster recovery device of claim 9, further comprising:
a connection synchronization unit, configured to send connection information on the gateway device to the other gateway device, and receive the connection information sent by the other gateway device; and updating a local connection information list according to the connection information sent by the other gateway equipment.
11. The gateway disaster recovery apparatus as claimed in any one of claims 7 to 10, further comprising:
the route issuing unit is used for issuing a route of a second network entry address to a second network switch after the fault determining unit determines that the other gateway equipment has faults, wherein the second network switch comprises a second network switch under the faulty gateway equipment, and the second network entry address comprises a second network entry address on the faulty gateway equipment;
and the second data forwarding unit is used for receiving the traffic data sent by the second network switch based on the route and forwarding the traffic data sent by the second network switch to the corresponding first network switch.
12. A gateway disaster recovery device is suitable for a network switch, and is characterized by comprising:
the gateway device comprises a heartbeat receiving unit, a heartbeat receiving unit and a heartbeat receiving unit, wherein the heartbeat receiving unit is used for receiving heartbeat packets sent by a target gateway device and other gateway devices in a gateway device cluster through an address management module, the target gateway device and the other gateway devices mutually send the heartbeat packets through the address management module, and when the target gateway device does not receive the heartbeat packets sent by the other gateway devices within a preset time period, the other gateway devices are determined to be in fault;
the failure determining unit is used for determining that the other gateway equipment fails when the heartbeat packet sent by the other gateway equipment is not received within a preset time period;
a data sending unit, configured to send traffic data to a normal gateway device in the gateway device cluster based on a route of an address issued by the normal gateway device, so that the normal gateway device forwards the traffic data to a corresponding second network switch; the address includes a first network exit address or a second network entry address on the other gateway device, the first network exit address is an exit address configured on the other gateway device and allocated to a normal gateway device for taking over, the first network exit address is an exit address of a first network connected by the gateway device cluster, the normal gateway device forwards the traffic data to a corresponding second network switch based on a local connection information list, and the connection information list is obtained after the normal gateway device updates the local connection information list based on the connection synchronization module receiving the connection information sent by the other gateway device.
13. A storage medium storing instructions which, when executed by a processor, carry out the steps of the method according to any one of claims 1 to 6.
CN201710423016.7A 2017-06-07 2017-06-07 Gateway disaster tolerance method, device and storage medium Active CN107276846B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710423016.7A CN107276846B (en) 2017-06-07 2017-06-07 Gateway disaster tolerance method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710423016.7A CN107276846B (en) 2017-06-07 2017-06-07 Gateway disaster tolerance method, device and storage medium

Publications (2)

Publication Number Publication Date
CN107276846A CN107276846A (en) 2017-10-20
CN107276846B true CN107276846B (en) 2022-03-08

Family

ID=60066101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710423016.7A Active CN107276846B (en) 2017-06-07 2017-06-07 Gateway disaster tolerance method, device and storage medium

Country Status (1)

Country Link
CN (1) CN107276846B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110166270A (en) * 2018-02-13 2019-08-23 中兴通讯股份有限公司 Hot standby switch processing method, equipment and storage medium
CN108600025B (en) * 2018-05-07 2021-11-02 北京京东尚科信息技术有限公司 Method and device for automatic disaster recovery of system
CN115529220A (en) * 2021-06-08 2022-12-27 中国移动通信集团重庆有限公司 Communication gateway disaster tolerance system and method
CN113852526A (en) * 2021-08-24 2021-12-28 天翼数字生活科技有限公司 WiFi-based home network diagnosis method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007016832A1 (en) * 2005-08-05 2007-02-15 Huawei Technologies Co., Ltd. A method for detecting fault in the next generation network
CN102970388A (en) * 2012-11-19 2013-03-13 北京奇虎科技有限公司 Method and system for managing outer net access
CN102970389A (en) * 2012-11-19 2013-03-13 北京奇虎科技有限公司 Outer net access method and system
CN103607310A (en) * 2013-11-29 2014-02-26 华为技术有限公司 Method for arbitration of remote disaster recovery
CN106385334A (en) * 2016-09-20 2017-02-08 携程旅游信息技术(上海)有限公司 Call-center system and abnormality detection and self-recovery method therefor

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102739820B (en) * 2012-06-28 2015-06-03 杭州华三通信技术有限公司 Message network address conversion processing method and network equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007016832A1 (en) * 2005-08-05 2007-02-15 Huawei Technologies Co., Ltd. A method for detecting fault in the next generation network
CN102970388A (en) * 2012-11-19 2013-03-13 北京奇虎科技有限公司 Method and system for managing outer net access
CN102970389A (en) * 2012-11-19 2013-03-13 北京奇虎科技有限公司 Outer net access method and system
CN103607310A (en) * 2013-11-29 2014-02-26 华为技术有限公司 Method for arbitration of remote disaster recovery
CN106385334A (en) * 2016-09-20 2017-02-08 携程旅游信息技术(上海)有限公司 Call-center system and abnormality detection and self-recovery method therefor

Also Published As

Publication number Publication date
CN107276846A (en) 2017-10-20

Similar Documents

Publication Publication Date Title
US10779339B2 (en) Wireless roaming using a distributed store
CN107276846B (en) Gateway disaster tolerance method, device and storage medium
CN107454155B (en) Fault processing method, device and system based on load balancing cluster
US8855117B2 (en) Scalable media access control protocol synchronization techniques for fabric extender based emulated switch deployments
US11133949B2 (en) Method and device for establishing multicast data channel in network virtualization system
WO2017162184A1 (en) Method of controlling service traffic between data centers, device, and system
CN102263704B (en) Topology construction method and device supporting layer 2 interconnection of data centers
US20060168084A1 (en) Method and apparatus for rendering load balancing and failover
CN110601881B (en) Two-layer private network system, configuration method and equipment
US20160173367A1 (en) Redundant Pathways For Network Elements
WO2022083464A1 (en) Data processing method, apparatus and system, computer device and computer-readable storage medium
EP3069471B1 (en) Optimized multicast routing in a clos-like network
US20070104198A1 (en) Apparatus and method for providing a high availability network mechanish
CN103825975A (en) Cdn node distribution server and system
CN111182022B (en) Data transmission method and device, storage medium and electronic device
CN104253748B (en) Method for routing and system based on distributed structure/architecture
WO2011011933A1 (en) Method and system for realizing network topology discovery
CN111510310B (en) Network mode implementation method and device under public cloud architecture
JP6795043B2 (en) Gateway devices, network address translators, communication systems, communication methods, and programs
CN111988439A (en) ARP request suppression system, method, equipment and storage medium
CN106452882B (en) Backup switching method and system for universal network passport server
CN112910704B (en) Local area network system, method and device supporting dynamic self-adaptive network configuration
WO2022017099A1 (en) Communication method, cp device, and nat device
CN106878051B (en) Multi-machine backup implementation method and device
CN106712994B (en) Software defined network management method and communication system

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