To avoid conflicting with the public IP such as Elastic IP address of the bound ECS instance, Global Acceleration establishes a connection using the public IP address of the Global Acceleration instance and the private IP address of the backend service.
Because the ECS instance in the VPC network only has one private network NIC with its own private IP address, it cannot receive packets sent from the Global Acceleration instance to the private IP address of the backend service. Backend service activation is intended to enable the ECS instance to receive packets from the Global Acceleration instance by adding a network sub-interface on the ECS instance.
The activation includes the following two steps:
Obtain the backend service IP address that the Global Acceleration instance allocates to the ECS instance.
For more information, see Obtain the backend service IP address.
Add a network interface on the ECS instance using the obtained IP address.
For more information, see Add a NIC subinterface.
You can obtain the allocated backend service IP address from the console or using the API:
Obtain from the console
Follow these steps to obtain the IP address:
Log on to the VPC console.
In the left-side navigation pane, click Global Acceleration.
Select the region of the target Global Acceleration instance and view the backend service IP address in the Backend Service Details column of the target instance.
Obtain by using API
You can call the
DescribeGlobalAccelerationInstancesAPI to view the backend service address. The returned value of the ServerIpAddress parameter is the backend service IP address.
The following is an example.
$ python api.py DescribeGlobalAccelerationInstances RegionId=ap-southeast-1
=====Request URL end======
====== Got Response ======
"Description": "My first GlobalAcceleration instance",
Instead of adding a new NIC (network interface card), you have to add a sub-interface onto the NIC of the ECS instance.
Configure a Linux ECS instance
The configuration varies by system versions. Take Ubuntu 16.04 64-bit as an example, follow these steps to add a sub-interface.
Run the following command to open the interface configuration file:
sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0:1
Add the following contents to the configuration file:
DEVICEis the interface name.
IPADDRis the backend service IP address.
Run the following command to enable the new sub-interface:
Configure a Windows ECS instance
Note: A sudden spikes in the network traffic will occur during the configuration.
Follow these steps to add a sub-interface:
Log on to the ECS instance and run the
ipconfigcommand to view the IP address of the instance.
Run the following command to create an Ethernet interface:
netsh interface ipv4 set address name=<EthernetAdapterName> source=static address=<backendServiceIPaddress> mask=<netmask> gateway=<defaultGateway>
netsh interface ipv4 set address name="local connection 4" source=static address=172.16.x.xxx mask=255.255.255.255
Run the following command to add a sub-interface:
netsh interface ipv4 add address <EthernetAdapterName> <backendServiceIPAddress> <netmask>
netsh interface ipv4 add address "local connection 4" 172.16.x.xxx 255.255.255.255