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?
touch
command in the file instead of theifconfig
command, that way you can verify if the command gets executed at all. Also verify if it makes a difference whether DAD is enabled or disabled.up touch /root/ipv6test
but the file doesn't exist after a reboot.up
work if you put in aninet
stanza rather than aninet6
stanza?up
andpost-up
are synonyms. May still be worth testing if using one or the other makes a difference.