Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Why did you add the "label eth0:0"? Did you try to leave it out? And if you really need to use it, I think it should be placed before the "dev eth0". –  Dubu Jan 13 at 8:01

1 Answer 1

The alias eth0:0 interfaces are for IPv4, where traditionally multiple addresses per interface weren't allowed. (With the ip tool you can add multiple IPv4 and IPv6 addresses to an interface, but ifconfig will not show the extra IPv4 addresses, so using eth0:0 is still very common)

Change your config to:

up ip addr add 2607:f878:1:aec::d4bf:2d9d dev eth0
down ip addr del 2607:f878:1:aec::d4bf:2d9d dev eth0

and it should work.

share|improve this answer
    
It's common on Debian systems, anyway, where their horribly out of date wiki still recommends it. The rest of the Linux world has moved on to the new way of adding multiple IP addresses to interfaces. –  Michael Hampton Jan 7 at 17:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.