At one of my servers I needed to use multiple IPv6 addresses, for https connections.
The problem however is that as stated in Ubuntu bug 617978, the normal way of setting up eth0 aliases does not work with IPv6.
If I would add a second IPv6 address the ‘traditional’ way, this would look like :
auto eth0:0 iface eth0:0 inet6 static address 2001:1AF8:4500:A004:1::A netmask 64 gateway 2001:1AF8:4500:A004::1
However, this will result in the following error:
SIOCSIFFLAGS: Cannot assign requested address Failed to bring up eth0:0.
There is a work arround however, I must admit, it’s an ugly one, but it does the trick.
auto eth0 iface eth0 inet6 static address 2001:1AF8:4500:A004:1::A netmask 64 gateway 2001:1AF8:4500:A004::1 post-up ip -f inet6 addr add 2001:1AF8:4500:A004:1::B dev eth0 pre-down ip -f inet6 addr del 2001:1AF8:4500:A004:1::B dev eth0 post-up ip -f inet6 addr add 2001:1AF8:4500:A004:1::C dev eth0 pre-down ip -f inet6 addr del 2001:1AF8:4500:A004:1::C dev eth0 post-up ip -f inet6 addr add 2001:1AF8:4500:A004:1::D dev eth0 pre-down ip -f inet6 addr del 2001:1AF8:4500:A004:1::D dev eth0trademarks


[...] – this one documented in Ubuntu, but I confirm it is also valid on my mongrel Debian system. Thanks to Ronny Roethof for pointing me in the right direction [...]