Services and tunnels
udhcpc6
Asks a DHCPv6 server for an address (stateful) or only for settings such as DNS servers (stateless).
A DHCPv6 client talks to ff02::1:2 from its link-local address, on UDP 546 to 547. Stateful: Solicit,
Advertise, Request, Reply, and the device holds a leased /128. Stateless (-l): one Information-request and
its Reply, settings only, the address staying with SLAAC. Which one a device uses is the router advertisement's M and
O flags. DHCPv6 never gives a default route: that comes from the advertisement.
udhcpc6 command usage
udhcpc6 -i CARD [-l] [-n] [-q] [-s SCRIPT]
Options
-
-i eth0 - the card to ask on
-
-l - stateless: an Information-request for settings, no address
-
-n -q - give up if nobody answers; exit once answered
-
-s /etc/udhcpc6.script - the script that is handed the answer (prints it and installs the address)
udhcpc6 examples
-
udhcpc6 -i eth0 -l -q -n -s /etc/udhcpc6.script - Asks for DNS servers and the search domain only.
-
udhcpc6 -i eth0 -q -n -s /etc/udhcpc6.script - Leases an address from the server's pool and installs it as a /128.
Pitfalls
- A device asks DHCPv6 only when the advertisement's M or O flag says so; with both off the server is never asked.