CN116708283B - Automatic network switching method and switching system - Google Patents

Automatic network switching method and switching system Download PDF

Info

Publication number
CN116708283B
CN116708283B CN202310990313.5A CN202310990313A CN116708283B CN 116708283 B CN116708283 B CN 116708283B CN 202310990313 A CN202310990313 A CN 202310990313A CN 116708283 B CN116708283 B CN 116708283B
Authority
CN
China
Prior art keywords
address
network port
server
virtual
slave
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
CN202310990313.5A
Other languages
Chinese (zh)
Other versions
CN116708283A (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.)
Zhuhai Pilot Technology Co ltd
Original Assignee
Zhuhai Pilot Technology 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 Zhuhai Pilot Technology Co ltd filed Critical Zhuhai Pilot Technology Co ltd
Priority to CN202310990313.5A priority Critical patent/CN116708283B/en
Publication of CN116708283A publication Critical patent/CN116708283A/en
Application granted granted Critical
Publication of CN116708283B publication Critical patent/CN116708283B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/247Multipath using M:N active or standby paths
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

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

Abstract

The embodiment of the invention relates to the technical field of communication, and discloses a network automatic switching method and a switching system, wherein the method comprises the following steps: after the position information of the server of each network port virtual IP address in the configuration file is determined, voting is carried out on each network port virtual IP address according to the network port information of the master server and the slave server and a designated voting mechanism; determining a target network port virtual IP address according to voting statistics results of the network port virtual IP addresses; determining master-slave server configuration change information according to the server position information of the target network port virtual IP address; and sending the configuration change information of the master server and the slave server to a dynamic configuration center so as to inform the master server and the slave server of reestablishing connection through the dynamic configuration center. By implementing the embodiment of the invention, the network fault dynamic switching can be realized.

Description

Automatic network switching method and switching system
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and a system for automatically switching networks.
Background
At present, the power monitoring system has a technical requirement that a dual-network technology is required to be satisfied, namely, a main-standby architecture is required to be supported in addition to service response of an application end, a high-availability architecture is required to be supported on network communication, two completely independent network structures are required to be simultaneously supported on the network architecture, mutual interference and physical isolation are avoided, and the use of one network is not affected after the interruption of the other network.
However, in practice, it is found that the network connection established between the application service and the dis and MySQL cannot meet the requirement of dual networks at the same time, and it can only determine which network card of the server is used for IP communication during application initialization, and once the network card is broken or the local area network where the network card is located is paralyzed, the application service cannot automatically realize network switching, so that service is not available.
Disclosure of Invention
The embodiment of the invention discloses a network automatic switching method and a switching system, which can realize the dynamic switching of network faults.
The first aspect of the embodiment of the invention discloses a network automatic switching method, which comprises the following steps:
after the position information of the server of each network port virtual IP address in the configuration file is determined, voting is carried out on each network port virtual IP address according to the network port information of the master server and the slave server and a designated voting mechanism;
determining a target network port virtual IP address according to voting statistics results of the network port virtual IP addresses;
determining master-slave server configuration change information according to the server position information of the target network port virtual IP address;
and sending the configuration change information of the master server and the slave server to a dynamic configuration center so as to inform the master server and the slave server of reestablishing connection through the dynamic configuration center.
As another optional implementation manner, in the first aspect of the embodiment of the present invention, before determining the server location information of each network port virtual IP address in the configuration file, the method further includes:
inquiring the network port information of the master server and the slave server at regular time; the master server network port information comprises a master server network port IP address and a slave server network port IP address;
detecting whether the IP address of the main server network port is matched with the IP address of the main server configuration network port in the configuration file; if yes, detecting whether a first network port virtual IP address connected with the network port of the main server successfully matched exists in the main server;
if yes, judging that the first network port virtual IP address exists in the main server;
detecting whether the network port IP address of the slave server is matched with the network port IP address of the slave server configuration in the configuration file; if yes, detecting whether a second network port virtual IP address connected with the network port of the slave server successfully matched exists in the slave server;
if yes, judging that the second network port virtual IP address exists in the slave server.
As another optional implementation manner, in the first aspect of the embodiment of the present invention, the method further includes:
If the first network port virtual IP address is detected to be not in the master server, judging that the first network port virtual IP address is in the slave server;
and if the second network port virtual IP address is detected not to exist in the slave server, judging that the second network port virtual IP address exists in the master server.
In another optional implementation manner, in the first aspect of the embodiment of the present invention, after determining the server location information of each network port virtual IP address in the configuration file, voting is performed on each network port virtual IP address according to the master-slave server network port information and a designated voting mechanism, including:
if the network port IP address of the main server is successfully matched and the first network port virtual IP address exists in the main server, voting is conducted on the first network port virtual IP address;
if the network port IP address of the master server is successfully matched and the first network port virtual IP address exists in the slave server, voting is conducted on the first network port virtual IP address;
if the network port IP address of the slave server is successfully matched and the second network port virtual IP address exists in the slave server, voting is conducted on the second network port virtual IP address;
And if the network port IP addresses of the slave servers are successfully matched and the second network port virtual IP address exists in the master server, voting is conducted on the second network port virtual IP address.
In another optional implementation manner, in the first aspect of the embodiment of the present invention, the determining, according to a voting statistical result of each of the network port virtual IP addresses, the target network port virtual IP address includes:
detecting whether the voting statistical result of the first network port virtual IP address is the same as the voting statistical result of the second network port virtual IP address; if yes, respectively acquiring the network port priority weight factors of the first network port virtual IP address and the second network port virtual IP address from the configuration file;
and determining the virtual IP address of the target network port according to the priority weight factors.
As another optional implementation manner, in the first aspect of the embodiment of the present invention, the method further includes:
if the voting statistical result of the first network port virtual IP address is detected to be different from the voting statistical result of the second network port virtual IP address, determining the network port virtual IP address with high voting statistical result as the target network port virtual IP address.
In another optional implementation manner, in the first aspect of the embodiment of the present invention, determining, according to server location information of the target network port virtual IP address, master-slave server configuration change information includes:
setting the redis of the master server as a master node and the redis of the slave server as the internet access IP address of the master server if the target internet access virtual IP address exists in the master server;
and if the target internet access virtual IP address exists in the slave server, setting the redis of the slave server as a master node, and setting the redis of the master server as the internet access IP address of the slave server.
A second aspect of an embodiment of the present invention discloses a switching system, including:
the voting unit is used for voting to each network port virtual IP address according to the network port information of the master server and the appointed voting mechanism after determining the position information of the server of each network port virtual IP address in the configuration file;
the first determining unit is used for determining a target network port virtual IP address according to voting statistical results of the network port virtual IP addresses;
The second determining unit is used for determining master-slave server configuration change information according to the server position information of the target network port virtual IP address;
and the sending unit is used for sending the configuration change information of the master server and the slave server to a dynamic configuration center so as to inform the master server and the slave server of reestablishing connection through the dynamic configuration center.
As another optional implementation manner, in the second aspect of the embodiment of the present invention, the switching system further includes:
the query unit is used for periodically querying the network port information of the master server and the slave server before the voting unit determines the position information of the server of the virtual IP address of each network port in the configuration file; the master server network port information comprises a master server network port IP address and a slave server network port IP address;
the first detection unit is used for detecting whether the IP address of the main server network port is matched with the IP address of the main server configuration network port in the configuration file;
the second detection unit is used for detecting whether a first network port virtual IP address connected with the network port of the main server successfully matched exists in the main server or not when the first detection unit detects that the network port IP address of the main server is matched with the IP address of the main server configuration network port in the configuration file;
The third determining unit is used for determining the server position information of the first network port virtual IP address when the second detecting unit detects that the first network port virtual IP address connected with the network port of the main server successfully matched exists in the main server;
the first detection unit is further configured to detect whether the slave server network port IP address is matched with a slave server configuration network port IP address in the configuration file;
the second detection unit is further configured to detect, when the first detection unit detects that the slave server network port IP address matches the slave server configuration network port IP address in the configuration file, whether a second network port virtual IP address connected to the slave server network port that matches successfully exists in the slave server;
the third determining unit is further configured to determine, when the second detecting unit detects that the second network port virtual IP address connected to the slave server network port successfully matched exists in the slave server, server location information where the second network port virtual IP address is located.
A third aspect of an embodiment of the present invention discloses a switching system, including:
a memory storing executable program code;
A processor coupled to the memory;
the processor invokes the executable program code stored in the memory to execute the network automatic switching method disclosed in the first aspect of the embodiment of the present invention.
A fourth aspect of the embodiment of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program causes a computer to execute a network automatic switching method disclosed in the first aspect of the embodiment of the present invention.
A fifth aspect of an embodiment of the invention discloses a computer program product which, when run on a computer, causes the computer to perform part or all of the steps of any one of the network automatic switching methods of the first aspect.
A sixth aspect of the embodiments of the present invention discloses an application publishing platform for publishing a computer program product, wherein the computer program product, when run on a computer, causes the computer to perform part or all of the steps of any one of the network automatic switching methods of the first aspect.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, after the position information of the server where each network port virtual IP address in the configuration file is located is determined, voting is carried out on each network port virtual IP address according to the network port information of the master server and the assigned voting mechanism; determining a target network port virtual IP address according to voting statistics results of the network port virtual IP addresses; determining master-slave server configuration change information according to the server position information of the target network port virtual IP address; and sending the configuration change information of the master server and the slave server to a dynamic configuration center so as to inform the master server and the slave server of reestablishing connection through the dynamic configuration center. Therefore, the embodiment of the invention can realize the dynamic switching of network faults.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a network automatic switching method according to an embodiment of the present invention;
fig. 2 is a flow chart of another automatic network switching method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a switching system according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another switching system according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of another switching system according to an embodiment of the present invention;
FIG. 6 is a diagram of a dual-network assembly architecture in accordance with an embodiment of the present invention;
fig. 7 is a diagram of a dual-network election sequence according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that the terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present invention are used for distinguishing between different objects and not necessarily for describing a particular sequential or chronological order. The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the invention discloses a network automatic switching method and a switching system, which can realize the dynamic switching of network faults.
The following detailed description refers to the accompanying drawings.
Example 1
Referring to fig. 1, fig. 1 is a flow chart of a network automatic switching method according to an embodiment of the invention. As shown in fig. 1, the network automatic switching method may include the following steps.
101. After the position information of the server where each network port virtual IP address in the configuration file is located is determined, the switching system votes for each network port virtual IP address according to the network port information of the master server and the appointed voting mechanism.
In the embodiment of the present application, a system may include 2 server segments (a master server and a slave server respectively), where a server segment includes 2 ports, and the number of server segments is in a proportional relationship with the number of virtual IP addresses of the ports, where the 2 server segments may include 2 virtual IP addresses of the ports, and the two virtual IP addresses of the ports may be in the same server segment or may be in two server segments respectively.
As an optional implementation manner, in the embodiment of the application, the statistical summarization condition of the servers where the two network port virtual IP addresses of the Keepalied dual network card are located can be combined, then an IP address which can be communicated is finally determined through a self-developed election algorithm, and finally, the application service can establish connection communication with Redis and MySQL through the elected IP.
102. And the switching system determines the virtual IP address of the target network port according to the voting statistical result of the virtual IP addresses of the network ports.
103. And the switching system determines the configuration change information of the master server and the slave server according to the position information of the server where the virtual IP address of the target network port is located.
104. The switching system sends the configuration change information of the master server and the slave server to the dynamic configuration center so as to inform the master server and the slave server of reestablishing the connection through the dynamic configuration center.
As an optional implementation manner, in the embodiment of the invention, after the network fails to switch, the dual-network IP election can be automatically triggered, the result is pushed to the Nacos dynamic configuration center, and the technical point of dynamic update of Nacos configuration items is combined, so that the running application service can reinitialize the connection object with Redis and MySQL by itself after receiving the configuration change, thereby achieving the automatic switching of the network and high availability of the dual network.
As an alternative implementation manner, in the embodiment of the invention, the system may pull the current configuration of Redis and MySQL from the Nacos dynamic configuration center, then replace the old Internet protocol IP address with the elected new Internet protocol address, send the latest master-slave server configuration change information to the Nacos dynamic configuration center, and then send the latest configuration to each micro service by the Nacos dynamic configuration center, and update the connection object again.
As an optional implementation manner, in the embodiment of the present invention, after determining the configuration change information of the master server and the slave server, the system may notify all micro services to reestablish the redis connection by means of a dynamic configuration center.
As an alternative implementation manner, in the embodiment of the present invention, the master server and the slave server are confirmed at the beginning, but when the network port virtual IP address needs to be acquired at fixed time, if the target network port virtual IP address appears in the slave server, the master server and the slave server change the configuration, and the master server changes the slave server and the master server.
In the network automatic switching method of fig. 1, a switching system is described as an example of an execution subject. It should be noted that, the execution body of the network automatic switching method of fig. 1 may also be a stand-alone device associated with the switching system, which is not limited by the embodiment of the present application.
It can be seen that implementing a network automatic switching method described in fig. 1 can implement network failure dynamic switching.
In addition, implementing a network automatic switching method described in fig. 1 can realize that each application service and other intermediate components are highly available in communication under the dual network.
Example two
Referring to fig. 2, fig. 2 is a flow chart of another automatic network switching method according to an embodiment of the application. As shown in fig. 2, the network automatic switching method may include the steps of:
201. the switching system queries network port information of the master server and the slave server at regular time; the master server network port information comprises the master server network port IP address and the slave server network port IP address.
As an optional implementation manner, in the embodiment of the present application, before executing step 201, the present application may further perform configuration of the internet access IP address, the internet access virtual IP address, the opposite internet access IP address, and the opposite internet access virtual IP address of different network segments for each service.
As an alternative implementation manner, in the embodiment of the application, a timing task is started in the system, that is, the network port information of the master server and the slave server is checked every 2 seconds, whether the VIP of the keepalive of the two network ports in the master server is local or not is analyzed, the total voting results of the two parties are counted, and the voting results are written into a file directory appointed by the service for counting and summarizing the voting results at the later time.
202. The switching system detects whether the network port IP address of the main server is matched with the network port IP address of the main server configuration in the configuration file, if yes, step 203 is executed, and if not, step 206 is executed.
203. The switching system detects whether the first internet access virtual IP address connected to the successfully matched internet access of the main server exists in the main server, if yes, step 204 is executed, and if not, step 205 is executed.
In an embodiment of the present application, the present application may obtain whether the network port IP address of each network card exists and whether the virtual network port IP address (VIP) exists by comparing the result of reading the network port information of the master server and the IP result configured in the configuration file.
204. The switching system determines that the first network port virtual IP address exists in the host server, and performs step 206.
205. The switching system determines that the first network port virtual IP address exists in the slave server, and performs step 206.
206. The switching system detects whether the slave server internet access IP address is matched with the slave server configuration internet access IP address in the configuration file, if yes, step 207 is executed, and if not, the flow is ended.
207. The switching system detects whether the second network port virtual IP address connected to the network port of the slave server successfully matched exists in the slave server, if yes, step 208 is executed, and if not, step 209 is executed.
208. The switching system determines that the second network port virtual IP address exists in the slave server, and executes steps 210 to 214.
209. The switching system determines that the second network port virtual IP address exists in the main server, and executes steps 210 to 214.
As an optional implementation manner, in the embodiment of the present invention, the system may first see whether an actual network port IP address of the server network card exists, if so, the network port virtual IP address may exist on the server network card, and if just the network port virtual IP address exists on the server, the system may vote for the network port virtual IP address of the server, i.e. the network port virtual IP address obtains a vote 1 at this time; if the actual internet access IP address of the server network card exists, but the internet access virtual IP address does not exist on the server, the system can judge that the internet access virtual IP address exists in the opposite side server and vote for the internet access virtual IP address in the opposite side server, namely the internet access virtual IP address obtains a vote 1 at the moment.
210. If the network port IP address of the main server is successfully matched and the first network port virtual IP address exists in the main server, the switching system votes for the first network port virtual IP address.
211. If the network port IP address of the master server is successfully matched and the first network port virtual IP address exists in the slave server, the switching system votes for the first network port virtual IP address.
212. And if the slave server network port IP address is successfully matched and the second network port virtual IP address exists in the slave server, the switching system votes for the second network port virtual IP address.
213. If the slave server network port IP address is successfully matched and the second network port virtual IP address exists in the master server, the switching system votes for the second network port virtual IP address.
In the embodiment of the invention, the system can have 1 master server network card and 1 slave server network card, each network segment can have one network port virtual IP address (VIP), namely, the system can have 2 network port virtual IP addresses (VIP) at the moment, each server network card contains 2 network ports, each network port is connected with one network port virtual IP address (VIP), the system can respectively match the master server network card, the network port virtual IP addresses (VIP) in the slave server network card and the network port virtual IP addresses (VIP) set in the configuration file, if the matching is successful, the master server network card can obtain the network port virtual IP address (VIP) which is successfully matched, the voting of the network port virtual IP address (VIP) which is successfully matched is 1, the master server and the slave server conduct voting exchange, finally, the total number of the votes of each network port virtual IP address (VIP) is counted, and the network port virtual IP address (VIP) with high ticket number is taken as the target network port virtual IP address (VIP). If the number of votes for each internet access virtual IP address (VIP) is the same, the system may determine the selected target internet access virtual IP address (VIP) according to the weight factor (priority) in the configuration file.
In the embodiment of the application, the master server and the slave server have election results, the election results are written into the file, and the system can count the final result by reading the file merging result.
In an embodiment of the present application, the voting mechanism is a process of mutually casting between the master server and the slave server, for example, the system may first query whether the real IP address of the network port of the master server exists, if the network port virtual IP address exists in the master server, the system may determine that the network port virtual IP address exists in the master server, then the system performs voting of the network port virtual IP address to the network port of the master server, and then query the slave server, if the real IP address exists in the slave server, but the network port virtual IP address does not exist in the master server, the system may perform voting of the network port virtual IP address to the network port of the master server, and add up the two votes, and the other network ports are the same.
For another example, it may be first queried whether the real IP address of the host server portal exists, if the virtual IP address of the portal does not exist, the system may determine that the virtual IP address of the portal exists in the slave server, then the system votes the virtual IP address of the portal to the slave server portal, then queries the slave server, if the real IP address of the slave server exists and the virtual IP address of the portal also exists, then the system may vote the virtual IP address of the portal to the slave server portal again, and the VIP is added up to the same theory as the other portal.
For another example, the system may first query whether the real IP address of the host server portal exists, if not, the system may not need to determine whether the virtual IP address of the portal exists any more, at this time, the system may not need to vote at this time because the system cannot determine where the virtual IP address of the portal exists, and then query the slave server, if the real IP address of the slave server exists and the virtual IP address of the portal also exists, the system may determine that the virtual IP address of the portal exists in the slave server, the system may vote the virtual IP address of the portal to the slave server portal, and add up the VIP to be a vote, and the other portals are the same.
For another example, the system may first query whether the real IP address of the portal of the master server exists, if not, the system may not need to determine whether the virtual IP address of the portal exists any more, at this time, the system may not need to vote at this time because the system cannot determine where the virtual IP address of the portal exists, and then query the slave server, if the real IP address of the slave server exists but the virtual IP address of the portal does not exist, the system may determine that the virtual IP address of the portal exists in the master server, and then the system may vote for the virtual IP address of the portal to the portal of the master server, and add up the VIP to a vote, which is the same as the other portal.
For another example, the system may first query whether the real IP address of the network port of the master server exists, if not, the system may not need to determine whether the virtual IP address of the network port exists any more, at this time, the system cannot determine where the virtual IP address of the network port exists, so the system does not need to vote at this time, then query the slave server, if the real IP address of the slave server does not exist and the virtual IP address of the network port does not exist, at this time, the system cannot determine where the virtual IP address of the network port exists, at this time, the system does not need to vote, and together with this VIP, no vote is generated, and other network ports have the same theory.
214. The switching system detects whether the voting statistical result of the first network port virtual IP address is the same as the voting statistical result of the second network port virtual IP address, if so, steps 215-216 and 218-219 are executed, and if not, steps 217-219 are executed.
As an optional implementation manner, in the embodiment of the present invention, the system may circularly read the voting result sent by the master-slave server application (the reading directory reads according to the electric result path address in the configuration file), and if the reading is successful, combine the result into the voting result of the user, and delete the voting file; if the file is not read, the file is read again every 10 seconds. After the voting result is obtained, counting the network port virtual IP addresses (VIP) to obtain the voting result, respectively obtaining corresponding ballots according to the network port virtual IP addresses (VIP), and taking the network port virtual IP addresses (VIP) with high priority as a final result if the ballots of the two network port virtual IP addresses (VIP) are the same.
215. And the switching system respectively acquires the network port priority weight factors of the first network port virtual IP address and the second network port virtual IP address from the configuration file.
216. And the switching system determines the virtual IP address of the target network port according to the priority weight factors.
217. And the switching system determines the network port virtual IP address with high voting statistics as a target network port virtual IP address.
218. And the switching system determines the configuration change information of the master server and the slave server according to the position information of the server where the virtual IP address of the target network port is located.
In the embodiment of the present invention, if the target internet access virtual IP address exists in the master server, the redis of the master server is set as a master node, and the redis of the slave server is set as the internet access IP address of the master server;
and if the target internet access virtual IP address exists in the slave server, setting the redis of the slave server as a master node, and setting the redis of the master server as the internet access IP address of the slave server.
As an optional implementation manner, in this embodiment of the present invention, if an election result of a target internet access virtual IP address (VIP) is obtained from a main server, the following is performed: redis-cli-p 6379 SLAVEOF NO ONE, i.e. set Redis in the host server as host. If the election result of the target internet access virtual IP address (VIP) cannot be obtained from the main server, executing: redis-cli-p 6379 SLAVEOF 10.10.43.89 6379, i.e. set Redis in the master server as slave and point to the host portal IP address.
As an optional implementation manner, in the embodiment of the present application, the master-slave relationship of redis is that the master server redis is set as a non-slave node, and the slave server redis is set as the internet access IP address of the master server, so that the master-slave relationship is established.
219. The switching system sends the configuration change information of the master server and the slave server to the dynamic configuration center so as to inform the master server and the slave server of reestablishing the connection through the dynamic configuration center.
As an optional implementation manner, in the embodiment of the application, the rediss are high in availability of own master and slave, and do not support the application scene of the double network card, so that the rediss can be applied to the application scene of the double network card in a dynamic configuration center mode.
It can be seen that implementing another network automatic switching method described in fig. 2 can implement network failure dynamic switching.
In addition, implementing another network automatic switching method described in fig. 2 can achieve automatic switching of networks and high availability of dual networks.
Example III
Referring to fig. 3, fig. 3 is a schematic structural diagram of a switching system according to an embodiment of the application. As shown in fig. 3, the switching system 300 may include a voting unit 301, a first determining unit 302, a second determining unit 303, and a transmitting unit 304, wherein:
The voting unit 301 is configured to vote for each network port virtual IP address according to the master-slave server network port information and a specified voting mechanism after determining the server location information of each network port virtual IP address in the configuration file.
The first determining unit 302 is configured to determine a target network port virtual IP address according to the voting statistics result of each network port virtual IP address.
And the second determining unit 303 is configured to determine master-slave server configuration change information according to the server location information of the target network port virtual IP address.
And the sending unit 304 is configured to send the configuration change information of the master server and the slave server to a dynamic configuration center, so as to notify the master server and the slave server to reestablish connection through the dynamic configuration center.
In the embodiment of the present application, a system may include 2 server segments (a master server and a slave server respectively), where a server segment includes 2 ports, and the number of server segments is in a proportional relationship with the number of virtual IP addresses of the ports, where the 2 server segments may include 2 virtual IP addresses of the ports, and the two virtual IP addresses of the ports may be in the same server segment or may be in two server segments respectively.
As an optional implementation manner, in the embodiment of the application, the statistical summarization condition of the servers where the two network port virtual IP addresses of the Keepalied dual network card are located can be combined, then an IP address which can be communicated is finally determined through a self-developed election algorithm, and finally, the application service can establish connection communication with Redis and MySQL through the elected IP.
As an optional implementation manner, in the embodiment of the application, after the network fails to switch, the dual-network IP election can be automatically triggered, the result is pushed to the Nacos dynamic configuration center, and the technical point of dynamic update of Nacos configuration items is combined, so that the running application service can reinitialize the connection object with Redis and MySQL by itself after receiving the configuration change, thereby achieving the automatic switching of the network and high availability of the dual network.
As an alternative implementation manner, in the embodiment of the application, the system may pull the current configuration of Redis and MySQL from the Nacos dynamic configuration center, then replace the old Internet protocol IP address with the elected new Internet protocol address, send the latest master-slave server configuration change information to the Nacos dynamic configuration center, and then send the latest configuration to each micro service by the Nacos dynamic configuration center, and update the connection object again.
As an optional implementation manner, in the embodiment of the present invention, after the second determining unit 303 determines the configuration change information of the master server and the slave server, the system may notify all micro services to reestablish the redis connection by using a dynamic configuration center.
As an alternative implementation manner, in the embodiment of the present invention, the master server and the slave server are confirmed at the beginning, but when the network port virtual IP address needs to be acquired at fixed time, if the target network port virtual IP address appears in the slave server, the master server and the slave server change the configuration, and the master server changes the slave server and the master server.
It can be seen that implementing the switching system described in fig. 3 enables dynamic switching of network failures.
In addition, implementing the switching system described in fig. 3 can realize high availability of communication between each application service and other intermediate components under dual networks.
Example IV
Referring to fig. 4, fig. 4 is a schematic structural diagram of another switching system according to an embodiment of the invention. The switching system of fig. 4 is optimized by the switching system of fig. 3. In comparison with the switching system of fig. 3, the switching system of fig. 4 further includes:
A query unit 305, configured to query the master-slave server portal information at regular time before the voting unit 301 determines the server location information of each portal virtual IP address in the configuration file; the master server network port information comprises a master server network port IP address and a slave server network port IP address.
As an optional implementation manner, in the embodiment of the present application, before executing the operation, the query unit 305 of the present application may further perform configuration of the network port IP address, the network port virtual IP address, the opposite network port IP address, and the opposite network port virtual IP address of different network segments for each service.
As an alternative implementation manner, in the embodiment of the present application, a timing task is started in the query unit 305, that is, the network port information of the master server and the slave server is checked every 2 seconds, the first detection unit 306 and the second detection unit 307 analyze whether VIP of keep alive of two network ports in the master server and the slave server is local, and the judging unit 308 counts the total voting results of both parties, and writes the voting results into a file directory specified by the service for statistical summary of the voting results.
The first detecting unit 306 is configured to detect whether the IP address of the main server portal matches the IP address of the main server configuration portal in the configuration file.
And a second detecting unit 307, configured to detect, when the first detecting unit 306 detects that the IP address of the main server portal matches the IP address of the main server configuration portal in the configuration file, whether a first portal virtual IP address connected to the main server portal that matches successfully exists in the main server.
In an embodiment of the present application, the present application may obtain whether the network port IP address of each network card exists and whether the virtual network port IP address (VIP) exists by comparing the result of reading the network port information of the master server and the IP result configured in the configuration file.
And a judging unit 308, configured to judge that the first internet access virtual IP address exists in the main server when the second detecting unit 307 detects that the first internet access virtual IP address connected to the successfully matched main server exists in the main server.
As an optional implementation manner, in an embodiment of the present application, the first detection unit 306 is further configured to detect whether the slave server portal IP address matches the slave server configuration portal IP address in the configuration file.
As an optional implementation manner, in this embodiment of the present application, the second detecting unit 307 is further configured to detect, when the first detecting unit 306 detects that the slave server portal IP address matches the slave server configuration portal IP address in the configuration file, whether a second portal virtual IP address connected to the slave server portal that matches successfully exists in the slave server.
As an optional implementation manner, in the embodiment of the present invention, the determining unit 308 is further configured to determine that the second internet access virtual IP address exists in the slave server when the second detecting unit 307 detects that the second internet access virtual IP address connected to the slave server internet access that is successfully matched exists in the slave server.
In comparison with the switching system of fig. 3, the switching system of fig. 4 further includes:
as an optional implementation manner, in the embodiment of the present invention, the determining unit 308 is further configured to determine that the first network port virtual IP address exists in the slave server if the second detecting unit 307 detects that the first network port virtual IP address does not exist in the master server;
and if the second detecting unit 307 detects that the second internet access virtual IP address does not exist in the slave server, determining that the second internet access virtual IP address exists in the master server.
As an optional implementation manner, in the embodiment of the present invention, the first detecting unit 306 may first see whether an actual network port IP address of the server network card exists, if so, the network port virtual IP address may exist on the server network card, and if just the network port virtual IP address exists on the server, the voting unit 301 may vote for the network port virtual IP address of the server, that is, the network port virtual IP address obtains a vote 1 at this time; if the actual internet access IP address of the server network card exists, but the internet access virtual IP address does not exist on the machine, the determining unit 308 may determine that the internet access virtual IP address exists in the opposite server, and the voting unit 301 votes for the internet access virtual IP address in the opposite server, that is, the internet access virtual IP address obtains the vote 1.
In comparison with the switching system of fig. 3, the voting unit 301 of fig. 4 includes:
and the voting subunit 3011 is configured to vote for the first network port virtual IP address if the network port IP address of the main server is successfully matched and the first network port virtual IP address exists in the main server.
As an optional implementation manner, in this embodiment of the present invention, the voting subunit 3011 is further configured to vote for the first portal virtual IP address if the matching of the network port IP address of the master server is successful and the first portal virtual IP address exists in the slave server.
As an optional implementation manner, in this embodiment of the present invention, the voting subunit 3011 is further configured to vote for the second portal virtual IP address if the matching of the slave server portal IP address is successful and the second portal virtual IP address exists in the slave server.
As an optional implementation manner, in this embodiment of the present invention, the voting subunit 3011 is further configured to vote for the second portal virtual IP address if the slave server portal IP address matches successfully and the second portal virtual IP address exists in the master server.
In the embodiment of the present invention, there may be 1 master server network card and 1 slave server network card in the present system, each network segment may have one network port virtual IP address (VIP), that is, at this time, the system may have 2 network port virtual IP addresses (VIP), each server network card includes 2 network ports, each network port is connected with one network port virtual IP address (VIP), the second detection unit 307 may respectively match the master server network card, the network port virtual IP addresses (VIP) in the slave server network card, and the network port virtual IP addresses (VIP) set in the configuration file, if the matching is successful, the master server network card may obtain the network port virtual IP address (VIP) that is successfully matched as 1, and similarly, the slave server network card may obtain the network port virtual IP address (VIP) that is successfully matched as 1, the master server and the slave server perform voting exchange, and finally count the total number of votes of each network port virtual IP address (VIP), and take the network port virtual IP address (VIP) with a high number of votes as the target port virtual IP address (VIP). If the number of votes for each internet access virtual IP address (VIP) is the same, the system may determine the selected target internet access virtual IP address (VIP) according to the weight factor (priority) in the configuration file.
In the embodiment of the application, the master server and the slave server have election results, the election results are written into the file, and the system can count the final result by reading the file merging result.
In an embodiment of the present application, the voting mechanism is a process of mutually casting between the master server and the slave server, for example, the system may first query whether the real IP address of the network port of the master server exists, if the network port virtual IP address exists in the master server, the system may determine that the network port virtual IP address exists in the master server, then the system performs voting of the network port virtual IP address to the network port of the master server, and then query the slave server, if the real IP address exists in the slave server, but the network port virtual IP address does not exist in the master server, the system may perform voting of the network port virtual IP address to the network port of the master server, and add up the two votes, and the other network ports are the same.
For another example, it may be first queried whether the real IP address of the host server portal exists, if the virtual IP address of the portal does not exist, the system may determine that the virtual IP address of the portal exists in the slave server, then the system votes the virtual IP address of the portal to the slave server portal, then queries the slave server, if the real IP address of the slave server exists and the virtual IP address of the portal also exists, then the system may vote the virtual IP address of the portal to the slave server portal again, and the VIP is added up to the same theory as the other portal.
For another example, the system may first query whether the real IP address of the host server portal exists, if not, the system may not need to determine whether the virtual IP address of the portal exists any more, at this time, the system may not need to vote at this time because the system cannot determine where the virtual IP address of the portal exists, and then query the slave server, if the real IP address of the slave server exists and the virtual IP address of the portal also exists, the system may determine that the virtual IP address of the portal exists in the slave server, the system may vote the virtual IP address of the portal to the slave server portal, and add up the VIP to be a vote, and the other portals are the same.
For another example, the system may first query whether the real IP address of the portal of the master server exists, if not, the system may not need to determine whether the virtual IP address of the portal exists any more, at this time, the system may not need to vote at this time because the system cannot determine where the virtual IP address of the portal exists, and then query the slave server, if the real IP address of the slave server exists but the virtual IP address of the portal does not exist, the system may determine that the virtual IP address of the portal exists in the master server, and then the system may vote for the virtual IP address of the portal to the portal of the master server, and add up the VIP to a vote, which is the same as the other portal.
For another example, the system may first query whether the real IP address of the network port of the master server exists, if not, the system may not need to determine whether the virtual IP address of the network port exists any more, at this time, the system cannot determine where the virtual IP address of the network port exists, so the system does not need to vote at this time, then query the slave server, if the real IP address of the slave server does not exist and the virtual IP address of the network port does not exist, at this time, the system cannot determine where the virtual IP address of the network port exists, at this time, the system does not need to vote, and together with this VIP, no vote is generated, and other network ports have the same theory.
Compared to the switching system of fig. 3, the first determining unit 302 of fig. 4 includes:
a detection subunit 3021, configured to detect whether the voting statistical result of the first network port virtual IP address and the voting statistical result of the second network port virtual IP address are the same.
As an optional implementation manner, in the embodiment of the present invention, the system may circularly read the voting result sent by the master-slave server application (the reading directory reads according to the electric result path address in the configuration file), and if the reading is successful, combine the result into the voting result of the user, and delete the voting file; if the file is not read, the file is read again every 10 seconds. After the voting result is obtained, counting the network port virtual IP addresses (VIP) to obtain the voting result, respectively obtaining corresponding ballots according to the network port virtual IP addresses (VIP), and taking the network port virtual IP addresses (VIP) with high priority as a final result if the ballots of the two network port virtual IP addresses (VIP) are the same.
An obtaining subunit 3022, configured to obtain, when the detecting subunit 3021 detects that the voting statistics of the first network port virtual IP address and the voting statistics of the second network port virtual IP address are the same, the network port priority weight factors of the first network port virtual IP address and the second network port virtual IP address from the configuration file respectively.
A determining subunit 3023, configured to determine the target internet access virtual IP address according to the priority weight factor.
In comparison with the switching system of fig. 3, the switching system of fig. 4 further includes:
as an optional implementation manner, in this embodiment of the present invention, the determining subunit 3023 is further configured to determine, as the target portal virtual IP address, a portal virtual IP address with a high voting statistic result if the detecting subunit 3021 detects that the voting statistic result of the first portal virtual IP address and the voting statistic result of the second portal virtual IP address are different.
Compared to the switching system of fig. 3, the second determining unit 303 of fig. 4 includes:
a setting subunit 3031, configured to set, if the target network port virtual IP address exists in the master server, the redis of the master server as a master node, and set the redis of the slave server as the network port IP address of the master server.
As an optional implementation manner, in this embodiment of the present invention, the setting subunit 3031 is further configured to set, if the target network port virtual IP address exists in the slave server, the redis of the slave server as the master node, and set the redis of the master server as the network port IP address of the slave server.
In the embodiment of the present invention, if the target network port virtual IP address exists in the master server, the setting subunit 3031 sets the redis of the master server as a master node, and sets the redis of the slave server as the network port IP address of the master server;
if the target internet access virtual IP address exists in the slave server, the setting subunit 3031 sets redis of the slave server as a master node, and sets redis of the master server as the internet access IP address of the slave server.
As an optional implementation manner, in this embodiment of the present invention, if an election result of a target internet access virtual IP address (VIP) is obtained from a main server, the following is performed: redis-cli-p 6379 SLAVEOF NO ONE, i.e. the setup subunit 3031 sets Redis in the main server as the host. If the election result of the target internet access virtual IP address (VIP) cannot be obtained from the main server, executing: redis-cli-p 6379 SLAVEOF 10.10.43.89 6379, i.e. the setup subunit 3031 sets Redis in the master server as slave and points to the host portal IP address.
As an optional implementation manner, in the embodiment of the present application, the master-slave relationship of redis is that the master server redis is set as a non-slave node, and the slave server redis is set as the internet access IP address of the master server, so that the master-slave relationship is established.
As an optional implementation manner, in the embodiment of the application, the rediss are high in availability of own master and slave, and do not support the application scene of the double network card, so that the rediss can be applied to the application scene of the double network card in a dynamic configuration center mode.
It can be seen that implementing another switching system as described in fig. 4 enables network fail-over.
Furthermore, implementing another switching system as described in fig. 4 enables automatic switching of networks, high availability of dual networks.
Example five
Referring to fig. 5, fig. 5 is a schematic structural diagram of another switching system according to an embodiment of the application. As shown in fig. 5, the switching system may include:
a memory 501 in which executable program codes are stored;
a processor 502 coupled to the memory 501;
the processor 502 invokes executable program codes stored in the memory 501 to execute any one of the network automatic switching methods of fig. 1-2.
The embodiment of the invention discloses a computer readable storage medium which stores a computer program, wherein the computer program enables a computer to execute any one of the network automatic switching methods shown in fig. 1-2.
The embodiments of the present invention also disclose a computer program product, wherein the computer program product, when run on a computer, causes the computer to perform some or all of the steps of the method as in the method embodiments above.
Those of ordinary skill in the art will appreciate that all or part of the steps of the various methods of the above embodiments may be implemented by hardware associated with a program that may be stored in a computer-readable storage medium, including Read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), one-time programmable Read-Only Memory (OTPROM), electrically erasable programmable Read-Only Memory (EEPROM), compact disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM), or other optical disk Memory, magnetic disk Memory, tape Memory, or any other medium that can be used to carry or store data that is readable by a computer.
The above describes in detail a network automatic switching method and switching system disclosed in the embodiments of the present invention, and specific examples are applied to describe the principles and embodiments of the present invention, where the description of the above embodiments is only for helping to understand the method and core ideas of the present invention; meanwhile, as those skilled in the art will vary in the specific embodiments and application scope according to the idea of the present invention, the present disclosure should not be construed as limiting the present invention in summary.

Claims (9)

1. A method for automatically switching networks, comprising:
after the position information of the server of each network port virtual IP address in the configuration file is determined, voting is carried out on each network port virtual IP address according to the network port information of the master server and the slave server and a designated voting mechanism;
determining a target network port virtual IP address according to voting statistics results of the network port virtual IP addresses;
determining master-slave server configuration change information according to the server position information of the target network port virtual IP address;
the configuration change information of the master server and the slave server is sent to a dynamic configuration center so as to inform the master server and the slave server of reestablishing connection through the dynamic configuration center;
After determining the position information of the server where each network port virtual IP address in the configuration file is located, voting is performed on each network port virtual IP address according to the network port information of the master server and the assigned voting mechanism, including:
if the network port IP address of the main server is successfully matched with the network port IP address of the main server configuration in the configuration file, and a first network port virtual IP address connected with the network port of the main server successfully matched exists in the main server, voting is conducted on the first network port virtual IP address;
if the network port IP address of the master server is successfully matched with the network port IP address of the master server configuration in the configuration file, and the first network port virtual IP address exists in the slave server, voting is carried out on the first network port virtual IP address;
if the slave server network port IP address is successfully matched with the slave server configuration network port IP address in the configuration file, and a second network port virtual IP address connected with the slave server network port which is successfully matched exists in the slave server, voting is conducted on the second network port virtual IP address;
and if the slave server network port IP address is successfully matched with the slave server configuration network port IP address in the configuration file, and the second network port virtual IP address exists in the master server, voting is conducted on the second network port virtual IP address.
2. The method of claim 1, wherein before determining the server location information of each portal virtual IP address in the configuration file, the method further comprises:
inquiring the network port information of the master server and the slave server at regular time; the master server network port information comprises a master server network port IP address and a slave server network port IP address;
detecting whether the IP address of the main server network port is matched with the IP address of the main server configuration network port in the configuration file; if yes, detecting whether a first network port virtual IP address connected with the network port of the main server successfully matched exists in the main server;
if yes, judging that the first network port virtual IP address exists in the main server;
detecting whether the network port IP address of the slave server is matched with the network port IP address of the slave server configuration in the configuration file; if yes, detecting whether a second network port virtual IP address connected with the network port of the slave server successfully matched exists in the slave server;
if yes, judging that the second network port virtual IP address exists in the slave server.
3. The method according to claim 2, wherein the method further comprises:
If the first network port virtual IP address is detected to be not in the master server, judging that the first network port virtual IP address is in the slave server;
and if the second network port virtual IP address is detected not to exist in the slave server, judging that the second network port virtual IP address exists in the master server.
4. The method according to claim 1, wherein determining the target portal virtual IP address according to the voting statistics of each of the portal virtual IP addresses comprises:
detecting whether the voting statistical result of the first network port virtual IP address is the same as the voting statistical result of the second network port virtual IP address; if yes, respectively acquiring the network port priority weight factors of the first network port virtual IP address and the second network port virtual IP address from the configuration file;
and determining the virtual IP address of the target network port according to the priority weight factors.
5. The method according to claim 4, wherein the method further comprises:
if the voting statistical result of the first network port virtual IP address is detected to be different from the voting statistical result of the second network port virtual IP address, determining the network port virtual IP address with high voting statistical result as the target network port virtual IP address.
6. The method according to claim 1, wherein determining master-slave server configuration change information according to server location information of the target portal virtual IP address includes:
setting the redis of the master server as a master node and the redis of the slave server as the internet access IP address of the master server if the target internet access virtual IP address exists in the master server;
and if the target internet access virtual IP address exists in the slave server, setting the redis of the slave server as a master node, and setting the redis of the master server as the internet access IP address of the slave server.
7. A switching system, the switching system comprising:
the voting unit is used for voting to each network port virtual IP address according to the network port information of the master server and the appointed voting mechanism after determining the position information of the server of each network port virtual IP address in the configuration file;
the first determining unit is used for determining a target network port virtual IP address according to voting statistical results of the network port virtual IP addresses;
the second determining unit is used for determining master-slave server configuration change information according to the server position information of the target network port virtual IP address;
The sending unit is used for sending the configuration change information of the master server and the slave server to a dynamic configuration center so as to inform the master server and the slave server of reestablishing connection through the dynamic configuration center;
wherein the voting unit includes:
the voting subunit is used for voting the first network port virtual IP address if the network port IP address of the main server is successfully matched with the network port IP address of the main server configuration in the configuration file and the first network port virtual IP address connected with the network port of the main server successfully matched exists in the main server;
the voting subunit is further configured to vote for the first network port virtual IP address if the network port IP address of the master server is successfully matched with the network port IP address of the master server configuration in the configuration file, and the first network port virtual IP address exists in the slave server;
the voting subunit is further configured to vote for a second network port virtual IP address connected to the successfully matched slave server network port if the slave server network port IP address is successfully matched with the slave server configuration network port IP address in the configuration file, and the second network port virtual IP address exists in the slave server;
And the voting subunit is further configured to vote for the second network port virtual IP address if the slave server network port IP address is successfully matched with the slave server configuration network port IP address in the configuration file, and the second network port virtual IP address exists in the master server.
8. The switching system of claim 7, further comprising:
the query unit is used for periodically querying the network port information of the master server and the slave server before the voting unit determines the position information of the server of the virtual IP address of each network port in the configuration file; the master server network port information comprises a master server network port IP address and a slave server network port IP address;
the first detection unit is used for detecting whether the IP address of the main server network port is matched with the IP address of the main server configuration network port in the configuration file;
the second detection unit is used for detecting whether a first network port virtual IP address connected with the network port of the main server successfully matched exists in the main server or not when the first detection unit detects that the network port IP address of the main server is matched with the IP address of the main server configuration network port in the configuration file;
The judging unit is used for judging that the first network port virtual IP address exists in the main server when the second detecting unit detects that the first network port virtual IP address connected with the network port of the main server successfully matched exists in the main server;
the first detection unit is further configured to detect whether the slave server network port IP address is matched with a slave server configuration network port IP address in the configuration file;
the second detection unit is further configured to detect, when the first detection unit detects that the slave server network port IP address matches the slave server configuration network port IP address in the configuration file, whether a second network port virtual IP address connected to the slave server network port that matches successfully exists in the slave server;
and the judging unit is further used for judging that the second network port virtual IP address exists in the slave server when the second detecting unit detects that the second network port virtual IP address connected with the slave server network port successfully matched exists in the slave server.
9. A switching system, the switching system comprising:
a memory storing executable program code;
a processor coupled to the memory;
The processor invokes the executable program code stored in the memory to perform the network auto-switching method of any one of claims 1-6.
CN202310990313.5A 2023-08-08 2023-08-08 Automatic network switching method and switching system Active CN116708283B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310990313.5A CN116708283B (en) 2023-08-08 2023-08-08 Automatic network switching method and switching system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310990313.5A CN116708283B (en) 2023-08-08 2023-08-08 Automatic network switching method and switching system

Publications (2)

Publication Number Publication Date
CN116708283A CN116708283A (en) 2023-09-05
CN116708283B true CN116708283B (en) 2023-10-31

Family

ID=87843717

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310990313.5A Active CN116708283B (en) 2023-08-08 2023-08-08 Automatic network switching method and switching system

Country Status (1)

Country Link
CN (1) CN116708283B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6556547B1 (en) * 1998-12-15 2003-04-29 Nortel Networks Limited Method and apparatus providing for router redundancy of non internet protocols using the virtual router redundancy protocol
WO2009009977A1 (en) * 2007-07-18 2009-01-22 Hangzhou H3C Technologies Co., Ltd. Master backup switch method for route device and backup system for route device
CN103546315A (en) * 2013-10-11 2014-01-29 北京星网锐捷网络技术有限公司 System, method and equipment for backing up DHCP (dynamic host configuration protocol) server
CN105554130A (en) * 2015-12-18 2016-05-04 深圳中兴网信科技有限公司 Distributed storage system-based NameNode switching method and switching device
CN108900647A (en) * 2018-09-13 2018-11-27 新华三技术有限公司成都分公司 Address switching handling method and device
CN109344014A (en) * 2018-09-26 2019-02-15 新华三大数据技术有限公司 A kind of main/standby switching method, device and communication equipment
CN114124650A (en) * 2021-12-08 2022-03-01 中国电子科技集团公司第三十四研究所 Master-slave deployment method of SPTN (shortest Path bridging) network controller
CN114584608A (en) * 2022-02-09 2022-06-03 北信源系统集成有限公司 Network switching method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009147735A (en) * 2007-12-14 2009-07-02 Nec Corp Network, node device, network redundancy method, and network redundancy program
US8549120B2 (en) * 2010-06-28 2013-10-01 Cisco Technology, Inc. System and method for location based address assignment in the distribution of traffic in a virtual gateway

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6556547B1 (en) * 1998-12-15 2003-04-29 Nortel Networks Limited Method and apparatus providing for router redundancy of non internet protocols using the virtual router redundancy protocol
WO2009009977A1 (en) * 2007-07-18 2009-01-22 Hangzhou H3C Technologies Co., Ltd. Master backup switch method for route device and backup system for route device
CN103546315A (en) * 2013-10-11 2014-01-29 北京星网锐捷网络技术有限公司 System, method and equipment for backing up DHCP (dynamic host configuration protocol) server
CN105554130A (en) * 2015-12-18 2016-05-04 深圳中兴网信科技有限公司 Distributed storage system-based NameNode switching method and switching device
CN108900647A (en) * 2018-09-13 2018-11-27 新华三技术有限公司成都分公司 Address switching handling method and device
CN109344014A (en) * 2018-09-26 2019-02-15 新华三大数据技术有限公司 A kind of main/standby switching method, device and communication equipment
CN114124650A (en) * 2021-12-08 2022-03-01 中国电子科技集团公司第三十四研究所 Master-slave deployment method of SPTN (shortest Path bridging) network controller
CN114584608A (en) * 2022-02-09 2022-06-03 北信源系统集成有限公司 Network switching method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
虚拟路由冗余协议及应用;杨波, 武波;通信世界(19);全文 *

Also Published As

Publication number Publication date
CN116708283A (en) 2023-09-05

Similar Documents

Publication Publication Date Title
US7518983B2 (en) Proxy response apparatus
CN109344014B (en) Main/standby switching method and device and communication equipment
CN108234191A (en) The management method and device of cloud computing platform
US10917289B2 (en) Handling network failures in networks with redundant servers
CN112328421B (en) System fault processing method and device, computer equipment and storage medium
CN112506702B (en) Disaster recovery method, device, equipment and storage medium for data center
CN113489691B (en) Network access method, network access device, computer readable medium and electronic equipment
CN112866408B (en) Service switching method, device, equipment and storage medium in cluster
CN112118130A (en) Self-adaptive distributed cache master/standby state information switching method and device
CN113905050A (en) Method, device and system for detecting internet access information
CN117480067A (en) Electric vehicle charge management and client device
CN116708283B (en) Automatic network switching method and switching system
US10402282B1 (en) Assisted device recovery
CN108009045B (en) Method and device for processing faults of main and standby databases
CN106302077B (en) Disaster recovery rewinding method and device
CN107819591B (en) Data synchronization method, device, system and network equipment
CN111510336B (en) Network equipment state management method and device
CN114422335A (en) Communication method, communication device, server and storage medium
JP2014239298A (en) Failure cause estimation device, failure cause estimation system, failure cause estimation method, and failure cause estimation program
CN112104531B (en) Backup implementation method and device
CN109756543B (en) Decoupling system and method for program association
CN110266795A (en) One kind being based on Openstack platform courses method
CN116319676B (en) Domain name resolution method, device, storage medium and system
CN115277379B (en) Distributed lock disaster recovery processing method and device, electronic equipment and storage medium
WO2016177116A1 (en) Network path switching method and device

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