All Products
Search
Document Center

Simple Application Server:Multiple-IP instance family

Last Updated:Apr 01, 2026

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

ConstraintDetails
Supported imagesOnly Ubuntu 24.04, CentOS 7.6, Alibaba Cloud Linux 3, and custom images created from these images support the multiple-IP instance family
System resetYou cannot reset the system of a multiple-IP instance using a custom image
Peak bandwidth200 Mbps, shared across all static public IP addresses
2 IPv4 Addresses100 Mbps per IP address
3 IPv4 Addresses67 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: 2

Three 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: 2

CentOS 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=yes

eth1 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=no

Three 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=no

The 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 mask

Modify 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.

  1. Connect to the multiple-IP server. For more information, see Connect to a Linux server.

  2. Run the following commands to view the current private IP addresses, subnet masks, and default gateway.

    • eth0: private IP 172.26.32.207, subnet mask 255.255.192.0, gateway 172.26.63.253

    • eth1: private IP 172.26.32.208, subnet mask 255.255.192.0, gateway 172.26.63.253

    ifconfig
    route -n

    The output is similar to the following. Note the current assignments:

    image

  3. Open the network configuration file.

    sudo vim /etc/netplan/50-cloud-init.yaml
  4. Press i to enter edit mode. Update the configuration to swap the IP addresses between eth0 and eth1. The key change is in the addresses field of each NIC: disable DHCP on both NICs, assign eth1's original IP to eth0, assign eth0's original IP to eth1, and move the routes block to eth1.

    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: 2
  5. Press Esc, type :wq, and press Enter to save and exit.

  6. Apply the configuration.

    sudo netplan apply
  7. Verify the new configuration.

    ifconfig

    The output is similar to the following, confirming that the private IP addresses of eth0 and eth1 have been swapped.

    image

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 eth0 IP address: both inbound and outbound traffic passes through eth0.

  • Traffic for the eth1 IP address: both inbound and outbound traffic passes through eth1.

Verify the routing configuration

The following example shows how to verify the routing configuration on an Ubuntu 24.04 instance with two IP addresses.

  1. 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.

    image

  2. 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

  1. Connect to the multiple-IP server. For more information, see Connect to a Linux server.

  2. Run the following command to capture ICMP packets on eth0.

    tcpdump -i eth0 icmp
  3. On a local machine with internet access, ping the public IP address that corresponds to eth0.

    ping 39.XX.XX.103
  4. In 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 from eth0, confirming that both inbound and outbound traffic for the eth0 IP address passes through eth0.

    image

Verify traffic on eth1

  1. Connect to the multiple-IP server. For more information, see Connect to a Linux server.

  2. Run the following command to capture ICMP packets on eth1.

    tcpdump -i eth1 icmp
  3. On a local machine with internet access, ping the public IP address that corresponds to eth1.

    ping 47.XX.XX.135
  4. In 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 from eth1, confirming that both inbound and outbound traffic for the eth1 IP address passes through eth1.

    image