Debian IPv6 Without Autoconf

You can’t disable autoconf in sysctl.conf because the ipv6 module hasn’t loaded yet, and the ipv6 module loads after /etc/network/interfaces is parsed (thus ignoring your inet6 static section), so here’s how to do static IPv6 addressing with Debian:

iface eth0 inet6 static
    address 2001:0DB8:107:400::a
    netmask 64
    pre-up modprobe ipv6
    pre-up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/autoconf

The gateway will be picked up by listening for router advertisements, as this simply disables the autoconf address. This is ideal for servers.

Debian 6.0 “squeeze”

The IPv6 module no longer exists since it’s now built in (like IPv4), so just omit the modprobe line as such:

iface eth0 inet6 static
    address 2001:0DB8:107:400::a
    netmask 64
    pre-up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/autoconf

One Comment

  1. […] Ein Howto wie man Autoconf deaktiviert findet sich z.B. hier. […]