Disabling IPv6 on *one* network interface in Debian
    Brandon Applegate 
    brandon at burn.net
       
    Fri Feb  4 07:02:37 CET 2011
    
    
  
On Thu, 3 Feb 2011, Frank Bulk wrote:
> I tried that, no luck.
> ===================================
> iface eth0.100 inet static
>       pre-up sysctl -w net.ipv6.conf.eth0/100.autoconf=0
>       pre-up sysctl -w net.ipv6.conf.eth0/100.accept_ra=0
>       address a.b.c.d
>       netmask 255.255.255.0
>       network a.b.c.0
> ===================================
>
> Results in
> 	error: "net.ipv6.conf.eth0.100.autoconf" is an unknown key
>
> Of course, once the interface is up, I can execute sysctl manually. To change the autoconf and accept_ra.
> 	root at nagios:/etc/network#  sysctl -w net.ipv6.conf.eth0/100.autoconf=0
> 	net.ipv6.conf.eth0/100.autoconf = 0
> 	root at nagios:/etc/network#  sysctl -w net.ipv6.conf.eth0/100.autoconf=0
> 	net.ipv6.conf.eth0/100.autoconf = 0
> 	root at nagios:/etc/network#
>
> Frank
I'm *thinking* it's a race condition.  Debian is going to create that 
interface on demand with vconfig.  So I think pre-up is trying to run and 
the interface isn't created yet.  This is messy, but what about:
post-up ifconfig eth0.100 down
post-up sysctl -w net.ipv6.conf.eth0/100.autoconf=0 
post-up sysctl -w net.ipv6.conf.eth0/100.accept_ra=0
post-up ifconfig eth0.100 up
    
    
More information about the ipv6-ops
mailing list