CN107465556A - A kind of switching method of active/standby server, apparatus and system - Google Patents
A kind of switching method of active/standby server, apparatus and system Download PDFInfo
- Publication number
- CN107465556A CN107465556A CN201710800637.2A CN201710800637A CN107465556A CN 107465556 A CN107465556 A CN 107465556A CN 201710800637 A CN201710800637 A CN 201710800637A CN 107465556 A CN107465556 A CN 107465556A
- Authority
- CN
- China
- Prior art keywords
- address
- server
- standby server
- gateway
- itself
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 230000004044 response Effects 0.000 claims description 40
- 238000012360 testing method Methods 0.000 claims description 39
- 230000005540 biological transmission Effects 0.000 claims description 14
- 238000013507 mapping Methods 0.000 claims description 11
- 238000012544 monitoring process Methods 0.000 claims description 9
- 238000012545 processing Methods 0.000 claims description 8
- 238000012546 transfer Methods 0.000 abstract description 2
- 230000002035 prolonged effect Effects 0.000 description 8
- 238000001514 detection method Methods 0.000 description 3
- 230000004888 barrier function Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0663—Performing the actions predefined by failover planning, e.g. switching to standby network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/22—Arrangements for detecting or preventing errors in the information received using redundant apparatus to increase reliability
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/10—Mapping addresses of different types
- H04L61/103—Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/148—Migration or transfer of sessions
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 discloses a kind of switching method of active/standby server, apparatus and system, including:Standby server monitors the network connection state of master server;When listening to connecting fault, the state of redundant internet agreement (IP) address of itself is arranged to upstate;The secondary ip address of itself and media access control (MAC) address are sent to gateway, so that information refresh address analysis protocol (APR) table of gateway according to acquisition;Wherein, the secondary ip address of standby server and the IP address of master server are identical.From the embodiment of the present invention, because standby server is monitored the network connection state of master server, and the information that gateway can be made to refresh APR tables is sent to gateway when listening to network connectivity fai_lure, so as to when gateway receives service request again, with regard to that can transfer to service request standby server to be handled, therefore rapidly realize the switching of active/standby server.
Description
Technical field
The present invention relates to Internet technical field, more particularly to a kind of switching method of active/standby server, apparatus and system.
Background technology
With a large amount of deployment of business event on the server, when power-off, server damage occurs, attacked and its
During the factor of his force majeure, the situation that frequently can lead to system business can not access occurs, therefore, it is necessary to standby by switching to
With server (i.e. standby server) by standby server process access request.
In correlation technique, the switching method of active/standby server can set domain name system (Domain Name System,
DNS) server, then realize that a domain name corresponds to multiple Internet protocol (Internet by way of domain name mapping
Protocol, IP) address, so as to reach the purpose of active/standby server switching.
But due to setting the cost of dns server larger, it is past when process object is small businesses or LAN service
Toward will not set dns server, and when carrying out the switching of active/standby server in the case of without dns server, it is necessary to keeper from
The network connection state of row monitoring master server, when monitoring the network connectivity fai_lure of master server, standby server is logged in, is entered
And with purchase server ip address be with master server IP address identical IP address, the switching of active/standby server could be realized,
Therefore, certainly, this switching method needs to expend more time, so as to cause prolonged network interruption.
The content of the invention
In order to solve the above-mentioned technical problem, the present invention provides a kind of switching method of active/standby server, apparatus and system, energy
Enough on the premise of long-time network interruption is avoided the occurrence of, the switching of active/standby server is realized.
In order to reach the object of the invention, the invention provides a kind of switching method of active/standby server, including:
Standby server monitors the network connection state of master server;
When listening to the network connectivity fai_lure of the master server, by the shape of the redundant internet Protocol IP address of itself
State is arranged to upstate;Wherein, the secondary ip address of the standby server is identical with the IP address of the master server;
The secondary ip address of itself and MAC address are sent to gateway so that the gateway according to
The information refresh address analysis protocol APR tables of acquisition.
Before the standby server monitors the network state of master server, in addition to:
The standby server sets primary ip address on the network interface card of itself;Wherein, the primary ip address of the standby server with
The IP address of the master server is different;
According to the part generation Microsoft Loopback Adapter for the network interface card for having set the primary ip address;
Secondary ip address is set on the Microsoft Loopback Adapter, and it is disabled status to set the state of the secondary ip address;
Obtain the IP address of the master server;
It is described that the secondary ip address of itself and MAC Address are sent to gateway, so that information brush of the gateway according to acquisition
Before new APR tables, in addition to:
APR table cache clearance orders are sent to the gateway.
The standby server monitors the network connection state of master server, including:
The standby server sends to the master server every preset time according to the IP address of the master server and surveyed
Try packet;
If being not received by the response data packet that the master server is sent, the network connection event of the master server is determined
Barrier;Wherein, the response data packet master server responds the test data bag and generated.
It is described send APR table caches clearance order and the Microsoft Loopback Adapter information of itself to gateway after, in addition to:
The standby server detects whether the network connection state of itself is stablized;
If detecting, the network connection state of itself is stable, deletes the primary ip address of itself.
The standby server detects whether the network connection state of itself is stablized, including:
The standby server sends M test data bag according to the secondary ip address of itself to itself;Wherein, M is just whole
Number;
Obtain the transmission time of the M test data bag;
Obtain the reception time of M response data packet;Wherein, the M response data packet is the standby server response
The M test data bag and generate;
The time difference for sending time and the reception time of the M response data packet of the M test data bag is calculated,
Obtain M packet time difference;
If the M packet time difference is both less than preset time, determine that the network connection state of itself is stable.
Present invention also offers a kind of switching method of active/standby server, including:
Gateway receives the secondary ip address and MAC Address for the standby server that standby server is sent;
APR tables are refreshed according to the information of acquisition.
Before the refreshing APR tables according to the information of acquisition, in addition to:
The gateway receives the APR table cache clearance orders that the standby server is sent;
Accordingly, it is described that APR tables are refreshed according to the information of acquisition, including:
The caching of the APR tables is purged according to the APR table caches clearance order;
Mapping relations are established in the APR tables according to the secondary ip address of the standby server and MAC Address.
Present invention also offers a kind of standby server, including:
Module is monitored, for monitoring the network connection state of master server;
Processing module, for when listening to the network connectivity fai_lure of the master server, by the standby IP of standby server
The state of address is arranged to upstate;Wherein, the IP address of the secondary ip address of the standby server and the master server
It is identical;
Sending module, for the secondary ip address of itself and MAC Address to be sent into gateway so that the gateway according to
The information of acquisition refreshes APR tables.
Present invention also offers a kind of gateway, including:
Receiving module, the secondary ip address and MAC Address of the standby server sent for receiving standby server;
Refresh module, for refreshing APR tables according to the information of acquisition.
Present invention also offers a kind of switching system of active/standby server, including:
Standby server as described above, gateway as described above, and master server;
Wherein, the master server is used to receive the test data bag that the standby server is sent, and responds the test number
Response data packet is generated according to bag, and the response data packet is sent to the master server.
Compared with prior art, the present invention comprises at least the network connection state that standby server monitors master server;Work as prison
When hearing the network connectivity fai_lure of master server, the state of the secondary ip address of itself is arranged to upstate;Wherein, standby clothes
The secondary ip address of business device is identical with the IP address of master server;By itself secondary ip address and media access control
(Media Access Control, MAC) address is sent to gateway, is assisted so that gateway parses according to the information refresh address of acquisition
Discuss (Address Resolution Protocol, APR) table.From technical scheme provided by the invention, due to standby server
The network connection state of master server is monitored, and when listening to network connectivity fai_lure immediately to gateway send itself with
Master server IP address identical secondary ip address and the MAC Address of itself, to enable gateway according to these information brushes
New APR tables, so as to when gateway receives service request again, can just transfer to service request standby server to be handled, therefore
Realize the switching of active/standby server;Simultaneously because the secondary ip address of standby server is pre-configured, once main service
Device breaks down, and can just substitute master server processing business to ask immediately, so as to avoid prolonged network interruption.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification
Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by specification, rights
Specifically noted structure is realized and obtained in claim and accompanying drawing.
Brief description of the drawings
Accompanying drawing is used for providing further understanding technical solution of the present invention, and a part for constitution instruction, with this
The embodiment of application is used to explain technical scheme together, does not form the limitation to technical solution of the present invention.
Fig. 1 is a kind of schematic flow sheet of the switching method of active/standby server provided in an embodiment of the present invention;
Fig. 2 is the schematic flow sheet of the switching method of another active/standby server provided in an embodiment of the present invention;
Fig. 3 is the schematic flow sheet of the switching method of another active/standby server provided in an embodiment of the present invention;
Fig. 4 is the schematic flow sheet of the switching method of another active/standby server provided in an embodiment of the present invention;
Fig. 5 is a kind of structural representation of standby server provided in an embodiment of the present invention;
Fig. 6 is the structural representation of another standby server provided in an embodiment of the present invention;
Fig. 7 be it is provided in an embodiment of the present invention another for server structural representation;
Fig. 8 is a kind of structural representation of gateway provided in an embodiment of the present invention;
Fig. 9 is the structural representation of another gateway provided in an embodiment of the present invention;
Figure 10 is a kind of structural representation of the switching system of active/standby server provided in an embodiment of the present invention.
Embodiment
For the object, technical solutions and advantages of the present invention are more clearly understood, below in conjunction with accompanying drawing to the present invention
Embodiment be described in detail.It should be noted that in the case where not conflicting, in the embodiment and embodiment in the application
Feature can mutually be combined.
The embodiment of the present invention provides a kind of switching method of active/standby server, as shown in figure 1, this method includes:
Step 101, standby server monitor the network connection state of master server.
It should be noted that standby server always belongs to hot standby state and has been pre-configured with secondary ip address, this sample prescription
Continue after an action of the bowels and carry out follow-up step in the network connectivity fai_lure for listening to master server.
Step 102, when listening to the network connectivity fai_lure of master server, the state of the secondary ip address of itself is set
For upstate.
Wherein, the secondary ip address of standby server is identical with the IP address of master server.
It should be noted that the state of the secondary ip address of standby server is originally disabled status.
Step 103, the secondary ip address of itself and MAC Address be sent to gateway, so that letter of the gateway according to acquisition
Breath refreshes APR tables.
It should be noted that because gateway obtains the new information that can be used for establishing mapping relations, therefore being capable of root
Refresh APR tables according to the information of acquisition.
The switching method for the active/standby server that the embodiment of the present invention is provided, the network that standby server monitors master server connect
Connect state;When listening to the network connectivity fai_lure of master server, the state of the secondary ip address of itself is arranged to available shape
State;Wherein, the secondary ip address of standby server is identical with the IP address of master server;By itself secondary ip address and MAC
Address is sent to gateway, so that gateway refreshes APR according to the information of acquisition sends APR table caches clearance order and itself to gateway
Microsoft Loopback Adapter information so that gateway according to the information of acquisition refresh APR tables.From technical scheme provided by the invention, from
Technical scheme provided by the invention is visible, because standby server is monitored the network connection state of master server, and is supervising
Hear during network connectivity fai_lure immediately to gateway send itself with master server IP address identical secondary ip address and itself
MAC Address, to enable gateway to refresh APR tables according to these information, so as to when gateway receives service request again, just
Service request can will be transferred to standby server to be handled, it is achieved that the switching of active/standby server;Simultaneously because standby service
The secondary ip address of device is pre-configured, once master server breaks down, can just substitute master server to handle industry immediately
Business request, so as to avoid prolonged network interruption.
The embodiment of the present invention provides the switching method of another active/standby server, as shown in Fig. 2 this method includes:
Step 201, gateway receive the secondary ip address and MAC Address for the standby server that standby server is sent.
Step 202, according to the information of acquisition refresh APR tables.
The switching method for the active/standby server that the embodiment of the present invention is provided, gateway receive the standby service that standby server is sent
The secondary ip address and MAC Address of device;APR tables are refreshed according to the information of acquisition.From technical scheme provided by the invention,
Due to the secondary ip address and MAC Address refreshing APR tables of the standby server that gateway is sent according to standby server, so as to work as gateway
When receiving service request again, service request can just be transferred to standby server to be handled, it is achieved that active/standby server
Switching;As soon as simultaneously because receiving the secondary ip address and MAC Address of standby server, refresh APR tables, therefore can be quick
Ground makes standby server substitute master server, so as to avoid prolonged network interruption.
The embodiment of the present invention provides the switching method of another active/standby server, as shown in figure 3, this method includes:
Step 301, standby server set primary ip address on the network interface card of itself.
Wherein, the primary ip address of standby server is different from the IP address of master server.
Specifically, the primary ip address of standby server is used to be communicated with master server, therefore set primary ip address
It is different from the IP address of master server.
Step 302, standby server generate Microsoft Loopback Adapter according to a part for the network interface card for having set primary ip address.
Specifically, standby server only has one piece of network interface card, therefore an IP address can only be set in theory, but standby server
The resource of a part can be obtained in itself network interface card, Microsoft Loopback Adapter is produced using this part resource, so as in virtual net
One IP address is set again on card.
Step 303, standby server set secondary ip address on Microsoft Loopback Adapter, and set the state of secondary ip address to prohibit
Use state.
Wherein, the secondary ip address of standby server is identical with the IP address of master server.
Specifically, because the server for now responding service request is master server, and the secondary ip address of standby server
It is identical with the IP address of master server, so if the state for being not provided with the secondary ip address of standby server obtains for disabled status
Words, a same IP address will correspond to two MAC Address, the i.e. MAC Address of the MAC Address of master server and standby server,
So service request will be unable to be sent to master server, cause service request not accept.
Step 304, standby server obtain the IP address of master server.
Step 305, standby server send test number every preset time according to the IP address of master server to master server
According to bag.
Specifically, test data bag can be ping packets, ping is operating system Windows, Unix and Linux systems
An order under system, ping falls within a communication protocol, is transmission control protocol/Internet Protocol
The part of (Transmission Control Protocol/Internet Protocol, TCP/IP) agreement.Utilize
" ping " order can check whether network connects, and can carry out assistant analysis well, and then judge network failure.
Specifically, preset time can be configured as the case may be, if real-time monitoring must be realized as far as possible, that
Preset time can is configured shorter, but the load of so active/standby server is also relatively larger, therefore a meeting
Than the transmission test data bag of comparatively dense, the transmission response data packet than comparatively dense is compared in a meeting;If to the real-time of monitoring
Property require so high, then preset time can is configured longer, and the load of such active/standby server also can be relative
It is smaller.
If step 306, the response data packet for being not received by master server transmission, standby server determines the net of master server
Network connecting fault.
Wherein, response data packet generates for master server response test packet.
Specifically, because if the network connection of master server does not have failure, master server is receiving standby server transmission
Test data bag after, can response test packet generation response data packet, be then sent to standby server, but if main clothes
During the network connectivity fai_lure of business device, master server just can not receive the test data bag that standby server is sent, or receive standby clothes
Network connection is broken down after the test data bag that business device is sent, so as to send response data packet without normal direction for server.
The state of the secondary ip address of itself is arranged to upstate by step 307, standby server.
APR table cache clearance orders are sent to gateway by step 308, standby server.
Step 309, gateway receive the APR table cache clearance orders that standby server is sent.
The secondary ip address of itself and MAC Address are sent to gateway by step 310, standby server.
Step 311, gateway receive the secondary ip address and MAC Address for the standby server that standby server is sent.
Step 312, gateway are purged according to APR table caches clearance order to the caching of APR tables.
Specifically, the mapping relations being originally present in APR tables be IP address and the main service of master server MAC Address it
Between the mapping relations established, therefore, gateway can be purged according to APR table caches clearance order to these information.
Step 313, gateway establish mapping relations according to the secondary ip address and MAC Address of standby server in APR tables.
Specifically, the mapping relations established are between the IP address of standby server and the MAC Address of standby server
The mapping relations of foundation.
Step 314, standby server detect whether the network connection state of itself is stablized.
If step 315, detecting that the network connection state of itself is stable, standby server deletes the primary ip address of itself.
Specifically, standby server deletes the primary ip address of itself, only the secondary ip address of standby server is remained,
So that standby server " replacement " master server.
The switching method for the active/standby server that the embodiment of the present invention is provided, the network that standby server monitors master server connect
Connect state;When listening to the network connectivity fai_lure of master server, the state of the secondary ip address of itself is arranged to available shape
State;Wherein, the secondary ip address of standby server is identical with the IP address of master server;By itself secondary ip address and MAC
Address is sent to gateway, so that gateway refreshes APR according to the information of acquisition sends APR table caches clearance order and itself to gateway
Microsoft Loopback Adapter information so that gateway according to the information of acquisition refresh APR tables.From technical scheme provided by the invention, from
Technical scheme provided by the invention is visible, because standby server is monitored the network connection state of master server, and is supervising
Hear during network connectivity fai_lure immediately to gateway send itself with master server IP address identical secondary ip address and itself
MAC Address, to enable gateway to refresh APR tables according to these information, so as to when gateway receives service request again, just
Service request can will be transferred to standby server to be handled, it is achieved that the switching of active/standby server;Simultaneously because standby service
The secondary ip address of device is pre-configured, once master server breaks down, can just substitute master server to handle industry immediately
Business request, so as to avoid prolonged network interruption.
The embodiment of the present invention provides the switching method of another active/standby server, as shown in figure 4, this method includes:
Step 401, standby server set primary ip address on the network interface card of itself.
Step 402, standby server generate Microsoft Loopback Adapter according to a part for the network interface card for having set primary ip address.
Step 403, standby server set secondary ip address on Microsoft Loopback Adapter, and set the state of secondary ip address to prohibit
Use state.
Step 404, standby server obtain the IP address of master server.
Step 405, standby server send test number every preset time according to the IP address of master server to master server
According to bag.
If step 406, the response data packet for being not received by master server transmission, standby server determines the net of master server
Network connecting fault.
The state of the secondary ip address of itself is arranged to upstate by step 407, standby server.
APR table cache clearance orders are sent to gateway by step 408, standby server.
Step 409, gateway receive the APR table cache clearance orders that standby server is sent.
The secondary ip address of itself and MAC Address are sent to gateway by step 410, standby server.
Step 411, gateway receive the secondary ip address and MAC Address for the standby server that standby server is sent.
Step 412, gateway are purged according to APR table caches clearance order to the caching of APR tables.
Step 413, gateway establish mapping relations according to the secondary ip address and MAC Address of standby server in APR tables.
Step 414, standby server send M test data bag according to the secondary ip address of itself to itself.
Wherein, M is positive integer.
Specifically, M number can be any positive integer, generally, M number can be 10.
Step 415, standby server obtain the transmission time of M test data bag.
Step 416, standby server obtain the reception time of M response data packet.
Wherein, the standby server of M response data packet generates in response to M test data bag.
Specifically, standby server sends a test data bag to itself, if the network connection state of itself is without event
During barrier, a response data packet itself can be received.
Step 417, standby server calculate the reception time for sending time and M response data packet of M test data bag
Time difference, obtain M packet time difference.
Specifically, standby server calculates when sending time and the reception of the 1st response data packet of the 1st test data bag
Between time difference, obtain the 1st packet time difference;Calculate transmission time of the 2nd test data bag and the 2nd response data
The time difference of the reception time of bag, obtain the 2nd packet time difference ... calculate transmission time of m-th test data bag with
The time difference of the reception time of m-th response data packet, it is poor to obtain m-th packet time.
If step 418, M packet time difference are both less than preset time, determine that the network connection state of itself is stable.
Specifically, if M packet time difference is not both less than preset time, determine that the network connection state of itself is unstable
It is fixed, continue executing with step 414~418.
If step 419, detecting that the network connection state of itself is stable, standby server deletes the primary ip address of itself.
The switching method for the active/standby server that the embodiment of the present invention is provided, the network that standby server monitors master server connect
Connect state;When listening to the network connectivity fai_lure of master server, the state of the secondary ip address of itself is arranged to available shape
State;Wherein, the secondary ip address of standby server is identical with the IP address of master server;By itself secondary ip address and MAC
Address is sent to gateway, so that gateway refreshes APR according to the information of acquisition sends APR table caches clearance order and itself to gateway
Microsoft Loopback Adapter information so that gateway according to the information of acquisition refresh APR tables.From technical scheme provided by the invention, from
Technical scheme provided by the invention is visible, because standby server is monitored the network connection state of master server, and is supervising
Hear during network connectivity fai_lure immediately to gateway send itself with master server IP address identical secondary ip address and itself
MAC Address, to enable gateway to refresh APR tables according to these information, so as to when gateway receives service request again, just
Service request can will be transferred to standby server to be handled, it is achieved that the switching of active/standby server;Simultaneously because standby service
The secondary ip address of device is pre-configured, once master server breaks down, can just substitute master server to handle industry immediately
Business request, so as to avoid prolonged network interruption.
The embodiment of the present invention provides a kind of standby server, as shown in figure 5, this includes for server 5:
Module 51 is monitored, for monitoring the network connection state of master server.
Processing module 52, for when listening to the network connectivity fai_lure of master server, by the standby IP of standby server
The state of location is arranged to upstate;Wherein, the secondary ip address of standby server is identical with the IP address of master server.
Sending module 53, the secondary ip address of itself and MAC Address are sent to gateway, so that gateway is according to acquisition
Information refreshes APR tables.
Further, on the basis of embodiment corresponding to Fig. 5, the embodiment of the present invention provides another standby server, such as Fig. 6
Shown, this also includes for server 5:
First setup module 54, for setting primary ip address on the network interface card of standby server;Wherein, the main IP of standby server
Address is different from the IP address of master server.
Generation module 55, for the part generation Microsoft Loopback Adapter according to the network interface card for having set primary ip address.
Second setup module 56, for setting secondary ip address on Microsoft Loopback Adapter, and the state of secondary ip address is set
For disabled status.
Acquisition module 57, for obtaining the IP address of master server.
Further, sending module 53, it is additionally operable to APR table cache clearance orders being sent to gateway.
Monitoring module 51 includes:
First transmitting element 511, send and survey to master server every preset time for the IP address according to master server
Try packet.
First determining unit 512, if the response data packet for being not received by master server transmission, determines master server
Network connectivity fai_lure;Wherein, response data packet generates for master server response test packet.
This also includes for server 5:
Whether detection module 58, the network connection state for detecting standby server are stablized.
Removing module 59, if for detecting that the network connection state of standby server is stable, delete the main IP of standby server
Address.
Further, on the basis of embodiment corresponding to Fig. 6, the embodiment of the present invention provides another for server, such as Fig. 7
Shown, detection module 58 includes:
Second transmitting element 581, M test data is sent to standby server for the secondary ip address according to standby server
Bag;Wherein, M is positive integer.
First acquisition unit 582, for obtaining the transmission time of M test data bag.
Second acquisition unit 583, for obtaining the reception time of M response data packet;Wherein, M response data packet is
Standby server generates in response to M test data bag.
Computing unit 584, for calculating the reception time for sending time and M response data packet of M test data bag
Time difference, obtain M packet time difference.
Second determining unit 585, if being both less than preset time for M packet time difference, it is determined that the net of standby server
Network connection status is stable.
The standby server that the embodiment of the present invention is provided, monitor the network connection state of master server;When listening to main clothes
During the network connectivity fai_lure of business device, the state of the secondary ip address of itself is arranged to upstate;APR tables are sent to gateway to delay
Clearance order and the Microsoft Loopback Adapter information of itself are deposited, so that gateway refreshes APR tables;Wherein, Microsoft Loopback Adapter information includes standby service
The secondary ip address and MAC Address of device;The secondary ip address of standby server is identical with the IP address of master server.Carried from the present invention
The technical scheme of confession is visible, because standby server is monitored the network connection state of master server, and is listening to network
During connecting fault immediately to gateway send APR table caches clearance orders, itself with the standby IP of master server IP address identical
Location and the MAC Address of itself, to enable gateway to refresh APR tables according to these information, so as to receive industry again when gateway
During business request, with regard to standby server can will be transferred to service request to be handled, it is achieved that the switching of active/standby server;Simultaneously
Because the secondary ip address of standby server is pre-configured, once master server breaks down, it can just substitute main clothes immediately
Device processing business of being engaged in request, so as to avoid prolonged network interruption.
In actual applications, the monitoring module 51, the first transmitting element 511, the first determining unit 512, processing module
52nd, sending module 53, the first setup module 54, generation module 55, the second setup module 56, acquisition module 57, detection module 58,
Second transmitting element 581, first acquisition unit 582, second acquisition unit 583, computing unit 584, the second determining unit 585,
Removing module 59 can be by the central processing unit (Central Processing Unit, CPU) in standby server, micro- place
Manage device (Micro Processor Unit, MPU), digital signal processor (Digital Signal Processor, DSP) or
Field programmable gate array (Field Programmable Gate Array, FPGA) etc. is realized.
The embodiment of the present invention provides a kind of gateway, as shown in figure 8, the gateway 6 includes:
Receiving module 61, the secondary ip address and MAC Address of the standby server sent for receiving standby server.
Refresh module 62, for refreshing APR tables according to the information of acquisition.
Further, receiving module 61, it is additionally operable to receive the APR table cache clearance orders that standby server is sent.
Further, on the basis of embodiment corresponding to Fig. 8, the embodiment of the present invention provides another gateway, such as Fig. 9 institutes
Show, refresh module 62 includes:
Clearing cell 621, for being purged according to APR table caches clearance order to the caching of APR tables.
Unit 622 is established, mapping is established in APR tables for the secondary ip address according to standby server and MAC Address closes
System.
The gateway that the embodiment of the present invention is provided, receive the standby server that standby server is sent secondary ip address and
MAC Address;APR tables are refreshed according to the information of acquisition.From technical scheme provided by the invention, because gateway is according to standby service
The secondary ip address and MAC Address for the standby server that device is sent refresh APR tables, so as to receive service request again when gateway
When, service request can just be transferred to standby server to be handled, it is achieved that the switching of active/standby server;Simultaneously because one connects
The secondary ip address and MAC Address of standby server are received, just refreshes APR tables, therefore substitutes rapidly standby server
Master server, so as to avoid prolonged network interruption.
In actual applications, the receiving module 61, refresh module 62, clearing cell 621, establish unit 622 can be by
CPU, MPU, DSP or FPGA in gateway etc. are realized.
The embodiment of the present invention provides a kind of switching system of active/standby server, and as shown in Figure 10, the switching system 7 includes:
Implement corresponding to standby server 71, above-mentioned Fig. 8 or Fig. 9 that embodiment corresponding to above-mentioned Fig. 5 or Fig. 6 or Fig. 7 provides
The gateway 72 that example provides, and master server 73.
Wherein, master server 73 is used to receive the test data bag that standby server is sent, and the generation of response test packet rings
Packet is answered, and response data packet is sent to master server.
Although disclosed herein embodiment as above, described content be only readily appreciate the present invention and use
Embodiment, it is not limited to the present invention.Technical staff in any art of the present invention, taken off not departing from the present invention
On the premise of the spirit and scope of dew, any modification and change, but the present invention can be carried out in the form and details of implementation
Scope of patent protection, still should be subject to the scope of the claims as defined in the appended claims.
Claims (10)
- A kind of 1. switching method of active/standby server, it is characterised in that including:Standby server monitors the network connection state of master server;When listening to the network connectivity fai_lure of the master server, the state of the redundant internet Protocol IP address of itself is set It is set to upstate;Wherein, the secondary ip address of the standby server is identical with the IP address of the master server;The secondary ip address of itself and MAC address are sent to gateway, so that the gateway is according to acquisition Information refresh address analysis protocol APR tables.
- 2. switching method according to claim 1, it is characterised in that the standby server monitors the network-like of master server Before state, in addition to:The standby server sets primary ip address on the network interface card of itself;Wherein, the primary ip address of the standby server with it is described The IP address of master server is different;According to the part generation Microsoft Loopback Adapter for the network interface card for having set the primary ip address;Secondary ip address is set on the Microsoft Loopback Adapter, and it is disabled status to set the state of the secondary ip address;Obtain the IP address of the master server;It is described that the secondary ip address of itself and MAC Address are sent to gateway, so that gateway refreshes APR according to the information of acquisition Before table, in addition to:APR table cache clearance orders are sent to the gateway.
- 3. switching method according to claim 2, it is characterised in that the network that the standby server monitors master server connects State is connect, including:The standby server sends test number every preset time according to the IP address of the master server to the master server According to bag;If being not received by the response data packet that the master server is sent, the network connectivity fai_lure of the master server is determined; Wherein, the response data packet master server responds the test data bag and generated.
- 4. according to the switching method described in claim any one of 1-3, it is characterised in that described to send APR table caches to gateway After clearance order and the Microsoft Loopback Adapter information of itself, in addition to:The standby server detects whether the network connection state of itself is stablized;If detecting, the network connection state of itself is stable, deletes the primary ip address of itself.
- 5. switching method according to claim 4, it is characterised in that the standby server detects the network connection shape of itself Whether state is stablized, including:The standby server sends M test data bag according to the secondary ip address of itself to itself;Wherein, M is positive integer;Obtain the transmission time of the M test data bag;Obtain the reception time of M response data packet;Wherein, the M response data packet responds the M for the standby server Individual test data bag and generate;The time difference for sending time and the reception time of the M response data packet of the M test data bag is calculated, is obtained M packet time difference;If the M packet time difference is both less than preset time, determine that the network connection state of itself is stable.
- A kind of 6. switching method of active/standby server, it is characterised in that including:Gateway receives the secondary ip address and MAC Address for the standby server that standby server is sent;APR tables are refreshed according to the information of acquisition.
- 7. switching method according to claim 6, it is characterised in that before the refreshing APR tables according to the information of acquisition, Also include:The gateway receives the APR table cache clearance orders that the standby server is sent;Accordingly, it is described that APR tables are refreshed according to the information of acquisition, including:The caching of the APR tables is purged according to the APR table caches clearance order;Mapping relations are established in the APR tables according to the secondary ip address of the standby server and MAC Address.
- A kind of 8. standby server, it is characterised in that including:Module is monitored, for monitoring the network connection state of master server;Processing module, for when listening to the network connectivity fai_lure of the master server, by the secondary ip address of standby server State be arranged to upstate;Wherein, the secondary ip address of the standby server is identical with the IP address of the master server;Sending module, for the secondary ip address of itself and MAC Address to be sent into gateway, so that the gateway is according to acquisition Information refresh APR tables.
- A kind of 9. gateway, it is characterised in that including:Receiving module, the secondary ip address and MAC Address of the standby server sent for receiving standby server;Refresh module, for refreshing APR tables according to the information of acquisition.
- A kind of 10. switching system of active/standby server, it is characterised in that including:Standby server as claimed in claim 8, gateway as claimed in claim 9, and master server;Wherein, the master server is used to receive the test data bag that the standby server is sent, and responds the test data bag Response data packet is generated, and the response data packet is sent to the master server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710800637.2A CN107465556B (en) | 2017-09-07 | 2017-09-07 | Method, device and system for switching main server and standby server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710800637.2A CN107465556B (en) | 2017-09-07 | 2017-09-07 | Method, device and system for switching main server and standby server |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107465556A true CN107465556A (en) | 2017-12-12 |
CN107465556B CN107465556B (en) | 2021-02-05 |
Family
ID=60551159
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710800637.2A Active CN107465556B (en) | 2017-09-07 | 2017-09-07 | Method, device and system for switching main server and standby server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107465556B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108390798A (en) * | 2018-02-28 | 2018-08-10 | 郑州云海信息技术有限公司 | Control method, device, equipment and the storage medium of the double network interface work of server |
CN108900572A (en) * | 2018-05-31 | 2018-11-27 | 康键信息技术(深圳)有限公司 | Primary database domain name method for handover control, computer equipment and storage medium |
CN109586986A (en) * | 2019-01-29 | 2019-04-05 | 杭州迪普科技股份有限公司 | Method, apparatus, equipment and the storage medium of network equipment switching |
CN109618000A (en) * | 2019-01-09 | 2019-04-12 | 广州视源电子科技股份有限公司 | Master-slave switching method, device and system of load balancing service and server |
CN110119129A (en) * | 2019-05-10 | 2019-08-13 | 上海新联合电气有限公司 | Industrial control network |
WO2020057445A1 (en) * | 2018-09-19 | 2020-03-26 | 华为技术有限公司 | Communication system, method, and device |
CN111007753A (en) * | 2019-10-25 | 2020-04-14 | 苏州浪潮智能科技有限公司 | Main/standby arbitration method and device for double controllers |
CN111224959A (en) * | 2019-12-29 | 2020-06-02 | 西安天互通信有限公司 | Server port automatic detection and forwarding defense system and defense method |
CN112737844A (en) * | 2020-12-28 | 2021-04-30 | 浙江中控技术股份有限公司 | Method and device for switching between main and standby in redundant system |
CN114585009A (en) * | 2022-05-06 | 2022-06-03 | 浪潮通信技术有限公司 | UPF dual-computer hot standby switching method and device, electronic equipment and storage medium |
CN116545843A (en) * | 2023-06-25 | 2023-08-04 | 民航成都信息技术有限公司 | Method, device, equipment and medium for switching between main and standby systems of flight ground service guarantee |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004032103A (en) * | 2002-06-21 | 2004-01-29 | Ntt Docomo Tokai Inc | Network system and server switching method |
CN1878088A (en) * | 2006-03-07 | 2006-12-13 | 华为技术有限公司 | Hot standby maintenance system and hot standby maintenance and failover method |
CN101237342A (en) * | 2007-01-31 | 2008-08-06 | 中兴通讯股份有限公司 | System and method for realizing disaster tolerance between SIP servers |
US20080219273A1 (en) * | 2007-03-05 | 2008-09-11 | Fujitsu Limited | Scheduling method for executing job, scheduling apparatus for executing job, and commutative recording medium having recorded thereon scheduling program for causing execution of job |
CN102752209A (en) * | 2012-07-09 | 2012-10-24 | 杭州华三通信技术有限公司 | Rapid address switchover method used for realizing backup service and route forwarding unit |
US20140321265A1 (en) * | 2013-04-29 | 2014-10-30 | Telefonaktiebolaget L M Ericsson (Publ) | Fast traffic recovery in vrrp based routers |
CN105391574A (en) * | 2015-10-28 | 2016-03-09 | 曙光云计算技术有限公司 | Server address setting method and device |
CN106789246A (en) * | 2016-12-22 | 2017-05-31 | 广西防城港核电有限公司 | The changing method and device of a kind of active/standby server |
-
2017
- 2017-09-07 CN CN201710800637.2A patent/CN107465556B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004032103A (en) * | 2002-06-21 | 2004-01-29 | Ntt Docomo Tokai Inc | Network system and server switching method |
CN1878088A (en) * | 2006-03-07 | 2006-12-13 | 华为技术有限公司 | Hot standby maintenance system and hot standby maintenance and failover method |
CN101237342A (en) * | 2007-01-31 | 2008-08-06 | 中兴通讯股份有限公司 | System and method for realizing disaster tolerance between SIP servers |
US20080219273A1 (en) * | 2007-03-05 | 2008-09-11 | Fujitsu Limited | Scheduling method for executing job, scheduling apparatus for executing job, and commutative recording medium having recorded thereon scheduling program for causing execution of job |
CN102752209A (en) * | 2012-07-09 | 2012-10-24 | 杭州华三通信技术有限公司 | Rapid address switchover method used for realizing backup service and route forwarding unit |
US20140321265A1 (en) * | 2013-04-29 | 2014-10-30 | Telefonaktiebolaget L M Ericsson (Publ) | Fast traffic recovery in vrrp based routers |
CN105391574A (en) * | 2015-10-28 | 2016-03-09 | 曙光云计算技术有限公司 | Server address setting method and device |
CN106789246A (en) * | 2016-12-22 | 2017-05-31 | 广西防城港核电有限公司 | The changing method and device of a kind of active/standby server |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108390798A (en) * | 2018-02-28 | 2018-08-10 | 郑州云海信息技术有限公司 | Control method, device, equipment and the storage medium of the double network interface work of server |
CN108900572A (en) * | 2018-05-31 | 2018-11-27 | 康键信息技术(深圳)有限公司 | Primary database domain name method for handover control, computer equipment and storage medium |
WO2020057445A1 (en) * | 2018-09-19 | 2020-03-26 | 华为技术有限公司 | Communication system, method, and device |
CN110932876A (en) * | 2018-09-19 | 2020-03-27 | 华为技术有限公司 | Communication system, method and device |
CN109618000A (en) * | 2019-01-09 | 2019-04-12 | 广州视源电子科技股份有限公司 | Master-slave switching method, device and system of load balancing service and server |
CN109618000B (en) * | 2019-01-09 | 2021-08-31 | 广州视源电子科技股份有限公司 | Master-slave switching method, device and system of load balancing service and server |
CN109586986A (en) * | 2019-01-29 | 2019-04-05 | 杭州迪普科技股份有限公司 | Method, apparatus, equipment and the storage medium of network equipment switching |
CN109586986B (en) * | 2019-01-29 | 2022-04-26 | 杭州迪普科技股份有限公司 | Method, device, equipment and storage medium for switching network equipment |
CN110119129A (en) * | 2019-05-10 | 2019-08-13 | 上海新联合电气有限公司 | Industrial control network |
CN111007753A (en) * | 2019-10-25 | 2020-04-14 | 苏州浪潮智能科技有限公司 | Main/standby arbitration method and device for double controllers |
CN111224959A (en) * | 2019-12-29 | 2020-06-02 | 西安天互通信有限公司 | Server port automatic detection and forwarding defense system and defense method |
CN112737844A (en) * | 2020-12-28 | 2021-04-30 | 浙江中控技术股份有限公司 | Method and device for switching between main and standby in redundant system |
CN114585009A (en) * | 2022-05-06 | 2022-06-03 | 浪潮通信技术有限公司 | UPF dual-computer hot standby switching method and device, electronic equipment and storage medium |
CN116545843A (en) * | 2023-06-25 | 2023-08-04 | 民航成都信息技术有限公司 | Method, device, equipment and medium for switching between main and standby systems of flight ground service guarantee |
CN116545843B (en) * | 2023-06-25 | 2023-09-12 | 民航成都信息技术有限公司 | Method, device, equipment and medium for switching between main and standby systems of flight ground service guarantee |
Also Published As
Publication number | Publication date |
---|---|
CN107465556B (en) | 2021-02-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107465556A (en) | A kind of switching method of active/standby server, apparatus and system | |
CN111464648B (en) | Distributed local DNS system and domain name query method | |
US6205122B1 (en) | Automatic network topology analysis | |
CN105024855B (en) | Distributed type assemblies manage system and method | |
CN103220161B (en) | A kind of detection method of server state and device | |
CN110855633A (en) | Method, device and system for protecting distributed denial of service (DDOS) attack | |
CN102801585A (en) | Information monitoring system and method based on cloud computing network environment | |
CN108471369A (en) | A kind of network dialing method, device and storage medium | |
CN106982244B (en) | Method and device for realizing message mirroring of dynamic flow under cloud network environment | |
US20180324063A1 (en) | Cloud-based system for device monitoring and control | |
CN104065508A (en) | Application service health examination method, device and system | |
CN106385334A (en) | Call-center system and abnormality detection and self-recovery method therefor | |
CN105490847B (en) | A kind of private cloud storage system interior joint failure real-time detection and processing method | |
CN111988170A (en) | Terminal fault positioning method and device | |
CN108683561B (en) | Site state detection method and device | |
CN102904761B (en) | The method of a kind of NVR stacking and NVR | |
CN104104554B (en) | The life cycle methodology and device of detection data access request | |
CN112600733A (en) | Computer health monitoring method | |
CN107277043A (en) | Network admittance control system based on cluster service | |
WO2023124127A1 (en) | Communication connection method, apparatus and device for host and storage system, and medium | |
KR20200116784A (en) | Network Error Detection Method | |
CN106161339A (en) | Obtain the method and device of IP access relation | |
US10237122B2 (en) | Methods, systems, and computer readable media for providing high availability support at a bypass switch | |
Cisco | Monitoring Cisco Server Load Balancing Devices | |
Cisco | Monitoring Cisco Sever Load Balancing Devices |
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 | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20210104 Address after: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd. Address before: Room 1601, floor 16, 278 Xinyi Road, Zhengdong New District, Zhengzhou City, Henan Province Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |