CN110932876B - Communication system, method and device - Google Patents

Communication system, method and device Download PDF

Info

Publication number
CN110932876B
CN110932876B CN201811095768.6A CN201811095768A CN110932876B CN 110932876 B CN110932876 B CN 110932876B CN 201811095768 A CN201811095768 A CN 201811095768A CN 110932876 B CN110932876 B CN 110932876B
Authority
CN
China
Prior art keywords
server
address
routing table
routing
mapping relationship
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
CN201811095768.6A
Other languages
Chinese (zh)
Other versions
CN110932876A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201811095768.6A priority Critical patent/CN110932876B/en
Priority to PCT/CN2019/105770 priority patent/WO2020057445A1/en
Publication of CN110932876A publication Critical patent/CN110932876A/en
Application granted granted Critical
Publication of CN110932876B publication Critical patent/CN110932876B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The embodiment of the application discloses a communication method, a communication device and a communication system, which are used for realizing automatic switching between servers and reducing the workload of users and managers. The communication system of the embodiment of the application comprises: a first server and a second server; the first server is used for acquiring the first mapping relation and sending the first mapping relation to the target equipment based on a border gateway protocol; the first mapping relation is a mapping relation between an IP address associated with the first server and a local IP address of the first server, and the IP address associated with the first server comprises a preset southbound interface IP address and/or a preset northbound interface IP address; and the second server is used for acquiring the state of the first server and a second mapping relation, and if the state is a fault state, sending the second mapping relation to the target equipment based on a border gateway protocol, wherein the second mapping relation is the mapping relation between the IP address associated with the first server and the local IP address of the second server.

Description

Communication system, method and device
Technical Field
The present application relates to the field of network communications, and in particular, to a communication system, method and apparatus.
Background
With the development of communication technology, cloud service is more and more widely applied. The cloud service can provide services such as network service automatic deployment, automatic operation and maintenance and the like for users, so that the normal operation of the cloud service is very important to guarantee. In order to ensure the reliability of the cloud service, a server which needs to support cloud service management has a disaster recovery function, that is, when a main server fails, a service can be switched to a standby server in time.
Currently, a server supporting cloud service management has a south-oriented interface and a north-oriented interface. In the conventional technology, an Internet Protocol (IP) address of a southbound interface of a main server is different from an IP address of a southbound interface of a standby server, and an IP address of a northbound interface of the main server is different from an IP address of the northbound interface of the standby server. Therefore, after the main server fails, the manager is required to manually replace the southbound interface IP address of the main server with the southbound interface IP address of the standby server in the network device accessing the southbound interface, so as to realize the access to the standby server. Similarly, the user needs to manually replace the IP address of the northbound interface of the main server with the IP address of the northbound interface of the standby server through the user terminal accessing the northbound interface, so as to access the standby server.
Therefore, in the process of switching the main server to the standby server, the IP address replacement operation needs to be performed on the northbound user terminal and the southbound network device, which causes inconvenience to the user and the administrator.
Disclosure of Invention
The embodiment of the application provides a communication method, a communication device and a communication system, which are used for realizing automatic switching between a main server and a standby server and reducing the workload of users and managers.
The embodiment of the application provides a communication system which comprises a first server and a second server. The first server is connected with the second server. The first server and the second server may be load balancing servers or other types of servers, which are not limited in this application. The first server and the second server may be physical servers or virtual servers. The number of the first servers can be one or more; the number of the second servers may be one or more. The first server and the second server can be in the same autonomous domain, and can also belong to different autonomous domains. The first server and the second server each have a southbound interface and a northbound interface.
The first server is used for acquiring the first mapping relation and sending the first mapping relation to the target device based on the border gateway protocol. The first mapping is a mapping between an IP address associated with the first server and a local IP address of the first server. The IP address associated with the first server includes: the IP address of the southbound interface is preset and/or the IP address of the northbound interface is preset. The preset southbound interface IP address and/or the preset northbound interface IP address comprises the following three conditions: the method comprises the steps of setting a south interface IP address and a north interface IP address separately, or setting the south interface IP address and the north interface IP address separately. The first mapping relationship may be for the target device to access the first server.
And the second server is used for acquiring the state and the second mapping relation of the first server, and if the state is a fault state, the second mapping relation is sent to the target equipment based on the border gateway protocol. The second mapping is a mapping between an IP address associated with the first server and a local IP address of the second server. The second mapping relationship may be used for the target device to access the second server.
Since the target device accesses the first server and the second server using the same IP address, i.e., the IP address associated with the first server, there is no need for a user or administrator to effect a switch from accessing the first server to accessing the second server by modifying the IP address. Meanwhile, the IP addresses associated with the first server are sent to the target device by the first server and the second server instead of the routing device of the first server and the routing device of the second server, so that the second server does not need to set priority on the routing device to control who issues the IP addresses associated with the first server to the target device, and the second server itself issues the IP addresses associated with the first server to the target device by acquiring the state of the first server when the state is in a failure state, so that automatic switching between the first server and the second server is realized, and the workload of management personnel is reduced.
The embodiment of the application also provides a communication method, which comprises the following steps: first, a first server obtains a first mapping relationship, wherein the first mapping relationship is a mapping relationship between an Internet Protocol (IP) address associated with the first server and a local IP address of the first server, and the IP address associated with the first server comprises a preset southbound interface IP address and/or a preset northbound interface IP address. Secondly, the first server sends the first mapping relation to the target device based on the border gateway protocol. The first server may be a load balancing server or other type of server.
In this embodiment, the first server sends, to the target device, a mapping relationship between an IP address associated with the first server and a local IP address of the first server, that is, a first mapping relationship, so that the target device can access the first server according to the first mapping relationship. For the user, the first server may be accessed using the IP address associated with the first server without having to access the first server using the IP address of the first server, i.e., the user may access without being aware of the first server. When the first server fails and needs to be replaced to the second server, the target device only needs to change the mapping relation between the IP address associated with the first server and the IP address of the first server into the mapping relation between the IP address associated with the first server and the IP address of the second server, and a user does not need to change an access address when switching between the servers, so that convenience is brought to the user. Meanwhile, the IP address associated with the first server is sent to the target device and is not the routing device of the first server, so that the priority does not need to be set on the routing device to control whether the target device accesses the first server, and the workload of management personnel is reduced.
Optionally, the destination device may include a routing device. Then, sending the first mapping relationship to the target device based on the border gateway protocol includes: sending a first routing table item generation instruction to the routing equipment based on the border gateway protocol, wherein the first routing table item generation instruction carries a first mapping relation, the first routing table item generation instruction is used for indicating the routing equipment to generate a first routing table item according to the first mapping relation, the destination address of the first routing table item is an IP address associated with the first server, and the next hop address of the first routing table item is a local IP address of the first server. Therefore, the routing device may search the first routing table entry according to the IP address associated with the first server carried in the received packet, determine the next hop address corresponding to the IP address associated with the first server, that is, the local IP address of the first server, and then send the packet to the first server.
Optionally, in order to enable the routing device to no longer send the packet from the target device to the first server when the first server is in the failure state, the method further includes: and if the state of the first server is a fault state, sending a first deleting instruction to the routing equipment, wherein the first deleting instruction is used for indicating the routing equipment to delete the first routing table entry.
Optionally, sending the first mapping relationship to the target device based on the border gateway protocol specifically may include: if the state of the first server is the working state, the active/standby identifier of the first server is set to an identifier corresponding to the main server, for example, 1. And if the primary and standby identification of the first server is detected to be the identification corresponding to the primary server, sending the first mapping relation to the target equipment based on the border gateway protocol. That is, as an optional implementation manner, whether to trigger an action of sending the first mapping relationship to the target device is determined by the primary and secondary identifiers, and a specific value of the primary and secondary identifiers may be determined by a state of the first server.
The embodiment of the application also provides a communication method, which comprises the following steps: firstly, the second server obtains the state of the first server and a second mapping relation, the second mapping relation is the mapping relation between the IP address associated with the first server and the local IP address of the second server, and the IP address associated with the first server comprises a preset southbound interface Internet protocol IP address and/or a preset northbound interface IP address. And secondly, if the state is a fault state, the second server sends a second mapping relation to the target equipment based on the border gateway protocol. The second mapping relationship is used for the target device to access the second server. The second server may be a load balancing server or other type of server.
In this embodiment, the second server sends, to the target device, a mapping relationship between the internet protocol IP address associated with the first server and the local IP address of the second server, that is, a second mapping relationship, so that the target device can access the second server according to the second mapping relationship. For the user, the second server may be accessed using the IP address associated with the second server without using the IP address of the second server to access the second server, i.e., the user may gain access without being aware of the second server. That is to say, when the first server fails and needs to be replaced with the second server, the mapping relationship between the IP address associated with the first server and the first server only needs to be changed into the mapping relationship between the IP address associated with the first server and the second server, and the user does not need to change the access address when switching between the servers, which provides convenience for the user. Meanwhile, the IP address associated with the first server is sent to the target device, and is the second server, but not the routing device of the second server, so that the second server does not need to set priority on the routing device to control whether the routing device accesses the second server, and the second server distributes the IP address associated with the first server to the target device when the state is the fault state by acquiring the state of the first server, thereby realizing the access to the second server and reducing the workload of managers.
Optionally, the target device includes a routing device, and sending the second mapping relationship to the target device based on the border gateway protocol includes: and sending a second routing table item generating instruction to the routing equipment based on the border gateway protocol, wherein the second routing table item generating instruction carries a second mapping relation, the second routing table item generating instruction is used for indicating the routing equipment to generate a second routing table item according to the second mapping relation, the destination address of the second routing table item is the IP address associated with the first server, and the next hop address of the second routing table item is the local IP address of the second server. Therefore, the routing device may search the second routing table entry according to the IP address associated with the first server and carried in the received packet, determine the next hop address corresponding to the IP address associated with the first server, that is, the local IP address of the second server, and then send the packet to the second server.
Optionally, sending the second mapping relationship to the target device based on the border gateway protocol includes: if the state of the first server is a fault state, setting the main and standby identification of the second server as the identification corresponding to the main server; and when detecting that the main/standby identification of the second server is the identification corresponding to the main server, sending a second mapping relation to the target equipment based on the border gateway protocol. That is, as an optional implementation manner, whether to trigger an action of sending the second mapping relationship to the target device is determined by the primary and secondary identifiers, and a specific value of the primary and secondary identifiers may be determined by a state of the first server.
An embodiment of the present application further provides a communication apparatus, applied to a first server, including: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a first mapping relation, the first mapping relation is a mapping relation between an Internet Protocol (IP) address associated with a first server and a local IP address of the first server, and the IP address associated with the first server comprises a preset southbound interface IP address and/or a preset northbound interface IP address; and the sending unit is used for sending the first mapping relation to the target equipment based on the border gateway protocol.
Optionally, the target device includes a routing device; the sending unit is configured to send a first routing table entry generation instruction to the routing device based on the border gateway protocol, where the first routing table entry generation instruction carries a first mapping relationship, and the first routing table entry generation instruction is used to instruct the routing device to generate a first routing table entry according to the first mapping relationship, a destination address of the first routing table entry is an IP address associated with the first server, and a next hop address of the first routing table entry is a local IP address of the first server.
Optionally, the apparatus further comprises: and the deleting unit is used for sending a first deleting instruction to the routing equipment if the state of the first server is a fault state, wherein the first deleting instruction is used for indicating the routing equipment to delete the first routing table entry.
Optionally, the sending unit is configured to set the active/standby identifier of the first server as an identifier corresponding to the primary server if the state of the first server is a working state; and if the primary and standby identification of the first server is detected to be the identification corresponding to the primary server, sending the first mapping relation to the target equipment based on the border gateway protocol.
Optionally, the first server includes a load balancing server.
The embodiment of the present application further provides a communication device, which is applied to a second server, and the device includes: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring the state of a first server and a second mapping relation, the second mapping relation is the mapping relation between an IP address associated with the first server and a local IP address of a second server, and the IP address associated with the first server comprises a preset southbound interface Internet protocol IP address and/or a preset northbound interface IP address; and the sending unit is used for sending the second mapping relation to the target equipment based on the border gateway protocol if the state is the fault state.
Optionally, the target device includes a routing device; and the sending unit is used for sending a second routing table item generation instruction to the routing equipment based on the border gateway protocol, wherein the second routing table item generation instruction carries a second mapping relation, the second routing table item generation instruction is used for indicating the routing equipment to generate a second routing table item according to the second mapping relation, the destination address of the second routing table item is an IP address associated with the first server, and the next hop address of the second routing table item is a local IP address of the second server.
Optionally, the sending unit is configured to set the active/standby identifier of the second server as an identifier corresponding to the primary server if the state of the first server is a failure state; and when detecting that the main/standby identification of the second server is the identification corresponding to the main server, sending a second mapping relation to the target equipment based on the border gateway protocol.
Drawings
Fig. 1 is a block diagram of a communication system according to an embodiment of the present application;
fig. 2 is a block diagram of another communication system according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a communication method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating another communication method according to an embodiment of the present application;
fig. 5 is a block diagram of a communication device according to an embodiment of the present disclosure;
fig. 6 is a block diagram of another communication device according to an embodiment of the present disclosure;
fig. 7 is a block diagram of a server according to an embodiment of the present disclosure;
fig. 8 is a block diagram of another server according to an embodiment of the present disclosure.
Detailed Description
In the conventional technology, different IP addresses are required to be used for accessing a main server and a standby server, so that when the main server fails, the IP address of the main server needs to be manually modified into the IP address of the standby server to access the standby server, which causes inconvenience to users and managers.
At present, a technical scheme can solve the technical problems. That is, the IP address associated with the first server, i.e., the preset southbound interface IP address and/or the preset northbound interface IP address, is stored both in the first routing device connected to the main server and in the second routing device connected to the standby server. The priority is configured in the first routing device and the second routing device in advance, when the main server can work, the priority configured by the main server is high priority, and the priority configured by the standby server is low priority. When the first routing device is configured with a high priority, the first routing device sends an IP address associated with the first server to the destination device. The target device may be a northbound user terminal and/or a southbound network device, among others. Because the second routing device is configured for low priority, the second routing device does not send the IP address associated with the first server to the target device, at which point the target device may access the primary server via the IP address associated with the first server.
When the primary server fails, the priority of the second routing device needs to be modified from low priority to high priority, and the priority of the first routing device needs to be modified from high priority to low priority, so that the second routing device can send the IP address associated with the first server to the target device, and thus the target device can access the standby server through the IP address associated with the first server.
In the process of switching the main server and the standby server, the target device accesses the main server and the standby server by using the same IP address, namely the IP address associated with the first server, and a user does not need to modify the IP address, so that the user experience is effectively improved.
However, another problem is introduced, that is, when the active/standby server is switched, the administrator of the active/standby server needs to manually change the priority of the first routing device and the priority of the second routing device, which increases the workload of the administrator.
In order to achieve convenience for users and avoid adding extra workload to managers of the main server and the standby server, embodiments of the application provide a communication system, a method, and a device, where the communication system includes a first server and a second server. The first server is connected with the second server.
The first server is used for acquiring the first mapping relation and sending the first mapping relation to the target device based on a border gateway protocol. The first mapping is a mapping between an IP address associated with the first server and a local IP address of the first server. The IP address associated with the first server includes: and presetting the southbound interface IP address and/or presetting the northbound interface IP address. The preset southbound interface IP address and/or the preset northbound interface IP address comprise the following three conditions: the method comprises the steps of setting a south interface IP address and a north interface IP address separately, or setting the south interface IP address and the north interface IP address separately. The first mapping relationship may be for the target device to access the first server.
And the second server is used for acquiring the state and the second mapping relation of the first server, and if the state is a fault state, the second mapping relation is sent to the target equipment based on the border gateway protocol. The second mapping is a mapping between an IP address associated with the first server and a local IP address of the second server. The second mapping relationship is used for the target device to access the second server.
Since the target device accesses the first server and the second server using the same IP address, i.e., the IP address associated with the first server, there is no need for a user or administrator to effect a switch from accessing the first server to accessing the second server by modifying the IP address. Meanwhile, the IP addresses associated with the first server are sent to the target device by the first server and the second server instead of the routing device of the first server and the routing device of the second server, so that the second server does not need to set priority on the routing device to control who issues the IP addresses associated with the first server to the target device, and the second server itself issues the IP addresses associated with the first server to the target device by acquiring the state of the first server when the state is in a failure state, so that automatic switching between the first server and the second server is realized, and the workload of management personnel is reduced.
The following describes a technical solution of a communication system according to an embodiment of the present application in detail with reference to the accompanying drawings.
Referring to fig. 1, this figure is a block diagram of a communication system according to an embodiment of the present application.
The communication system provided by the embodiment of the application comprises: a first server 101 and a second server 102.
In this embodiment, the first server 101 and the second server 102 may be servers for load balancing or servers for other purposes, and this embodiment is not particularly limited.
The first server 101 and the second server 102 may be physical servers or virtual servers.
If the first server 101 is an entity server, the local IP address of the first server 101 is a physical IP address; if the first server 101 is a virtual server, the local IP address of the first server is a virtual IP address.
Similarly, if the second server 102 is an entity server, the local IP address of the second server 102 is a physical IP address; if the second server 102 is a virtual server, the local IP address of the second server 102 is a virtual IP address.
The number of the first servers 101 may be one or more; the number of the second servers 102 may be one or more.
The first server 101 and the second server 102 may be in the same Autonomous System (AS) or may belong to different autonomous domains.
The first server 101 and the second server 102 each have a southbound interface corresponding to a southbound network device and a northbound interface corresponding to a northbound user terminal. The southbound network device may be, for example, a router, an Access Point (AP), a switch, and other devices. The northbound user terminal may be, for example, a mobile phone, a computer, a notebook computer, an IPAD, or other devices.
For the same server, the IP address of the southbound interface and the IP address of the northbound interface may be the same or different. For different servers, the IP addresses of the southbound interfaces are uniform, and the IP addresses of the northbound interfaces are uniform, that is, the southbound interface IP address of the first server 101 and the southbound interface IP address of the second server 102 are both preset southbound interface IP addresses; the northbound interface IP address of the first server 101 and the northbound interface IP address of the second server 102 are both preset northbound interface IP addresses.
The first server 101 is configured to obtain the first mapping relationship, and send the first mapping relationship to a target device based on a Border Gateway Protocol (BGP).
The first mapping relationship is a mapping relationship between an internet protocol IP address associated with the first server and a local IP address of the first server 101, and the IP address associated with the first server 101 includes a predetermined southbound interface IP address and/or a predetermined northbound interface IP address. The first mapping relationship is used for the target device to access the first server 101.
And the second server 102 is configured to obtain the state and the second mapping relationship of the first server 101, and send the second mapping relationship to the target device based on the border gateway protocol if the state is the failure state.
The second mapping is a mapping between the IP address associated with the first server 101 and the local IP address of the second server 102. The second mapping is used for the target device to access the second server 102.
In practical applications, the IP address associated with the first server 101 may be stored in the first server 101 and the second server 102 in a configured manner in advance, or may be distributed to the first server 101 and the second server 102 by a network device connected to the first server 101 and the second server 102 in a unified manner, so as to form the first mapping relationship or the second mapping relationship.
The first server 101 sends the first mapping relationship to the target device based on the border gateway protocol. If the target device and the first server 101 are located in the same autonomous domain, sending the target device based on an Internal Border Gateway Protocol (IBGP); if the target device is not in the same autonomous domain as the first server 101, the target device transmits based on an External Border Gateway Protocol (EBGP).
Similarly, the second server 102 sends the second mapping relationship to the target device based on the border gateway protocol. If the target device and the second server 102 are located in the same autonomous domain, sending based on IBGP; if the target device is not in the same autonomous domain as the second server 102, the EBGP-based transmission is performed.
In an embodiment of the present application, the target device includes a southbound network device and/or a northbound user terminal. As mentioned previously, the southbound network device may include a routing device, such as a router, switch, etc.
If the target device includes a routing device, in this embodiment of the present application, the sending, by the first server 101, the first mapping relationship to the target device based on the border gateway protocol may specifically be: the first server 101 sends a first routing table entry generation instruction to the routing device based on the border gateway protocol, where the first routing table entry generation instruction carries a first mapping relationship, and the first routing table entry generation instruction is used to instruct the routing device to generate a first routing table entry according to the first mapping relationship, a destination address of the first routing table entry is an IP address associated with the first server 101, and a next hop address of the first routing table entry is a local IP address of the first server.
Therefore, the routing device may search for the first routing table entry according to the IP address associated with the first server 101 and carried in the received packet, determine the next hop address corresponding to the IP address associated with the first server, that is, the local IP address of the first server 101, and then send the packet to the first server 101. To enable the routing device to generate a first routing table entry according to the first mapping relationship. Optionally, the first server 101 may send a first routing table entry generation instruction to the routing device, where the instruction carries the first mapping relationship. After receiving the first routing table item generation instruction, the routing device generates a first routing table item according to the first mapping relation carried in the first routing table item generation instruction.
Similarly, if the target device includes a routing device, in this embodiment of the application, the sending, by the second server 102, the second mapping relationship to the target device based on the border gateway protocol may specifically be: the second server 102 sends a second routing table entry generating instruction to the routing device based on the border gateway protocol, where the second routing table entry generating instruction carries a second mapping relationship, and the second routing table entry generating instruction is used to instruct the routing device to generate a second routing table entry according to the second mapping relationship, where a destination address of the second routing table entry is an IP address associated with the first server 101, and a next hop address of the first routing table entry is a local IP address of the second server 102.
Therefore, the routing device may search the second routing table entry according to the IP address associated with the second server 102 carried by the received packet, determine the next-hop address corresponding to the IP address associated with the first server 101, that is, the local IP address of the first server 101, and then send the packet to the second server 102. In order to enable the routing device to generate the second routing table entry according to the second mapping relationship. Optionally, the second server 102 may send a second routing table entry generation instruction to the routing device, where the instruction carries the second mapping relationship. And after receiving the second routing table item generation instruction, the routing equipment generates a second routing table item according to the second mapping relation carried in the second routing table item generation instruction.
If the target device is a non-routing device, for example, a user terminal, the first server 101 and the second server 102 may be connected to the target device through a routing device, and the interaction between the first server 101 and the second server and the routing device is as described above, which is not described herein again. It should be noted that, in order to enable the user terminal to access the routing device, the IP address of the routing device may be stored in the user terminal in advance, so that the request for accessing the server corresponding to the IP address of the first server 101 is initiated according to the IP address of the routing device.
In addition, in the embodiment of the present application, in order to realize that the target device is automatically switched from accessing the first server 101 to accessing the second server 102, the second server 102 acquires the state of the first server 101, and if the state of the first server 101 is a failure state, sends the second mapping relationship to the target device, so that the target device accesses the second server 102 according to the second mapping relationship.
Specifically, the second server 102 may include a second identifier setting module and a second mapping relationship sending module.
The second identifier setting module is configured to set the active/standby identifiers of the second server 102 according to the state of the first server 101. If the state of the first server 101 is the working state, the second identifier setting module sets the active/standby identifier of the second server 101 to an identifier corresponding to the standby server, for example, 0. If the state of the first server 101 is a failure state, the second identifier setting module sets the active/standby identifier of the second server 102 to an identifier corresponding to the primary server, for example, 1.
And the second mapping relationship sending module does not send the second mapping relationship to the target device when detecting that the active/standby identifier of the second server 102 is the identifier corresponding to the standby server. And when detecting that the primary/standby identifier of the second server 102 is the identifier corresponding to the primary server, sending a second mapping relationship to the target device.
It should be noted that the second mapping relationship is not sent to the target device, so that the target device does not access the second server 102 according to the second mapping relationship. As before, if the second server 102 controls the target device to access the second server 102 by sending the second routing table entry generation instruction to the target device, then not sending the second mapping relationship to the target device means not sending the second routing table entry generation instruction to the target device.
Similarly, the second mapping relationship is sent to the target device, so as to allow the target device to access the second server 102 according to the second mapping relationship. As before, if the second server 102 controls the target device to access the second server 102 by sending the second routing table item generation instruction to the target device, then sending the second mapping relationship to the target device means sending the second routing table item generation instruction to the target device.
Optionally, if the second mapping relationship sending module sends a second routing table item generating instruction to the target device once, when the second mapping relationship sending module detects that the primary/secondary identifier stored in the second identifier setting module is an identifier corresponding to the secondary server, a second deleting instruction may be sent to the target device, where the second deleting instruction carries the second mapping relationship, and the second deleting instruction is used by the target device to delete the second routing table item in the target device.
Accordingly, the first server 101 may include a first identifier setting module and a first mapping relationship sending module.
The first identifier setting module is configured to set the active/standby identifier according to the state of the first server 101. If the state of the first server 101 is the working state, the first identifier setting module sets the active/standby identifier of the first server 101 to an identifier corresponding to the primary server, for example, 1. If the state of the first server 101 is a failure state, the first identifier setting module sets the active/standby identifier of the first server 101 to an identifier corresponding to the standby server, for example, 0.
When the first mapping relation sending module detects that the identifier stored in the first identifier setting module is the identifier corresponding to the master server, the first mapping relation sending module sends the first mapping relation to the target device; and when detecting that the main/standby identifier stored in the first identifier setting module is the identifier corresponding to the standby server, not sending the first mapping relation to the target device.
It should be noted that the sending of the first mapping relationship to the target device is here for the purpose of enabling the target device to access the first server 101 according to the first mapping relationship. As before, if the first server 101 controls the target device to access the first server 101 by sending the first routing table entry generation instruction to the target device, then sending the first mapping relationship to the target device means sending the first routing table entry generation instruction to the target device.
Similarly, the first mapping relationship is not sent to the target device, so that the target device is not allowed to access the first server 101 according to the first mapping relationship. As described above, if the first server 101 controls the target device to access the first server 101 by sending the first routing table entry generation instruction to the target device, then not sending the first mapping relationship to the target device means not sending the first routing table entry generation instruction to the target device.
Optionally, if the first mapping relationship sending module sends the first routing table item generating instruction to the target device once, when the first mapping relationship sending module detects that the primary/standby identifier stored in the first identifier setting module is an identifier corresponding to the standby server, the first mapping relationship sending module may send a first deleting instruction to the target device, where the first deleting instruction carries the first mapping relationship, and the first deleting instruction is used by the target device to delete the first routing table item in the target device.
In order to obtain the state of the first server 101 in time, the second server 102 serving as a standby server may receive the heartbeat message periodically sent by the main server, that is, the first server 101, and if the heartbeat message sent by the first server 101 is not received within a preset time period, it is determined that the first server 101 fails.
In addition, when the first server 101 is used as a primary server, the first server 101 needs to synchronize the service data to a standby server, i.e., the second server 102. When the second server 102 is upgraded from the standby server to the main server, the second server 102 needs to synchronize the service data to the first server 101 with the recovered failure, so as to ensure the reliability of the data.
In the embodiment of the present application, the target device may use the same IP address, i.e., the IP address associated with the first server, to access the first server 101 and the second server 102, so that the user is not required to modify the IP address to implement the switch from accessing the first server 101 to accessing the second server 102. Meanwhile, since the first mapping relation is stored in the first server 101 instead of the routing device of the first server 101, and the second mapping relation is stored in the second server 102 instead of the routing device of the second server 102, it is not necessary to set a priority on the routing device to control who issues the IP address associated with the first server to the target device, but the second server 102 itself issues the IP address associated with the first server to the target device by acquiring the state of the first server 101, and when the state is a failure state, the second server 102 automatically switches from accessing the first server 101 to accessing the second server 102 according to the IP address associated with the first server, thereby reducing the workload of management personnel.
The communication system of the above embodiment is further described below by taking an application scenario as an example.
An agile controller-campus (ACC) is a solution scenario management control system for cloud-campus (clouded-campus), and supports services such as network service management, network security management, user access management, network monitoring, network quality analysis, network application analysis, alarms, and reports.
The medium and large networks are managed by the cloud management platform in a centralized mode, higher requirements are placed on the reliability of cloud park products, and the remote disaster recovery function is required to be provided besides data backup and recovery. The main server and the standby server are deployed in different regions, and when a cloud platform of the main server fails due to scenes such as earthquake, fire or fiber break, the sustainability of management service needs to be ensured, that is, the capability of switching to the standby server in the different regions from the main server to continue providing services is provided.
The embodiment of the present application provides a communication system, and referring to fig. 2, the system 10 includes a server cluster 20, a server cluster 30 and a routing device 40. Server cluster 20, server cluster 30, and routing device 40 are interconnected.
Wherein the routing device 40 is connected to a northbound user terminal or a southbound network device.
Server cluster 20 and server cluster 30 may belong to different autonomous domains, e.g., server cluster 20 belongs to AS100 and server cluster 30 belongs to AS200.
Wherein server cluster 20 includes server 201, server 202, and routing device 203. The server 201, the server 202 and the routing device 203 are connected to each other.
The server cluster 30 includes a server 301, a server 302, and a routing device 303. Server 301, server 302, and routing device 303 are interconnected.
The server cluster 20 is a main server cluster, and the server cluster 30 is a standby server cluster. In the server cluster 20, the server 201 is a primary server, and the server 202 is a standby server. In the server cluster 30, the server 301 is a primary server and the server 302 is a standby server.
Server cluster 20 and server cluster 30 may be located in different geographical areas, for example, server cluster 20 is located in beijing and server cluster 30 is located in shanghai. Within a server cluster, the servers may also be deployed at different locations. For example, server 201 in server cluster 20 is located in the lake region and server 202 is located in the sunny region.
Server 201, server 202, server 301, and server 302 are all load balancing servers, i.e., perform load balancing functions. They may be physical servers or virtual servers.
Each of the four servers may have a south-bound interface and a north-bound interface, respectively. The IP address of the southbound interface and the IP address of the northbound interface may be the same or different. For example, the IP address of the southbound interface is 100.100.10.100/32, and the IP address of the northbound interface is 100.100.10.101/32.
In the embodiment of the present application, the automatic switching between the server cluster 20 and the server cluster 30 is involved, and the automatic switching between the server 201 and the server 202 in the server cluster 20 and the automatic switching between the server 301 and the server 302 in the server cluster 30 are involved. As will be described in detail below.
For implementing automatic switching between the server 201 and the server 202 in the server cluster 20, the following steps may be included:
1. the southbound and northbound interface IP addresses of server 201 and server 202 are first configured.
The southbound interface IP address of the server 201 is the same as the southbound interface IP address of the server 202, and is 100.100.10.100/32, for example. The north interface IP address of server 201 and the north interface IP address of server 202 are the same, e.g., 100.100.10.101/32. The mask may be set to 32 bits.
2. A disaster recovery processing service is configured in the server 201 and the server 202.
For example, the disaster recovery processing service may include a disaster recovery management service (drService) and a disaster recovery data synchronization service (repService). The drService is responsible for handling disaster tolerance operation management such as heartbeat keep-alive, main lifting and standby and the like of the disaster tolerance main and standby servers or clusters, and the repService is responsible for main and standby copying tasks of disaster tolerance databases and files.
Specifically, when the state of the server 201 is the working state, the drService of the server 201 sets the active/standby identifier thereof as the identifier corresponding to the primary server. Correspondingly, at this time, the server 202 can receive the heartbeat message sent by the server 201, so the drService of the server 202 sets the primary and standby identifiers thereof as identifiers corresponding to the standby servers.
When the state of the server 201 is a failure state, the drService of the server 201 sets the primary/standby identifier thereof as the identifier corresponding to the standby server. At this time, if the server 202 cannot receive the heartbeat message sent by the server 201 within the preset time period, the drService of the server 202 sets the primary and standby identifiers thereof as the identifiers corresponding to the primary server.
In addition, when the server 201 acts as a main server, the repService of the server 201 is responsible for synchronizing its business data and files to the server 202. When server 202 is the primary server, repService of server 202 is responsible for synchronizing its business data and files to server 201.
3. A border gateway protocol Service (BGP Service) is configured in the server 201 and the server 202.
Server 201 and server 202 may invoke BGP Service for the purpose of publishing routing information out. Specifically, a BGP peer (peer) is first created by calling BGP Service. The peers of server 201 and server 202 are devices that are neighbors of the two servers, for example, the routing device 203 can be both a peer of server 201 and a peer of server 202. Server 201 may send the southbound interface IP address and/or the northbound interface IP address with server 201 to routing device 203 and server 202 may send the southbound interface IP address and/or the northbound interface IP address with server 202 to routing device 203.
Since the server 201, the server 202 and the routing device 203 belong to the same autonomous domain, BGP in the BGP Service may specifically be IBGP. The BGP in BGP Service may specifically be EBGP, provided that the routing device 203 is located outside the AS 100.
When the server 201 is in a working state, the server 201 may invoke its own IBGP Service to send a mapping relationship between the IP address associated with the server 201 and the local IP address of the server 201 to the routing device 203, and the routing device 203 establishes the routing table entry L1 according to the mapping relationship. Where the IP address associated with server 201 is the southbound interface IP address and/or the northbound interface IP address of server 201. The destination address in the routing table entry L1 is the IP address associated with the server 201, and the next hop address is the local IP address of the server 201. The local IP address of server 201 is different from the IP address associated with server 201, and the local address of server 201 is, for example, 100.10.1.0/24.
The routing device 203 may further upload a mapping relationship between the IP address associated with the server 201 and the local IP address of the routing device 203 to the routing device 40, so as to establish a routing table entry L2 in the routing device 40, where a destination address of the routing table entry L2 is the IP address associated with the server 201, and a next hop address is the local address of the routing device 203.
The server 202 may invoke its own IBGP Service to cancel the sending action, which is an action of sending the mapping relationship between the IP address associated with the server 201 and the local IP address of the server 202 to the routing device 203, so as not to allow the routing device 203 to establish the routing table entry L3 according to the mapping relationship.
Optionally, if the routing device 203 establishes the routing table entry L3 before according to the mapping relationship between the IP address associated with the server 201 and the local IP address of the server 202, the server 202 may invoke its own IBGP Service to send the deletion instruction M1, so as to delete the routing table entry L3 stored in the routing device 203.
Thus, when the routing device 40 receives the packet, the next hop address, that is, the local IP address of the routing device 203, is determined from the routing table entry L2 according to the IP address associated with the server 201 and carried in the packet, and the packet is forwarded to the routing device 203. After receiving the message, the routing device 203 determines the next hop address, i.e. the local IP address of the server 201, from the routing table entry L1 according to the IP address associated with the server 201 in the message, and then forwards the message to the server 201.
When the server 201 is in a failure state, the server 202 may invoke its own IBGP Service to send a mapping relationship between the IP address associated with the server 201 and the local IP address of the server 202 to the routing device 203, and the routing device 203 establishes a routing table entry L3 according to the mapping relationship. The local IP address of server 202 is different from the IP address associated with server 201, and the local address of server 202 is, for example, 100.10.1.1/24.
In this case, the server 201 is set down from the primary server to the backup server, and therefore, calls its own IBGP Service to cancel the sending operation, which is an operation of sending the mapping relationship between the IP address associated with the server 201 and the local IP address of the server 201 to the routing device 203, and the purpose of the cancellation is not to make the routing device 203 establish the routing table entry L1 according to the mapping relationship.
Optionally, since the routing device 203 previously establishes the routing table entry L1 according to the mapping relationship between the IP address associated with the server 201 and the local IP address of the server 202, the server 201 may invoke its own IBGP Service to send the deletion instruction M2 to delete the routing table entry L1 stored in the routing device 203.
Thus, when the routing device 40 receives the packet, the next hop address, that is, the local address of the routing device 203, is determined from the routing table entry L2 according to the IP address associated with the server 201 and carried in the packet, and the packet is forwarded to the routing device 203. After receiving the message, the routing device 203 determines the next hop address, i.e. the local IP address of the server 202, from the routing table entry L3 according to the IP address associated with the server 201 in the message, and then forwards the message to the server 202.
The process of switching between the main server and the standby server in the whole server cluster 20 is automatically realized, so that a user does not need to modify an IP address, and the workload of additionally modifying the priority by a manager does not need to be increased, so that the method is more convenient and faster.
When both server 201 and server 202 in server cluster 20 fail, then server cluster 30 needs to be started.
Specifically, the master server in the server cluster 20 may invoke drService to periodically send a heartbeat packet to the server (e.g., the server 301) of the server cluster 30, and if the server of the server cluster 30 does not receive the heartbeat packet within a preset time period, it is determined that the server cluster 20 fails. At this time, a server of the server cluster 30, for example, the server 301 calls drService to modify its own backup server identifier into a primary server identifier, and calls BGPService to send to the routing device 303 the mapping relationship between the IP address associated with the server 201 in the server 301 and the local IP address of the server 301, so as to establish a routing table entry L4 in the routing device 303, where the destination address of the routing table entry L4 is the IP address associated with the server 201, and the next hop address is the local IP address of the server 301. The local IP address of server 301 is different from the IP address associated with server 201, e.g., the local address of server 301 is 100.10.2.0/24.
Further, the routing device 303 sends the IP address associated with the server 201 and the local IP address of the routing device 303 to the routing device 40, so that the routing device 40 can establish a routing table entry L5, where a destination address of the routing table entry L5 is the IP address associated with the server 201, and a next hop address is the local IP address of the routing device 303.
Since the south interface IP addresses of the servers in the server cluster 20 are the same as the south interface IP addresses of the servers in the server cluster 30, and the north interface IP addresses of the servers in the server cluster 20 are the same as the north interface IP addresses of the servers in the server cluster 30, for the user, the switching between the server cluster 20 and the server cluster 30 does not need to be perceived by the user, which is convenient for the user to access.
When the routing device 40 receives the message, it finds the corresponding next hop address, i.e. the local IP address of the routing device 303, from the routing table entry L5 according to the IP address associated with the server 201 in the message, and forwards the message to the routing device 303. And the routing device 303 finds the next hop address, i.e. the local IP address of the server 301, from the routing table entry L4 according to the IP address associated with the server 201 in the message, so that the server 301 receives the message.
It can be seen that the switching process between the server cluster 20 and the server cluster 30 is also automatically implemented, which improves the experience for the user and the administrator.
Since the internal architectures of the server cluster 30 and the server cluster 20 are similar, the switching between the server 301 and the server 302 is described above with reference to the switching between the server 201 and the server 202, and will not be described here.
Based on the communication system provided above, refer to fig. 3, which is a flowchart illustrating a communication method provided in an embodiment of the present application.
The communication method provided by the embodiment of the present application may be applied to the first server in the embodiment shown in fig. 1, and specifically includes the following steps:
s101: obtaining a first mapping relation, wherein the first mapping relation is a mapping relation between an Internet Protocol (IP) address associated with the first server and a local IP address of the first server, and the IP address associated with the first server comprises a preset southbound interface IP address and/or a preset northbound interface IP address;
s102: and sending the first mapping relation to the target equipment based on a border gateway protocol.
In this embodiment, the first server sends, to the target device, a mapping relationship between an IP address associated with the first server and a local IP address of the first server, that is, a first mapping relationship, so that the target device may access the first server according to the first mapping relationship. For the user, the first server may be accessed using the IP address associated with the first server without using the IP address of the first server to access the first server, i.e., the user may achieve access without perceiving the first server. When the first server fails and needs to be replaced to the second server, the target device only needs to change the mapping relation between the IP address associated with the first server and the IP address of the first server into the mapping relation between the IP address associated with the first server and the IP address of the second server, and a user does not need to change an access address when switching between the servers, so that convenience is brought to the user. Meanwhile, the IP address associated with the first server is sent to the target device and is not the routing device of the first server, so that the priority does not need to be set on the routing device to control whether the target device accesses the first server, and the workload of management personnel is reduced.
Optionally, the target device includes a routing device;
the sending the first mapping relationship to the target device based on the border gateway protocol includes:
sending a first routing table item generation instruction to the routing device based on a border gateway protocol, where the first routing table item generation instruction carries the first mapping relationship, and the first routing table item generation instruction is used to instruct the routing device to generate a first routing table item according to the first mapping relationship, where a destination address of the first routing table item is the IP address associated with the first server, and a next hop address of the first routing table item is a local IP address of the first server.
Optionally, the method further includes:
and if the state of the first server is a fault state, sending a first deleting instruction to the routing equipment, wherein the first deleting instruction is used for indicating the routing equipment to delete the first routing table entry.
Optionally, the sending the first mapping relationship to the target device based on the border gateway protocol includes:
if the state of the first server is a working state, setting the main and standby identifications of the first server as the identifications corresponding to the main server;
and if the primary and standby identification of the first server is detected to be the identification corresponding to the primary server, sending the first mapping relation to the target equipment based on a border gateway protocol.
Optionally, the first server includes a load balancing server.
Referring to fig. 4, the flowchart of a communication method according to an embodiment of the present application is schematically shown.
The communication method provided by the embodiment of the present application may be applied to the second server shown in fig. 1, and specifically includes the following steps:
s201: acquiring a state of a first server and a second mapping relation, wherein the second mapping relation is a mapping relation between an IP address associated with the first server and a local IP address of a second server, and the IP address associated with the first server comprises a preset southbound interface Internet Protocol (IP) address and/or a preset northbound Interface (IP) address;
s202: and if the state is a fault state, sending the second mapping relation to the target equipment based on a border gateway protocol.
In this embodiment, the second server sends, to the target device, a mapping relationship between the internet protocol IP address associated with the first server and the local IP address of the second server, that is, a second mapping relationship, so that the target device can access the second server according to the second mapping relationship. For the user, the second server may be accessed using the IP address associated with the second server without using the IP address of the second server to access the second server, i.e., the user may gain access without being aware of the second server. That is to say, when the first server fails and needs to be replaced with the second server, the mapping relationship between the IP address associated with the first server and the first server only needs to be changed into the mapping relationship between the IP address associated with the first server and the second server, and the user does not need to change the access address when switching between the servers, which provides convenience for the user. Meanwhile, the IP address associated with the first server is sent to the target device, and is the second server, but not the routing device of the second server, so that the second server does not need to set priority on the routing device to control whether the routing device accesses the second server, and the second server distributes the IP address associated with the first server to the target device when the state is the fault state by acquiring the state of the first server, thereby realizing the access to the second server and reducing the workload of managers.
Optionally, the target device includes a routing device;
the sending the second mapping relationship to the target device based on the border gateway protocol includes:
sending a second routing table item generating instruction to the routing device based on a border gateway protocol, where the second routing table item generating instruction carries the second mapping relationship, and the second routing table item generating instruction is used to instruct the routing device to generate a second routing table item according to the second mapping relationship, where a destination address of the second routing table item is the IP address associated with the first server, and a next hop address of the second routing table item is a local IP address of the second server.
Optionally, the sending the second mapping relationship to the target device based on the border gateway protocol includes:
if the state of the first server is a fault state, setting the main and standby identifications of the second server as the identifications corresponding to the main server;
and when detecting that the primary and standby identifiers of the second server are identifiers corresponding to the primary server, sending the second mapping relation to the target device based on a border gateway protocol.
Optionally, the second server includes a load balancing server.
Referring to fig. 5, the figure is a block diagram of a communication device according to an embodiment of the present application.
The communication device provided by the embodiment of the application is applied to a first server, and the device comprises:
an obtaining unit 501, configured to obtain a first mapping relationship, where the first mapping relationship is a mapping relationship between an internet protocol IP address associated with the first server and a local IP address of the first server, and the IP address associated with the first server includes a preset southbound interface IP address and/or a preset northbound interface IP address;
a sending unit 502, configured to send the first mapping relationship to a target device based on a border gateway protocol.
Optionally, the target device includes a routing device;
the sending unit 502 is configured to send a first routing table entry generating instruction to the routing device based on a border gateway protocol, where the first routing table entry generating instruction carries the first mapping relationship, the first routing table entry generating instruction is used to instruct the routing device to generate a first routing table entry according to the first mapping relationship, a destination address of the first routing table entry is the IP address associated with the first server, and a next hop address of the first routing table entry is a local IP address of the first server.
Optionally, the apparatus further comprises:
a deleting unit, configured to send a first deleting instruction to the routing device if the state of the first server is a failure state, where the first deleting instruction is used to instruct the routing device to delete the first routing table entry.
Optionally, the sending unit is configured to set the active/standby identifier of the first server as an identifier corresponding to a primary server if the state of the first server is a working state; and if the primary and standby identification of the first server is detected to be the identification corresponding to the primary server, sending the first mapping relation to the target equipment based on a border gateway protocol.
Optionally, the first server includes a load balancing server.
Referring to fig. 6, this figure is a block diagram of another communication device according to an embodiment of the present disclosure.
The communication device provided by the embodiment of the application is applied to a second server, and the device comprises:
an obtaining unit 601, configured to obtain a state of a first server and a second mapping relationship, where the second mapping relationship is a mapping relationship between an IP address associated with the first server and a local IP address of a second server, and the IP address associated with the first server includes a preset southbound interface internet protocol IP address and/or a preset northbound interface IP address;
a sending unit 602, configured to send the second mapping relationship to a target device based on a border gateway protocol if the status is a failure status.
Optionally, the target device includes a routing device;
the sending unit 602 is configured to send a second routing table entry generating instruction to the routing device based on a border gateway protocol, where the second routing table entry generating instruction carries the second mapping relationship, and the second routing table entry generating instruction is used to instruct the routing device to generate a second routing table entry according to the second mapping relationship, a destination address of the second routing table entry is the IP address associated with the first server, and a next hop address of the second routing table entry is a local IP address of the second server.
Optionally, the sending unit 602 is configured to set the active/standby identifier of the second server as an identifier corresponding to a primary server if the state of the first server is a failure state; and when detecting that the main/standby identifier of the second server is the identifier corresponding to the main server, sending the second mapping relation to the target device based on a border gateway protocol.
Optionally, the second server includes a load balancing server.
Referring to fig. 7, this figure is a block diagram of a server according to an embodiment of the present disclosure.
The server 700 provided in the embodiment of the present application is a first server, and the server 700 may implement the function of the first server in the embodiment shown in fig. 3. The server 700 includes: a processor 701, a memory 702 and a communication unit 703, wherein the memory 702 is configured to store instructions;
the processor 701 is configured to execute the instructions in the memory, and perform the communication method of the first server in the embodiment shown in fig. 3.
The communication unit 703 is configured to communicate with a second server.
The processor 701, the memory 702, and the communication unit 703 are connected to each other by a bus 704; the bus 704 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 7, but that does not indicate only one bus or one type of bus.
In particular implementations, memory 702 may include a fetch unit 7021 and a transmit unit 7022 that store computer readable instructions to implement fetch unit 501 and transmit unit 502, respectively, as shown in fig. 5. Accordingly, processor 701 specifically implements the function of obtaining unit 501 by executing the instruction in obtaining unit 7021, and implements the function of sending unit 502 by executing the instruction of sending unit 7022.
Referring to fig. 8, this figure is a block diagram of another server according to an embodiment of the present disclosure.
The server 800 provided in the embodiment of the present application is a second server, and the server 800 may implement the function of the second server in the embodiment shown in fig. 4. The server 800 includes: a processor 801, a memory 802 and a communication unit 803, wherein the memory 802 is used for storing instructions;
the processor 801 is configured to execute the instructions in the memory to execute the communication method of the first server in the embodiment shown in fig. 3.
The communication unit 803 is configured to communicate with a second server.
The processor 801, the memory 802, and the communication unit 803 are connected to each other by a bus 804; the bus 804 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 8, but this is not intended to represent only one bus or type of bus.
In particular implementations, memory 802 may include a fetch unit 8021 and a transmit unit 8022 that store computer readable instructions for implementing fetch unit 601 and transmit unit 602, respectively, shown in fig. 6. Accordingly, the processor 801 specifically implements the function of the acquisition unit 601 by executing the instructions in the acquisition unit 8021, and implements the function of the transmission unit 602 by executing the instructions in the transmission unit 8022.
The memory 701 and the memory 801 may be a random-access memory (RAM), a flash memory (flash), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a register (register), a hard disk, a removable hard disk, a CD-ROM, or any other form of storage medium known to those skilled in the art. The memory 701 may represent only one memory or may represent a plurality of memories; similarly, memory 801 may represent only one memory or may represent multiple memories.
The processor 702 and the processor 802 may be, for example, a Central Processing Unit (CPU), a general purpose processor, a Digital Signal Processor (DSP), an application-specific integrated circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein. A processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, a DSP and a microprocessor, or the like. The processor 702 may represent only one processor or may represent multiple processors; similarly, the processor 802 may represent only one processor or may represent multiple processors.
The communication unit 703 and the communication unit 803 may be, for example, an I/O interface, a LAN interface, a WAN interface, or the like.
Embodiments of the present application also provide a computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform the above communication method applied to the first server and/or the second server.
Embodiments of the present application also provide a computer program product containing instructions that, when run on a computer, cause the computer to perform the above communication method applied to the first server and/or the second server.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processor, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above-described embodiments are intended to explain the objects, aspects and advantages of the present invention in further detail, and it should be understood that the above-described embodiments are merely exemplary embodiments of the present invention.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and these modifications or substitutions do not depart from the scope of the technical solutions of the embodiments of the present application.

Claims (15)

1. A communication method applied to a first server, the method comprising:
obtaining a first mapping relationship, where the first mapping relationship is a mapping relationship between an Internet Protocol (IP) address associated with the first server and a local IP address of the first server, and the IP address associated with the first server includes a preset southbound interface IP address and/or a preset northbound interface IP address;
sending the first mapping relation to a target device based on a border gateway protocol, so that the target device accesses the first server according to the first mapping relation;
the target device comprises a routing device, and the sending the first mapping relation to the target device based on the border gateway protocol comprises:
sending a first routing table item generation instruction to the routing device based on a border gateway protocol, where the first routing table item generation instruction carries the first mapping relationship, and the first routing table item generation instruction is used to instruct the routing device to generate a first routing table item according to the first mapping relationship, where a destination address of the first routing table item is the IP address associated with the first server, and a next hop address of the first routing table item is a local IP address of the first server.
2. The method of claim 1, further comprising:
and if the state of the first server is a fault state, sending a first deleting instruction to the routing equipment, wherein the first deleting instruction is used for indicating the routing equipment to delete the first routing table entry.
3. The method of claim 1, wherein sending the first mapping relationship to a target device based on a border gateway protocol comprises:
if the state of the first server is a working state, setting the main and standby identification of the first server as an identification corresponding to a main server;
and if the primary and standby identification of the first server is detected to be the identification corresponding to the primary server, sending the first mapping relation to the target equipment based on a border gateway protocol.
4. A method according to any of claims 1-3, wherein the first server comprises a load balancing server.
5. A communication method applied to a second server, the method comprising:
acquiring a state of a first server and a second mapping relation, wherein the second mapping relation is a mapping relation between an IP address associated with the first server and a local IP address of a second server, and the IP address associated with the first server comprises a preset southbound interface Internet Protocol (IP) address and/or a preset northbound Interface (IP) address;
if the state is a fault state, sending the second mapping relation to target equipment based on a border gateway protocol, so that the target equipment accesses the second server according to the second mapping relation;
the target device comprises a routing device, and the sending the second mapping relation to the target device based on the border gateway protocol comprises:
and sending a second routing table entry generating instruction to the routing device based on a border gateway protocol, where the second routing table entry generating instruction carries the second mapping relationship, and the second routing table entry generating instruction is used to instruct the routing device to generate a second routing table entry according to the second mapping relationship, where a destination address of the second routing table entry is the IP address associated with the first server, and a next hop address of the second routing table entry is a local IP address of the second server.
6. The method of claim 5, wherein sending the second mapping to a target device based on a border gateway protocol comprises:
if the state of the first server is a fault state, setting the main and standby identification of the second server as the identification corresponding to the main server;
and when detecting that the primary and standby identifiers of the second server are identifiers corresponding to the primary server, sending the second mapping relation to the target device based on a border gateway protocol.
7. The method of claim 5 or 6, wherein the second server comprises a load balancing server.
8. A communication apparatus, applied to a first server, the apparatus comprising:
an obtaining unit, configured to obtain a first mapping relationship, where the first mapping relationship is a mapping relationship between an internet protocol IP address associated with the first server and a local IP address of the first server, and the IP address associated with the first server includes a preset southbound interface IP address and/or a preset northbound interface IP address;
a sending unit, configured to send the first mapping relationship to a target device based on a border gateway protocol, so that the target device accesses the first server according to the first mapping relationship;
the target device includes a routing device, where the sending unit is specifically configured to send a first routing table entry generating instruction to the routing device based on a border gateway protocol, where the first routing table entry generating instruction carries the first mapping relationship, the first routing table entry generating instruction is used to instruct the routing device to generate a first routing table entry according to the first mapping relationship, a destination address of the first routing table entry is the IP address associated with the first server, and a next hop address of the first routing table entry is a local IP address of the first server.
9. The apparatus of claim 8, further comprising:
and a deleting unit, configured to send a first deleting instruction to the routing device if the state of the first server is a failure state, where the first deleting instruction is used to instruct the routing device to delete the first routing table entry.
10. The apparatus of claim 8,
the sending unit is configured to set a primary/standby identifier of the first server as an identifier corresponding to a primary server if the state of the first server is a working state; and if the primary and standby identification of the first server is detected to be the identification corresponding to the primary server, sending the first mapping relation to the target equipment based on a border gateway protocol.
11. The apparatus of any of claims 8-10, wherein the first server comprises a load balancing server.
12. A communication apparatus, applied to a second server, the apparatus comprising:
the device comprises an obtaining unit, a mapping unit and a processing unit, wherein the obtaining unit is used for obtaining the state of a first server and a second mapping relation, the second mapping relation is the mapping relation between an IP address associated with the first server and a local IP address of a second server, and the IP address associated with the first server comprises a preset southbound interface Internet Protocol (IP) address and/or a preset northbound interface IP address;
a sending unit, configured to send the second mapping relationship to a target device based on a border gateway protocol if the status is a failure status, so that the target device accesses the second server according to the second mapping relationship;
the target device includes a routing device, and the sending unit is specifically configured to send a second routing table entry generation instruction to the routing device based on a border gateway protocol, where the second routing table entry generation instruction carries the second mapping relationship, and the second routing table entry generation instruction is used to instruct the routing device to generate a second routing table entry according to the second mapping relationship, a destination address of the second routing table entry is the IP address associated with the first server, and a next hop address of the second routing table entry is a local IP address of the second server.
13. The apparatus of claim 12,
the sending unit is configured to set the active/standby identifier of the second server as an identifier corresponding to a primary server if the state of the first server is a failure state; and when detecting that the main/standby identifier of the second server is the identifier corresponding to the main server, sending the second mapping relation to the target device based on a border gateway protocol.
14. The apparatus of claim 12 or 13, wherein the second server comprises a load balancing server.
15. A communication system, characterized in that the system comprises a first server and a second server;
the first server is used for acquiring a first mapping relation and sending the first mapping relation to target equipment based on a border gateway protocol so that the target equipment accesses the first server according to the first mapping relation; the first mapping relationship is a mapping relationship between an Internet Protocol (IP) address associated with the first server and a local IP address of the first server, the IP address associated with the first server comprises a preset southbound interface IP address and/or a preset northbound interface IP address, and the target device comprises a routing device; the first server is specifically configured to send a first routing table entry generating instruction to the routing device based on a border gateway protocol, where the first routing table entry generating instruction carries the first mapping relationship, the first routing table entry generating instruction is used to instruct the routing device to generate a first routing table entry according to the first mapping relationship, a destination address of the first routing table entry is the IP address associated with the first server, and a next hop address of the first routing table entry is a local IP address of the first server;
the second server is configured to obtain a state of the first server and a second mapping relationship, and if the state is a failure state, send the second mapping relationship to a target device based on a border gateway protocol, so that the target device accesses the second server according to the second mapping relationship, where the second mapping relationship is a mapping relationship between an IP address associated with the first server and a local IP address of the second server;
the second server is specifically configured to send a second routing table entry generating instruction to the routing device based on a border gateway protocol, where the second routing table entry generating instruction carries the second mapping relationship, the second routing table entry generating instruction is used to instruct the routing device to generate a second routing table entry according to the second mapping relationship, a destination address of the second routing table entry is the IP address associated with the first server, and a next hop address of the second routing table entry is a local IP address of the second server.
CN201811095768.6A 2018-09-19 2018-09-19 Communication system, method and device Active CN110932876B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811095768.6A CN110932876B (en) 2018-09-19 2018-09-19 Communication system, method and device
PCT/CN2019/105770 WO2020057445A1 (en) 2018-09-19 2019-09-12 Communication system, method, and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811095768.6A CN110932876B (en) 2018-09-19 2018-09-19 Communication system, method and device

Publications (2)

Publication Number Publication Date
CN110932876A CN110932876A (en) 2020-03-27
CN110932876B true CN110932876B (en) 2022-12-02

Family

ID=69856078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811095768.6A Active CN110932876B (en) 2018-09-19 2018-09-19 Communication system, method and device

Country Status (2)

Country Link
CN (1) CN110932876B (en)
WO (1) WO2020057445A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113014426B (en) * 2021-02-10 2023-04-07 优刻得科技股份有限公司 Method and device for establishing communication between cloud server and client server
CN113794644B (en) * 2021-10-12 2023-05-26 新华三信息安全技术有限公司 Method and device for deleting routing table entries
CN114245400B (en) * 2021-11-11 2023-11-03 新华三大数据技术有限公司 Cloud management platform system and method for dynamically managing users thereof
CN114301989A (en) * 2021-12-28 2022-04-08 中国电信股份有限公司 Information transmission method, device and system

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004032452A (en) * 2002-06-26 2004-01-29 Nec Corp System changing method and system of cluster-configured machines
CN1306777C (en) * 2004-10-18 2007-03-21 北京首信股份有限公司 Method for realizing seamless changing of master and spare service module
CN101150439A (en) * 2007-09-25 2008-03-26 华为技术有限公司 A method, system and device for realizing master/slave switching
JP4703682B2 (en) * 2008-04-21 2011-06-15 株式会社東芝 Cluster system and program
CN101572676B (en) * 2009-06-17 2011-06-29 杭州华三通信技术有限公司 Load sharing method and equipment of double outlets at data center
CN103346903B (en) * 2013-06-20 2017-02-15 北京捷成世纪科技股份有限公司 Dual-machine backup method and device
US10230629B2 (en) * 2015-08-11 2019-03-12 Nicira, Inc. Static route configuration for logical router
CN106789246A (en) * 2016-12-22 2017-05-31 广西防城港核电有限公司 The changing method and device of a kind of active/standby server
CN107465556B (en) * 2017-09-07 2021-02-05 苏州浪潮智能科技有限公司 Method, device and system for switching main server and standby server
CN108494675A (en) * 2018-02-07 2018-09-04 华为技术有限公司 Realize the method, apparatus and routing device of Virtual Router Redundacy Protocol backup group

Also Published As

Publication number Publication date
WO2020057445A1 (en) 2020-03-26
CN110932876A (en) 2020-03-27

Similar Documents

Publication Publication Date Title
CN112087312B (en) Method, device and equipment for providing edge service
CN110932876B (en) Communication system, method and device
US9596134B2 (en) Synchronization of configuration file of virtual application distribution chassis
EP3544232B1 (en) Processing method, device and system for nf component abnormality
US11770359B2 (en) Maintaining communications in a failover instance via network address translation
CN113572831B (en) Communication method, computer equipment and medium between Kubernetes clusters
CN110474802B (en) Equipment switching method and device and service system
EP2939401B1 (en) Method for guaranteeing service continuity in a telecommunication network and system thereof
CN104144124B (en) Data forwarding method, Apparatus and system
US20180077007A1 (en) Redundant storage solution
JP2019525604A (en) Network function NF management method and NF management apparatus
CN111083177B (en) Cross-domain collaborative interaction method based on collaborative gateway
CN114143283B (en) Tunnel self-adaptive configuration method and device, central terminal equipment and communication system
US11057475B2 (en) Methods, apparatus and systems for resuming transmission link
CN113364741A (en) Application access method and proxy server
CN108900441B (en) Network switching method, first electronic device and readable storage medium
CN108366087B (en) ISCSI service realization method and device based on distributed file system
CN112995027B (en) Route publishing method and VTEP node
US20230146880A1 (en) Management system and management method
CN114884880A (en) Data transmission method and system
US11729140B2 (en) Method and system for managing DHCP servers
CN106878051B (en) Multi-machine backup implementation method and device
CN110958182B (en) Communication method and related equipment
CN115225634B (en) Data forwarding method, device and computer program product under virtual network
CN113765783B (en) Communication 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