My ISP (Time Warner Cable) hands out IPv6 addresses with DHCPv6;
it will delegate a /56 if asked. So long as I keep refreshing the lease,
it won't renumber me. I have my cable modem set to bridge, and do all the
firewalling, NATing, etc., on a Debian box.
In what follows,
eth0 is the internal interface.
The dhclient that ships with debian/ubuntu does not support asking for a prefix delegation, so I had to build one from sources.
- Get the ISC dhcp source.
- Get patches.
- Build, and install the client as
/sbin/dhclient6if you don't want to do an actual
make install, which would probably also require to figure out how to apply the Debian packaging changes.
Next, change the stanza for your external interface (in my case,
/etc/network/interfaces to this:
iface eth1 inet dhcp up /sbin/dhclient6 -v -6 -P -Pl 56 -pf /run/dhclient6.eth1.pid -lf /var/lib/dhcp/dhclient6.eth1.leases eth1 down killall dhclient6 down service radvd stop
(there are many other ways to skin this particular cat, I opted for the one that involved the least amount of blood!)
Make sure the following
sysctl variables are set correctly:
net.ipv6.conf.eth1.accept_ra=2 net.ipv6.conf.all.disable_ipv6=0 net.ipv6.conf.all.forwarding=1
(you need the first one so you can get the LL address of the default route from your ISP; at least I do).
ifdown eth1; ifup eth1 should do the trick.
In my case, I'm asking for a /56, I allocate a /64 to each of my interfaces, vlans, etc. I'm only showing one interface here, of course.