My VPS server assigned 1 IPv4 and 2 IPv6 addresses but only one seems to work.
My interfaces config
auto eth0
iface eth0 inet static
address 184.82.222.136
gateway 184.82.222.1
netmask 255.255.255.0
iface eth0 inet6 static
up echo 0 > /proc/sys/net/ipv6/conf/all/autoconf
up echo 0 > /proc/sys/net/ipv6/conf/default/autoconf
netmask 64
gateway 2607:f878:0001:0aec:0000:0000:0000:0001
address 2607:f878:1:aec::218a:4537
auto eth0:0
iface eth0:0 inet6 static
up echo 0 > /proc/sys/net/ipv6/conf/all/autoconf
up echo 0 > /proc/sys/net/ipv6/conf/default/autoconf
netmask 64
address 2607:f878:1:aec::d4bf:2d9d
auto lo
iface lo inet loopback
and when I run /etc/init.d/networking stop && /etc/init.d/networking start I get
Deconfiguring network interfaces...done.
Configuring network interfaces...SIOCSIFFLAGS: Cannot assign requested address
Failed to bring up eth0:0.
done.
I read that my network card has something to do with it. Is it true? Do I need to talk to my VPS provider to manually assign the IP to this interface?
(Debian 6 with Xen.)
Update!
I tried new up and down technique and still not working.
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 184.82.222.136
gateway 184.82.222.1
netmask 255.255.255.0
iface eth0 inet6 static
up echo 0 > /proc/sys/net/ipv6/conf/all/autoconf
up echo 0 > /proc/sys/net/ipv6/conf/default/autoconf
netmask 64
gateway 2607:f878:0001:0aec:0000:0000:0000:0001
address 2607:f878:1:aec::218a:4537
up ip addr add 2607:f878:1:aec::d4bf:2d9d dev eth0 label eth0:0
down ip addr del 2607:f878:1:aec::d4bf:2d9d dev eth0 label eth0:0
auto lo
iface lo inet loopback
Still first IPv6 is working and the second one is not.
Best Answer
The alias
eth0:0
interfaces are for IPv4, where traditionally multiple addresses per interface weren't allowed. (With theip
tool you can add multiple IPv4 and IPv6 addresses to an interface, butifconfig
will not show the extra IPv4 addresses, so usingeth0:0
is still very common)Change your config to:
and it should work.