I'm trying to add a secondary IPv6 address to eth0
on Debian Sid.
I added the following lines to /etc/network/interfaces
:
iface eth0 inet6 static
address [IPv6 address #1]
netmask 64
gateway [IPv6 gateway]
pre-up echo 0 > /proc/sys/net/ipv6/conf/eth0/autoconf
up /sbin/ifconfig eth0 inet6 add [IPv6 address #2]/64
After a reboot there is only one IPv6 address assigned to eth0
. However, if I simply execute the command (/sbin/ifconfig eth0 inet6 add [IPv6 address #2]/64
) manually, I have 2 IPv6 addresses assigned to eth0
, just like I want.
It looks like the up
command is just not executed at all. Has this been changed? I do have a /etc/network/if-up.d
directory, but I read that those scripts may be run more than once.
How can I make up
work or add a second IPv6 address on Debian Sid?
Best Answer
Not a direct answer to why
up
doesn't work, but maybe a solution for your problem:I usually use the same configuration style for multiple IPv4 and IPv6 addresses for consistency. This is the configuration of one of my servers:
The IPv6 addresses show up on
eth0
not oneth0:0
andeth0:1
when seen throughifconfig
:I don't know why your configuration doesn't work, but maybe doing it this way will work for you...