I'm setting up my Debian router. Depending on where I put my router, I need to use either SLAAC or DHCPv6 to get an IPv6 Address (and I need them both because I am not sure whether I'll need to use DHCPv6 or SLAAC before I actually get there).
At first I wrote this in /etc/network/interfaces
iface eth0 inet6 auto
accept_ra 2
but this seems to only work with SLAAC. Then I changed to
iface eth0 inet6 dhcp
accept_ra 2
pre-down dhclient -6 -r eth0
but SLAAC is not working.
I wonder if there is a way (or maybe a script or something) to let Linux automatically determine whether to use SLAAC or to use DHCPv6?
I guess I can write a script to run dhclient -6 eth0 and try to configure SLAAC if no address is acquired via DHCPv6, but I think there must be a more elegant way.
I found autoconf 1 in interfaces' manual page, but it doesn't seem to work (it can be a misconfiguration).
autoconf int
Perform stateless autoconfiguration (0=off, 1=on)
To take a step further, is there a way to tell Linux to prefer DHCPv6 to SLAAC other than writing a script?