Ubuntu/Debian and multiple IPv6 addresses

1 Comment 23 februari, 2011, 1:37

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 eth0

About the Author

Similar Posts

ufw and fail2ban

Because I use Ubuntu and yes it can use iptables, but ufw is a Ubuntu thing and I have UFW in my puppet setup, I

IPtables rules testing

Did you ever configure a firewall and locked yourself out? Try using these commands to test the iptables configuration for a few seconds and then

Comments (1)

Leave a comment




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

*

stgermain_monty@mailxu.com