ignore ipv6 router advertisements for static addresses with bonded interfaces
Posted
by
boran
on Super User
See other posts from Super User
or by boran
Published on 2012-09-05T09:40:30Z
Indexed on
2012/11/21
5:05 UTC
Read the original article
Hit count: 386
I need to attribute static IPv6 addresses (not use autoconfigured addresses, and ignore router advertisements). This can be done as follows for a standard interface like eth0
iface eth0 inet6 static
address myprefix:mysubnet::myip
gateway myprefix:mysubnet::mygatewayip
netmask 64
pre-up /sbin/sysctl -q -w net.ipv6.conf.$IFACE.autoconf=0
pre-up /sbin/sysctl -q -w net.ipv6.conf.$IFACE.accept_ra=0
However, how can this be done for bonded interfaces? using the "all" interface does not work.
Systems is Ubuntu 10.04, 2.6.24-24-server.
If one uses the above sysctl command for the bond0, the networking hangs on boot, because /proc/sys/net/ipv6/conf/bond0 does not yet exist and cannot be written to.
One the system has booted /proc/sys/net/ipv6/conf/bond0 exist, so one solution after booting is to add the following to /etc/rc.local:
/sbin/sysctl -q -w net.ipv6.conf.bond0.autoconf=0
/sbin/sysctl -q -w net.ipv6.conf.bond0.accept_ra=0
/etc/init.d/networking restart
and this has the desired effect, the autoconfig v6 address disappears. Seems like a bit of a hack though, are there better solutions?
© Super User or respective owner