[go: up one dir, main page]

WO2020186925A1 - 一种数据传输的方法和计算机系统 - Google Patents

一种数据传输的方法和计算机系统 Download PDF

Info

Publication number
WO2020186925A1
WO2020186925A1 PCT/CN2020/073023 CN2020073023W WO2020186925A1 WO 2020186925 A1 WO2020186925 A1 WO 2020186925A1 CN 2020073023 W CN2020073023 W CN 2020073023W WO 2020186925 A1 WO2020186925 A1 WO 2020186925A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
subnet
network segment
vpc
server
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.)
Ceased
Application number
PCT/CN2020/073023
Other languages
English (en)
French (fr)
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 EP20773427.8A priority Critical patent/EP3883217A4/en
Publication of WO2020186925A1 publication Critical patent/WO2020186925A1/zh
Priority to US17/373,025 priority patent/US11451509B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/256NAT traversal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2592Translation of Internet protocol [IP] addresses using tunnelling or encapsulation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2514Translation of Internet protocol [IP] addresses between local and global IP addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2521Translation architectures other than single NAT servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2521Translation architectures other than single NAT servers
    • H04L61/2535Multiple local networks, e.g. resolving potential IP address conflicts
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/668Internet protocol [IP] address subnets

Definitions

  • This application relates to the field of cloud computing, and more specifically, to a data transmission method and computer system.
  • the data center may be, for example, an application center, a business center, a service center, etc.
  • VPC Virtual private cloud
  • Users under the cloud can access the VPC through a VPN connection, for example, to access the data center in the cloud.
  • IP Internet Protocol
  • This application provides a data transmission method and computer system, in order to achieve correct transmission of data packets and improve user experience.
  • a data transmission method includes: determining that a first network segment and a second network segment overlap; the first network segment is a network segment included in a subnet where a target server is located, and the target server is a server running in a first virtual private cloud VPC, The first network segment is subordinate to the network segment included in the first VPC; the second network segment is the network segment included in the subnet where the first electronic device is located; at least two subnets are created in the first VPC, and the at least two subnets The network segment included in any subnet of the network does not overlap with the first network segment and the second network segment; when the target server sends a data packet to the first electronic device, the network interfaces in the at least two subnets are used for forwarding successively The data packet is transmitted to the first electronic device after being forwarded at least twice.
  • this method may be executed by a server running in the first VPC.
  • a server running in the first VPC may be the above-mentioned target server or other servers, which is not limited in this application.
  • the network segment overlaps between the first electronic device and the target server
  • at least two subnets are created in the first VPC to realize the interconnection between the first electronic device and the software system. Since the network segment included in any one of the at least two subnets does not overlap with the network segment where the first electronic device is located, and the network segment where the target server is located, the data packet can be found to be unique during transmission. The destination IP address can realize the correct transmission of data packets between the first electronic device and the software system, which is beneficial to improve user experience.
  • the technical solution provided by the present application does not require a new target server, nor does it need to deploy a software system on other target servers (such as a newly-built server), so the cost is small and the cycle is short.
  • the data packet is forwarded after performing IP address conversion via each of the at least two network interfaces, which are the same as the at least two subnets mentioned above.
  • the IP address of each network interface belongs to the corresponding subnet.
  • the network interface in each of the above at least two subnets is used to perform IP address translation on the received data packets according to a predetermined route, so that the data packets from the target server pass through the at least two subnets successively After the IP address in each subnet in is translated, it is forwarded to the first electronic device.
  • the network interface in each of the at least two subnets is used to perform IP address conversion on the received data packet according to a predetermined route, so that the data packet from the first electronic device sequentially passes through the at least two subnets.
  • the IP address in each subnet in the network is translated and forwarded to the target server.
  • the data packet from the first electronic device can be forwarded to the target server after being forwarded by the at least two newly created subnets, or the data packet from the target server can be transmitted through the newly created subnet. At least two subnets are forwarded to the first electronic device.
  • the backhaul path of the data packet can be further obtained. For example, after receiving the data packet from the first electronic device, the target server may feed back a response message to the first electronic device along the backhaul path; or, after receiving the data packet from the target server, the first electronic device may follow the backhaul The path returns a response message to the target server.
  • IP address translation can be implemented by network address translation (NAT) software, or by destination network address translation (DNAT) software and source network address translation (SNAT) software. ) Co-implementation by software, or other software or hardware that can achieve the same or similar functions. This application does not limit this.
  • the at least two network interfaces are configured on the target server.
  • the at least two network interfaces are configured on the target server, which can reduce the waste of server resources. At least two network interfaces corresponding to the at least two newly created subnets can be added to the target server, and the IP address of each network interface belongs to the corresponding subnet.
  • the method further includes: creating the second server in the first VPC; and configuring the at least two network interfaces on the second server.
  • the at least two network interfaces are configured on the second server, that is, on a server different from the target server. This can meet the needs of users who do not want to restart the target server, which is conducive to improving user experience.
  • At least two network cards corresponding to the at least two newly created subnets can be configured on the second server, and the IP address of each network card belongs to the corresponding subnet.
  • the at least two network cards are active network cards
  • the method further includes: creating a third server in the first VPC; configuring at least two network cards on the third server A backup network interface, the at least two backup network interfaces have a one-to-one correspondence with at least two primary network interfaces, and the IP address of each primary network interface is subordinate to the network segment to which the IP address of the corresponding backup network interface is subordinate
  • the segments are the same, and each primary network interface and its corresponding standby network interface have the same floating IP address.
  • the third server can be used as the above-mentioned target server or a backup server of the second server.
  • the network interface configured by the third server is a backup network interface.
  • the network interface configured by the target server or the second server is the main network interface.
  • the method further includes: determining that a third network segment overlaps the first network segment, and the third network segment is included in the subnet where the second electronic device is located.
  • Network segment create at least two subnets in the second VPC, the second VPC has a communication connection with the first VPC, any one of the at least two subnets is connected to the first network segment, the second The network segment and the third network segment do not overlap; when the target server sends a data packet to the second electronic device, the network interfaces of the at least two subnets are used to forward the data packet successively, so that the data packet passes through at least two After forwarding, it is sent to the second electronic device.
  • network segment overlap may occur between the multiple electronic devices.
  • you can create a new VPC that is, the above-mentioned second VPC, and create at least two subnets in the newly created second VPC.
  • the at least two subnets created by the second VPC are the same as the above-mentioned first network segment and the first network segment.
  • the two network segments do not overlap, so that any two network segments overlapping electronic devices can achieve interconnection and intercommunication with the target server through different paths and transmit data.
  • the embodiments of the present application provide corresponding technical solutions for the scenario where multiple electronic devices need to access the target server, the network segment overlap between the target server and the electronic device and the network segment overlap between the electronic devices are provided to implement the electronic device Interconnection with the target server, so as to realize a center to connect any number of users.
  • a data transmission method includes: determining that a fourth network segment and a fifth network segment overlap, the fourth network segment is a network segment included in the subnet where the third electronic device is located, and the fifth network segment is the subnet where the fourth electronic device is located.
  • the fourth electronic device has a network connection relationship with a target server;
  • the target server is a server running in the first virtual private cloud VPC, the IP address of the first network interface belongs to the first network segment, and
  • the first network segment is subordinate to the network segment included in the first VPC;
  • at least one subnet is created in the third VPC, and there is a communication connection between the third VPC and the first VPC, and any one of the at least one subnet is The network does not overlap with the first, fourth, and fifth network segments; when the target server sends a data packet to the third electronic device, the network interface in the at least one subnet is used to forward the data packet , So that the data packet is sent to the third electronic device after being forwarded at least once.
  • this method may be executed by a server running in the first VPC.
  • a server running in the first VPC may be the above-mentioned target server or other servers, which is not limited in this application.
  • a new VPC is created for the newly accessed third electronic device, and a new subnet is created in the newly created VPC. Realize the interconnection between the third electronic device and the target server. Since the network segment included in the newly created VPC does not overlap with the network segment where the fourth electronic device is located and the network segment where the target server is located, the unique destination address can be found during the transmission of the data packet Therefore, the correct transmission of the data packet between the third electronic device and the target server can be realized, which is beneficial to improve user experience.
  • the technical solution provided by the present application does not require a new target server, nor does it need to deploy a software system on other target servers (such as a newly-built server), so the cost is small and the cycle is short.
  • the data packet is forwarded after performing IP address translation via each of the at least two network interfaces, where the at least two network interfaces are the same as the at least two subnets.
  • the IP address of each network interface belongs to the corresponding subnet.
  • the network interface in each subnet of the above at least one subnet is used to perform IP address conversion on the received data packet according to a predetermined route, so that the data packet from the target server sequentially passes through the at least one subnet After the IP address in each subnet in is translated, it is forwarded to the third electronic device.
  • the network interface in each subnet of the at least one subnet is used to perform IP address conversion on the received data packet according to a predetermined route, so that the data packet from the third electronic device sequentially passes through the at least one subnet.
  • the IP address in each subnet in the network is translated and forwarded to the target server.
  • the data packet from the third electronic device can be forwarded to the target server by the at least one newly created subnet, or the data packet from the target server can be transmitted through the newly created subnet. At least one subnet is forwarded to the third electronic device.
  • the backhaul path of the data packet can be further obtained. For example, after receiving the data packet from the third electronic device, the target server can feed back a response message to the third electronic device along the backhaul path; or, after receiving the data packet from the target server, the third electronic device can follow the backhaul The path returns a response message to the target server.
  • data packet forwarding module may be implemented by, for example, NAT software, DNAT software and SNAT software, or other software or hardware that can implement the same or similar functions. This application does not limit this.
  • the method further includes: creating a third VPC.
  • the third VPC may be newly created or originally existing, which is not limited in this application.
  • the method further includes: creating a fourth server in the third VPC; and configuring the at least one network interface on the fourth server.
  • a fourth server is created in the newly created third VPC, and at least one network interface corresponding to the newly created at least one subnet can be configured on the server, and the IP address of each network interface belongs to the corresponding subnet.
  • the at least one network card is the active network card
  • the method further includes: creating a fifth server in the third VPC; configuring at least one backup network on the fifth server Interface, the at least one backup network interface has a one-to-one correspondence with at least one primary network interface, the network segment to which the IP address of each primary network interface belongs is the same as the network segment to which the IP address of the corresponding backup network interface belongs, and each Each primary network interface and its corresponding backup network interface have the same floating IP address.
  • the fifth server can be used as the first server or the backup server.
  • the network interface configured by the fifth server is a backup network interface.
  • the network interface configured by the first server is the main network interface.
  • a computer system in a third aspect, includes modules that can be used to implement the first aspect and any of the possible implementation manners of the first aspect.
  • the computer system includes a determining module and a creating module; the determining module is used to determine that a first network segment overlaps a second network segment, and the first network segment is a network segment included in the subnet where the target server is located ,
  • the target server is a server running in a first virtual private cloud VPC, the first network segment is subordinate to a network segment included in the first VPC, and the second network segment is where the first electronic device is located
  • the creation module is used to: create at least two subnets in the first VPC, and the network segment included in any one of the at least two subnets and the first network segment and The second network segments do not overlap; when the target server sends a data packet to the first electronic device, the network interfaces in the at least two subnets are used to forward the data packet successively, so that the data The packet is sent to the first electronic device after being forwarded at least twice.
  • the data packet is forwarded after performing IP address conversion via each of the at least two network interfaces, and the at least two network interfaces are At least two subnets have a one-to-one correspondence, and the IP address of each network interface belongs to the corresponding subnet.
  • the at least two network interfaces are configured on the target server.
  • the creation module is further configured to: create the second server in the first VPC; the computer system further includes a configuration module, the configuration The module is used to configure the at least two network interfaces on the second server.
  • the network interface corresponding to the at least two subnets is the main network interface
  • the creation module is further configured to: create the first VPC in the first VPC Three servers; the configuration module is also used to configure at least two backup network interfaces on the third server, the at least two backup network interfaces are in one-to-one correspondence with the at least two primary network interfaces, and each primary The network segment to which the IP address of the network interface is subordinate is the same as the network segment to which the IP address of the corresponding backup network interface is subordinate, and each primary network interface and its corresponding backup network interface have the same floating IP address.
  • the determining module is further configured to: determine that a third network segment overlaps with the first network segment, and the third network segment is owned by the second electronic device.
  • the network segment included in the subnet at the location; the creation module is also used to: create at least two subnets in the second VPC, the second VPC and the first VPC have a communication connection, the at least two subnets Any subnet in the network does not overlap with the first network segment, the second network segment, and the third network segment; when the target server sends a data packet to the second electronic device, all The network interfaces of the at least two subnets are used to forward the data packet successively, so that the data packet is sent to the second electronic device after being forwarded at least twice.
  • a computer system in a fourth aspect, includes modules that can be used to implement the foregoing second aspect and any one of the possible implementation manners of the second aspect.
  • the computer system includes a determining module and a creating module.
  • the determining module is configured to determine that the fourth network segment overlaps the fifth network segment, the fourth network segment is a network segment included in the subnet where the third electronic device is located, and the fifth network segment is the fourth electronic device.
  • a network segment included in the subnet where the device is located, the fourth electronic device has a network connection relationship with a target server, the target server is a server running in a first virtual private cloud VPC, and the IP of the first network interface
  • the address belongs to the first network segment, and the first network segment belongs to the network segment included in the first VPC;
  • the creation module is used to create at least one subnet in the third VPC, and the third VPC is connected to all There is a communication connection between the first VPC, and any one of the at least one subnet does not overlap with the first network segment, the fourth network segment, and the fifth network segment; when the When the target server sends a data packet to the third electronic device, the network interface in the at least one subnet is used to forward the data packet, so that the data packet is sent to the third electronic device after at least one forwarding .
  • the data packet is forwarded after performing IP address conversion via each of the at least one network interface, and the at least one network interface is connected to the at least one network interface.
  • the at least one network interface is connected to the at least one network interface.
  • the creation module is further configured to: create the third VPC.
  • the creation module is further configured to: create the fourth server in the third VPC; the computer system further includes a configuration module, the configuration The module is used to configure at least one network interface corresponding to the at least one subnet on the fourth server.
  • At least one network interface corresponding to the at least one subnet is the active network interface
  • the creation module is further configured to: create a third VPC in the third VPC.
  • Five servers; the configuration module is also used to configure at least one backup network interface on the fifth server, the at least one backup network interface corresponds to at least one active network interface, and each active network interface
  • the subordinate network segment of the IP address is the same as the subordinate network segment of the IP address of the corresponding backup network interface, and each primary network interface and its corresponding backup network interface have the same floating IP address.
  • a computer system in the fifth aspect, includes a processor, a memory, and a communication interface.
  • the memory can be used to store program codes and data of the computer system. Therefore, the memory may be a storage unit inside the processor, or an external storage unit independent of the processor, or a component including a storage unit inside the processor and an external storage unit independent of the processor.
  • the memory may include volatile memory (volatile memory), such as random access memory (RAM); the memory may also include non-volatile memory (non-volatile memory), such as read-only memory (read-only memory). , ROM), flash memory (flash memory), hard disk drive (HDD), or solid-state drive (SSD); the memory may also include a combination of the above types of memory.
  • volatile memory such as random access memory (RAM)
  • non-volatile memory such as read-only memory (read-only memory).
  • ROM read-only memory
  • flash memory flash memory
  • HDD hard disk drive
  • SSD solid-state drive
  • the memory may be used to store a set of program codes, so that the processor can call the program codes stored in the memory to implement the functions of the receiving module and/or the processing module involved in the embodiments of the present invention.
  • the processor may be composed of one or more general-purpose processors, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (digital signal processor, DSP), and an application-specific integrated circuit (application-specific integrated circuit). integrated circuit, ASIC), field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules and circuits described in conjunction with the disclosure of this application.
  • the processor may also be a combination for realizing calculation functions, for example, including a combination of multiple microprocessors, a combination of DSP and microprocessor, and so on.
  • the processor can be used to run programs for processing functions in related program codes. In other words, the processor executes the program code to realize the function of the processing module. For the specific functions of each module, please refer to the relevant description in the third aspect.
  • processor may also be a collection of processors including at least one computing device, which is not specifically limited in this application.
  • the processors of the at least one computing device are commonly used to run related program codes to implement the functions of the modules in the third aspect or the fourth aspect of the present application.
  • the processor of each computing device may be independently used to run related program codes to realize the functions of the modules in the third aspect or the fourth aspect of the present application.
  • the communication interface may be a wired interface (for example, an Ethernet interface) or a wireless interface (for example, a cellular network interface or using a wireless local area network interface) for communicating with other modules/devices.
  • a wired interface for example, an Ethernet interface
  • a wireless interface for example, a cellular network interface or using a wireless local area network interface
  • the processor is configured to call and run the computer program from the memory, so that the computer system executes the method in any one of the first aspect or the second aspect and any one of the first aspect or the second aspect.
  • a computer-readable medium stores program code, and when the computer program code runs on a computer, the computer executes the methods in the above aspects.
  • a computer program product includes: computer program code, which when the computer program code runs on a computer, causes the computer to execute the methods in the above aspects.
  • FIG. 1 is a schematic diagram of a communication system suitable for the data transmission method provided by an embodiment of the present application
  • Figure 2 is a schematic diagram of multiple electronic devices accessing a software system on a server
  • FIG. 3 is a schematic flowchart of a data transmission method provided by an embodiment of the present application.
  • FIGS. 4 and 5 are schematic diagrams of data transmission between a software system running on a target server provided by a first VPC and a first electronic device according to an embodiment of the present application;
  • FIG. 6 is a schematic diagram of a main server and a backup server provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of the first electronic device and the second electronic device respectively transmitting data with a software system running on a target server according to an embodiment of the present application;
  • FIG. 8 is a schematic flowchart of a data transmission method according to another embodiment of the present application.
  • FIG. 9 is a schematic diagram of a third electronic device and a fourth electronic device respectively transmitting data with a software system running on a target server according to an embodiment of the present application;
  • FIG. 10 is a schematic block diagram of a computer system provided by an embodiment of the present application.
  • FIG. 11 is another schematic block diagram of a computer system provided by an embodiment of the present application.
  • Public cloud usually refers to a cloud that can be used by third-party providers. Users can access the service through the Internet.
  • common public clouds include Huawei Cloud, Facebook Cloud, Amazon Web Service (AWS), etc.
  • Virtual private network (virtual private network, VPN): Simply put, VPN is to establish a private network on a public network for encrypted communication. Since the connection between any two nodes of the entire VPN does not have the end-to-end physical link required by the traditional private network, it is a logical network built on the network platform provided by the public network service provider, so it is called Virtual network.
  • the VPN can be used to establish a secure and encrypted communication tunnel between a system on the cloud of a virtual private cloud (VPC) and a server under the cloud.
  • VPC virtual private cloud
  • VPN technology can be used to achieve interconnection between the two ends.
  • a VPN connection or a cloud dedicated line can be established between the system on the cloud and the server under the cloud in the VPC respectively.
  • the VPN connection is based on the Internet tunnel technology and can be used to construct a secure and reliable encrypted channel between the VPN gateway and the user gateway.
  • the VPN connection supports the IP security (IP security, IP sec) VPN protocol.
  • VPC Virtual private cloud
  • a VPC is a collection of resources that run on a public cloud and isolate a part of public cloud resources for a user for private use by the user.
  • VPC can be managed by a public cloud and run on public resources, but it can ensure that the resources between each user are isolated, and the user is not affected by other users when using it, and it feels like they are using their own private cloud. Therefore it is called a virtual private cloud.
  • VPC is based on a secure tunnel network technology.
  • the VPN technology described above can provide a secure and isolated network environment. Users can fully control their own virtual network, including creating subnets, configuring routing tables, setting security groups, and applying for flexible bandwidth/IP.
  • the network connection between two VPCs can be called a VPC peering connection.
  • Elastic cloud host It can also be called an elastic cloud server (ECS).
  • the elastic cloud host may be composed of, for example, a central processing unit (CPU), network card, memory, mirroring, disk, etc., and is a cloud server that can be obtained at any time and is elastically scalable. After the elastic cloud host is successfully created, you can use the elastic cloud host on the cloud just like using a local personal computer (PC) or physical server.
  • PC personal computer
  • the elastic cloud host can realize functions such as computing, storage, network, and image installation.
  • the software system is a system running on an elastic cloud host provided by a VPC.
  • Public clouds can provide elastic cloud hosts that run in a VPC environment.
  • Corresponding applications applications, APPs
  • the cloud-based system can also be called a cloud-based application program or a cloud-based application system.
  • the cloud system is equivalent to the data center of this formula.
  • the data center may be, for example, an application center, a business center, a service center, etc. This application does not limit this.
  • IP addresses can be used to distinguish different hosts in the Internet.
  • the IP address represents the host on the network by the network number and the host number. Only computers under one network number can communicate with each other directly, and computers with different network numbers can communicate with each other through a gateway. However, this division is not very flexible in some cases. For this reason, the IP network can also be divided into smaller networks called subnets. In other words, the subnet is a logical division of the IP network.
  • the subnet can be distinguished by the subnet mask.
  • the subnet mask can be used to determine whether any two IP addresses belong to the same subnet.
  • one VPC may include one network segment.
  • the network segments between different VPCs do not overlap each other.
  • a VPC can also be divided into smaller granular networks.
  • a network with a smaller granularity in a VPC can also be called a subnet.
  • a subnet is a network used to manage the network plane of the elastic cloud host, and can provide IP address management and domain name system (DNS) services.
  • DNS domain name system
  • Each subnet can also include a network segment, and each network segment can consist of multiple IP addresses.
  • the network segments included in a subnet can be understood as the range of IP addresses of this subnet.
  • the network segment of a subnet is subordinate to the network segment included in the VPC. In other words, the network segment of a subnet can be regarded as a subset of the network segment included in the VPC.
  • the network segments of different subnets in the same VPC do not overlap each other.
  • the elastic cloud servers in all subnets of the same VPC can communicate.
  • one or more network interfaces can be configured in the elastic cloud host, and each network interface is configured with an IP address, which belongs to a certain subnet network segment included in the VPC IP address. It is understandable that the IP address of any network interface in the elastic cloud host is subordinate to the network segment included in the VPC.
  • subnets can be distinguished by subnet masks.
  • the subnet mask can be used to determine whether any two IP addresses belong to the same subnet. For any two given IP addresses, the subnet mask can be used to determine whether the two IP addresses belong to the same subnet.
  • Private IP address It can also be called an internal IP address. Or, it can also be referred to as private IP or internal IP for short.
  • the private IP is the IP on the local LAN.
  • Corresponding to it is public IP (or public network IP).
  • the IP addresses involved in the embodiments of this application may all be private IP addresses.
  • two elastic cloud hosts can be set to the same IP address on the same subnet.
  • the software can be set to set the standby elastic cloud host to be down when the active elastic cloud host is running normally; and it can enable the standby elastic cloud host when the active elastic cloud host is down. Since the two elastic cloud hosts share the same floating IP address in the same subnet, to the user, it is as if the same elastic cloud host is providing services. In other words, users only need to use this floating IP, and if any elastic cloud host is down, they can actively switch this floating IP address to another machine. It should be noted that floating IP addresses are also private IP addresses.
  • FIG. 1 is a schematic diagram of a communication system 100 applicable to the data transmission method provided by the embodiment of the present application.
  • the communication system 100 may include: one or more electronic devices 101 and one or more VPC 102.
  • the electronic device 101 may be, for example, a server under the cloud, or may also be called a local server, a remote server, and so on.
  • the electronic device 101 may also be other communication devices. This application does not limit this.
  • VPCs can be interconnected through VPC peering connections.
  • Electronic devices can be interconnected with servers in the VPC through network connections such as VPN connections.
  • network connections such as VPN connections.
  • the electronic device and the server in the VPC can communicate with each other through, for example, a VPN connection.
  • the VPN connection may be specifically established between the VPN gateway 103 under the cloud and the VPN gateway 104 on the cloud.
  • the VPN gateway 103 under the cloud can be connected to the electronic device 101 through a router.
  • the electronic device can be a server running in a certain subnet.
  • the VPN gateway 103 can be connected to the electronic device 101 via network nodes such as routers and subnet gateways.
  • the VPC may contain one or more subnets, such as subnet 1 and subnet 2 as shown in the figure. Each subnet can correspond to a network segment. The network segments do not overlap each other.
  • the VPC has a corresponding gateway, such as the VPC gateway 105 as shown in the figure.
  • Each subnet in the VPC also has its own corresponding gateway, such as gateway 106 and gateway 107 as shown in the figure.
  • the gateway of each subnet can be connected to the VPN gateway 104 through the VPC gateway 105.
  • the VPN gateway is an egress gateway device established under the VPC and the cloud respectively, such as the VPN gateway 103 and the VPN gateway 104 as shown in the figure.
  • the VPN gateway can have both firewall and routing functions.
  • the gateway of each subnet is the egress gateway device of each subnet, such as gateway 106 and gateway 107 as shown in the figure. Through the gateway of each subnet, the interconnection and intercommunication between each subnet can be established.
  • the VPC gateway is the export gateway device of the VPC. Through the VPC gateway, the interconnection between VPCs and between VPCs and the cloud can be established.
  • the VPC gateway can have both firewall and routing functions.
  • the server in the VPC may be, for example, an elastic cloud host, or called an elastic cloud server. This application does not limit this.
  • the server in the VPC can be pre-configured or temporarily applied from the public cloud.
  • One or more servers can run in a VPC.
  • Server 1 to Server 4 are shown in the figure. It should be understood that the four servers shown in the figure are only examples and should not constitute any limitation to this application. This application does not limit the number of servers running in the VPC. In addition, the numbers of the servers in the figure are only defined for easy distinction, and should not constitute any limitation to this application.
  • the software system may run on a pre-configured server, such as server 1 as shown in the figure.
  • the software system may be a company's data center, for example.
  • Other servers, such as server 2 to server 4 as shown in the figure, can also be used to deploy different software, such as databases. This application does not limit this.
  • Figure 2 shows an example of multiple electronic devices accessing a software system on the same server.
  • subnet 1 where electronic device 1 is located includes network segment 1
  • subnet 2 where electronic device 2 is located includes network segment 2
  • subnet 3 of electronic device 3 includes network segment 3 for running the software
  • the subnet where the server of the system is located is also subnet 2, including network segment 2.
  • the subnet 2 of the electronic device 2 overlaps with the network segment of the subnet 2 where the software system is located.
  • VPC virtual private network
  • a new VPC is created, and the subnet of the newly created VPC may include network segment 4 to avoid network segment overlap with the subnet network segment of electronic device 2.
  • the overlap of network segments between multiple electronic devices and software systems is a high probability event. If each network segment overlap is handled in the same way, it may cause huge costs and a long deployment cycle.
  • the present application provides a data transmission method, which can realize a center to connect any number of users to ensure the correct transmission of data packets. At the same time, the implementation cost is lower and the deployment cycle is shorter.
  • the method provided in the embodiments of the present application may be executed by a server, and specifically may be implemented by software deployed on the server by executing corresponding instructions.
  • the software may be, for example, software deployed on a virtual machine created on the server.
  • the server may be, for example, a server provided by the VPC, or in other words, the server may be a server running in the VPC.
  • a software system runs in the VPC, and the software system may be deployed on the aforementioned server, for example, or on another server provided by the VPC. This application does not limit this.
  • the foregoing server is an elastic cloud host, or called an elastic cloud server.
  • the server used to execute the method provided in the embodiment of this application is referred to as the first server; the server running the above software system is referred to as the target server; the first server and the target server can run on In the same VPC, the VPC may be recorded as the first VPC, for example.
  • the electronic device that accesses the software system can be recorded as the first electronic device.
  • the first electronic device may be the server under the cloud listed above, or may be another communication device. This application does not limit this.
  • FIG. 3 is a schematic flowchart of a data transmission method 300 provided by an embodiment of the present application. As shown in the figure, the method 300 may include step 310 to step 340.
  • step 310 it is determined that the first network segment and the second network segment overlap.
  • the first network segment may be a network segment included in the subnet where the target server is located.
  • the subnet is recorded as the first subnet
  • the first subnet includes the first network segment.
  • a software system is running on the target server.
  • the electronic device under the cloud can access the software system according to the IP address of the network interface configured on the target server.
  • the network interface configured on the target server that can be used to implement access to the software system is recorded as the first network interface.
  • the network interface may be, for example, a network card or other software and/or hardware with the function of a network interface. This application does not limit this.
  • the target server runs in the first VPC, so the first network segment is subordinate to the network segment included in the first VPC.
  • the second network segment is a network segment included in the subnet where the first electronic device is located.
  • the subnet may be recorded as a second subnet, for example, and the second subnet includes a second network segment.
  • the first electronic device hopes to access the software system on the above-mentioned target server through a network connection. In other words, the first electronic device wishes to access the software system.
  • the subnet 2 in the first VPC shown in FIG. 2 is an example of the first subnet
  • the network segment 2 included in the subnet 2 is an example of the first network segment.
  • the electronic device 1, the electronic device 2, and the electronic device 3 shown in FIG. 2 are several examples of the first electronic device.
  • the subnet 1, subnet 2, and subnet 3 under the cloud shown in Figure 2 are examples of the second subnet
  • the corresponding network segment 1, network segment 2, and network segment 3 are examples of the second network segment. example.
  • the target server is in the first subnet, which may mean that the IP address of the target server belongs to a network segment included in the first subnet, or that the second network segment includes the IP address of the target server.
  • the IP address of the target server may specifically be an IP address of a network interface configured on the target server.
  • the first electronic device is in the second subnet, which may mean that the IP address of the first electronic device belongs to the second network segment included in the second subnet, or that the second network segment includes the IP address of the first electronic device .
  • the IP address of the first electronic device may specifically be the IP address of the network interface of the first electronic device.
  • the first server may obtain the first network segment and the second network segment in advance.
  • the first network segment may be entered into the first server in advance by a worker, for example.
  • the second network segment may also be pre-input by the staff into the first server, or, based on the user's new electronic device access to the software system, a dialog box may be temporarily popped up on the user interface for the staff to input.
  • 192.168.0.0 is the IP address and 16 is the subnet mask.
  • the IP address is an IP address starting with "0", which means that a network segment can be determined with the following subnet mask.
  • 192.168.*.* is the default private network IP.
  • the current default private network IP can also be, for example, 172.16.*.*. This application does not limit this.
  • IP address may be a private network IP address or a public network IP address, which is not limited in this application.
  • specific method for determining the network segment according to the IP address and the subnet mask can refer to the prior art. For brevity, detailed description of the specific method is omitted in this application.
  • the first server obtains the first network segment and the second network segment, it can be determined whether the second network segment overlaps the first network segment.
  • each network segment can be a collection of multiple IP addresses. Determine whether the first network segment overlaps with the second network segment, that is, whether the IP address in the first network segment overlaps with the IP address in the second network segment, or the IP address in the first network segment Whether the set has an intersection with the set of IP addresses in the second network segment. If the IP address in the first network segment does not overlap with the IP address in the second network segment, that is, the intersection is an empty set. It can be considered that the first network segment and the second network segment do not overlap. On the contrary, if the IP address in the first network segment is duplicated with the IP address in the second network segment, that is, the intersection is not empty. It can be considered that the first network segment and the second network segment overlap. When the first network segment overlaps with the second network segment, it can be partially overlapped or fully overlapped. This application does not limit this.
  • the first server can directly establish a VPN connection between the VPN gateway of the first electronic device and the VPN gateway in the first VPC.
  • the specific implementation process of establishing a VPN connection may be the same as the prior art. For brevity, a detailed description of the process is omitted here.
  • the first server establishes a VPN connection between the VPN gateway of the first electronic device and the VPN gateway in the VPC, which can be specifically implemented by calling an application programming interface (API).
  • API application programming interface
  • the API interface may be provided by a public cloud, for example, and the first server running in the first VPC may implement different functions by calling the corresponding API interface.
  • the VPN gateway of the first electronic device is not subordinate to the first electronic device.
  • the VPN gateway of the first electronic device can also be used as a VPN gateway of other electronic devices, and can communicate with the VPN gateway in the first VPC through a VPN connection.
  • the VPN gateway of the first electronic device can be understood as a VPN gateway under the cloud.
  • step 320 can be performed: at least two subnets are created in the first VPC, and the network segment of any one of the at least two subnets is the same as the first network segment. The segment and the second network segment do not overlap.
  • the network interfaces in the at least two subnets are used to forward the data packet successively, so that the data packet is sent to the first electronic device after being forwarded at least twice. More specifically, when the software system in the target server sends a data packet to the first electronic device, the network interfaces in the at least two subnets are used to forward the data packet successively, so that the data packet is sent after being forwarded at least twice To the first electronic device.
  • the network interfaces in the at least two subnets are used to forward the data packet successively, so that the data packet is sent to the target server after being forwarded at least twice. More specifically, when the first electronic device sends a data packet to the software system running in the target server, the network interfaces in the at least two subnets are used to forward the data packet successively, so that after the data packet is forwarded at least twice Send to the software system in the target server.
  • the network segments of subnet 2 on the cloud ie, an example of the first subnet
  • subnet 2 under the cloud ie, an example of the second subnet
  • the network segment of subnet 2 on the cloud overlaps with the network segment of subnet 2 under the cloud.
  • FIGS 4 and 5 show schematic diagrams of data transmission between the software system running on the target server provided by the first VPC and the first electronic device.
  • the first server has newly created two subnets in the first VPC.
  • the two newly created subnets can be recorded as subnet 5 and subnet 6, for example (that is, an example of at least two subnets), and the network segment included in subnet 5 can be recorded as network segment 5, for example.
  • the network segment included in the subnet 6 may be recorded as network segment 6, for example.
  • neither network segment 5 nor network segment 6 overlaps with network segment 2.
  • the subnet 5 and the subnet 6 can be connected to the first subnet where the target server is located (subnet 2 on the cloud as shown in the figure) and the second subnet where the first electronic device is located (as shown in the figure). Between the subnet 2) under the cloud shown.
  • the software system can realize the interconnection with the first electronic device through the two newly created subnets.
  • the arrows in FIGS. 4 and 5 exemplarily show the path of the data packet sent from the first electronic device to the software system. The following will be combined with the forwarding path of the data packet in the figure, and a detailed description of the specific content will be omitted here.
  • the route of the data packet transmitted between the first electronic device and the software system can be determined.
  • the route may be determined by the first server according to the interconnection relationship of the newly created subnet, or manually input by the staff. This application does not limit this.
  • the determined route may be stored in the network interface of each subnet in the form of a routing table, for example, so that when each subnet receives the data packet, it forwards the data packet based on the predetermined route.
  • data packets sent by the software system to the first electronic device can be forwarded to the first electronic device via the network interfaces of subnet 5 and subnet 6 successively; data packets sent by the first electronic device to the software system can be It is forwarded to the software system via the network interface of subnet 6 and subnet 5 successively.
  • a security group policy can be set so that the gateway of the first subnet (subnet 2 on the cloud in the figure) is prohibited from receiving data packets from the subnet 6.
  • the connection between the network card 2 of the subnet 6 and the gateway of the cloud subnet 2 is disconnected. For brevity, the description of the same or similar situations is omitted below.
  • a data packet sent by the software system to the first electronic device can also be forwarded to the first electronic device via the network interface of subnet 6 and subnet 5; data packets sent by the first electronic device to the software system can also be forwarded to the first electronic device. After being forwarded by the network interface of subnet 5 and subnet 6, it reaches the software system. This application does not limit this.
  • the creation of at least two subnets in the first VPC by the first server can be specifically implemented by the first server calling an API interface.
  • the API interface may present a dialog box to the staff through the user interface, so that the staff can input the network segment of each of the at least two subnets.
  • the network segments of the at least two subnets may also be determined by the first server according to the network segments of each subnet (for example, the aforementioned first subnet and second subnet, etc.) obtained in advance. This application does not limit this.
  • the data packet is forwarded after performing IP address conversion via each of the at least two network interfaces.
  • the at least two network interfaces correspond to the at least two subnets mentioned above, and the IP address of each network interface belongs to The corresponding subnet.
  • each subnet segment includes the IP address of the corresponding network interface.
  • the network interface can forward the data packet by performing network address translation (NAT) on the received data packet.
  • NAT network address translation
  • the network address may be an IP address, for example.
  • the data packets from the software system can be forwarded to the first electronic device via the data packet forwarding module of each of the at least two subnets. And/or, the data packets from the first electronic device are forwarded to the software system via the data packet forwarding module in each of the at least two subnets.
  • network address translation may specifically include destination network address translation (DNAT) and source network address translation (SNAT).
  • DNAT destination network address translation
  • SNAT source network address translation
  • DNAT can be used to convert the destination address of the received data packet, such as the destination IP address
  • SNAT can be used to convert the source address of the data packet sent, such as the source IP address.
  • Each of the at least two network interfaces may perform network address translation on the received data packet according to the predetermined route.
  • the network address translation function can be implemented by DNAT software and SNAT software, or by NAT software, or by other software or hardware that can implement the same or similar functions. This application does not limit this.
  • the module used to realize the network address translation function is referred to as NAT.
  • the destination IP address of the data packet can be determined according to a predetermined route, and the source IP of the data packet can be determined according to the IP address of the node that sent the data packet address.
  • the destination IP address and source IP address can be input into the NAT, and the NAT can realize the IP address translation of the data packet.
  • NAT can be deployed on the servers in each subnet, so that the servers in each subnet convert the destination IP address of the data packet when receiving the data packet, thereby forwarding the data packet.
  • the servers in each subnet can also perform source IP address translation when receiving the data packet to determine the backhaul route.
  • the aforementioned at least two network interfaces are configured on the same server.
  • the at least two subnets may share a NAT for IP address translation, or each may use an independent NAT for IP address translation.
  • the at least two network interfaces are configured on the target server.
  • the method further includes: the first server configures the at least two network interfaces on the target server. That is, at least two network cards can be added to the first server to correspond to the at least two subnets.
  • the IP address of each network card belongs to one of the at least two network cards.
  • the network interface of each of the at least two subnets receives a data packet, the data packet can be sent to the NAT to perform an IP address conversion.
  • the data packet that has undergone the IP address conversion is returned to the network interface.
  • the interface can forward the data packet to the next destination IP address according to the destination IP address after IP address conversion.
  • the method further includes: adding at least two network interfaces on the target server, and the IP addresses of the at least two network interfaces are respectively subordinate to the above-mentioned at least two subnets.
  • the IP addresses of the at least two network interfaces are in one-to-one correspondence with the above-mentioned at least two subnets.
  • the target server is configured with at least three network interfaces, the IP addresses of the at least three network interfaces belong to at least three subnets, and the at least three subnets
  • the network segments do not overlap each other.
  • the target server can be configured with three network interfaces, as shown in the figure, network card 0 (that is, an example of the first network interface), and network card 1 and network card 2 (that is, the above-mentioned at least two network interfaces).
  • the three network cards may belong to three different subnets, namely, subnet 2, subnet 5, and subnet 6.
  • the aforementioned at least two network interfaces are configured on the second server.
  • the method further includes: creating a second server in the first VPC; and configuring at least two network interfaces on the second server.
  • the IP addresses of the at least two network interfaces belong to the newly created at least two subnets.
  • the second server may be another server independent of the target server, and there is a network connection relationship between the second server and the target server.
  • At least two network interfaces are configured on the second server, the data packet sent by the target server can reach the first electronic device via the at least two network interfaces on the second server; the data packet sent by the first electronic device The target server can be reached via the forwarding of at least two network interfaces on the second server.
  • two network interfaces may be configured in the second server, and the two network interfaces may belong to two different subnets, namely, subnet 5 and subnet 6. Since the specific process of performing IP address conversion and forwarding data packets through the network interface is similar to that described above, for the sake of brevity, it will not be repeated here.
  • the newly created at least two subnets and the first subnet may correspond to the same server or may correspond to different servers.
  • the target server needs to be restarted. Therefore, you can decide whether to add a network interface to the target server or create a new server according to the needs of the user, and configure two or more network interfaces on the newly created server (for example, the second server) to forward data packets , In order to realize the interconnection between the first electronic device and the software system.
  • the second server may be a server temporarily created based on user needs, or may be a server originally running on the first VPC. If there are multiple servers running on the first VPC, one of the servers can also be considered as the second server. And directly configure at least two network interfaces corresponding to at least two subnets on the server. This application does not limit this.
  • the same server on at least two newly created subnets is only one possible implementation, and should not constitute any limitation to this application.
  • the NAT may be that the network interfaces of the at least two subnets share one NAT, or the network interfaces of each subnet may use their own NATs, which is not limited in this application.
  • FIGS. 4 and 5 are still taken as examples below to further describe the routing and forwarding process of the data packet transmitted between the software system and the first electronic device. It should be noted that, for ease of understanding, the figure shows the forwarding path of the data packet in the process of sending the data packet to the software system by the first electronic device. The forwarding path of the data packet in the process of sending the data packet to the first electronic device by the software system is the opposite, which is not shown in the figure for simplicity. However, those skilled in the art can derive the corresponding forwarding path according to the following description.
  • the software system When the software system sends a data packet to the first electronic device, the software system can set the destination address of the data packet to a subnet 5 through the first network interface (network interface 0 in the figure) on the target server.
  • the IP address of the network interface Here, for the convenience of distinction and description, the network interface in the subnet 5 is recorded as the network interface 1, and the IP address of the network interface 1 is recorded as the IP address 1.
  • the network interface 1 may be, for example, a newly added network interface in the target server, as shown in FIG. 4; or a network interface on another server, as shown in FIG. 5. This application does not limit this.
  • the data packet can be forwarded to the gateway of subnet 5 through the network interface 0 on the target server running the software system, and then forwarded to the network interface 1 by the gateway of subnet 5.
  • the network interface 1 can set the destination address of the data packet to the IP address of the network interface subordinate to the subnet 6. That is, the first network address translation of the data packet is completed.
  • the network interface in the subnet 6 is recorded as network interface 2
  • the IP address of this network interface 2 is recorded as IP address 2.
  • the network interface 2 may be, for example, another network interface newly added to the target server, as shown in FIG. 4; it may also be a network interface on another server, as shown in FIG. 5. This application does not limit this.
  • the data packet can be forwarded to the gateway of the subnet 6 through the network interface 1, and then forwarded to the network interface 2 by the gateway of the subnet 6.
  • the network interface 2 may set the destination address of the data packet as the IP address of the first electronic device. That is, the second network address translation for the data packet is completed.
  • the IP address of the first electronic device is recorded as IP address 3.
  • the IP address 3 is the IP address of the gateway of the subnet 2 where the first electronic device is located.
  • the data packet can be forwarded to the gateway of the subnet 2 under the cloud through the network interface 2, and then forwarded to the first electronic device by the gateway of the subnet 2 under the cloud.
  • a data packet is forwarded to the gateway of subnet 2 under the cloud via the network interface 2, for example, it can pass through the gateway of the subnet 6 on the cloud, the VPC gateway, the VPN gateway on the cloud, the VPN connection, the VPN gateway under the cloud, and the off cloud. Routers and other network nodes.
  • the path it travels can be the same as the existing technology. For the sake of brevity, no detailed description is given here. The description of the same or similar situations will be omitted in the following text.
  • the data packet sent by the software system can be delivered to the first electronic device.
  • the figure is only an example and does not show every node that the data packet passes through, but this should not constitute any limitation to this application.
  • the data packet sent by the software system can be delivered to the first electronic device.
  • the first electronic device When the first electronic device sends a data packet to the software system, the first electronic device may set the destination address of the data packet to the IP address of the network interface belonging to the subnet 6 through the network interface.
  • the network interface that belongs to subnet 6 is recorded as network interface 2
  • the IP address of this network interface 2 is recorded as IP address 2.
  • the network interface 2 may be a newly added network interface in the target server, as shown in FIG. 4; it may also be a network interface on another server, as shown in FIG. 5. This application does not limit this.
  • the data packet can be forwarded to the gateway of the subnet 6 through the network interface of the subnet 2 where the first electronic device is located, and then forwarded to the network interface 2 by the gateway of the subnet 6.
  • the network interface 2 can set the destination address of the data packet to the IP address of the network interface subordinate to the subnet 5. That is, the first network address translation of the data packet is completed.
  • the network interface that belongs to subnet 5 is recorded as network interface 1
  • the IP address of this network interface 1 is recorded as IP address 1.
  • the network interface 1 may be a newly-added network interface in the target server, as shown in FIG. 4; it may also be a network interface on another server, as shown in FIG. 5. This application does not limit this.
  • the data packet can be forwarded to the gateway of the subnet 5 through the network interface 2, and then forwarded to the network interface 1 by the gateway of the subnet 5.
  • Network interface 1 can set the destination address of the data packet to the IP address of network interface 0. That is, the second network address translation of the data packet is completed.
  • the IP address of the network interface 0 is the IP address of the target server used to run the software system.
  • the data packet sent by the first electronic device can be delivered to the software system.
  • the figure is only an example and does not show every node that the data packet passes through, but this should not constitute any limitation to this application.
  • Those skilled in the art can understand that by performing network address translation on the data packet twice, the data packet sent by the first electronic device can be delivered to the software system.
  • the data packet can be transmitted during transmission. , The unique destination IP address can be found, so that the data packet can be correctly transmitted between the first electronic device and the software system.
  • the primary network interface and the secondary network interface can be further configured for the above at least two subnets.
  • the main network interface and the backup network interface can be configured on different servers, but the same floating IP address is configured in the same subnet.
  • the aforementioned at least two network interfaces are active network interfaces.
  • the method also includes:
  • Step 330 The first server creates a third server in the first VPC
  • Step 340 the first server configures at least two backup network interfaces on the third server, one-to-one correspondence, the network segment to which the IP address of each primary network interface belongs and the network segment to which the IP address of the corresponding backup network interface belongs The same, and each primary network interface and its corresponding backup network interface have the same floating IP address.
  • the method further includes: the first server assigns the same floating IP address to each active network interface and its corresponding standby network interface.
  • the IP addresses of the at least two backup network interfaces may correspond to the aforementioned at least two subnets.
  • the IP address of each backup network interface belongs to the network segment of the corresponding subnet. Therefore, in the at least two newly created subnets, each subnet runs the target server (or the second server) and the third server.
  • the target server (or the second server) can provide the main network interface, and the third server can provide the backup network interface.
  • the first server may configure a backup network interface for each active network interface.
  • the first server can set a floating IP address for the main network interface and the backup network interface in each subnet.
  • the floating IP address can be understood as the external IP of the main network interface and the backup network interface.
  • a primary network interface and a corresponding backup network interface can share the same floating IP address.
  • the floating IP address still belongs to the subnet.
  • the main network interface and the backup network interface in the subnet 5 can use the same floating IP address, and the floating IP address belongs to the network segment of the subnet 5.
  • the main network interface and the backup network interface in the subnet 6 can use another floating IP address, which is subordinate to the network segment of the subnet 6.
  • the server configured with the main network interface can be called the main server; corresponding to the backup network interface, the server configured with the backup network interface (That is, the above-mentioned third server) may be referred to as a backup server.
  • the backup server When a user accesses the floating IP address, the main server is working normally, and the backup server can be set to be down; when the main server is down, the backup server is set to work normally. In other words, the user only needs to use this floating IP address, and if any server is down, the floating IP address can be actively switched to another server. Therefore, when a user accesses the floating IP address, there is always a server that can work normally to provide services for the user. It looks like a server is working. In this way, high availability of active and standby is realized.
  • each subnet can be configured with a primary network interface and a backup network interface. That is, each newly created subnet has a floating IP address.
  • each subnet can run one server.
  • Each subnet can be configured with a primary network interface and a backup network interface. Therefore, each subnet can run one primary server and one backup server.
  • the same server can run in at least two newly created subnets
  • the same active server can run in at least two newly created subnets
  • the same backup server can also be run in at least two newly created subnets when considering the high availability of the active and standby servers. Run in at least two newly created subnets.
  • the third server may be a server temporarily created based on user requirements, or may be a server originally running on the first VPC. If there are multiple servers running on the first VPC, one of the servers can also be considered as the third server. And directly configure at least two network interfaces corresponding to at least two subnets on the server. This application does not limit this.
  • Fig. 6 shows an example of a main server and a backup server.
  • the main server may be, for example, the above-mentioned target server or the second server.
  • FIG. 6 shows an example of the target server as the main server.
  • the backup server can be a newly created server.
  • Fig. 6 shows an example in which the third server is a backup server.
  • the active server and the standby server are respectively configured with at least two network interfaces.
  • the floating IP addresses of the network interface of the active server and the network interface of the standby server can be recorded as floating IP address 1, for example; in subnet 6, the floating IP addresses of the network interface of the active server and the network interface of the standby server can be recorded, for example As a floating IP address 2.
  • the floating IP address 1 can belong to the network segment of the subnet 5
  • the floating IP address 2 can belong to the network segment of the subnet 6.
  • the floating IP address of the network interface of the active server in subnet 5 is the same as the floating IP address of the network interface of the standby server in subnet 5.
  • the floating IP address of the network interface of the active server in the subnet 6 and the floating IP address of the network interface of the backup server in the subnet 6 are also the same.
  • the figure is only an example, showing a situation where the same primary server and the same backup server are running on two subnets. But this should not constitute any limitation to this application.
  • the main use and the backup may be designated by the system, for example, in the embodiment of the present application, it may be designated by the first server or by the staff.
  • Active and standby are only two relative concepts.
  • the active server and standby server can be configured with the same hardware resources and software resources to provide the same services. Therefore, for one of the newly created at least two subnets, the designated primary server may also be a backup server of the other subnet.
  • the main server of subnet 6 may be a backup server of subnet 5
  • the main server of subnet 5 may be a backup server of subnet 6.
  • the first server can set three private IP addresses for the main network interface and the backup network interface in the same subnet, one of which can be used as a floating IP address, and the other two private IP addresses The addresses can be respectively used as the IP address of the primary network interface and the IP address of the backup network interface.
  • network segment overlaps may also occur between electronic devices.
  • This application also provides corresponding technical solutions for network segment overlap between electronic devices.
  • the method further includes: determining that the third network segment overlaps the first network segment.
  • the third network segment may be the network segment where the electronic device that wishes to access the software system is located.
  • the electronic device is recorded as the second electronic device
  • the subnet where the electronic device is located is recorded as the third subnet
  • the network segment included in the third subnet is the third network segment.
  • the method further includes: determining whether the third network segment overlaps the second network segment.
  • the method further includes: establishing a VPN connection between the VPN gateway of the second electronic device and the VPN gateway in the first VPC.
  • the specific implementation process of establishing a VPN connection may be the same as the prior art. For brevity, a detailed description of the process is omitted here.
  • the method further includes: creating a second VPC, and creating at least two subnets in the second VPC. There is a communication connection between the second VPC and the first VPC, and at least two subnets created in the second VPC do not overlap with the first network segment and the third network segment.
  • the network segments between the two VPCs do not overlap. Therefore, at least two subnets created in the second VPC must not overlap the network segments of any one of the subnets in the first VPC. In addition, at least two subnets created in the second VPC do not overlap with the third network segment. Therefore, when the target server sends a data packet to the second electronic device, the network interfaces of the at least two subnets can be used to forward the data packet successively, so that the data packet is sent to the second electronic device after at least two forwarding.
  • the creation of the second VPC by the first server and the creation of subnets in the second VPC can also be implemented by calling API.
  • the API interface can be provided by a public cloud.
  • the first server can call the corresponding API interface to create the second VPC, and create at least two subnets in the second VPC.
  • the data packet is forwarded after performing IP address conversion via each of the at least two network interfaces, and the at least two network interfaces correspond to the at least two subnets in the second VPC, each The IP address of the network interface belongs to the corresponding subnet.
  • the network interfaces of the at least two subnets can be used to forward the data packet successively, so that the data packet is sent to the target server after at least two forwarding.
  • the data packet is forwarded after performing IP address conversion via each of the at least two network interfaces, and the at least two network interfaces correspond to the at least two subnets in the second VPC, each The IP address of the network interface belongs to the corresponding subnet.
  • each subnet of the at least two subnets may share the same NAT for IP address translation, or their respective NATs may perform IP address translation. This application does not limit this.
  • FIG. 7 shows a schematic diagram of the first electronic device and the second electronic device respectively transmitting data with the software system running on the target server.
  • the at least two subnets newly created in the second VPC may include, for example, subnet 8 and subnet 9 (ie, an example of at least two subnets in the second VPC).
  • the network segments of the subnet 8 and the subnet 9 do not overlap with the network segment of the first VPC, nor do they overlap with the third network segment where the second electronic device is located.
  • the data packet sent by the software system to the second electronic device can be forwarded to the second electronic device in the third subnet via the subnet 8 and the subnet 9 successively.
  • the data packet has undergone a network address translation in subnet 8 and subnet 9 successively.
  • the specific process is similar to the specific process in which the data packet is sent to the first electronic device via the subnet 5 and the subnet 6, and will not be repeated here for brevity.
  • the data packet sent by the second electronic device to the software system may be forwarded to the software system in the first subnet via the subnet 9 and the subnet 8 successively.
  • the data packet has undergone a network address translation in subnet 9 and subnet 8.
  • the specific process is similar to the specific process in which the data packet is sent to the software system via the subnet 6 and the subnet 5. For brevity, it will not be repeated here.
  • the embodiments of the present application provide corresponding technical solutions for the scenario where multiple electronic devices need to access the software system, and the network segment overlap between the software system and the electronic device and the network segment overlap between the electronic devices are provided to implement the electronic device. Interconnection with the software system, so as to realize a center to connect any number of users.
  • the technical solution provided by the present application does not require a new software system, has a lower cost and a shorter period.
  • this application also provides a method for realizing the interconnection and intercommunication between each electronic device and the software system in the case of network segment overlap between electronic devices, thereby realizing a center to connect any number of users.
  • the method provided in the embodiment of the present application may be executed by the first server described above, and may be specifically implemented by software deployed on the server by executing corresponding instructions.
  • the software may be, for example, software deployed on a virtual machine created on the server.
  • the server may be, for example, a server provided by the VPC, or in other words, the server may be a server running in the VPC.
  • a software system runs in the VPC, and the software system may be deployed on the aforementioned server, for example, or on another server provided by the VPC. This application does not limit this.
  • the target server may be, for example, the target server shown in the above method 300
  • the first server may be, for example, the first server shown in the above method 300
  • the VPC may be, for example, the above method 300.
  • the related description of the first VPC, the first server, the target server, and the software system in the above method 300 is still applicable in this embodiment. For brevity, the description will not be repeated in the method 800.
  • FIG. 8 is a schematic flowchart of a data transmission method 800 according to another embodiment of the present application. As shown in the figure, the method 800 may include step 810 and step 820.
  • step 810 it is determined that the fourth network segment and the fifth network segment overlap.
  • the fourth network segment may be a network segment included in the subnet where the third electronic device is located, and the third electronic device may be an electronic device that wants to access the software system in the target server, or in other words, that wants to access the target server Electronic equipment. In other words, there is no network connection relationship between the third electronic device and the target server.
  • the fifth network segment may be a network segment included in the subnet where the fourth electronic device is located, and the fourth electronic device has a network connection relationship with the target server, or in other words, the fourth electronic device is connected to the target server Electronic equipment. Since step 310 in the above method 300 has described the specific process of obtaining the second network segment in detail, the specific process of obtaining the fourth network segment and the fifth network segment in this embodiment is similar. Repeat it again.
  • the fourth electronic device can refer to the method described in method 300 above to achieve interconnection and intercommunication with the software system; if the fifth network segment does not overlap the first network segment In this case, the fourth electronic device can directly establish a VPN connection with the software system by referring to the method in the prior art to realize interconnection and intercommunication.
  • the fourth electronic device may be a newly-added electronic device that is connected to the software system before the fifth electronic device, or it may be an electronic device that is previously connected to the software system, which is not limited in this application.
  • the first server may directly establish a VPN connection between the VPN gateway of the third electronic device and the VPN gateway of the first VPC.
  • both the VPN connection between the third electronic device and the first VPC and the VPN connection between the fourth offline service and the first VPC can access the software system through the VPN gateway in the first VPC.
  • step 820 can be performed to create at least one subnet in the third VPC, and any one of the at least one subnet is connected to the first network segment and the first network segment.
  • the fourth network segment and the fifth network segment do not overlap.
  • the network interface in the at least one subnet is used to forward the data packet successively, so that the data packet is sent to the third electronic device after at least one forwarding.
  • the network interface in the at least one subnet is used to forward the data packet successively, so that the data packet is sent to the target server after at least one forwarding.
  • the data packet is forwarded after performing IP address conversion on each of the at least one network interface, the at least one network interface corresponds to the at least one subnet one-to-one, and the IP address of each network interface belongs to all The corresponding subnet.
  • FIG. 9 shows a schematic diagram of the third electronic device and the fourth electronic device respectively transmitting data with the software system running on the target server.
  • the first server newly creates a third VPC in the public cloud, and the third VPC and the first VPC may realize interconnection and intercommunication between VPCs, for example, through a VPC peer-to-peer connection.
  • the subnet where the third electronic device is located is, for example, a fourth subnet, and the fourth subnet may include, for example, a fourth network segment.
  • the subnet 3a shown in FIG. 9 is an example of the fourth subnet, and the network segment 3 included in the subnet 3a is an example of the fourth network segment.
  • the subnet where the fourth electronic device is located is, for example, the fifth subnet, and the fifth subnet may include, for example, a fifth network segment.
  • the other subnet 3b shown in FIG. 9 is an example of the fifth subnet, and the network segment 3 included in the subnet 3b is an example of the fifth network segment.
  • the third electronic device overlaps with the fourth electronic device.
  • the first server may create at least one subnet in the third VPC.
  • the subnet created in the third VPC is denoted as the subnet 10
  • the network segment included in the subnet 10 may be denoted as the network segment 10, for example.
  • the network segment 10 is related to the first network segment (network segment 2 included in subnet 2 as shown in the figure) and the fourth network segment (network segment 3 included in subnet 3 as shown in the figure). ) Do not overlap. Therefore, the subnet 10 can be connected between the first subnet where the target server is located and the fourth subnet where the third electronic device is located.
  • the software system can realize the interconnection with the third electronic device through the subnet in the third VPC.
  • the route of the data packet transmitted between the third electronic device and the software system can be determined.
  • the route may be determined by the first server according to the interconnection relationship of the newly created subnet, or manually input by the staff. This application does not limit this.
  • the determined route may be stored in the gateway of each subnet in the form of a routing table, for example, so that when each subnet receives the data packet, it forwards the data packet based on the predetermined route.
  • data packets sent by the software system to the third electronic device arrive at the third electronic device after being forwarded by the subnet 10
  • data packets sent by the third electronic device to the software system arrive after being forwarded by the subnet 10 Software system.
  • FIG. 10 is only an example, which schematically shows an example in which the subnet 10 is connected between the third electronic device and the software system. But this should not constitute any limitation to this application.
  • data packets sent by the software system to the third electronic device can be forwarded to the third electronic device via the network interfaces of the multiple subnets, and the third electronic device Data packets sent to the software system can also be forwarded to the software system through the network interfaces of the multiple subnets.
  • the method further includes: creating a third VPC with a communication connection between the third VPC and the first VPC.
  • the third VPC may be a newly created VPC or a VPC that was originally running on a public cloud. This application is not limited
  • the creation of the third VPC by the first server and the creation of at least one subnet in the third VPC may be implemented by the first server calling an API interface.
  • the API interface can present a dialog box to the staff through the user interface, so that the staff can input the network segment of each subnet in the third VPC and at least one subnet.
  • the network segment of the third VPC may be determined by the first server according to the network segment of an existing VPC (such as the aforementioned first VPC).
  • the network segment of the at least one subnet may also be determined by the first server according to the network segments of each subnet (for example, the foregoing first subnet and fourth subnet, etc.) obtained in advance. This application does not limit this.
  • the network interface of the at least one subnet may be configured on a server provided by the third VPC.
  • this server is recorded as the fourth server.
  • the method further includes: creating a fourth server in the third VPC; and configuring the above-mentioned at least one network interface on the fourth server.
  • the at least one network interface can share a NAT to perform IP address translation.
  • the data packet can be sent to the NAT of the fourth server, so as to perform IP address translation on the data packet.
  • the data packet that has undergone IP address conversion is returned to the network interface, and the network interface can forward the data packet to the next destination IP address.
  • the at least one network interface can also use respective NATs to perform IP address translation, which is not limited in this application.
  • Figure 9 shows an example of forwarding data packets through the network interface on the fourth server.
  • the fourth server may be configured with a network interface, for example, a network interface 10, and the IP address of the network interface 10 may belong to the subnet 10 (ie, an example of at least one subnet).
  • the routing and forwarding process of the data packet transmitted between the software system and the third electronic device will be further described below.
  • the figure is only for ease of understanding, and shows the forwarding path of the data packet in the process of sending the data packet to the third electronic device by the software system.
  • the forwarding path of the data packet in the process of sending the data packet to the software system by the third electronic device is the opposite, which is not shown in the figure for brevity.
  • those skilled in the art can derive the corresponding forwarding path according to the following description.
  • the software system When the software system sends a data packet to the third electronic device, the software system can set the destination address of the data packet to the IP address of the network interface belonging to the subnet 10 through the first network interface on the target server.
  • the network interface in the subnet 10 is recorded as the network interface 10
  • the IP address of the network interface 10 is recorded as the IP address 10.
  • the data packet can be forwarded to the gateway of the subnet 10 through the first network interface running on the target server of the software system, and then forwarded to the network interface 10 by the gateway of the subnet 10.
  • the network interface 10 may set the destination address of the data packet to the IP address of the network interface subordinate to the subnet 3a (that is, an example of the fourth subnet). That is, a network address translation of the data packet is completed.
  • the data packet can be forwarded to the gateway of the subnet 3a through the network interface 10, and then forwarded by the gateway of the subnet 3a to the third electronic device in the subnet 3a.
  • the data packet sent by the software system can be delivered to the third electronic device.
  • the figure is only an example and does not show every node that the data packet passes through, but this should not constitute any limitation to this application.
  • the data packet sent by the software system can be delivered to the third electronic device.
  • the third electronic device When the third electronic device sends a data packet to the software system, the third electronic device may set the destination IP address of the data packet to the IP address of the network interface subordinate to the subnet 10 through the network interface.
  • the network interface subordinate to the subnet 10 is recorded as the network interface 10
  • the IP address of the network interface 10 is recorded as the IP address 10.
  • the data packet can be forwarded to the gateway of the subnet 10 through the network interface of the subnet where the third electronic device is located, and then forwarded to the network interface 10 by the gateway of the subnet 10.
  • the network interface 10 may set the destination IP address of the data packet to the IP address of the network interface 0. That is, the destination address translation of the data packet is completed.
  • the IP address of the network interface 0 is the IP address of the target server used to run the software system.
  • the data packet sent by the third electronic device can be delivered to the software system. It should be understood that the figure is only an example and does not show every node that the data packet passes through, but this should not constitute any limitation to this application. Those skilled in the art can understand that by performing destination address conversion on the data packet, the data packet sent by the third electronic device can be delivered to the software system.
  • a newly created VPC and a subnet are taken as an example to illustrate the data packet forwarding process. It can be understood that when the number of newly created subnets is N (N ⁇ 2, and N is an integer), the number of destination address conversions performed on the data packet is also N.
  • the number of newly created VPCs can be one or multiple. The number of newly created VPCs and the number of newly created subnets are not necessarily the same. This application does not limit the number of newly created VPCs and the number of newly created subnets.
  • a new VPC and a new subnet are created for the third electronic device, To realize the interconnection between the third electronic device and the software system. Since the subnet in the newly created VPC does not overlap with the network segment where the fourth electronic device is located, the network segment where the third electronic device is located, and the network segment where the software system is located, the data packets can be During the transmission process, the unique destination address can be found, so that the correct transmission of the data packet between the third electronic device and the software system can be realized.
  • the primary network interface and the secondary network interface can be further configured for the at least one subnet.
  • the main network interface and the backup network interface can be configured on different servers, but the same floating IP address is configured in the same subnet.
  • the above-mentioned at least one network interface is a master network interface.
  • the method also includes:
  • At least one backup network interface is configured on the fifth server, the at least one backup network interface corresponds to at least one primary network interface, and the IP address of each primary network interface is subordinate to the network segment and the corresponding backup network interface The subordinate network segments of the IP addresses are the same, and each primary network interface and its corresponding standby network interface have the same floating IP address.
  • the method further includes: allocating the same floating IP address for each primary network interface and its corresponding standby network interface.
  • At least two IP addresses can be set for each primary network interface, and the at least two IP addresses include one floating IP address.
  • the floating IP address can be understood as the external IP of the network interface. In other words, when the destination address of the data packet is set to the floating IP address of the network interface, the data packet can be routed to the network interface.
  • step 330 and step 340 in the method 300 above have already described the specific process of realizing high availability of active and standby in detail.
  • the specific process of configuring the backup network interface and allocating the floating IP address in this embodiment is similar to it, and for the sake of brevity, it will not be repeated here.
  • the embodiment of the present application provides a corresponding technical solution for the scenario where multiple electronic devices need to access the software system, and multiple electronic devices overlap in network segments, so as to realize the interconnection and intercommunication between multiple electronic devices and the software system.
  • a center connects any number of users.
  • the technical solution provided by the present application does not require a new software system, has a lower cost and a shorter period.
  • the first server used to implement the software system and the electronic device method described in the method 300 and the method 800 can run in the form of software on a virtual machine provided by a public cloud provider, or can run On a virtual machine provided by a third party.
  • This application does not limit this.
  • the user may purchase a virtual machine from a third party, and deploy related software on the virtual machine to implement the function of the first server in the above embodiment.
  • the size of the sequence number of each process does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of this application. .
  • FIG. 10 is a schematic block diagram of a computer system 1000 according to an embodiment of the present application. As shown in the figure, the computer system 1000 may include: a determining module 1100 and a creating module 1200.
  • the determining module 1100 may be used to determine that the first network segment overlaps the second network segment, where the first network segment is a network segment included in the subnet where the target server is located, and the target server is A server running in a first virtual private cloud VPC, the first network segment is subordinate to a network segment included in the first VPC, and the second network segment is a network segment included in the subnet where the first electronic device is located .
  • the creation module 1200 can be used to create at least two subnets in the first VPC, and any one of the at least two subnets includes a network segment that is different from the first network segment and the second network segment. Overlap; when the target server sends a data packet to the first electronic device, the network interfaces in the at least two subnets are used to forward the data packet successively, so that the data packet is sent after at least two forwardings To the first electronic device.
  • the determining module 1100 may be used to determine that the fourth network segment overlaps the fifth network segment, where the fourth network segment is a network segment included in the subnet where the third electronic device is located, and the The fifth network segment is a network segment included in the subnet where the fourth electronic device is located, the fourth electronic device has a network connection relationship with a target server, and the target server is a server running in the first virtual private cloud VPC,
  • the IP address of the first network interface is subordinate to a first network segment, and the first network segment is subordinate to a network segment included in the first VPC.
  • the creation module 1200 can be used to create at least one subnet in a third VPC, the third VPC has a communication connection with the first VPC, and any one of the at least one subnet is connected to the first VPC.
  • One network segment, the fourth network segment, and the fifth network segment do not overlap; when the target server sends a data packet to the third electronic device, the network interface in the at least one subnet is used for The data packet is forwarded, so that the data packet is sent to the third electronic device after being forwarded at least once.
  • the computer system 1000 may correspond to the first server in the method 300 and the method 800 for data transmission according to the embodiments of the present application, and the computer system 1000 may include a method for executing the method 300 in FIG. 3 or the method 300 in FIG.
  • the module of the method executed by the first server in the method 800.
  • each module in the computer system 1000 and other operations and/or functions described above are used to implement the corresponding process of the method 300 in FIG. 3 or the method 800 in FIG. 8, respectively. Since the specific process of each module executing the above corresponding steps has been described in detail in the method embodiment, for the sake of brevity, details are not repeated here.
  • FIG. 11 is a schematic block diagram of a computer system 2000 provided by an embodiment of the present application.
  • the computer system 2000 may include a communication interface 2100, a processor 2200, and a memory 2300.
  • the computer system 2000 may further include a bus 2400.
  • the communication interface 2100, the processor 2200, and the memory 2300 may be connected to each other through a bus 2400;
  • the bus 2400 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (abbreviated as EISA) bus, etc.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus 2400 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used to represent in FIG. 11, but it does not mean that there is only one bus or one type of bus.
  • the memory 2300 may be used to store program codes and data executed by the computer system. Therefore, the memory 2300 may be a storage unit inside the processor 2200, an external storage unit independent of the processor 2200, or a storage unit inside the processor 2200 and an external storage unit independent of the processor 2200. part.
  • the processor 2200 may be composed of one or more general-purpose processors, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (digital signal processor, DSP), and an application-specific integrated circuit (application- Specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules and circuits described in conjunction with the disclosure of this application.
  • the processor may also be a combination for realizing calculation functions, for example, including a combination of multiple microprocessors, a combination of DSP and microprocessor, and so on.
  • the processor 2200 may be used to run programs for processing functions in related program codes. That is, the processor 2200 executes the program code to realize the functions of determining the module and creating the module. For details of the functions of the determining module and the creating module, reference may be made to the relevant description in the foregoing embodiment.
  • the processor 2200 is configured to run related program codes to implement the function of the first server in the foregoing method embodiment of the present application, or to implement step 310 shown in FIG. 3 of the present application.
  • step 340 or to implement the method described in step 810 to step 820 shown in FIG. 8 above, and/or to implement other steps of the technology described herein, etc., this application does not do it here Elaborate and qualify.
  • the communication interface 2100 may be a wired interface (for example, an Ethernet interface) or a wireless interface (for example, a cellular network interface or using a wireless local area network interface) for communicating with other modules/devices.
  • a wired interface for example, an Ethernet interface
  • a wireless interface for example, a cellular network interface or using a wireless local area network interface
  • the memory 2300 may include a volatile memory (volatile memory), such as a random access memory (random access memory, RAM); the memory may also include a non-volatile memory (non-volatile memory), such as a read-only memory (read-only memory). memory, ROM), flash memory (flash memory), hard disk drive (HDD), or solid-state drive (SSD); the memory 2300 may also include a combination of the foregoing types of memories.
  • the memory 2300 may be used to store a group of program codes, so that the processor 2200 can call the program codes stored in the memory 2300 to implement the functions of the communication module and/or processing module involved in the embodiment of the present invention.
  • the computer system 2000 can be caused to execute the method in the foregoing method embodiment 300 or 800.
  • an embodiment of the present application further provides a computer program product, the computer program product includes: computer program code, when the computer program code runs on a computer, the computer executes the methods in the foregoing aspects.
  • components used in this application are used to denote computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution.
  • the component may be, but is not limited to, a process, a processor, an object, an executable file, an execution thread, a program, and/or a computer running on a processor.
  • the application running on the computing device and the computing device can be components.
  • One or more components may reside in processes and/or threads of execution, and components may be located on one computer and/or distributed among two or more computers.
  • these components can be executed from various computer readable media having various data structures stored thereon.
  • a component can pass through a signal with one or more data packets (for example, data from two components that interact with another component in a local system, a distributed system, and/or a network, such as the Internet that interacts with other systems through signals) Local and/or remote processes to communicate.
  • data packets for example, data from two components that interact with another component in a local system, a distributed system, and/or a network, such as the Internet that interacts with other systems through signals.
  • system and “network” in this article are often used interchangeably in this article.
  • the term “and/or” in this article is only an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, exist alone B these three situations.
  • the character "/" in this text generally indicates that the associated objects before and after are in an "or” relationship.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of this application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program code .

Landscapes

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

Abstract

本申请提供了一种数据传输的方法和计算机系统。该方法包括:确定第一网段和第二网段重叠,该第一网段是运行在VPC上的目标服务器所处的子网的网段,该第二网段是希望访问该目标服务器的电子设备所处的子网的网段。在该VPC中创建至少两个子网,该至少两个子网中任意一个与第一网段、第二网段均不重叠。该至少两个子网用于转发数据包。当目标服务器向电子设备发送数据包时,先后经由该至少两个子网中的网络接口的转发后到达电子设备。由于该至少两个子网的网段与第一网段、第二网段均不重叠,数据包在该至少两个子网的任意一个子网的网络接口上都可被转发到具有唯一IP地址的下一个节点,从而实现数据包在电子设备和目标服务器间的正确传输。

Description

一种数据传输的方法和计算机系统
本申请要求于2019年3月15日提交中国专利局、申请号为201910199742.4、申请名称为“一种数据传输的方法和计算机系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及云计算领域,并且更具体地,涉及一种数据传输的方法和计算机系统。
背景技术
随着信息技术的发展,目前很多公司都在全国或全球范围内设立了分支机构或子公司。各个地区或国家的分支机构和子公司希望通过网络实现业务的部署和连接。为了降低成本,用户希望将数据中心部署在云端,以方便各分支机构和子公司的云下用户访问。该数据中心例如可以是应用中心、业务中心、服务中心等。
虚拟私有云(virtual private cloud,VPC)可以为用户提供安全、私密的网络环境。云下的用户例如可以通过VPN连接等方式接入VPC,以访问云端的数据中心。
然而,由于不同区域的电信网络运营商不同,这些电信网络运营商所提供的因特网协议(Internet protocal,IP)网段之间与云下服务器的IP网段重叠也是一个大概率事件。一旦IP地址重叠,就有可能使得数据包不能被正确发送,从而影响用户体验,甚至给用户造成巨大的经济损失。
发明内容
本申请提供一种数据传输的方法和计算机系统,以期实现数据包的正确传输,提高用户体验。
第一方面,提供了一种数据传输的方法。该方法包括:确定第一网段和第二网段重叠;该第一网段是目标服务器所处的子网包括的网段,该目标服务器是运行在第一虚拟私有云VPC中的服务器,该第一网段从属于第一VPC包括的网段;该第二网段是第一电子设备所处的子网包括的网段;在第一VPC中创建至少两个子网,该至少两个子网中任意一个子网包括的网段与第一网段和第二网段均不重叠;当目标服务器向第一电子设备发送数据包时,该至少两个子网中的网络接口用于先后转发该数据包,使得该数据包经由至少两次转发后发送至该第一电子设备。
应理解,该方法可以由运行在第一VPC中的服务器执行。例如可以是上述目标服务器,也可以是其他服务器,本申请对此不作限定。
基于上述技术方案,在第一电子设备与目标服务器发生网段重叠的情况下,在第一VPC中创建至少两个子网,来实现第一电子设备与软件系统的互联互通。由于该至少两个子网中任意一个子网包括的网段与第一电子设备所处的网段、目标服务器所处的网段均不 重叠,可以使得数据包在传输的过程中,能够找到唯一的目的IP地址,从而可以实现数据包在第一电子设备和软件系统之间的正确传输,有利于提高用户体验。并且,本申请所提供的技术方案并不需要新建目标服务器,也不需要在其他目标服务器(如新建的服务器)上部署软件系统,成本较小,周期较短。
结合第一方面,在某些可能的实现方式中,该数据包经由至少两个网络接口中的每个网络接口进行IP地址转换后被转发,该至少两个网络接口与上述至少两个子网一一对应,每个网络接口的IP地址从属于所对应的子网。
具体来说,上述至少两个子网的每个子网中的网络接口用于根据预先确定的路由对接收到的数据包进行IP地址转换,以使得来自目标服务器的数据包先后经由该至少两个子网中的每个子网中的IP地址转换后被转发到达第一电子设备。
相应地,该至少两个子网的每个子网中的网络接口用于根据预先确定的路由对接收到的数据包进行IP地址转换,以使得来自第一电子设备的数据包依次经由该至少两个子网中的每个子网中的IP地址转换后被转发到达目标服务器。
其中,通过对目的网络地址进行转换,可以使得来自第一电子设备的数据包经上述新创建的至少两个子网的转发后到达目标服务器,或者,使得来自目标服务器的数据包经上述新创建的至少两个子网的转发后到达第一电子设备。
通过对源网络地址进行转换,可以进一步获得数据包的回程路径。例如,目标服务器在接收到来自第一电子设备的数据包后,可以沿回程路径向第一电子设备反馈响应消息;或者,第一电子设备在接收到来自目标服务器的数据包后,可以沿回程路径向目标服务器反馈响应消息。
应理解,IP地址转换例如可以由网络地址转换(network address translation,NAT)软件实现,也可以由目的网络地址转换(destination network address translation,DNAT)软件和源网络地址转换(source network address translation,SNAT)软件共同实现,或者,也可以由其它可实现相同或相似功能的软件或硬件实现。本申请对此不作限定。
结合第一方面,在某些可能的实现方式中,所述至少两个网络接口配置在目标服务器上。
将该至少两个网络接口配置在目标服务器上,这样可以减少对服务器资源的浪费。该目标服务器上可以新增与新创建的至少两个子网对应的至少两个网络接口,每个网络接口的IP地址从属于所对应的子网。
结合第一方面,在某些可能的实现方式中,该方法还包括:在该第一VPC中创建该第二服务器;在该第二服务器上配置该至少两个网络接口。
将该至少两个网络接口配置在第二服务器上,也就是配置在与目标服务器不同的服务器上。这可以满足用户不希望重启目标服务器的需求,有利于提高用户体验。该第二服务器上可以配置与新创建的至少两个子网对应的至少两个网卡,每个网卡的IP地址从属于所对应的子网。
结合第一方面,在某些可能的实现方式中,所述至少两个网卡为主用网卡,该方法还包括:在该第一VPC中创建第三服务器;在该第三服务器上配置至少两个备用网络接口,该至少两个备用网络接口与至少两个主用网络接口一一对应,每个主用网络接口的IP地址从属的网段与所对应的备用网络接口的IP地址从属的网段相同,且每个主用网络接口 及其对应的备用网络接口具有相同的浮动IP地址。该第三服务器可以作为上述目标服务器或第二服务器的备用服务器。该第三服务器配置的网络接口为备用网络接口。上述目标服务器或第二服务器配置的网络接口为主用网络接口。通过为IP地址从属同一子网的主用网络接口和备用网络接口设置同一浮动IP,可以实现主备高可用,从而可以获得高可靠性的服务,有利于提高用户体验。
结合第一方面,在某些可能的实现方式中,所述方法还包括:确定第三网段与该第一网段重叠,该第三网段为第二电子设备所处的子网包括的网段;在第二VPC中创建至少两个子网,该第二VPC与该第一VPC之间具有通信连接,该至少两个子网中的任意一个子网与该第一网段、该第二网段和该第三网段均不重叠;当该目标服务器向该第二电子设备发送数据包时,该至少两个子网的网络接口用于先后转发该数据包,使得该数据包经由至少两次转发后发送至该第二电子设备。
进一步地,在多个电子设备希望接入同一目标服务器的情况下,多个电子设备之间可能出现网段重叠。在此情况下,可以创建新的VPC,即上述第二VPC,并在新创建的第二VPC中创建至少两个子网,该第二VPC创建的至少两个子网与上述第一网段和第二网段均不重叠,从而可以使得任意两个网段重叠的电子设备可以通过不同的路径与目标服务器实现互联互通,传输数据。
因此,本申请实施例为多个电子设备需要接入目标服务器的场景下,目标服务器与电子设备发生网段重叠以及电子设备之间发生网段重叠均提供了相应的技术方案,以实现电子设备与目标服务器的互联互通,从而实现一个中心连接任意多个用户。
第二方面,提供了一种数据传输的方法。该方法包括:确定第四网段和第五网段重叠,该第四网段为第三电子设备所处的子网包括的网段,该第五网段为第四电子设备所处的子网包括的网段,该第四电子设备与目标服务器具有网络连接关系;该目标服务器为运行在第一虚拟私有云VPC中的服务器,该第一网络接口的IP地址从属第一网段,该第一网段从属于该第一VPC包括的网段;在第三VPC中创建至少一个子网,该第三VPC与第一VPC之间具有通信连接,该至少一个子网中的任意一个子网与第一网段、第四网段和第五网段均不重叠;当该目标服务器向该第三电子设备发送数据包时,该至少一个子网中的网络接口用于转发该数据包,使得该数据包经由至少一次转发后发送至该第三电子设备。
应理解,该方法可以由运行在第一VPC中的服务器执行。例如可以是上述目标服务器,也可以是其他服务器,本申请对此不作限定。
基于上述技术方案,在访问目标服务器的多个电子设备发生网段重叠的情况下,为新接入的第三电子设备创建新的VPC,并在新创建的VPC中创建新的子网,来实现第三电子设备与目标服务器的互联互通。由于新创建的VPC中的子网包括的网段与第四电子设备所处的网段和目标服务器所处的网段不重叠,可以使得数据包在传输的过程中,能够找到唯一的目的地址,从而可以实现数据包在第三电子设备和目标服务器之间的正确传输,有利于提高用户体验。并且,本申请所提供的技术方案并不需要新建目标服务器,也不需要在其他目标服务器(如新建的服务器)上部署软件系统,成本较小,周期较短。
结合第二方面,在某些可能的实现方式中,该数据包经由至少两个网络接口中的每个网络接口进行IP地址转换后被转发,该至少两个网络接口与该至少两个子网一一对应,每个网络接口的IP地址从属于所对应的子网。
具体来说,上述至少一个子网的每个子网中的网络接口用于根据预先确定的路由对接收到的数据包进行IP地址转换,以使得来自目标服务器的数据包先后经由该至少一个子网中的每个子网中的IP地址转换后被转发到达第三电子设备。
相应地,该至少一个子网的每个子网中的网络接口用于根据预先确定的路由对接收到的数据包进行IP地址转换,以使得来自第三电子设备的数据包依次经由该至少一个子网中的每个子网中的IP地址转换后被转发到达目标服务器。
其中,通过对目的网络地址进行转换,可以使得来自第三电子设备的数据包经上述新创建的至少一个子网的转发后到达目标服务器,或者,使得来自目标服务器的数据包经上述新创建的至少一个子网的转发后到达第三电子设备。
通过对源网络地址进行转换,可以进一步获得数据包的回程路径。例如,目标服务器在接收到来自第三电子设备的数据包后,可以沿回程路径向第三电子设备反馈响应消息;或者,第三电子设备在接收到来自目标服务器的数据包后,可以沿回程路径向目标服务器反馈响应消息。
应理解,上述数据包转发模块例如可以由NAT软件实现,也可以由DNAT软件和SNAT软件共同实现,或者,也可以由其它可实现相同或相似功能的软件或硬件实现。本申请对此不作限定。
结合第二方面,在某些可能的实现方式中,该方法还包括:创建第三VPC。
应理解,该第三VPC可以是新创建的,也可以是原本就有的,本申请对此不作限定。
结合第二方面,在某些可能的实现方式中,该方法还包括:在该第三VPC中创建第四服务器;在该第四服务器上配置该至少一个网络接口。
即,在新创建的第三VPC中创建第四服务器,该服务器上可配置与新创建的至少一个子网对应的至少一个网络接口,每个网络接口的IP地址从属于所对应的子网。
结合第二方面,在某些可能的实现方式中,所述至少一个网卡为主用网卡,该方法还包括:在第三VPC中创建第五服务器;在该第五服务器上配置至少一个备用网络接口,该至少一个备用网络接口与至少一个主用网络接口一一对应,每个主用网络接口的IP地址从属的网段与所对应的备用网络接口的IP地址从属的网段相同,且每个主用网络接口及其对应的备用网络接口具有相同的浮动IP地址。
该第五服务器可以作为上述第一服务器或的备用服务器。该第五服务器配置的网络接口为备用网络接口。上述第一服务器配置的网络接口为主用网络接口。通过为IP地址从属同一子网的主用网络接口和备用网络接口设置同一浮动IP,可以实现主备高可用,从而可以获得高可靠性的服务,有利于提高用户体验。
第三方面,提供了一种计算机系统,该计算机系统包括可用于实现上述第一方面及第一方面任意种可能实现方式的模块。
具体地,该计算机系统包括确定模块和创建模块;所述确定模块用于:确定第一网段和第二网段重叠,所述第一网段是目标服务器所处的子网包括的网段,所述目标服务器是运行在第一虚拟私有云VPC中的服务器,所述第一网段从属于所述第一VPC包括的网段,所述第二网段是第一电子设备所处的子网包括的网段;所述创建模块用于:在所述第一VPC中创建至少两个子网,所述至少两个子网中任意一个子网包括的网段与所述第一网段和所述第二网段均不重叠;当所述目标服务器向所述第一电子设备发送数据包时,所述至 少两个子网中的网络接口用于先后转发所述数据包,使得所述数据包经由至少两次转发后发送至所述第一电子设备。
结合第三方面,在第三方面的某些实现方式中,所述数据包经由至少两个网络接口中的每个网络接口进行IP地址转换后被转发,所述至少两个网络接口与所述至少两个子网一一对应,每个网络接口的IP地址从属于所对应的子网。
结合第三方面,在第三方面的某些实现方式中,所述至少两个网络接口配置在所述目标服务器上。
结合第三方面,在第三方面的某些实现方式中,所述创建模块还用于:在所述第一VPC中创建所述第二服务器;所述计算机系统还包括配置模块,所述配置模块用于:在所述第二服务器上配置所述至少两个网络接口。
结合第三方面,在第三方面的某些实现方式中,与所述至少两个子网对应的网络接口为主用网络接口,所述创建模块还用于:在所述第一VPC中创建第三服务器;所述配置模块还用于:在所述第三服务器上配置至少两个备用网络接口,所述至少两个备用网络接口与至少两个主用网络接口一一对应,每个主用网络接口的IP地址从属的网段与所对应的备用网络接口的IP地址从属的网段相同,且每个主用网络接口及其对应的备用网络接口具有相同的浮动IP地址。
结合第三方面,在第三方面的某些实现方式中,所述确定模块还用于:确定第三网段与所述第一网段重叠,所述第三网段为第二电子设备所处的子网包括的网段;所述创建模块还用于:在第二VPC中创建至少两个子网,所述第二VPC与所述第一VPC之间具有通信连接,所述至少两个子网中的任意一个子网与所述第一网段、所述第二网段和所述第三网段均不重叠;当所述目标服务器向所述第二电子设备发送数据包时,所述至少两个子网的网络接口用于先后转发所述数据包,使得所述数据包经由至少两次转发后发送至所述第二电子设备。
第四方面,提供了一种计算机系统,该计算机系统包括可用于实现上述第二方面及第二方面任意一种可能实现方式的模块。
具体地,该计算机系统包括确定模块和创建模块。所述确定模块用于:确定第四网段和第五网段重叠,所述第四网段为第三电子设备所处的子网包括的网段,所述第五网段为第四电子设备所处的子网包括的网段,所述第四电子设备与目标服务器具有网络连接关系,所述目标服务器为运行在第一虚拟私有云VPC中的服务器,所述第一网络接口的IP地址从属第一网段,所述第一网段从属于所述第一VPC包括的网段;所述创建模块用于:在第三VPC中创建至少一个子网,所述第三VPC与所述第一VPC之间具有通信连接,所述至少一个子网中的任意一个子网与所述第一网段、所述第四网段和所述第五网段均不重叠;当所述目标服务器向所述第三电子设备发送数据包时,所述至少一个子网中的网络接口用于转发所述数据包,使得所述数据包经由至少一次转发后发送至所述第三电子设备。
结合第四方面,在第四方面的某些实现方式中,所述数据包经由至少一个网络接口中的每个网络接口进行IP地址转换后被转发,所述至少一个网络接口与所述至少一个子网一一对应,每个网络接口的IP地址从属于所对应的子网。
结合第四方面,在第四方面的某些实现方式中,所述创建模块还用于:创建所述第三 VPC。
结合第四方面,在第四方面的某些实现方式中,所述创建模块还用于:在所述第三VPC中创建所述第四服务器;所述计算机系统还包括配置模块,所述配置模块用于:在所述第四服务器上配置与所述至少一个子网对应的至少一个网络接口。
结合第四方面,在第四方面的某些实现方式中,与所述至少一个子网对应的至少一个网络接口为主用网络接口,所述创建模块还用于:在第三VPC中创建第五服务器;所述配置模块还用于:在所述第五服务器上配置至少一个备用网络接口,所述至少一个备用网络接口与至少一个主用网络接口一一对应,每个主用网络接口的IP地址从属的网段与所对应的备用网络接口的IP地址从属的网段相同,且每个主用网络接口及其对应的备用网络接口具有相同的浮动IP地址。
第五方面,提供了一种计算机系统。该计算机系统包括处理器、存储器和通信接口。
该存储器可以用于存储该计算机系统的程序代码和数据。因此,该存储器可以是处理器内部的存储单元,也可以是与处理器独立的外部存储单元,还可以是包括处理器内部的存储单元和与处理器独立的外部存储单元的部件。
存储器可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM);存储器也可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM)、快闪存储器(flash memory)、硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器还可以包括上述种类的存储器的组合。存储器可用于存储一组程序代码,以便于处理器调用存储器中存储的程序代码以实现本发明实施例中涉及的接收模块和/或处理模块的功能。
处理器可以由一个或者多个通用处理器构成,例如可以是中央处理器(central processing unit,CPU),通用处理器,数字信号处理器(digital signal processor,DSP),专用集成电路(application-specific integrated circuit,ASIC),现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含多个微处理器组合,DSP和微处理器的组合等等。处理器可用于运行相关的程序代码中处理功能的程序。也就是说,处理器执行程序代码可以实现处理模块的功能。其中,关于各模块的具体功能可参见前述第三方面中的相关阐述。
应理解,处理器还可以是包括至少一台计算设备的处理器的集合,本申请对此不做具体限定。
在一种可能的实施方式中,所述至少一个计算设备的处理器共同用于运行相关的程序代码,以实现本申请上述第三方面或第四方面中各模块的功能。
在另一种可能的实施方式中,每个计算设备的处理器可单独用于运行相关的程序代码,以实现本申请上述第三方面或第四方面中各模块的功能。
通信接口可以为有线接口(例如以太网接口)或无线接口(例如蜂窝网络接口或使用无线局域网接口),用于与其他模块/设备进行通信。
所述处理器用于从存储器中调用并运行该计算机程序,使得所述计算机系统执行第一方面或或第二方面以及第一方面或第二方面中任一种可能实现方式中的方法。
第六方面,提供了一种计算机可读介质,所述计算机可读介质存储有程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行上述各方面中的方法。
第七方面,提供了一种计算机程序产品,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行上述各方面中的方法。
附图说明
图1是适用于本申请实施例提供的数据传输的方法的通信系统的示意图;
图2是多个电子设备接入服务器上的软件系统的示意图;
图3是本申请一实施例提供的数据传输的方法的示意性流程图;
图4和图5是本申请实施例提供的在第一VPC提供的目标服务器上运行的软件系统与第一电子设备传输数据的示意图;
图6是本申请实施例提供的主用服务器和备用服务器的示意图;
图7是本申请实施例提供的第一电子设备、第二电子设备分别与目标服务器上运行的软件系统传输数据的示意图;
图8是本申请另一实施例提供的数据传输的方法的示意性流程图;
图9是本申请实施例提供的第三电子设备、第四电子设备分别与目标服务器上运行的软件系统传输数据的示意图;
图10是本申请实施例提供的计算机系统的示意性框图;
图11是本申请实施例提供的计算机系统的另一示意性框图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
首先,对本申请中涉及到的一些术语做简单说明。
1、公有云:通常是指第三方提供商为用户提供的能够使用的云。用户可以通过互联网访问服务。目前常见的公有云例如有华为云、阿里云、亚马逊网络服务(Amazon web service,AWS)等。
2、虚拟专用网络(virtual private network,VPN):简单地说,VPN就是在公用网络上建立专用网络,进行加密通讯。由于整个VPN的任意两个节点之间的连接并没有传统专网所需的端到端的物理链路,而是架设在公用网络服务商所提供的网络平台上的逻辑网络,因此将其称为虚拟网络。
在本申请实施例中,VPN可用于在虚拟私有云(virtual private cloud,VPC)的云上系统和云下的服务器之间建立安全、加密的通信隧道。当云下的用户需要通过本地服务器访问VPC中的云上系统中的资源时,或者VPC中的云上系统需要访问云下服务器中的资源时,可以通过VPN技术来实现两端的互联互通。具体地,可以分别在VPC中的云上系统和云下服务器中之间建立VPN连接或云专线等。本申请对于云上系统与云下服务器之间的网络连接的具体形式不做限定。
其中,VPN连接是一种基于Internet隧道技术、可用于构建VPN网关和用户网关之间的安全、可靠的加密通道。当前协议中,VPN连接支持IP安全(IP security,IP sec)VPN协议。
3、虚拟私有云(VPC):也称虚拟专用云。VPC是运行在公有云上、将一部分公有云资源为某个用户隔离出来给这个用户私有使用的资源的集合。VPC可以由公有云管理,运行在公共资源上,但又可以保证每个用户之间的资源是隔离,用户在使用的时候不受其他用户的影响,感觉像是在使用自己的私有云一样。因此称之为虚拟私有云。
VPC基于安全的隧道网络技术,如上所述的VPN技术,可提供安全、隔离的网络环境。用户可以完全掌握自己的虚拟网络,包括创建子网、配置路由表、设置安全组和申请弹性带宽/IP等。
两个VPC之间的网络连接可以称为VPC对等连接。
4、弹性云主机:也可以称为弹性云服务器(elastic cloud server,ECS)。弹性云主机例如可以是由中央处理单元(central processing unit,CPU)、网卡、内存、镜像、磁盘等组成,是一种可随时获取、可弹性伸缩的云服务器。弹性云主机创建成功后,就可以像使用本地个人计算机(personal computer,PC)或物理服务器一样,在云上使用弹性云主机。通过和其他产品、服务组合,弹性云主机可以实现计算、存储、网络、镜像安装等功能。
5、软件系统:在本申请实施例中,软件系统是运行在VPC提供的弹性云主机上的系统。公有云可以提供弹性云主机,该弹性云主机运行在VPC环境中。该弹性云主机中可以部署相应的应用程序(application,APP),以实现相应的功能。因此,该云上系统也可以称为云上应用程序、云上应用系统。
由于一个公司在各个地区的分支机构或子公司均可通过网络访问该云上系统,该云上系统也就相当于这个公式的数据中心。该数据中心例如可以是应用中心、业务中心、服务中心等。本申请对此不作限定。
6、子网(subnet)和网段:在Internet中可以利用IP地址来区分不同的主机。IP地址是以网络号和主机号来表示网络上的主机的,只有在一个网络号下的计算机之间才能“直接”互通,不同网络号的计算机要通过网关才能互通。但这样的划分在某些情况下显得并不十分灵活。为此IP网络还可以划分为更小的网络,称为子网。换句话说,子网是对IP网络的一种逻辑划分。子网可以通过子网掩码来区分。子网掩码可以用来判断任意两个IP地址是否属于同一子网。
在本申请实施例中,一个VPC可以包括一个网段。不同VPC之间的网段互不重叠。
一个VPC也可以划分为更小粒度的网络。一个VPC中更小粒度的网络也可以称为子网。子网是用来管理弹性云主机网络平面的一个网络,可以提供IP地址管理、域名系统(domain name system,DNS)服务。每个子网也可以包括一个网段,每个网段可以由多个IP地址组成。一个子网包括的网段可以理解为是这个子网的IP地址的范围。作为VPC中更小粒度的网络划分,一个子网的网段从属于VPC包括的网段。换句话说,一个子网的网段可以看成是VPC包括的网段的一个子集。
同一VPC中不同子网的网段互不重叠。同一VPC的所有子网内的弹性云服务器均可以进行通信。
当弹性云主机运行在VPC上时,该弹性云主机中可以配置一个或多个网络接口,每个网络接口配置有一个IP地址,该IP地址是从属该VPC包括的某一子网网段的IP地址。可以理解的是,该弹性云主机中的任意一个网络接口的IP地址都从属于该VPC包括的网段。
此外,子网可以通过子网掩码来区分。子网掩码可以用来判断任意两个IP地址是否属于同一子网。对于任意两个给定的IP地址,可以由子网掩码来确定该两个IP地址是否属于同一子网。
7、私有IP地址:也可以称为内部IP地址。或者,也可简称为私有IP、内部IP。私有IP是在本地局域网上的IP。与之对应的是公有IP(或称公网IP)。本申请实施例中涉及的IP地址均可以为私有IP地址。
8、浮动(floating)IP地址:在本申请实施例中,两个弹性云主机可以在同一个子网可以设定一个相同的IP地址。当用户访问该IP地址时,具体运行哪台弹性云主机可以由系统指定。该两台弹性云主机中的一台可以被指定为主用弹性云主机,另一台可以被指定为备用弹性云主机。软件可以设置在主用弹性云主机正常运行的情况下,将备用弹性云主机设置为宕机状态;并可以在主用弹性云主机宕机的情况下,启用备用弹性云主机。由于该两个弹性云主机在同一子网中共用同一个浮动IP地址,对于用户来说,就好像是同一个弹性云主机在提供服务一样。换句话说,用户只需要使用这个浮动IP,任何一台弹性云主机宕机了,就可以把这个浮动IP地址主动切换到另外一台机器上。需要说明的是,浮动IP地址也属于私有IP地址。
为便于理解本申请实施例,下面首先结合图1详细说明适用于本申请实施例提供的方法的通信系统。图1是适用于本申请实施例提供的数据传输的方法的通信系统100的示意图。如图所示,该通信系统100可以包括:一个或多个电子设备101和一个或多个VPC 102。
其中,电子设备101例如可以是云下服务器,或者也可以称为本地服务器、远端服务器等。电子设备101还可以是其他通信设备。本申请对此不作限定。
各VPC之间可以通过VPC对等连接实现互联互通。电子设备可以通过VPN连接等网络连接与VPC中的服务器互联互通。应理解,图中仅为示例,示出了一个电子设备和一个VPC连接的场景。但这不应对本申请构成任何限定,本申请对于该通信系统中所包含的VPC的数量和电子设备的数量以及彼此之间的连接关系均不做限定。
电子设备和VPC中的服务器之间可以通过例如VPN连接实现互通。VPN连接具体可以建立在云下的VPN网关103和云上的VPN网关104之间。
其中,云下的VPN网关103可以通过路由器连接至电子设备101。图中虽未示出,但本领域的技术人员可以理解。电子设备可以是运行在某一子网中的服务器。VPN网关103可经由路由器、子网网关等网络节点与电子设备101连接。
VPC中可以包含一个或多个子网,如图中示出的子网1和子网2。每个子网可对应一个网段。各网段之间互不重叠。VPC有对应的网关,如图中示出的VPC网关105。VPC中的每个子网也都有各自对应的网关,如图中示出的网关106和网关107。各子网的网关可以通过VPC网关105与VPN网关104连接。
其中,VPN网关是分别在VPC和云下建立的出口网关设备,如图中示出的VPN网关103和VPN网关104。通过VPN网关,可建立VPC和电子设备或VPC与VPC之间的安全可靠的加密通信。可选地,VPN网关可以兼具防火墙和路由的功能。
各子网的网关是各子网的出口网关设备,如图中示出的网关106和网关107。通过各子网的网关,可以建立各子网之间的互联互通。VPC网关是VPC的出口网关设备,通过VPC网关,可以建立VPC之间以及VPC与云下的互联互通。可选地,VPC网关可以兼 具防火墙和路由的功能。
VPC中的服务器例如可以是弹性云主机,或者称弹性云服务器。本申请对此不作限定。
VPC中的服务器可以是预先配置好的,也可以是临时从公有云中申请的。VPC中可以运行一个或多个服务器。如图中示出的服务器1至服务器4。应理解,图中示出的四台服务器仅为示例,不应对本申请构成任何限定。本申请对于VPC中运行的服务器的数量不作限定。此外,图中对服务器的编号仅为便于区分而定义,也不应对本申请构成任何限定。
在本申请实施例中,软件系统可以运行在预先配置好的一台服务器上,如图中示出的服务器1。该软件系统例如可以是公司的数据中心。其他服务器,如图中示出的服务器2至服务器4,还可以用于部署不同的软件,例如数据库等。本申请对此不作限定。
由于各地或各国的分支机构或子公司都希望能够与软件系统互联互通。因此希望能够实现一个中心连接任意多个用户。然而,由于不同区域的电信网络运营商不同,所提供的IP网段与电子设备的IP网段重叠是一个大概率事件。一旦IP地址重叠,就有可能使得数据包不能被正确发送,从而影响用户体验,甚至给用户造成巨大的经济损失。
图2示出了多个电子设备接入同一服务器上的软件系统的一例。如图所示,电子设备1所处的子网1包括网段1,电子设备2所处的子网2包括网段2,电子设备3的子网3包括网段3,用于运行该软件系统的服务器所处的子网也为子网2,也包括网段2。也就是说,电子设备2的子网2与软件系统所处的子网2的网段发生重叠。若将电子设备2与软件系统之间直接通过VPN连接互联,则数据包在电子设备2和软件系统之间传输时,数据包中的一个目的地址,可能对应了两个节点。换句话说,一个目的地址并不能对应唯一的一个节点。因此,数据包可能会被错误地转发。电子设备2与软件系统中的任意一端可能均无法正确接收到来自对端的数据包。
因此,若要实现互联互通,可能需要创建新的VPC并创建新的数据中心。例如,针对电子设备2,创建新的VPC,该新创建的VPC的子网可以包括网段4,以避免与电子设备2的子网网段发生网段重叠。可以理解,由于电子设备的数量很多,多个电子设备与软件系统的网段重叠是一个大概率事件。若对每次网段重叠均采用相同的方式来处理,可能会造成巨大的成本和较长的部署周期。
有鉴于此,本申请提供一种数据传输的方法,能够实现一个中心连接任意多个用户,以保证数据包的正确传输。同时,实现成本较低,部署周期较短。
下面结合附图详细说明本申请实施例提供的方法。
需要说明的是,本申请实施例所提供的方法可以由服务器执行,具体可以由部署在服务器上的软件通过执行相应的指令来实现。该软件例如可以是在该服务器上创建的虚拟机上部署的软件。该服务器例如可以是VPC提供的服务器,或者说,该服务器可以是运行在VPC中的服务器。该VPC中运行有软件系统,该软件系统例如可以部署在上述服务器上,也可以部署在该VPC提供的另一服务器上。本申请对此不作限定。
在一种实现方式中,上述服务器为弹性云主机,或者称,弹性云服务器。
下文中为方便区分和说明,将用于执行本申请实施例提供的方法的服务器记作第一服务器;将运行有上述软件系统的服务器记作目标服务器;该第一服务器和目标服务器可以运行在同一VPC中,该VPC例如可以记作第一VPC。访问该软件系统的电子设备可以记 作第一电子设备。该第一电子设备可以是上文所列举的云下服务器,也可以是其他通信设备。本申请对此不作限定。
图3是本申请实施例提供的数据传输的方法300的示意性流程图。如图所示,该方法300可以包括步骤310至步骤340。
在步骤310中,确定第一网段和第二网段重叠。
其中,该第一网段可以是目标服务器所处的子网包括的网段。该子网例如记作第一子网,该第一子网包括第一网段。该目标服务器上运行有软件系统。云下的电子设备可以根据配置在该目标服务器上的网络接口的IP地址来实现对软件系统的访问。为便于区分和说明,将该配置在目标服务器上可用于实现对软件系统访问的网络接口记作第一网络接口。
应理解,网络接口例如可以是网卡或其他具有网络接口的功能的软件和/或硬件。本申请对此不作限定。
如前所述,该目标服务器运行在第一VPC中,故该第一网段从属于第一VPC所包括的网段。
该第二网段是第一电子设备所处的子网包括的网段。该子网例如可以记作第二子网,该第二子网包括第二网段。在本申请实施例中,该第一电子设备希望通过网络连接访问上述目标服务器上的软件系统。或者说,该第一电子设备希望接入该软件系统。
例如,图2中所示的第一VPC中的子网2为第一子网的一例,该子网2包括的网段2为第一网段的一例。图2中所示的电子设备1、电子设备2和电子设备3为第一电子设备的几例。图2中所示的云下的子网1、子网2和子网3为第二子网的几例,与此对应的网段1、网段2和网段3为第二网段的几例。
这里,目标服务器处于第一子网,可以是指,该目标服务器的IP地址从属于第一子网所包括的网段,或者说,该第二网段包括目标服务器的IP地址。该目标服务器的IP地址具体可以是配置在该目标服务器上的网络接口的IP地址。
第一电子设备处于第二子网,可以是指,第一电子设备的IP地址属于第二子网所包括的第二网段,或者说,该第二网段包括第一电子设备的IP地址。第一电子设备的IP地址具体可以是第一电子设备的网络接口的IP地址。下文为了简洁,省略对相同或相似情况的说明。
可选地,第一服务器可以预先获取第一网段和第二网段。该第一网段例如可以是由工作人员预先输入到第一服务器中。第二网段也可以是由工作人员预先输入到第一服务器中,或者,还可以基于用户新增的电子设备访问软件系统的需求,临时在用户界面弹出对话框,以便工作人员输入。
下文示出了输入网段的一例:192.168.0.0/16。其中,192.168.0.0为IP地址,16为子网掩码。该IP地址是以“0”开头的IP地址,则代表可以配合后面的子网掩码来确定一个网段。192.168.*.*是默认的私网IP。当前默认的私网IP例如还可以是172.16.*.*。本申请对此不做限定。
应理解,上述IP地址可以为私网IP地址,也可以为公网IP地址,本申请对此不作限定。此外,根据IP地址和子网掩码确定网段的具体方法可以参考现有技术,为了简洁,本申请中省略对具体方法的详细说明。
可选地,在该第一服务器获取到第一网段和第二网段之后,可以判断该第二网段是否与第一网段发生重叠。
具体地,每个网段可以是多个IP地址的集合。判断第一网段和第二网段是否发生重叠,也就是判断第一网段中的IP地址与第二网段中的IP地址是否有重复,或者说,第一网段中的IP地址的集合与第二网段中的IP地址的集合是否有交集。若第一网段中的IP地址与第二网段中的IP地址没有重复,即,交集为空集。则可以认为第一网段和第二网段未发生重叠。相反,若第一网段中的IP地址与第二网段中的IP地址有重复,即,交集不为空。则可以认为第一网段和第二网段发生重叠。当第一网段和第二网段发生重叠时,可以是部分重叠,也可以是全部重叠。本申请对此不作限定。
若第二网段未与第一网段发生重叠,则第一服务器可以直接在第一电子设备的VPN网关与第一VPC中的VPN网关之间建立VPN连接。建立VPN连接的具体实现过程可以与现有技术相同,为了简洁,这里省略对该过程的详细说明。
这里,需要说明的是,第一服务器在第一电子设备的VPN网关与VPC中的VPN网关之间建立VPN连接,具体可以通过调用应用程序接口(application programming interface,API)来实现。通过调用API接口,可以运行预先编写的程序,或,调用相关软件,如VPN软件,以实现VPN连接的自动创建。此外,API接口例如可以是由公有云提供的,运行在第一VPC中的第一服务器可以通过调用相应API接口来实现不同的功能。
还需要说明的是,第一电子设备的VPN网关并不从属第一电子设备。该第一电子设备的VPN网关还可作为其他电子设备的VPN网关,与第一VPC中的VPN网关通过VPN连接实现互通。第一电子设备的VPN网关可以理解为是云下的VPN网关。
若第二网段与第一网段发生重叠,则可以执行步骤320:在该第一VPC中创建至少两个子网,该至少两个子网中的任意一个子网的网段与上述第一网段和第二网段均不重叠。
当目标服务器向第一电子设备发送数据包时,该至少两个子网中的网络接口用于先后转发该数据包,使得该数据包经由至少两次转发后发送至第一电子设备。更具体地说,当目标服务器中的软件系统向第一电子设备发送数据包时,该至少两个子网中的网络接口用于先后转发该数据包,使得该数据包经由至少两次转发后发送至第一电子设备。
相应地,当第一电子设备向目标服务器发送数据包时,该至少两个子网中的网络接口用于先后转发该该数据包,使得该数据包经由至少两次转发后发送至目标服务器。更具体地说,当第一电子设备向目标服务器中运行的软件系统发送数据包时,该至少两个子网中的网络接口用于先后转发该数据包,使得该数据包经由至少两次转发后发送至目标服务器中的软件系统。
为便于理解和说明,下面结合图2中示出的场景,来详细说明本申请提供的数据传输的具体方法。如前所述,图2示出的云上的子网2(即,第一子网的一例)与云下的子网2(即,第二子网的一例)的网段均为网段2,也就是说,云上的子网2与云下的子网2的网段发生了重叠。
图4和图5示出了在第一VPC提供的目标服务器上运行的软件系统与第一电子设备传输数据的示意图。如图所示,第一服务器在该第一VPC中新创建了两个子网。下文中为方便区分和说明,该新创建的两个子网例如可以记作子网5和子网6(即,至少两个子网的一例),子网5包括的网段例如可以记作网段5,子网6包括的网段例如可以记作网 段6。在本申请实施例中,网段5和网段6均不与网段2重叠。因此,该子网5和子网6可以连接于目标服务器所处的第一子网(如图中所示的云上子网2)和第一电子设备所处的第二子网(如图中所示的云下子网2)之间。软件系统可以通过该新创建的两个子网实现与第一电子设备的互联。图4和图5中的箭头示例性地示出了数据包由第一电子设备发送至软件系统的路径。下文中会结合附图数据包的转发路径,这里暂且省略对该具体内容的详细说明。
应理解,图中仅为示例,示意性地示出了新创建的两个子网,但这不应对本申请构成任何限定。新创建的子网个数可以是两个,也可以是两个以上。
在创建了上述至少两个子网之后,第一电子设备与软件系统之间传输的数据包的路由便可以确定。例如,该路由可以由第一服务器根据新创建的子网的互联关系确定,也可以由工作人员手动输入。本申请对此不作限定。确定好的路由例如可以以路由表的形式保存在各子网的网络接口中,以便于各子网在接收到数据包时,基于预先确定的路由转发数据包。
如图所示,由软件系统发送至第一电子设备的数据包可先后经由子网5和子网6的网络接口的转发到达第一电子设备;由第一电子设备发送至软件系统的数据包可先后经由子网6和子网5的网络接口的转发到达软件系统。并且,可以通过设置安全组策略,使得第一子网(如图中云上子网2)的网关禁止接收来自子网6的数据包。图中为便于理解,以子网6的网卡2与云上子网2的网关之间的连接被断开示意。为了简洁,下文中省略对相同或相似情况的说明。
应理解,上文中仅为示例,示意性地示出了数据包由软件系统发送至第一电子设备的路径以及由第一电子设备发送至软件系统的路径,但这不应对本申请构成任何限定。例如,由软件系统发送至第一电子设备的数据包也可以先后经由子网6和子网5的网络接口的转发后到达第一电子设备;由第一电子设备发送至软件系统的数据包也可以先后经由子网5和子网6的网络接口的转发后到达软件系统。本申请对此不作限定。
需要说明的是,在本申请实施例中,第一服务器在第一VPC中创建至少两个子网具体可以由该第一服务器调用API接口实现。通过调用API接口,可以运行预先编写的程序,或,调用相关软件,以实现子网的自动创建。在子网的创建过程中,API接口可以通过用户界面向工作人员呈现对话框,以便工作人员输入该至少两个子网中每个子网的网段。该至少两个子网的网段也可以由第一服务器根据预先获取的各子网(例如上述第一子网和第二子网等)的网段确定。本申请对此不作限定。
可选地,数据包经由至少两个网络接口中的每个网络接口进行IP地址转换后被转发,至少两个网络接口与上述至少两个子网一一对应,每个网络接口的IP地址从属于所对应的子网。
换句话说,每个子网网段包括所对应的网络接口的IP地址。网络接口可以通过对接收到的数据包进行网络地址转换(network address translation,NAT)来转发数据包。其中,该网络地址例如可以是IP地址。
例如,通过该至少两个网络接口进行至少两次IP地址转换后,可以使得来自软件系统的数据包先后经由至少两个子网中的每个子网的数据包转发模块的转发到达第一电子设备;和/或,来自第一电子设备中的数据包先后经由该至少两个子网中的每个子网中的 数据包转发模块的转发到达软件系统。
应理解,网络地址转换具体可以包括目的网络地址转换(destination network address translation,DNAT)和源网络地址转换(source network address translation,SNAT)。其中,DNAT可用于转换接收该数据包的目的地址,如目的IP地址;SNAT可用于转换发送该数据包的源地址,如源IP地址。
上述至少两个网络接口中的每个网络接口可以根据上述预先确定的路由对接收到的数据包进行网络地址转换。该网络地址转换的功能具体可以由DNAT软件和SNAT软件共同实现,也可以由NAT软件实现,或者,也可以由其它可实现相同或相似功能的软件或硬件实现。本申请对此不作限定。下文中,为方便说明将用于实现网络地址转换功能的模块记作NAT。
对于每个网络接口来说,在接收到数据包之后,可以将根据预先确定的路由确定该数据包的目的IP地址,并可以根据发送该数据包的节点的IP地址确定该数据包的源IP地址。网络接口在确定了目的IP地址和源IP地址之后,可以将该目的IP地址和源IP地址输入NAT,由NAT来实现对该数据包的IP地址转换。对于每个子网来说,NAT可以部署在各子网中的服务器上,以便各子网中的服务器在接收到数据包时对数据包的进行目的IP地址转换,从而将数据包转发出去。此外,各子网中的服务器在接收到该数据包时还可以对进行源IP地址转换,以便确定回程路由。
可选地,上述至少两个网络接口配置在同一服务器。
当至少两个网络接口配置在同一服务器上时,该至少两个子网可以共用一个NAT来进行IP地址转换,也可以各自使用独立的NAT来进行IP地址转换。
作为一个实施例,该至少两个网络接口配置在目标服务器上。
可选地,该方法还包括:该第一服务器在该目标服务器上配置该至少两个网络接口。也就是说,该第一服务器上可以新增至少两个网卡,以与该至少两个子网对应。每个网卡的IP地址从属于该至少两个网卡中的一个。该至少两个子网中的每个子网的网络接口在接收到数据包时,可以分别将该数据包发送至NAT进行一次IP地址转换,进行了IP地址转换的数据包被返回至网络接口,网络接口可以根据进行了IP地址转换后的目的IP地址,将数据包转发至下一个目的IP地址。
如前所述,该目标服务器上除了原本配置的网络接口(例如记作第一网络接口)之外,还增加了至少两个网络接口,以与新创建的至少两个子网对应。即,可选地,该方法还包括:在目标服务器上增加至少两个网络接口,该至少两个网络接口的IP地址分别从属于上述至少两个子网。或者说,该至少两个网络接口的IP地址与上述至少两个子网一一对应。
再考虑到该目标服务器上原本配置的第一网络接口,该目标服务器中配置有至少三个网络接口,该至少三个网络接口的IP地址分别从属于至少三个子网,且该至少三个子网的网段互不重叠。如图4所示,该目标服务器可配置三个网络接口,如图中所示的网卡0(即,第一网络接口的一例)以及网卡1和网卡2(即,上述至少两个网络接口的一例)。该三个网卡可以分别从属三个不同的子网,即,子网2、子网5和子网6。
作为另一个实施例,上述至少两个网络接口配置在第二服务器上。
可选地,该方法还包括:在第一VPC中创建第二服务器;并在该第二服务器上配置 至少两个网络接口。该至少两个网络接口的IP地址从属于新创建的至少两个子网。
其中,该第二服务器可以是独立于目标服务器的另一服务器,且该第二服务器与目标服务器之间具有网络连接关系。在该第二服务器上配置至少两个网络接口,则由目标服务器发送的数据包可以经由第二服务器上的至少两个网络接口的转发到达第一电子设备;由第一电子设备发送的数据包可以经由第二服务器上的至少两个网络接口的转发到达目标服务器。
如图5所示,该第二服务器中可以配置两个网络接口,该两个网络接口可以分别从属于两个不同的子网,即,子网5和子网6。由于通过网络接口进行IP地址转换并转发数据包的具体过程与上文所述相似,为了简洁,这里不再赘述。
基于图4和图5的示例可以看到,新创建的至少两个子网与第一子网(如图中所示的子网2)可对应于同一服务器,也可以对应于不同的服务器。本领域的技术人员可以理解,若要在目标服务器上增加网络接口,需要重启该目标服务器。因此可以根据用户的需求来决定在目标服务器上增加网络接口还是需要新创建一服务器,并在新创建的服务器(如,第二服务器)上配置两个或两个以上的网络接口来转发数据包,以实现第一电子设备与软件系统的互联互通。
应理解,该第二服务器可以是基于用户的需求临时创建的服务器,也可以是原本运行在该第一VPC上的服务器。若在该第一VPC上原先就运行有多个服务器,也可以考虑将其中的一台服务器用作第二服务器。并直接在该服务器上配置与至少两个子网对应的至少两个网络接口。本申请对此不作限定。
还应理解,将同一服务器运行在新创建的至少两个子网(如图4和图5中的子网5和子网6)中仅为一种可能的实现方式,而不应对本申请构成任何限定。在新创建的每个子网中也可以分别运行一台服务器。即,上述第二服务器的数量并不限于一台,也可以为至少两台,本申请对此不作限定。与此对应地,上述NAT可以是上述至少两个子网的网络接口共用一个NAT,也可以是各子网的网络接口分别使用各自的NAT,本申请对此不作限定。
下面仍以图4和图5为例,对软件系统与第一电子设备之间传输的数据包的路由以及转发过程做更进一步地说明。需要说明的是,图中为便于理解,示出了由第一电子设备发送数据包至软件系统的过程中数据包的转发路径。由软件系统发送数据包至第一电子设备的过程中数据包的转发路径与之相反,为了简洁,图中并未示出。但本领域的技术人员可以根据下文的描述得出相应的转发路径。
当软件系统向第一电子设备发送数据包时,该软件系统可以通过目标服务器上的第一网络接口(如图中的网络接口0)将该数据包的目的地址设置为从属于子网5的网络接口的IP地址。这里,为方便区分和说明,将子网5中的网络接口记作网络接口1,将该网络接口1的IP地址记作IP地址1。该网络接口1例如可以是目标服务器中新增的网络接口,如图4中所示;也可以是另一服务器上的网络接口,如图5中所示。本申请对此不作限定。
该数据包可以通过运行软件系统的目标服务器上的网络接口0被转发至子网5的网关,进而由子网5的网关转发至网络接口1上。网络接口1可以将该数据包的目的地址设置为从属于子网6的网络接口的IP地址。即,完成了该数据包的第一次网络地址转换。这里,为方便区分和说明,将子网6中的网络接口记作网络接口2,将该网络接口2的IP 地址记作IP地址2。该网络接口2例如可以是目标服务器中新增的另一网络接口,如图4中所示;也可以是另一服务器上的网络接口,如图5中所示。本申请对此不作限定。
该数据包可以通过网络接口1被转发至子网6的网关,进而由子网6的网关转发至网络接口2上。网络接口2可以将该数据包的目的地址设置为第一电子设备的IP地址。即,完成了对该数据包的第二次网络地址转换。这里,为方便区分和说明,将第一电子设备的IP地址记作IP地址3。该IP地址3也就是第一电子设备所处的子网2的网关的IP地址。
该数据包可以通过网络接口2被转发至云下子网2的网关,进而由云下子网2的网关转发至第一电子设备。数据包在经由网络接口2被转发至云下子网2的网关时,例如可以依次经过云上子网6的网关、VPC网关、云上的VPN网关、VPN连接、云下的VPN网关以及云下的路由器等网络节点。由于数据包在云上和云下之间传输时,所经由的路径可以与现有技术相同。为了简洁,这里不做详细说明。后文中省略对相同或相似情况的说明。
由此,通过对数据包进行两次网络地址转换,可以将软件系统发送的数据包送达第一电子设备。应理解,图中仅为示例,并未示出该数据包所经过的每一个节点,但这不应对本申请构成任何限定。本领域的技术人员可以理解,通过对该数据包进行两次网络地址转换,可以将软件系统发送的数据包送达第一电子设备。
当第一电子设备向软件系统发送数据包时,该第一电子设备可以通过网络接口将数据包的目的地址设置为从属于子网6的网络接口的IP地址。如前所述,从属于子网6的网络接口记作网络接口2,该网络接口2的IP地址记作IP地址2。该网络接口2可以是目标服务器中新增的网络接口,如图4中所示;也可以是另一服务器上的网络接口,如图5中所示。本申请对此不作限定。
该数据包可以通过第一电子设备所处的子网2的网络接口被转发至子网6的网关,进而由子网6的网关转发到网络接口2上。网络接口2可以将该数据包的目的地址设置为从属于子网5的网络接口的IP地址。即,完成了该数据包的第一次网络地址转换。如前所述,从属于子网5的网络接口记作网络接口1,该网络接口1的IP地址记作IP地址1。该网络接口1可以是目标服务器中新增的网络接口,如图4中所示;也可以是另一服务器上的网络接口,如图5中所示。本申请对此不作限定。
该数据包可以通过网络接口2被转发至子网5的网关,进而由子网5的网关转发到网络接口1上。网络接口1可以将该数据包的目的地址设置为网络接口0的IP地址。即,完成了该数据包的第二次网络地址转换。如前所述,该网络接口0的IP地址即为用于运行软件系统的目标服务器的IP地址。
由此,通过对数据包进行两次网络地址转换,可以将第一电子设备发送的数据包送达软件系统。应理解,图中仅为示例,并未示出该数据包所经过的每一个节点,但这不应对本申请构成任何限定。本领域的技术人员可以理解,通过对该数据包进行两次网络地址转换,可以实现将第一电子设备发送的数据包送达软件系统。
还应理解,上文结合图4和图5,以新创建了两个子网为例来说明数据包的转发过程。可以理解的是,当新创建的子网个数为N(N≥2,且N为整数)时,对数据包进行目的地址转换的次数也为N。
基于上述技术方案,在第一电子设备与软件系统发生网段重叠的情况下,在第一VPC中创建至少两个子网,来实现第一电子设备与软件系统的互联互通。由于该至少两个子网 中任意一个子网包括的网段与第一电子设备所处的网段、第一网络接口的IP地址从属的网段均不重叠,可以使得数据包在传输的过程中,能够找到唯一的目的IP地址,从而可以实现数据包在第一电子设备和软件系统之间的正确传输。
为了提高可靠性,可以进一步为上述至少两个子网配置主用网络接口和备用网络接口。该主用网络接口和备用网络接口可以配置在不同的服务器上,但在同一个子网内配置有一个相同的浮动IP地址。
可选地,上述至少两个网络接口为主用网络接口。该方法还包括:
步骤330,第一服务器在第一VPC中创建第三服务器;
步骤340,第一服务器在该第三服务器配置至少两个备用网络接口,一一对应,每个主用网络接口的IP地址从属的网段与所对应的备用网络接口的IP地址从属的网段相同,且每个主用网络接口及其对应的备用网络接口具有相同的浮动IP地址。
可选地,该方法还包括:第一服务器为每个主用网络接口及其对应的备用网络接口分配同一浮动IP地址。
具体地,该至少两个备用网络接口的IP地址可以与上述至少两个子网对应。每个备用网络接口的IP地址从属于所对应的子网的网段。由此,在新创建的至少两个子网中,每个子网上都运行有目标服务器(或第二服务器)和第三服务器。该目标服务器(或第二服务器)可提供主用网络接口,第三服务器可提供备用网络接口。也就是说,第一服务器可以为每个主用网络接口配置一个备用网络接口。
第一服务器可以为每个子网中的主用网络接口和备用网络接口设置一个浮动IP地址。该浮动IP地址可以理解为是该主用网络接口和备用网络接口的对外IP。也就是说,一个主用网络接口和对应的备用网络接口可以共用同一个浮动IP地址。
需要说明的是,该浮动IP地址仍然从属于子网。如,子网5中的主用网络接口和备用网络接口可使用同一浮动IP地址,该浮动IP地址从属于子网5的网段。子网6中的主用网络接口和备用网络接口可使用另一浮动IP地址,该浮动IP地址从属于子网6的网段。
与主用网络接口相对应,配置了该主用网络接口的服务器(即,上述目标服务器或第二服务器)可以称为主用服务器;与备用网络接口相对应,配置了该备用网络接口的服务器(即,上述第三服务器)可以称为备用服务器。当用户访问该某一浮动IP地址时,主用服务器正常工作,备用服务器可设置为宕机状态;在主用服务器宕机的情况下,备用服务器被设置为正常工作。换句话说,用户只需要使用这个浮动IP地址,任何一台服务器宕机了,就可以把这个浮动IP地址主动切换到另外一台服务器上。因此,用户访问该浮动IP地址时,总有一个服务器可正常工作,为用户提供服务。这看起来就好像是一个服务器在工作。从而实现了主备高可用。
在新创建的至少两个子网中,每个子网中都可以配置一个主用网络接口和一个备用网络接口。即,每个新创建的子网都有一个浮动IP地址。如前所述,每个子网中均可以运行一台服务器。而每个子网都可以配置一个主用网络接口和一个备用网络接口,因此,在每个子网中可以运行一台主用服务器和一台备用服务器。
由于同一服务器可以运行在新创建的至少两个子网中,因此,在考虑主备高可用的情况下,同一台主用服务器可以运行在新创建的至少两个子网中,同一台备用服务器也可以运行在新创建的至少两个子网中。从而在实现高可靠服务的同时,也提高了资源利用率。
应理解,该第三服务器可以是基于用户的需求临时创建的服务器,也可以是原本运行在该第一VPC上的服务器。若在该第一VPC上原先就运行有多个服务器,也可以考虑将其中的一台服务器用作第三服务器。并直接在该服务器上配置与至少两个子网对应的至少两个网络接口。本申请对此不作限定。
图6示出了主用服务器和备用服务器的一例。其中,主用服务器例如可以是上文所述的目标服务器或第二服务器,图6示出了目标服务器为主用服务器的一例。备用服务器可以是新创建的一台服务器。图6示出了第三服务器为备用服务器的一例。
在子网5中,主用服务器和备用服务器分别配置有至少两个网络接口。主用服务器的网络接口和备用服务器的网络接口的浮动IP地址例如可以记作浮动IP地址1;在子网6中,主用服务器的网络接口和备用服务器的网络接口的浮动IP地址例如可以记作浮动IP地址2。则浮动IP地址1可以从属于子网5的网段,浮动IP地址2可以从属于子网6的网段。可以看到,主用服务器在子网5中的网络接口的浮动IP地址与备用服务器在子网5中的网络接口的浮动IP地址相同。主用服务器在子网6中的网络接口的浮动IP地址与备用服务器在子网6中的网络接口的浮动IP地址也相同。
应理解,图中仅为示例,示出了两个子网上运行同一台主用服务器和同一台备用服务器的情况。但这不应对本申请构成任何限定。本领域的技术人员可以理解,主用和备用可以是由系统指定的,例如在本申请实施例中可以由第一服务器指定或工作人员指定。主用和备用仅仅是相对而言的两个概念,主用服务器和备用服务器可以配置相同的硬件资源和软件资源,提供相同的服务。因此,对于新创建的至少两个子网中的一个子网来说,被指定的主用服务器也可以是另一个子网的备用服务器。例如,子网6的主用服务器可以是子网5的备用服务器,子网5的主用服务器可以是子网6的备用服务器。
还应理解,图中仅为示例,仅示出了各网络接口的浮动IP地址,但这不应对本申请构成任何限定。例如,在一种实现方式中,第一服务器可以为同一子网中的主用网络接口和备用网络接口设置三个私有IP地址,其中一个私有IP地址可作为浮动IP地址,另两个私有IP地址可分别作为主用网络接口的IP地址和备用网络接口的IP地址。
除了电子设备与软件系统的网段发生重叠,电子设备之间也可能发生网段重叠。本申请针对电子设备之间的网段重叠也提供了相应的技术方案。
可选地,该方法还包括:确定第三网段与第一网段重叠。
该第三网段可以是希望访问该软件系统的电子设备所处的网段。为方便区分和说明,将该电子设备记作第二电子设备,该电子设备所处的子网记作第三子网,该第三子网包括的网段为第三网段。
可选地,该方法还包括:判断第三网段与第二网段是否发生重叠。
在第三网段与第二网段未发生重叠的情况下,可选地,该方法还包括:在第二电子设备的VPN网关与第一VPC中的VPN网关之间建立VPN连接。建立VPN连接的具体实现过程可以与现有技术相同,为了简洁,这里省略对该过程的详细说明。
在第三网段与第二网段发生重叠的情况下,可选地,该方法还包括:创建第二VPC,并在该第二VPC中创建至少两个子网。该第二VPC与第一VPC之间具有通信连接,且该第二VPC中创建的至少两个子网与第一网段和第三网段均不重叠。
如前所述,两个VPC之间的网段不重叠。因此,在第二VPC中创建的至少两个子网 必然与第一VPC中的任意一个子网的网段不发生重叠。此外,该第二VPC中创建的至少两个子网也不与第三网段重叠。因此,当目标服务器向第二电子设备发送数据包时,该至少两个子网的网络接口可用于先后转发该数据包,使得该数据包经由至少两次转发后被发送至第二电子设备。
需要说明的是,第一服务器创建第二VPC以及在第二VPC中创建子网也可以通过调用API来实现。如前所述,该API接口可以是由公有云提供的。第一服务器可以调用相应的API接口来创建第二VPC,并在第二VPC中创建至少两个子网。
可选地,该数据包经由至少两个网络接口中的每个网络接口进行IP地址转换后被转发,该至少两个网络接口与第二VPC中的上述至少两个子网一一对应,每个网络接口的IP地址从属于所对应的子网。
相应地,当第二电子设备向目标服务器发送数据包时,该至少两个子网的网络接口可用于先后转发数据包,使得该数据包经由至少两次转发后被发送至目标服务器。
可选地,该数据包经由至少两个网络接口中的每个网络接口进行IP地址转换后被转发,该至少两个网络接口与第二VPC中的上述至少两个子网一一对应,每个网络接口的IP地址从属于所对应的子网。
如前所述,该至少两个子网的每个子网的网络接口可以共用同一NAT进行IP地址转换,也可以由各自的NAT进行IP地址转换。本申请对此不作限定。
图7示出了第一电子设备、第二电子设备分别与目标服务器上运行的软件系统传输数据的示意图。如图所示,第一电子设备与软件系统的互联关系与图4中所示意的互联关系相同。由于上文已经结合图4做了详细说明,为了简洁,这里不再赘述。第二VPC中新创建的至少两个子网例如可以包括子网8和子网9(即,第二VPC中的至少两个子网的一例)。该子网8和子网9的网段均不与第一VPC的网段重叠,也不与第二电子设备所处的第三网段重叠。
因此,由软件系统发送至第二电子设备的数据包可以先后经由子网8和子网9的转发后被发送至第三子网中的第二电子设备。该数据包先后在子网8和子网9进行了一次网络地址转换。其具体过程与数据包经由子网5和子网6被发送至第一电子设备的具体过程相似,为了简洁,这里不再赘述。
由第二电子设备发送至软件系统的数据包可以先后经由子网9和子网8的转发后被发送至第一子网中的软件系统。数据包先后在子网9和子网8中进行了一次网络地址转换。其具体过程与数据包经由子网6和子网5被发送至软件系统的具体过程相似,为了简洁,这里不再赘述。
应理解,第二电子设备和软件系统实现互联互通的具体过程可以与上文步骤310至步骤320所述的具体过程相似,为了简洁,这里不再赘述。
基于上述技术方案,在第二电子设备与第一电子设备发生网段重叠的情况下,为第二电子设备创建新的VPC,并在新创建的VPC中创建新的子网,来实现第二电子设备与软件系统的互联互通。由于新创建的VPC中的子网包括的网段与第一电子设备所处的网段、软件系统所处的网段均不重叠,可以使得数据包在传输的过程中,能够找到唯一的目的地址,从而可以实现数据包在第二电子设备和软件系统之间的正确传输。
因此,本申请实施例为多个电子设备需要接入软件系统的场景下,软件系统与电子设 备发生网段重叠以及电子设备之间发生网段重叠均提供了相应的技术方案,以实现电子设备与软件系统的互联互通,从而实现一个中心连接任意多个用户。并且,本申请所提供的技术方案并不需要新建软件系统,成本较小,周期较短。
此外,本申请还提供了一种方法,在电子设备之间发生网段重叠的情况下,实现各电子设备与软件系统的互联互通,进而实现一个中心连接任意多个用户。
需要说明的是,本申请实施例所提供的方法可以为上文所述的第一服务器执行,具体可以由部署在服务器上的软件通过执行相应的指令来实现。该软件例如可以是在该服务器上创建的虚拟机上部署的软件。该服务器例如可以是VPC提供的服务器,或者说,该服务器可以是运行在VPC中的服务器。该VPC中运行有软件系统,该软件系统例如可以部署在上述服务器上,也可以部署在该VPC提供的另一服务器上。本申请对此不作限定。
可选地,该目标服务器例如可以是上文方法300中示出的目标服务器,该第一服务器例如可以是上文方法300中示出的第一服务器,该VPC例如可以是上文方法300中示出的第一VPC。上文方法300中对于第一VPC、第一服务器、目标服务器及软件系统的相关描述在本实施例中仍然可以适用。为了简洁,在方法800中不再重复说明。
图8是本申请另一实施例提供的数据传输的方法800的示意性流程图。如图所示,该方法800可以包括步骤810和步骤820。
在步骤810中,确定第四网段和第五网段重叠。
其中,第四网段可以为第三电子设备所处的子网包括的网段,该第三电子设备可以是希望访问目标服务器中的软件系统的电子设备,或者说,希望接入目标服务器的电子设备。也就是说,该第三电子设备与目标服务器之间不具有网络连接关系。该第五网段可以为第四电子设备所处的子网包括的网段,该第四电子设备与目标服务器具有网络连接关系,或者说,该第四电子设备是已接入该目标服务器的电子设备。由于上文方法300中的步骤310已经对获取第二网段的具体过程做了详细说明,本实施例中获取第四网段和第五网段的具体过程与之相似,为了简洁,这里不再赘述。
由于上文方法300中已经对软件系统所处的网段与云下的电子设备所处的网段重叠的情况下本申请实施例所提供的方法做了详细说明。在本实施例中,为方便理解和说明,假设云下的电子设备均未与软件系统所处的网段发生重叠。
在第五网段与第一网段重叠的情况下,该第四电子设备可以参考如上文方法300所述的方法与软件系统实现互联互通;在第五网段与第一网段不重叠的情况下,该第四电子设备可以参考现有技术的方法直接与软件系统建立VPN连接以实现互联互通。
该第四电子设备可以是新增的在第五电子设备之前接入软件系统的电子设备,也可以是预先接入软件系统的电子设备,本申请对此不作限定。
第一服务器判断第四网段与第五网段是否重叠的具体方法在上文方法300中的步骤310中已经做了详细说明,为了简洁,这里不再赘述。
在第四网段与第五网段、第一网段均未发生重叠的情况下,第一服务器可以直接在第三电子设备的VPN网关和第一VPC的VPN网关之间建立VPN连接。此时,该第三电子设备与第一VPC之间的VPN连接和第四云下服务与第一VPC之间的VPN连接均可经由第一VPC中的VPN网关接入软件系统。
在第四网段与第五网段发生重叠的情况下,可以执行步骤820,在第三VPC中创建至 少一个子网,该至少一个子网中的任意一个子网与第一网段、第四网段和第五网段均不重叠。
因此,当目标服务器向第三电子设备发送数据包时,该至少一个子网中的网络接口用于先后转发该数据包,使得该数据包经由至少一次转发后发送至该第三电子设备。
相应地,当第三电子设备向目标服务器发送数据包时,该至少一个子网中的网络接口用于先后转发该数据包,使得该数据包经由至少一次转发后发送至该目标服务器。
可选地,数据包经由至少一个网络接口中的每个网络接口进行IP地址转换后被转发,该至少一个网络接口与该至少一个子网一一对应,每个网络接口的IP地址从属于所对应的子网。
图9示出了第三电子设备、第四电子设备分别与目标服务器上运行的软件系统传输数据的示意图。如图所示,第一服务器在公有云中新创建了第三VPC,该第三VPC和第一VPC之间例如可以通过VPC对等连接实现VPC之间的互联互通。该第三电子设备所处的子网例如为第四子网,该第四子网例如可以包括第四网段。如图9中所示的子网3a为第四子网的一例,该子网3a包括的网段3为第四网段的一例。该第四电子设备所处的子网例如为第五子网,该第五子网例如可以包括第五网段。如图9中所示的另一子网3b为第五子网的一例,该子网3b包括的网段3为第五网段的一例。该第三电子设备与第四电子设备发生网段重叠。
第一服务器可以在该第三VPC中创建至少一个子网。下文中为方便区分和说明,将在第三VPC中创建的子网记作子网10,该子网10包括的网段例如可以记作网段10。在本实施例中,网段10与第一网段(如图中所示的子网2包括的网段2)和第四网段(如图中所示的子网3包括的网段3)均不重叠。因此,该子网10可以连接于目标服务器所处的第一子网和第三电子设备所处的第四子网之间。软件系统可以通过该第三VPC中的子网实现与第三电子设备的互联。
应理解,图中仅为示例,示意性地示出了新创建的一个子网,但这不应对本申请构成任何限定。新创建的子网个数可以是一个,也可以是多个。
在创建了上述至少一个子网之后,第三电子设备与软件系统之间传输的数据包的路由便可以确定。例如,该路由可以由第一服务器根据新创建的子网的互联关系确定,也可以由工作人员手动输入。本申请对此不作限定。确定好的路由例如可以以路由表的形式保存在各子网的网关中,以便于各子网在接收到数据包时,基于预先确定的路由转发数据包。
如图所示,由软件系统发送至第三电子设备的数据包经由子网10的转发后到达第三电子设备,由第三电子设备发送至软件系统的数据包经由子网10的转发后到达软件系统。
应理解,图中仅为示例,示意性地示出了子网10连接于第三电子设备与软件系统之间的一例。但这不应对本申请构成任何限定。例如,当第三VPC中创建了多个子网时,由软件系统发送至第三电子设备的数据包可以先后经由该多个子网的网络接口的转发后到达第三电子设备,由第三电子设备发送至软件系统的数据包也可以先后经由该多个子网的网络接口的转发后到达软件系统。
可选地,该方法还包括:创建第三VPC,该第三VPC与第一VPC之间具有通信连接。应理解,第三VPC可以是新创建的VPC,也可以是原先就运行在公有云上的VPC。本申请对此不作限定
需要说明的是,在本申请实施例中,第一服务器创建第三VPC以及在第三VPC中创建至少一个子网具体可以由该第一服务器调用API接口实现。通过调用API接口,可以运行预先编写的脚本,或,调用相关软件,以实现VPC和子网的自动创建。在VPC和子网的创建过程中,API接口可以通过用户界面向工作人员呈现对话框,以便工作人员输入该第三VPC和至少一个子网中每个子网的网段。该第三VPC的网段可以由第一服务器根据已有的VPC(如上述第一VPC)的网段确定。该至少一个子网的网段也可以由第一服务器根据预先获取的各子网(例如上述第一子网和第四子网等)的网段确定。本申请对此不作限定。
该至少一个子网的网络接口可以配置在第三VPC提供的服务器上。为便于区分和说明,将该服务器记作第四服务器。
可选地,该方法还包括:在第三VPC中创建第四服务器;并在该第四服务器上配置上述至少一个网络接口。
当该至少一个网络接口配置在同一服务器上时,该至少一个网络接口可以共用一个NAT来进行IP地址转换。也就是说,该至少一个子网中的每个子网的网络接口在接收到数据包时,可以将该数据包发送至第四服务器的NAT,以便对该数据包进行IP地址转换。进行了IP地址转换的数据包被返回至网络接口,该网络接口可以将该数据包转发至下一个目的IP地址。
当然,该至少一个网络接口也可以用各自的NAT来进行IP地址转换,本申请对此不作限定。
图9示出了通过第四服务器上的网络接口转发数据包的一例。如图9所示,该第四服务器可配置一个网络接口,例如记作网络接口10,该网络接口10的IP地址可以从属于子网10(即,至少一个子网的一例)。
基于图9示出的第三电子设备与软件系统的互联关系,下面对软件系统与第三电子设备之间传输的数据包的路由及转发过程做更进一步地说明。需要说明的是,图中仅为便于理解,示出了由软件系统发送数据包至第三电子设备的过程中数据包的转发路径。由第三电子设备发送数据包至软件系统的过程中数据包的转发路径与之相反,为了简洁,图中并未示出。但本领域的技术人员可以根据下文的描述得出相应的转发路径。
当软件系统向第三电子设备发送数据包时,该软件系统可以通过目标服务器上的第一网络接口将数据包的目的地址设置为从属于子网10的网络接口的IP地址。这里,为方便区分和说明,将子网10中的网络接口记作网络接口10,并将该网络接口10的IP地址记作IP地址10。该网络接口10。
该数据包可以通过运行在软件系统的目标服务器上的第一网络接口被转发至子网10的网关,进而由子网10的网关转发至网络接口10上。网络接口10可以将该数据包的目的地址设置为从属于子网3a(即,第四子网的一例)的网络接口的IP地址。即,完成了该数据包的一次网络地址转换。
该数据包可以通过网络接口10被转发至子网3a的网关,进而由子网3a的网关转发至子网3a中的第三电子设备。
由此,通过对数据包进行一次网络地址转换,可以将软件系统发送的数据包送达第三电子设备。应理解,图中仅为示例,并未示出该数据包所经过的每一个节点,但这不应对 本申请构成任何限定。本领域的技术人员可以理解,通过对该数据包进行目的地址转换,可以将软件系统发送的数据包送达第三电子设备。
当第三电子设备向软件系统发送数据包时,该第三电子设备可以通过网络接口将数据包的目的IP地址设置为从属于子网10的网络接口的IP地址。如前所述,从属于子网10的网络接口记作网络接口10,该网络接口10的IP地址记作IP地址10。
该数据包可以通过第三电子设备所处子网的网络接口被转发至子网10的网关,进而由子网10的网关转发到网络接口10上。网络接口10可以将该数据包的目的IP地址设置为网络接口0的IP地址。即,完成了该数据包的目的地址转换。如前所述,该网络接口0的IP地址即为用于运行软件系统的目标服务器的IP地址。
由此,通过对数据包进行网络地址转换,可以将第三电子设备发送的数据包送达软件系统。应理解,图中仅为示例,并未示出该数据包所经过的每一个节点,但这不应对本申请构成任何限定。本领域的技术人员可以理解,通过对该数据包进行目的地址转换,可以将第三电子设备发送的数据包送达软件系统。
还应理解,上文结合图9,以新创建了一个VPC和一个子网为例来说明数据包的转发过程。可以理解的是,当新创建的子网个数为N(N≥2,且N为整数)时,对数据包进行目的地址转换的次数也为N。新创建的VPC个数可以为一个,也可以为多个,新创建的VPC个数与新创建的子网个数并不一定相同。本申请对于新创建的VPC个数和新创建的子网个数均不做限定。
基于上述技术方案,在待接入软件系统的第三电子设备与已接入软件系统的第四电子设备发生网段重叠的情况下,为第三电子设备创建新的VPC和新的子网,来实现第三电子设备与软件系统的互联互通。由于新创建的VPC中的子网包括的网段与第四电子设备所处的网段、第三电子设备所处的网段和软件系统所处的网段均不重叠,可以使得数据包在传输的过程中,能够找到唯一的目的地址,从而可以实现数据包在第三电子设备和软件系统之间的正确传输。
为了提高可靠性,可以进一步为上述至少一个子网配置主用网络接口和备用网络接口。该主用网络接口和备用网络接口可以配置在不同的服务器上,但在同一个子网内配置有一个相同的浮动IP地址。
可选地,上述至少一个网络接口为主用网络接口。该方法还包括:
在第三VPC中创建第五服务器;
在该第五服务器上配置至少一个备用网络接口,该至少一个备用网络接口与至少一个主用网络接口一一对应,每个主用网络接口的IP地址从属的网段与所对应的备用网络接口的IP地址从属的网段相同,且每个主用网络接口及其对应的备用网络接口具有相同的浮动IP地址。
可选地,该方法还包括:为每个主用网络接口及其对应的备用网络接口分配同一个浮动IP地址。
具体地,每个主用网络接口可以设置至少两个IP地址,该至少两个IP地址包括一个浮动IP地址。该浮动IP地址可以理解为是网络接口的对外IP。也就是说,当数据包的目的地址被设置为网络接口的浮动IP地址时,该数据包可以被路由至该网络接口上。
由于上文方法300中的步骤330和步骤340已经对实现主备高可用的具体过程做了详 细说明。本实施例中配置备用网络接口并分配浮动IP地址的具体过程与之相似,为了简洁,这里不再赘述。
因此,本申请实施例为多个电子设备需要接入软件系统的场景下,多个电子设备发生网段重叠提供了相应的技术方案,以实现多个电子设备与软件系统的互联互通,从而实现一个中心连接任意多个用户。并且,本申请所提供的技术方案并不需要新建软件系统,成本较小,周期较短。
需要说明的是,上文方法300和方法800所述的用于实现软件系统与电子设备的方法的第一服务器可以以软件的形式运行在公有云提供商所提供的虚拟机上,也可以运行在由第三方提供的虚拟机上。本申请对此不作限定。例如,用户可以从第三方购买虚拟机,在该虚拟机上部署相关软件,以实现上文实施例中第一服务器的功能。
应理解,上述实施例中,各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
上文中结合图1至图9,详细描述了本申请实施例提供的数据传输的方法,下面将结合图10和图11,详细描述本申请实施例提供的计算机系统。应理解,方法实施例的描述与装置实施例的描述相互对应,因此,未详细描述的部分可以参见前面方法实施例。
图10是本申请实施例提供的计算机系统1000的示意性框图。如图所示,该计算机系统1000可以包括:确定模块1100和创建模块1200。
在一种可能的设计中,该确定模块1100可用于确定第一网段和第二网段重叠,所述第一网段是目标服务器所处的子网包括的网段,所述目标服务器是运行在第一虚拟私有云VPC中的服务器,所述第一网段从属于所述第一VPC包括的网段,所述第二网段是第一电子设备所处的子网包括的网段。该创建模块1200可用于在所述第一VPC中创建至少两个子网,所述至少两个子网中任意一个子网包括的网段与所述第一网段和所述第二网段均不重叠;当所述目标服务器向所述第一电子设备发送数据包时,所述至少两个子网中的网络接口用于先后转发所述数据包,使得所述数据包经由至少两次转发后发送至所述第一电子设备。
在另一种可能的设计中,该确定模块1100可用于确定第四网段和第五网段重叠,所述第四网段为第三电子设备所处的子网包括的网段,所述第五网段为第四电子设备所处的子网包括的网段,所述第四电子设备与目标服务器具有网络连接关系,所述目标服务器为运行在第一虚拟私有云VPC中的服务器,所述第一网络接口的IP地址从属第一网段,所述第一网段从属于所述第一VPC包括的网段。该创建模块1200可用于在第三VPC中创建至少一个子网,所述第三VPC与所述第一VPC之间具有通信连接,所述至少一个子网中的任意一个子网与所述第一网段、所述第四网段和所述第五网段均不重叠;当所述目标服务器向所述第三电子设备发送数据包时,所述至少一个子网中的网络接口用于转发所述数据包,使得所述数据包经由至少一次转发后发送至所述第三电子设备。
应理解,该计算机系统1000可以对应于根据本申请实施例的数据传输的方法300和方法800中的第一服务器,该计算机系统1000可以包括用于执行图3中的方法300或图8中的方法800中第一服务器执行的方法的模块。并且,该计算机系统1000中的各模块和上述其他操作和/或功能分别为了实现图3中的方法300或图8中的方法800的相应流程。由于各模块执行上述相应步骤的具体过程在方法实施例中已经详细说明,为了简洁, 在此不再赘述。
图11是本申请实施例提供的一种计算机系统2000的示意性框图。如图所示,该计算机系统2000可以包括:通信接口2100、处理器2200和存储器2300。
可选地,计算机系统2000还可以包括总线2400。其中,通信接口2100、处理器2200以及存储器2300可以通过总线2400相互连接;总线2400可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。所述总线2400可以分为地址总线、数据总线、控制总线等。为便于表示,图11中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
该存储器2300可以用于存储该计算机系统执行的程序代码和数据。因此,该存储器2300可以是处理器2200内部的存储单元,也可以是与处理器2200独立的外部存储单元,还可以是包括处理器2200内部的存储单元和与处理器2200独立的外部存储单元的部件。
处理器2200可以由一个或者多个通用处理器构成,例如可以是中央处理器(central processing unit,CPU),通用处理器,数字信号处理器(digital signal processor,DSP),专用集成电路(application-specific integrated circuit,ASIC),现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含多个微处理器组合,DSP和微处理器的组合等等。处理器2200可用于运行相关的程序代码中处理功能的程序。也就是说,处理器2200执行程序代码可以实现确定模块和创建模块的功能。其中,关于确定模块和创建模块的功能具体可参见前述实施例中的相关阐述。
在一种可能的实施方式中,所述处理器2200用于运行相关的程序代码,以实现本申请上述方法实施例中第一服务器的功能,或以实现本申请上述图3示出的步骤310至步骤340中所述的方法,或以实现本申请上述图8示出的步骤810至步骤820中所述的方法,和/或实现本文所描述的技术的其它步骤等,本申请这里不做详述和限定。
通信接口2100可以为有线接口(例如以太网接口)或无线接口(例如蜂窝网络接口或使用无线局域网接口),用于与其他模块/设备进行通信。
存储器2300可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM);存储器也可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM)、快闪存储器(flash memory)、硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器2300还可以包括上述种类的存储器的组合。存储器2300可用于存储一组程序代码,以便于处理器2200调用存储器2300中存储的程序代码以实现本发明实施例中涉及的通信模块和/或处理模块的功能。
当存储器2300中的程序代码被处理器2200执行时,可以使得该计算机系统2000执行上述方法实施例300或800中的方法。
可选地,本申请实施例还提供了一种计算机程序产品,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行上述各方面中的方法。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及 算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请中使用的术语“部件”、“模块”、“系统”等用于表示计算机相关的实体、硬件、固件、硬件和软件的组合、软件、或执行中的软件。例如,部件可以是但不限于,在处理器上运行的进程、处理器、对象、可执行文件、执行线程、程序和/或计算机。通过图示,在计算设备上运行的应用和计算设备都可以是部件。一个或多个部件可驻留在进程和/或执行线程中,部件可位于一个计算机上和/或分布在2个或更多个计算机之间。此外,这些部件可从在上面存储有各种数据结构的各种计算机可读介质执行。部件可根据具有一个或多个数据分组(例如来自与本地系统、分布式系统和/或网络间的另一部件交互的二个部件的数据,例如通过信号与其它系统交互的互联网)的信号通过本地和/或远程进程来通信。
还应理解,在本申请的各实施例中,“第一”、“第二”、“第三”等仅是为了指代不同的对象,并不表示对指代的对象有其它限定。
另外,本文中术语“系统”和“网络”在本文中常被可互换使用。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的 介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (24)

  1. 一种数据传输的方法,其特征在于,所述方法包括:
    确定第一网段和第二网段重叠;所述第一网段是目标服务器所处的子网包括的网段,所述目标服务器是运行在第一虚拟私有云VPC中的服务器,所述第一网段从属于所述第一VPC包括的网段;所述第二网段是第一电子设备所处的子网包括的网段;
    在所述第一VPC中创建至少两个子网,所述至少两个子网中任意一个子网包括的网段与所述第一网段和所述第二网段均不重叠;
    当所述目标服务器向所述第一电子设备发送数据包时,所述至少两个子网中的网络接口用于先后转发所述数据包,使得所述数据包经由至少两次转发后发送至所述第一电子设备。
  2. 如权利要求1所述的方法,其特征在于,所述数据包经由至少两个网络接口中的每个网络接口进行IP地址转换后被转发,所述至少两个网络接口与所述至少两个子网一一对应,每个网络接口的IP地址从属于所对应的子网。
  3. 如权利要求2所述的方法,其特征在于,所述至少两个网络接口配置在所述目标服务器上。
  4. 如权利要求2所述的方法,其特征在于,所述方法还包括:
    在所述第一VPC中创建所述第二服务器;
    在所述第二服务器上配置所述至少两个网络接口。
  5. 如权利要求1至4中任一项所述的方法,其特征在于,与所述至少两个子网对应的至少两个网络接口为主用网络接口,所述方法还包括:
    在所述第一VPC中创建第三服务器;
    在所述第三服务器上配置至少两个备用网络接口,所述至少两个备用网络接口与至少两个主用网络接口一一对应,每个主用网络接口的IP地址从属的网段与所对应的备用网络接口的IP地址从属的网段相同,且每个主用网络接口及其对应的备用网络接口具有相同的浮动IP地址。
  6. 如权利要求1至5中任一项所述的方法,其特征在于,所述方法还包括:
    确定第三网段与所述第一网段重叠,所述第三网段为第二电子设备所处的子网包括的网段;
    在第二VPC中创建至少两个子网,所述第二VPC与所述第一VPC之间具有通信连接,所述至少两个子网中的任意一个子网与所述第一网段、所述第二网段和所述第三网段均不重叠;
    当所述目标服务器向所述第二电子设备发送数据包时,所述至少两个子网的网络接口用于先后转发所述数据包,使得所述数据包经由至少两次转发后发送至所述第二电子设备。
  7. 一种数据传输的方法,其特征在于,所述方法包括:
    确定第四网段和第五网段重叠,所述第四网段为第三电子设备所处的子网包括的网段,所述第五网段为第四电子设备所处的子网包括的网段,所述第四电子设备与目标服务 器具有通信连接;所述目标服务器为运行在第一虚拟私有云VPC中的服务器,所述第一网络接口的IP地址从属第一网段,所述第一网段从属于所述第一VPC包括的网段;
    在第三VPC中创建至少一个子网,所述第三VPC与所述第一VPC之间具有通信连接,所述至少一个子网中的任意一个子网与所述第一网段、所述第四网段和所述第五网段均不重叠;
    当所述目标服务器向所述第三电子设备发送数据包时,所述至少一个子网中的网络接口用于转发所述数据包,使得所述数据包经由至少一次转发后发送至所述第三电子设备。
  8. 如权利要求7所述的方法,其特征在于,所述数据包经由至少一个网络接口中的每个网络接口进行IP地址转换后被转发,所述至少一个网络接口与所述至少一个子网一一对应,每个网络接口的IP地址从属于所对应的子网。
  9. 如权利要求7或8所述的方法,其特征在于,所述方法还包括:
    创建所述第三VPC。
  10. 如权利要求7至9中任一项所述的方法,其特征在于,所述方法还包括:
    在所述第三VPC中创建所述第四服务器;
    在所述第四服务器上配置与所述至少一个子网对应的至少一个网络接口。
  11. 如权利要求7至10中任一项所述的方法,其特征在于,与所述至少一个子网对应的至少一个网络接口为主用网络接口,所述方法还包括:
    在第三VPC中创建第五服务器;
    在所述第五服务器上配置至少一个备用网络接口,所述至少一个备用网络接口与至少一个主用网络接口一一对应,每个主用网络接口的IP地址从属的网段与所对应的备用网络接口的IP地址从属的网段相同,且每个主用网络接口及其对应的备用网络接口具有相同的浮动IP地址。
  12. 一种计算机系统,其特征在于,包括:处理器,所述处理器用于从存储器中读取指令,当所述指令被所述处理器执行时,使得所述计算机系统确定第一网段和第二网段重叠;所述第一网段是目标服务器所处的子网包括的网段,所述目标服务器是运行在第一虚拟私有云VPC中的服务器,所述第一网段从属于所述第一VPC包括的网段;所述第二网段是第一电子设备所处的子网包括的网段;以及
    在所述第一VPC中创建至少两个子网,所述至少两个子网中任意一个子网包括的网段与所述第一网段和所述第二网段均不重叠;
    当所述目标服务器向所述第一电子设备发送数据包时,所述至少两个子网中的网络接口用于先后转发所述数据包,使得所述数据包经由至少两次转发后发送至所述第一电子设备。
  13. 如权利要求12所述的计算机系统,其特征在于,所述数据包经由至少两个网络接口中的每个网络接口进行IP地址转换后被转发,所述至少两个网络接口与所述至少两个子网一一对应,每个网络接口的IP地址从属于所对应的子网。
  14. 如权利要求13所述的计算机系统,其特征在于,所述至少两个网络接口配置在所述目标服务器上。
  15. 如权利要求13所述的计算机系统,其特征在于,当所述指令被所述处理器执行时,使得所述计算机系统在所述第一VPC中创建所述第二服务器;并在所述第二服务器 上配置所述至少两个网络接口。
  16. 如权利要求12至15中任一项所述的计算机系统,其特征在于,与所述至少两个子网对应的至少两个网络接口为主用网络接口;
    当所述指令被所述处理器执行时,使得所述计算机系统在所述第一VPC中创建第三服务器;并在所述第三服务器上配置至少两个备用网络接口,所述至少两个备用网络接口与至少两个主用网络接口一一对应,每个主用网络接口的IP地址从属的网段与所对应的备用网络接口的IP地址从属的网段相同,且每个主用网络接口及其对应的备用网络接口具有相同的浮动IP地址。
  17. 如权利要求12至16中任一项所述的计算机系统,其特征在于,当所述指令被所述处理器执行时,使得所述计算机系统确定第三网段与所述第一网段重叠,所述第三网段为第二电子设备所处的子网包括的网段;以及
    在第二VPC中创建至少两个子网,所述第二VPC与所述第一VPC之间具有通信连接,所述至少两个子网中的任意一个子网与所述第一网段、所述第二网段和所述第三网段均不重叠;
    当所述目标服务器向所述第二电子设备发送数据包时,所述至少两个子网的网络接口用于先后转发所述数据包,使得所述数据包经由至少两次转发后发送至所述第二电子设备。
  18. 一种计算机系统,其特征在于,包括:处理器,所述处理器用于从存储器中读取指令,当所述指令被所述处理器执行时,使得所述计算机系统确定第四网段和第五网段重叠,所述第四网段为第三电子设备所处的子网包括的网段,所述第五网段为第四电子设备所处的子网包括的网段,所述第四电子设备与目标服务器具有网络连接关系;所述目标服务器为运行在第一虚拟私有云VPC中的服务器,所述第一网络接口的IP地址从属第一网段,所述第一网段从属于所述第一VPC包括的网段;以及
    在第三VPC中创建至少一个子网,所述第三VPC与所述第一VPC之间具有通信连接,所述至少一个子网中的任意一个子网与所述第一网段、所述第四网段和所述第五网段均不重叠;
    当所述目标服务器向所述第三电子设备发送数据包时,所述至少一个子网中的网络接口用于转发所述数据包,使得所述数据包经由至少一次转发后发送至所述第三电子设备。
  19. 如权利要求18所述的计算机系统,其特征在于,所述数据包经由至少一个网络接口中的每个网络接口进行IP地址转换后被转发,所述至少一个网络接口与所述至少一个子网一一对应,每个网络接口的IP地址从属于所对应的子网。
  20. 如权利要求18或19所述的计算机系统,其特征在于,当所述指令被所述处理器执行时,使得所述计算机系统创建所述第三VPC。
  21. 如权利要求18至20中任一项所述的计算机系统,其特征在于,当所述指令被所述处理器执行时,使得所述计算机系统在所述第三VPC中创建所述第四服务器;并在所述第四服务器上配置与所述至少一个子网对应的至少一个网络接口。
  22. 如权利要求18至21中任一项所述的计算机系统,其特征在于,与所述至少一个子网对应的至少一个网络接口为主用网络接口;
    当所述指令被所述处理器执行时,使得所述计算机系统在第三VPC中创建第五服务 器;并在所述第五服务器上配置至少一个备用网络接口,所述至少一个备用网络接口与至少一个主用网络接口一一对应,每个主用网络接口的IP地址从属的网段与所对应的备用网络接口的IP地址从属的网段相同,且每个主用网络接口及其对应的备用网络接口具有相同的浮动IP地址。
  23. 一种计算机可读介质,其特征在于,包括计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如权利要求1至6中任一项所述的方法。
  24. 一种计算机可读介质,其特征在于,包括计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如权利要求7至11中任一项所述的方法。
PCT/CN2020/073023 2019-03-15 2020-01-19 一种数据传输的方法和计算机系统 Ceased WO2020186925A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20773427.8A EP3883217A4 (en) 2019-03-15 2020-01-19 Data transmission method and computer system
US17/373,025 US11451509B2 (en) 2019-03-15 2021-07-12 Data transmission method and computer system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910199742.4A CN111698338B (zh) 2019-03-15 2019-03-15 一种数据传输的方法和计算机系统
CN201910199742.4 2019-03-15

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/373,025 Continuation US11451509B2 (en) 2019-03-15 2021-07-12 Data transmission method and computer system

Publications (1)

Publication Number Publication Date
WO2020186925A1 true WO2020186925A1 (zh) 2020-09-24

Family

ID=72475462

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/073023 Ceased WO2020186925A1 (zh) 2019-03-15 2020-01-19 一种数据传输的方法和计算机系统

Country Status (4)

Country Link
US (1) US11451509B2 (zh)
EP (1) EP3883217A4 (zh)
CN (1) CN111698338B (zh)
WO (1) WO2020186925A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112437167A (zh) * 2020-11-11 2021-03-02 北京天融信网络安全技术有限公司 一种创建传输通道的方法、装置、存储介质和电子设备
CN112583949A (zh) * 2020-11-26 2021-03-30 新华三云计算技术有限公司 一种vpc访问公网的方法和vpc设备
CN113691453A (zh) * 2021-08-16 2021-11-23 中汽创智科技有限公司 一种网络管理方法、装置、设备及存储介质
CN115086194A (zh) * 2022-05-20 2022-09-20 阿里巴巴(中国)有限公司 云应用的数据传输方法、计算设备及计算机存储介质
CN116232992A (zh) * 2022-12-16 2023-06-06 中国联合网络通信集团有限公司 数据转发方法、装置、设备及存储介质
CN117201495A (zh) * 2023-09-15 2023-12-08 北京火山引擎科技有限公司 云服务中的网络创建方法、装置、计算机设备及存储介质
WO2025082440A1 (zh) * 2023-10-17 2025-04-24 北京奥星贝斯科技有限公司 数据访问

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112511404B (zh) * 2020-12-15 2022-06-28 海腾保险代理有限公司 网络互联方法、装置及电子设备
CN113472911B (zh) * 2021-06-10 2023-05-16 新华三信息安全技术有限公司 一种子网划分方法及装置
CN114024886B (zh) * 2021-10-25 2023-04-21 济南浪潮数据技术有限公司 跨资源池的网络互通方法、电子设备及可读存储介质
CN114039949B (zh) * 2021-12-24 2024-03-26 上海观安信息技术股份有限公司 云服务浮动ip绑定方法及系统
CN116527639A (zh) * 2022-01-24 2023-08-01 华为云计算技术有限公司 一种地址空间推荐方法、装置及相关设备
CN115499414B (zh) * 2022-08-15 2025-03-04 新华三技术有限公司 地址分配方法及装置
US20250088480A1 (en) * 2023-09-13 2025-03-13 3nets.io, Inc. Connecting services running on different networks with overlapping ip addresses

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103023898A (zh) * 2012-12-03 2013-04-03 杭州迪普科技有限公司 一种访问vpn服务端内网资源的方法及装置
EP2498449B1 (en) * 2011-03-11 2016-11-30 Nec Corporation Thin Client Environment Providing System, Server, Thin Client Environment Management Method and Thin Client Environment Management Program
CN106789367A (zh) * 2017-02-23 2017-05-31 郑州云海信息技术有限公司 一种网络系统的构建方法及装置
CN108965092A (zh) * 2018-07-24 2018-12-07 新华三技术有限公司 一种数据报文传输方法和装置

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7002924B2 (en) * 2000-02-04 2006-02-21 Matsushita Electric Industrial Co., Ltd. Zero configuration networking
US20020186698A1 (en) * 2001-06-12 2002-12-12 Glen Ceniza System to map remote lan hosts to local IP addresses
US20050066035A1 (en) * 2003-09-19 2005-03-24 Williams Aidan Michael Method and apparatus for connecting privately addressed networks
US7814541B1 (en) * 2006-05-19 2010-10-12 Array Networks, Inc. Virtual routing for virtual local area networks having overlapping IP addresses
JP2009017429A (ja) * 2007-07-09 2009-01-22 Fujitsu Ltd ネットワーク中継制御プログラム、ネットワーク中継制御装置、ネットワーク中継制御方法
EP2253124B1 (en) * 2008-03-20 2016-03-16 Telefonaktiebolaget LM Ericsson (publ) Method and apparatus for communication of data packets between local networks
JP5551061B2 (ja) * 2010-12-27 2014-07-16 株式会社Pfu 情報処理装置、アドレス重複対処方法およびアドレス重複対処用プログラム
CN102882758B (zh) * 2011-07-12 2018-12-07 华为技术有限公司 虚拟私云接入网络的方法、网络侧设备和数据中心设备
US20130103834A1 (en) * 2011-10-21 2013-04-25 Blue Coat Systems, Inc. Multi-Tenant NATting for Segregating Traffic Through a Cloud Service
US11099099B1 (en) * 2015-01-07 2021-08-24 Aviatrix Systems, Inc. System and method for selecting virtual appliances in communications with virtual private cloud networks
US9825854B2 (en) * 2014-03-27 2017-11-21 Nicira, Inc. Host architecture for efficient cloud service access
JP2015226131A (ja) * 2014-05-27 2015-12-14 富士通株式会社 情報処理装置、情報処理方法、及び情報処理プログラム
US10541966B1 (en) * 2015-07-02 2020-01-21 Aviatrix Systems, Inc. System and method for enabling communication between networks with overlapping IP address ranges
CN107241457B (zh) * 2017-06-01 2020-09-11 常青 一种实现网络端到端通信的方法
US10498693B1 (en) * 2017-06-23 2019-12-03 Amazon Technologies, Inc. Resizing virtual private networks in provider network environments
CN107809365B (zh) 2017-09-19 2021-01-05 大唐网络有限公司 一种基于OpenStack架构提供VPN服务的实现方法
US11102113B2 (en) * 2018-11-08 2021-08-24 Sap Se Mapping of internet protocol addresses in a multi-cloud computing environment
CN109361764B (zh) * 2018-11-29 2021-02-05 杭州数梦工场科技有限公司 内跨vpc的服务访问方法、装置、设备及可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2498449B1 (en) * 2011-03-11 2016-11-30 Nec Corporation Thin Client Environment Providing System, Server, Thin Client Environment Management Method and Thin Client Environment Management Program
CN103023898A (zh) * 2012-12-03 2013-04-03 杭州迪普科技有限公司 一种访问vpn服务端内网资源的方法及装置
CN106789367A (zh) * 2017-02-23 2017-05-31 郑州云海信息技术有限公司 一种网络系统的构建方法及装置
CN108965092A (zh) * 2018-07-24 2018-12-07 新华三技术有限公司 一种数据报文传输方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3883217A4

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112437167A (zh) * 2020-11-11 2021-03-02 北京天融信网络安全技术有限公司 一种创建传输通道的方法、装置、存储介质和电子设备
CN112583949A (zh) * 2020-11-26 2021-03-30 新华三云计算技术有限公司 一种vpc访问公网的方法和vpc设备
CN113691453A (zh) * 2021-08-16 2021-11-23 中汽创智科技有限公司 一种网络管理方法、装置、设备及存储介质
CN113691453B (zh) * 2021-08-16 2023-06-20 中汽创智科技有限公司 一种网络管理方法、装置、设备及存储介质
CN115086194A (zh) * 2022-05-20 2022-09-20 阿里巴巴(中国)有限公司 云应用的数据传输方法、计算设备及计算机存储介质
CN115086194B (zh) * 2022-05-20 2024-02-02 阿里巴巴(中国)有限公司 云应用的数据传输方法、计算设备及计算机存储介质
CN116232992A (zh) * 2022-12-16 2023-06-06 中国联合网络通信集团有限公司 数据转发方法、装置、设备及存储介质
CN116232992B (zh) * 2022-12-16 2024-05-14 中国联合网络通信集团有限公司 数据转发方法、装置、设备及存储介质
CN117201495A (zh) * 2023-09-15 2023-12-08 北京火山引擎科技有限公司 云服务中的网络创建方法、装置、计算机设备及存储介质
WO2025082440A1 (zh) * 2023-10-17 2025-04-24 北京奥星贝斯科技有限公司 数据访问

Also Published As

Publication number Publication date
CN111698338A (zh) 2020-09-22
US20210344643A1 (en) 2021-11-04
US11451509B2 (en) 2022-09-20
EP3883217A4 (en) 2021-12-29
EP3883217A1 (en) 2021-09-22
CN111698338B (zh) 2021-10-01

Similar Documents

Publication Publication Date Title
WO2020186925A1 (zh) 一种数据传输的方法和计算机系统
CN115699699B (zh) 虚拟私有云与云下数据中心通信、配置方法及相关装置
CN109451084B (zh) 一种服务访问方法及装置
US10547463B2 (en) Multicast helper to link virtual extensible LANs
US12363034B2 (en) Packet routing based on forwarding rules in a network visibility system
US10033691B1 (en) Adaptive resolution of domain name requests in virtual private cloud network environments
CN108347493B (zh) 混合云管理方法、装置和计算设备
US11757793B2 (en) Multisite interconnect and policy with switching fabrics
US10057126B2 (en) Configuration of a network visibility system
US20170272274A1 (en) Method and apparatus for interconnection between networks
WO2020108587A1 (zh) 数据处理方法、控制器和转发设备
JP2017526309A (ja) 転送テーブル同期方法、ネットワークデバイスおよびシステム
CN112385194B (zh) 远程网络之间的状态分组传输
US20250379845A1 (en) Method for Configuring Network Address Translation Gateway and Cloud Management Platform
CN111698346A (zh) 一种专线网络地址转换方法、装置、专线网关及存储介质
WO2025010985A1 (zh) 服务治理方法、装置及计算机可读存储介质
CN116866166A (zh) 基于ovn的虚拟nat网关规划方法、装置及设备
CN104113475B (zh) 基于Linux的家庭网关的网络路由实现方法和系统
CN112671811B (zh) 一种网络接入方法和设备
CN115150224A (zh) 一种集群间网络二层打通方法、装置、设备及存储介质
CN114301913B (zh) 一种请求处理方法及系统
KR102763960B1 (ko) 사용자 정의 기반의 가상 네트워크 설정 방법
CN115412527A (zh) 虚拟私有网络之间单向通信的方法及通信装置
US20250310253A1 (en) Architecture for a network visibility system
CN116915585A (zh) 软件定义的广域网组网方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20773427

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020773427

Country of ref document: EP

Effective date: 20210618

NENP Non-entry into the national phase

Ref country code: DE