2016-01-29
Linux dummy network interfaces can be very handy
The recent interruptions in the outside Internet connection made my wish to improve some things in the server at home so internal things keep running through an interruption. I have to request an IPv6 range for an interface to make wide-dhcpv6-client run, it won't run when I don't configure the interface to assign a /64 to, and my ISP will not route IPv6 when I don't use IPv6 prefix delegation to request the space which is static anyway. But I want the wired and wireless network to have fixed IPv6 ranges so things keep running even when the outside link has a hickup. Solution: request the IPv6 range for a dummy network interface and assign static IPv6 ranges to the ethernet interfaces. In /etc/network/interfaces:auto dumdh6 iface dumdh6 inet static pre-up ip link add name dumdh6 type dummy address 0.0.0.0And in /etc/wide-dhcpv6/dhcp6c.conf:interface ppp0 { send ia-pd 0; script "/etc/wide-dhcpv6/dhcp6c-script"; }; id-assoc pd { prefix-interface dumdh6 { sla-id 3; }; };And there is another dummynet interface to assign the fixed IP addresses to I use for hosting services. This means those services can start (and keep running) even when the link hickups and removes the IP address from the ppp interface. Earlier I did this on an unused vlan interface, but using dummynet feels more tidy.