When you host multiple websites or applications on a single server, sharing one public IP address creates security and isolation risks. A multiple-IP instance assigns a dedicated public IP address to each website or application, so traffic for different services never mingles at the network boundary. This improves network performance and security, and is useful for game acceleration and account security on e-commerce, gaming, and short video platforms.
This topic covers the limits, default network and routing configurations, and how to modify these configurations.
Limits
| Constraint | Details |
|---|---|
| Supported images | Only Ubuntu 24.04, CentOS 7.6, Alibaba Cloud Linux 3, and custom images created from these images support the multiple-IP instance family |
| System reset | You cannot reset the system of a multiple-IP instance using a custom image |
| Peak bandwidth | 200 Mbps, shared across all static public IP addresses |
| 2 IPv4 Addresses | 100 Mbps per IP address |
| 3 IPv4 Addresses | 67 Mbps per IP address |
Network configuration
Default network configuration
By default, a multiple-IP instance has two network interface cards (NICs): eth0 and eth1. Each NIC maps to a dedicated public IP address.
The following sections show the default configuration files for each supported operating system.
Ubuntu 24.04
The default network configuration file is /etc/netplan/50-cloud-init.yaml.
Two IP addresses
Both NICs use DHCP. eth0 has a lower route-metric (100) and serves as the primary interface.
network:
ethernets:
eth0:
dhcp4: true
dhcp4-overrides:
route-metric: 100
dhcp6: false
match:
macaddress: 00:16:3e:08:XX:XX #MAC address of eth0
set-name: eth0
eth1:
dhcp4: true
dhcp4-overrides:
route-metric: 200
dhcp6: false
match:
macaddress: 00:16:3e:08:XX:XX #MAC address of eth1
set-name: eth1
version: 2Three IP addresses
eth0 uses DHCP. eth1 is assigned two static private IP addresses with a manually configured default gateway.
network:
ethernets:
eth0:
dhcp4: true
dhcp6: false
match:
macaddress: 00:16:3e:09:XX:XX #MAC address of eth0
set-name: eth0
dhcp4-overrides:
route-metric: 100
eth1:
dhcp4: false
dhcp4-overrides:
route-metric: 200
dhcp6: false
match:
macaddress: 00:16:3e:09:XX:XX #MAC address of eth1
set-name: eth1
addresses:
- 172.26.32.200/18 #Private IP 1 on eth1
- 172.26.32.201/18 #Private IP 2 on eth1
routes:
- to: default
via: 172.26.63.253 #Default gateway
version: 2CentOS 7.6 and Alibaba Cloud Linux 3
Two IP addresses
eth0 is configured in /etc/sysconfig/network-scripts/ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yeseth1 is configured in /etc/sysconfig/network-scripts/ifcfg-eth1. The DEFROUTE=no setting prevents eth1 from overriding the default route:
DEVICE=eth1
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
HWADDR=00:16:3e:09:XX:XX #MAC address
DEFROUTE=noThree IP addresses
eth0 uses the same configuration as in the two-IP case.
eth1 is configured in /etc/sysconfig/network-scripts/ifcfg-eth1:
DEVICE=eth1
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
HWADDR=00:16:3e:09:XX:XX #MAC address
DEFROUTE=noThe second private IP on eth1 is configured as a virtual interface in /etc/sysconfig/network-scripts/ifcfg-eth1:1:
DEVICE=eth1:1
TYPE=Ethernet
BOOTPROTO=static
ONBOOT=yes
IPADDR=172.26.32.206 #Private IP address
NETMASK=255.255.192.0 #Subnet maskModify the network configuration
If the default configuration does not meet your requirements, edit the network configuration file. The following example shows how to swap the private IP addresses of eth0 and eth1 on an Ubuntu 24.04 instance with two IP addresses.
Connect to the multiple-IP server. For more information, see Connect to a Linux server.
Run the following commands to view the current private IP addresses, subnet masks, and default gateway.
eth0: private IP172.26.32.207, subnet mask255.255.192.0, gateway172.26.63.253eth1: private IP172.26.32.208, subnet mask255.255.192.0, gateway172.26.63.253
ifconfig route -nThe output is similar to the following. Note the current assignments:

Open the network configuration file.
sudo vim /etc/netplan/50-cloud-init.yamlPress
ito enter edit mode. Update the configuration to swap the IP addresses betweeneth0andeth1. The key change is in theaddressesfield of each NIC: disable DHCP on both NICs, assigneth1's original IP toeth0, assigneth0's original IP toeth1, and move theroutesblock toeth1.network: ethernets: eth0: dhcp4: false #Disable DHCP dhcp4-overrides: route-metric: 100 dhcp6: false match: macaddress: 00:16:3e:08:XX:XX set-name: eth0 addresses: - 172.26.32.208/18 #Change to the original private IP of eth1 eth1: dhcp4: false #Disable DHCP dhcp4-overrides: route-metric: 200 dhcp6: false match: macaddress: 00:16:3e:08:XX:XX set-name: eth1 addresses: - 172.26.32.207/18 #Change to the original private IP of eth0 routes: - to: default via: 172.26.63.253 #Configure the gateway on eth1 version: 2Press
Esc, type:wq, and pressEnterto save and exit.Apply the configuration.
sudo netplan applyVerify the new configuration.
ifconfigThe output is similar to the following, confirming that the private IP addresses of
eth0andeth1have been swapped.
Routing configuration
Default routing configuration
Multiple-IP instances use per-NIC routing rules to ensure traffic enters and exits through the correct public IP address:
Traffic for the
eth0IP address: both inbound and outbound traffic passes througheth0.Traffic for the
eth1IP address: both inbound and outbound traffic passes througheth1.
Verify the routing configuration
The following example shows how to verify the routing configuration on an Ubuntu 24.04 instance with two IP addresses.
On the instance card, click the instance ID to go to the Server Overview page. Note the public IP address that corresponds to each private IP address.

Verify that inbound and outbound traffic for each NIC passes through the correct interface by monitoring Internet Control Message Protocol (ICMP) packets.
Verify traffic on eth0
Connect to the multiple-IP server. For more information, see Connect to a Linux server.
Run the following command to capture ICMP packets on
eth0.tcpdump -i eth0 icmpOn a local machine with internet access, ping the public IP address that corresponds to
eth0.ping 39.XX.XX.103In the server's command line window, view the captured packet information. The output is similar to the following. The packet enters through
eth0, and the reply is also sent frometh0, confirming that both inbound and outbound traffic for theeth0IP address passes througheth0.
Verify traffic on eth1
Connect to the multiple-IP server. For more information, see Connect to a Linux server.
Run the following command to capture ICMP packets on
eth1.tcpdump -i eth1 icmpOn a local machine with internet access, ping the public IP address that corresponds to
eth1.ping 47.XX.XX.135In the server's command line window, view the captured packet information. The output is similar to the following. The packet enters through
eth1, and the reply is also sent frometh1, confirming that both inbound and outbound traffic for theeth1IP address passes througheth1.