Multiple IPv6 addresses per interface Debian / Ubuntu

To set multiple IPv6 addresses on one interface in Linux, you can use the tool ip.

ip addr add first_ipv6_address dev eth1
ip addr add second_ipv6_address dev eth1

When you like to set this on the system boot, you must do this in /etc/network/interfaces

auto eth0
iface eth0 inet6 static
address first_ipv6_address Adress
netmask 128
gateway ipv6_gateway
up ip addr add second_ipv6_address/128 dev eth1
down ip addr del second_ipv6_address/128 dev eth1

One thought on “Multiple IPv6 addresses per interface Debian / Ubuntu”

  1. If you want to add multiple IPv6 address, you can also create multiple secondary interfaces, as in this example:

    auto eth0:1
    iface eth0:1 inet6 static
    address second_ipv6_address
    netmask 128

    auto eth0:2
    iface eth0:2 inet6 static
    address second_ipv6_address
    netmask 128

    This has been tested on a LXC container (IPv6 addresses are also pingable from the outside). I cannot guarantee it to work on physical servers too.

Leave a Reply

Your email address will not be published. Required fields are marked *