Debian Multiple IPv6 Interfaces

I have been trying to figure out how to set up multiple IPv6 interfaces properly the “Debian” way but it seems like something is a bit broken now. Lets say I have two interfaces: eth0 and eth1. eth0 is on vlan 100 and eth1 on vlan 200. I would expect this to work in /etc/network/interfaces:

# VLAN 100
auto eth0
iface eth0 inet static
  address 192.168.1.1
  netmask 255.255.255.0
  gateway 192.168.1.254
iface eth0 inet6 static
  address 2a00:ffff:1::2
  netmask 64
  gateway 2a00:ffff:1::1

# VLAN 200
auto eth1
iface eth1 inet static
  address 192.168.2.1
  netmask 255.255.255.0
iface eth1 inet6 static
  address 2a00:ffff:2::1
  netmask 64

It just does not seem to work – on reboot only eth0 will come up and eth1 will only have an IPv4 address.

The only way I have managed to get it to work so far is by using a post-up/pre-down script. I have also had to set the script on eth0 and not on eth1, so the configuration would actually look like:

# VLAN 100
auto eth0
iface eth0 inet static
  address 192.168.1.1
  netmask 255.255.255.0
  gateway 192.168.1.254
iface eth0 inet6 static
  address 2a00:ffff:1::2
  netmask 64
  gateway 2a00:ffff:1::1
  post-up ip addr add 2a00:ffff:2::1/64 dev eth1
  pre-down ip addr del 2a00:ffff:2::1/64 dev eth1

# VLAN 200
auto eth1
iface eth1 inet static
  address 192.168.2.1
  netmask 255.255.255.0

I will update this post if I find a neater way or if this issue is resolved in later updates.

Posted in Linux and tagged , , .

One Comment

Leave a Reply

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