DHCP6C(8)

✨ dhcp6c β€” DHCPv6 client daemon ✨

okay bestie, gather round, because this is the DHCPv6 client daemon from the System Manager's Manual, section 8, and she is literally the one who goes and gets your IPv6 config for you. no cap. πŸ’…


πŸ¦‹ SYNOPSIS

dhcp6c [-c configfile] [-Ddfi] [-p pid-file] [-P profile] interface
       [interfaces...]

πŸ’– DESCRIPTION

so dhcp6c is out here working as a DHCPv6 client, and what she does is she gets info from DHCPv6 servers so she can configure the interface(s) you told her about. you can pass multiple interfaces separated by spaces or tabs, and in that case she'll be working on all of them simultaneously. multitasking queen πŸ‘‘

the command line options are:

  • -c configfile β€” use configfile as the configuration file, instead of the default one.
  • -d β€” print debugging messages. lil peek behind the curtain 🫣
  • -D β€” even MORE debugging info gets printed. she's giving verbose. she's giving unhinged. πŸ”₯
  • -f β€” foreground mode, which is super useful when you're debugging. normally dhcp6c prints warning / debugging / error messages to syslog(8), but if you pass this option she prints them to standard error instead.
  • -i β€” Info-req mode. in this mode, stateless DHCPv6 gets executed with the configuration below, and the info she gets is written to stdout. after that output, dhcp6c is terminated. (this suits a use in a shell-script and such, iykyk)
interface (interface given in the argument) {
       information-only;
       script (a script which displays the received information to stdout);
};

since that configuration is internally generated, you cannot provide a configuration in this mode. if you want different actions for the stateless DHCPv6 information, you should write an appropriate configuration and invoke dhcp6c without this option. periodt.

  • -p pid-file β€” use pid-file to dump the process ID of dhcp6c.
  • -P profile β€” use the given profile, defined in the dhcp6c configuration file, for interfaces that don't have a specific configuration of their own. the default-profile bestie πŸŽ€

the program will daemonize itself on invocation unless the -f or -i option is specified.

upon receipt of the SIGHUP or SIGTERM signals, dhcp6c will remove all stateful resources from the system. in the former case (that's SIGHUP) the daemon will then reinvoke itself, while in the latter case (that's SIGTERM) it will stop running. either way, dhcp6c will send DHCPv6 Release messages to release resources assigned from servers. she does NOT leave the group chat without saying goodbye 😭


🌸 FILES

  • /var/run/dhcp6c.pid β€” the default file that contains the pid of the currently running dhcp6c.
  • /etc/wide-dhcpv6/dhcp6c.conf β€” the default configuration file.
  • /var/lib/dhcpv6/dhcp6c_duid β€” the file to store the client's DUID.

🧚 Configuration Script

when dhcp6c receives a reply message, she'll invoke a supplementary configuration script specified in the dhcp6c.conf(5) file. the daemon will provide that script with configuration parameters as environment variables, and those include:

  • REASON β€” the reason why the script is invoked. as of this writing, the value is always "NBI" and thus meaningless. πŸ’€ (yes really. iconic of her.)
  • new_domain_name_servers β€” a list of available DNS servers, each of which is an IPv6 numeric address and is separated by a white space character.
  • new_domain_name β€” a list of DNS names, which provides the DNS name search path.
  • new_ntp_servers β€” a list of available NTP servers, each of which is an IPv6 numeric address and is separated by a white space character.
  • new_sip_servers β€” a list of available SIP server addresses, each of which is an IPv6 numeric address and is separated by a white space character.
  • new_sip_name β€” a list of SIP server domain names.
  • new_nis_servers β€” a list of available NIS server addresses, each of which is an IPv6 numeric address and is separated by a white space character.
  • new_nis_name β€” a list of NIS domain names.
  • new_nisp_servers β€” a list of available NIS+ server addresses, each of which is an IPv6 numeric address and is separated by a white space character.
  • new_nisp_name β€” a list of NIS+ domain names.
  • new_bcmcs_servers β€” a list of available BCMCS server addresses, each of which is an IPv6 numeric address and is separated by a white space character.
  • new_bcmcs_name β€” a list of BCMCS server domain names.
heads up bestie: the daemon does not always provide all the parameters. she sets an environment variable only when the corresponding configuration parameter is provided by the DHCPv6 server. so if a var is missing, it's not ghosting you, it just wasn't there 🌈

πŸ‘‘ SEE ALSO

daemon(3), dhcp6c.conf(5), dhcp6s(8)

Ralph Droms, Editor, Dynamic Host Configuration Protocol for IPv6 (DHCPv6), RFC 3315, 2003.


⭐ HISTORY

the dhcp6c command first appeared in the WIDE/KAME IPv6 protocol stack kit. a true legend from day one fr fr ✨


πŸ’€ BUGS

okay so we have to be honest here. dhcp6c is incomplete and she violates the DHCPv6 protocol spec in several aspects. in particular, temporary address assignment is intentionally omitted. not a bug, a choice, and she's standing by it πŸ™ˆ

also: the Information Refresh Time Option is not recognized in Info-req mode, since dhcp6c terminates after she receives a REPLY message. so yeah, that one just doesn't get read. noted. no notes. πŸ’…


KAME Β· Sep 12, 1999 β€” that's the source, the version and the date, and that's a wrap bestie, go configure some interfaces, ily, mwah πŸ«ΆπŸ’–πŸŽ€