Tests and setups with DHCP and SLAAC.
DHCP is widely used for IPv4 (and quite simple) but DHCPv6 is more complicated, so this ovl focuses most on that.
Keywords: SLAAC
These are downloaded or built locally. They are required to build the ovl. Test with;
./tar - | tar t
Udhcp is included (and maintained by)
BusyBox
, so it's included in xcluster
by default. Udhcp
does not
have server support for IPv6 but a client (udhcpc6) exists.
The udhcp clients makes call-outs to a script where you as a used must set (or remove/update) addresses.
./dhcp.sh test udhcp > $log
The ISC DHCP has a server with DHCPv6 support.
./dhcp.sh isc_build
./dhcp.sh isc_man
There is no option in DHCPv6 to pass prefix length (corresponding to "mask" in IPv4). To use an environment variable is proposed as a work-around.
./dhcp.sh test --mask=120 basic > $log
./dhcp.sh test --mask=64 basic > $log
The newer DHCP implementation Kea is not currently used.
For IPv6 radvd is used to send Router Advertisement (RA) messages.
./dhcp.sh radvd_build
./dhcp.sh radvd_man
RA messages are used to generate addresses with SLAAC.
./dhcp.sh test radvd > $log
Even if DHCPv6 is used (instead of SLAAC) RAs are still needed.
Some fields that are included in DHCP for IPv4 are supposed to be provided by RA for DHCPv6, for instance the prefix length ("mask" for IPv4).
I haven't yet figured out how this is supposed to work, but the
udhcpc6
might not be up to the task.
./dhcp.sh test dhcpv6 > $log
The address is still /128.
If the bridge CNI-plugin is used to add interfaces in PODs and the bridge enslaves an interface that receives RAs then the POD interfases will get SLAAC addresses.
./dhcp.sh test --no-stop cni_bridge > $log