DHCP6C.CONF(5)
π DHCP6C.CONF(5) π
okay bestie, gather round β this is the manual page for the DHCPv6 client configuration file, part of the File Formats Manual. Yes, it's DHCP6C.CONF(5), and yes, we're gonna make it make sense. π«Ά
β¨ NAME β¨
dhcp6c.conf β the DHCPv6 client configuration file, aka the vibe sheet your DHCPv6 client reads to know what it's supposed to be doing. π¦
π SYNOPSIS π
/etc/wide-dhcpv6/dhcp6c.conf
That's it. That's the whole synopsis. Slay. π
πΈ DESCRIPTION πΈ
So dhcp6c.conf holds all the config info for KAME's DHCPv6 client, dhcp6c. Here's the whole grammar vibe, no cap:
- The file is a sequence of statements, and every statement gets terminated by a semi-colon (
`;`). Periodt. π - Statements are built out of tokens separated by white space β and "white space" means any combo of blanks, tabs and newlines. Mix and match, she doesn't care. β¨
- Sometimes a whole set of statements gets wrapped in a pair of brackets, and the whole bracket blob counts as one single token. Iconic, honestly.
- Any line that starts with
`#`is a comment. Talk your talk, the parser isn't listening. π¬
π¦ Interface specification π¦
Some statements may specify an interface, and some have to. Rude but fair.
Interfaces get written in the form of "name unit", like fxp0 and gif1. So name, then space, then unit number. That's the whole format. π
π DHCPv6 options π
Some config statements take a description of a DHCPv6 option as an argument. Here's every option format and what it means, in order, no skipping:
domain-name-serversβ means a Domain Name Server option. πdomain-nameβ means a domain name option. π·οΈntp-serversβ means an NTP server option. β οΈ Heads up: as of this writing, the option type for this one is not officially assigned, anddhcp6cwill reject this option unless it's been explicitly built to accept it. So don't just assume it works, bestie.sip-server-addressβ means a SIP Server address option. πsip-server-domain-nameβ means a SIP server domain name option. πnis-server-addressβ means a NIS Server address option. ποΈnis-domain-nameβ means a NIS domain name option. ποΈnisp-server-addressβ means a NIS+ Server address option. ποΈnisp-domain-nameβ means a NIS+ domain name option. ποΈbcmcs-server-addressβ means a BCMCS Server address option. π‘bcmcs-server-domain-nameβ means a BCMCS server domain name option. π‘ia-pd IDβ means an IA_PD (Identity Association for Prefix Delegation) option.IDis a decimal number of the IAID β more on identity associations below, keep reading. π«Άia-na IDβ means an IA_PD (Identity Association for Non-temporary Addresses) option.IDis a decimal number of the IAID β again, see below about identity associations. π«Ά
ngl the page literally saysIA_PDright there in theia-naentry. I'm just the messenger, bestie. π Reproducing faithfully, that's the job.
rapid-commitβ means a rapid-commit option. β‘authentication authnameβ means an authentication option.authnameis a string specifying parameters of the authentication protocol. And real talk: anauthenticationstatement forauthnamemust be provided. No authname statement, no deal. π
π Interface statement π
An interface statement is where you specify configuration parameters on the interface. Generic format goes like this:
interface interface { substatements };
Now here's every possible substatement you can put inside an interface statement. π
send send-options ;
This one specifies the DHCPv6 options to be sent to the server(s). π€
Some options can only appear in particular messages per the spec, and in that case the appearance of those options is limited so it stays compliant with the spec. Rules are rules.
send-options is a comma-separated list of options, and each one should be specified the way described above. You can also stack multiple send statements, and in that case all the specified options get sent. More is more. β¨
- When
rapid-commitis specified,dhcp6cwill include a rapid-commit option in solicit messages and wait for an immediate reply instead of advertisements. No small talk, just business. β‘ - When
ia-pdis specified,dhcp6cwill initiate prefix delegation as a requesting router by including an IA_PD option with the specifiedIDin solicit messages. π - When
ia-nais specified,dhcp6cwill initiate stateful address assignment by including an IA_NA option with the specifiedIDin solicit messages. π
In either case, a corresponding identity association statement must exist with the same ID. This is not optional, bestie. It's giving "they have to match or nothing works". π
request request-options;
This statement specifies the DHCPv6 options to be included in an option-request option. πβοΈ
request-options is a comma-separated list of options, and it can consist of these:
domain-name-serversβ requests a list of Domain Name Server addresses. πdomain-nameβ requests a DNS search path. πntp-serversβ requests a list of NTP server addresses. β οΈ As of this writing, the option type for this one is not officially assigned, anddhcp6cwill reject this option unless it's explicitly built to accept it.sip-server-addressβ requests a list of SIP server addresses. πsip-domain-nameβ requests a SIP server domain name. πnis-server-addressβ requests a list of NIS server addresses. ποΈnis-domain-nameβ requests a NIS domain name. ποΈnisp-server-addressβ requests a list of NIS+ server addresses. ποΈnisp-domain-nameβ requests a NIS+ domain name. ποΈbcmcs-server-addressβ requests a list of BCMCS server addresses. π‘bcmcs-domain-nameβ requests a BCMCS domain name. π‘refreshtimeβ means an information refresh time option. π This one can only be specified when sent withinformation-requestmessages;dhcp6cwill ignore this option for other messages. Don't try it, she's not gonna read it.
You can also stack multiple request statements, and in that case all the specified options will be requested. π₯
information-only;
This statement tells dhcp6c to only exchange informational configuration parameters with servers. A list of DNS server addresses is a classic example of such parameters. π
This one is a lifesaver when the client doesn't need stateful configuration parameters like IPv6 addresses or prefixes. Just vibes and info, no commitments. π§
script "script-name";
This statement specifies a path to a script invoked by dhcp6c on a certain condition β including when the daemon receives a reply message. π
script-name has requirements, and they are not negotiable:
- it must be the absolute path from root to the script file, π£οΈ
- it must be a regular file, π
- and it must be created by the same owner who runs the daemon. π€
Get any of those wrong and it's not happening. The daemon said what it said. π
π Profile statement π
Some setups need to configure an interface independently from its name. That's literally what profiles are for. π
Profiles follow the same syntax as an interface statement β the only glow-up is that they can be arbitrarily named. Then you get to choose which profile to use for a given interface on the command line. Main character energy, honestly. β¨
π Identity association statement π
Identity association (IA) is a key notion of DHCPv6 β like, the whole concept, okay. Here's the tea:
- An IA is uniquely identified in a client by a pair of IA type and IA identifier (IAID). π
- An IA is associated with configuration information dependent on the IA type. So the type decides what config comes along with it.
An identity association statement defines a single IA with some client-side configuration parameters. Format:
id-assoc type [ID] { substatements };
Breakdown time, bestie:
typeis a string for the type of this IA. The current implementation supportsβnaβ(non-temporary address allocation) andβpdβ(prefix delegation) for the IA type. π«IDis a decimal number of the IAID. And if you omit it, the value0will be used by default. Sneaky little default, but there it is.substatementsis a sequence of statements that specifies configuration parameters for this IA. Each statement may or may not be specific to the type of IA β depends on the statement.
π substatements for an IA of type na
address ipv6-address pltime [vltime];β specifies an address and related parameters that the client wants to be allocated. You can specify multiple addresses, each one written as its own separateaddresssubstatement.dhcp6cwill include all the addresses (and related parameters) in Solicit messages, as an IA_NA prefix option encapsulated in the corresponding IA_NA option. π
BUT β and this is the important part β the server may or may not respect the specified prefix parameters. You asked, it decides. That's the deal. π
For parameters of the address substatement, go look at dhcp6s.conf(5). π
π substatements for an IA of type pd
prefix_interface_statementβ specifies the client's local configuration of how delegated prefixes should be used (see below). π§©prefix ipv6-prefix pltime [vltime];β specifies a prefix and related parameters that the client wants to be delegated. You can specify multiple prefixes, each one written as its own separateprefixsubstatement.dhcp6cwill include all the prefixes (and related parameters) in Solicit messages, as an IA_PD prefix option encapsulated in the corresponding IA_PD option. π
Same warning as above, fr fr: the server may or may not respect the specified prefix parameters. She heard you, she just might not agree. π
For parameters of the prefix substatement, see dhcp6s.conf(5). π
β¨ Prefix interface statement β¨
Okay so a prefix interface statement is the one that tells dhcp6c how to build the prefixes on your local interfaces out of the delegated prefixes it got handed π It specifies configuration parameters of prefixes on local interfaces that are derived from delegated prefixes.
Heads up bestie: this one is only allowed to show up as a substatement of an identity association statement with the type pd. Nowhere else. It's giving exclusive.
The generic format is literally:
prefix-interface interface { substatements };
When an IPv6 prefix is delegated from a DHCPv6 server, dhcp6c will assign a prefix on the interface unless the interface receives the DHCPv6 message that contains the prefix with the delegated prefix and the parameters provided in substatements.
The possible substatements, bestie, are these:
sla-id ID ;β sets the identifier value of the site-level aggregator (SLA) on the interface.IDmust be a decimal integer which fits in the length of SLA IDs (see below, iykyk). So like, ifIDis1and the client is delegated an IPv6 prefix2001:db8:ffff::/48,dhcp6cwill combine the two values into a single IPv6 prefix,2001:db8:ffff:1::/64, and will configure the prefix on the specified interface. Math but make it slay β¨sla-len length ;β sets the length of the SLA ID in bits.lengthmust be a decimal number between0and128. If the length is not specified by this statement, the default value16will be used.ifid ID ;β sets the interface id.IDmust be a decimal integer. It will be combined with the delegated prefix and thesla-idto form a complete interface address. The default is to use the EUI-64 address of the interface.ifid-random;β tells the client to generate a completely random interface id. This will override theifidstatement, if present. The resulting random interface id will be combined with the delegated prefix and thesla-idto form a complete interface address. Chaos, but organized π
π Authentication statement
An authentication statement defines a set of authentication parameters used in DHCPv6 exchanges with the server(s). The format is:
authentication authname { substatements };
So authname is a string which is unique among all authentication statements in the configuration file. It will specify a particular set of authentication parameters when authentication option is specified in the interface statement.
The possible substatements of the authentication statement are as follows:
protocol authprotocol ;β specifies the authentication protocol. Currently, the only available protocol asauthprotocolisdelayed, which means the DHCPv6 delayed authentication protocol. That's it, that's the whole menu πalgorithm authalgorithm ;β specifies the algorithm for this authentication. Currently, the only available algorithm isHMAC-MD5, which can be specified as one of the followings:hmac-md5,HMAC-MD5,hmacmd5, orHMACMD5. This substatement can be omitted. In this case,HMAC-MD5will be used as the algorithm.rdm replay-detection-method ;β specifies the replay protection method for this authentication. Currently, the only available method ismonocounter, which means the use of a monotonically increasing counter. If this method is specified,dhcp6cwill use an NTP-format timestamp when it authenticates the message. This substatement can be omitted, in which casemonocounterwill be used as the method.
ποΈ Keyinfo statement
A keyinfo statement defines a secret key shared with the server(s) to authenticate DHCPv6 messages. Format goes:
keyinfo keyname { substatements };
keyname is an arbitrary string. It does not affect client's behavior but is provided for readability of log messages. So it's purely for the vibes of your logs, no cap π«Ά
The possible substatements of the keyinfo statement are as follows:
realm "realmname" ;β specifies the DHCP realm.realmnameis an arbitrary string, but is typically expected to be a domain name like"kame.net".keyid ID ;β specifies the key identifier,ID, as a decimal number. A secret key is uniquely identified within the client by the DHCP realm and the key identifier.secret "secret-value" ;β specifies the shared secret of this key."secret-value"is a base-64 encoded string of the secret. Keep it safe bestie, it's giving classified πexpire "expiration-time" ;β specifies the expiration time of this key."expiration-time"should be formatted in one of the followings:yyyy-mm-dd HH:MM,mm-dd HH:MM, orHH:MM, whereyyyyis the year with century (e.g.,2004),mmis the month,ddis the day of the month,HHis the hour of 24-hour clock, andMMis the minute, each of which is given as a decimal number. Additionally, a special keywordforevercan be specified asexpiration-time, which means the key has an infinite lifetime and never expires. This substatement can be omitted, in which caseforeverwill be used by default. Immortal key behavior β¨
π Examples
The followings are a sample configuration to be delegated an IPv6 prefix from an upstream service provider. With this configuration dhcp6c will send solicit messages containing an IA_PD option, with an IAID 0, on to an upstream PPP link, ppp0. After receiving some prefixes from a server, dhcp6c will then configure derived IPv6 prefixes with the SLA ID 1 on a local ethernet interface, ne0. Note that the IAID for the id-assoc statement is 0 according to the default.
interface ppp0 {
send ia-pd 0;
};
id-assoc pd {
prefix-interface ne0 {
sla-id 1;
};
};
If a shared secret should be configured in both the client and the server for DHCPv6 authentication, it would be specified in the configuration file as follows:
keyinfo kame-key {
realm "kame.net";
keyid 1;
secret "5pvW2g48OHPvkYMJSw0vZA==";
};
One easy way of generating a new secret in the base64 format is to execute the openssl(1) command (when available) as follows,
% openssl rand -base64 16
and copy the output to the dhcp6c.conf file. Cheat code but legal π
To include an authentication option for DHCPv6 authentication, the interface statement should be modified and an authentication statement should be added as follows:
interface ppp0 {
send ia-pd 0;
send authentication kame;
};
authentication kame {
protocol delayed;
};
interface fxp0 {
send ia-na 0;
};
π SEE ALSO
π HISTORY
The dhcp6c.conf configuration file first appeared in the WIDE/KAME IPv6 protocol stack kit. Ancient lore fr fr π§
And that's a wrap on this absolute unit of a man page π It's from the KAME crew, dated July 29, 2004, and it lives at DHCP6C.CONF(5) β go configure something iconic, bestie, you got this π«Άβ¨π
π¦ where this page comes from
- debian bookworm: wide-dhcpv6-client 20080615-23 Β· BSD-3-Clause
- epel 10: wide-dhcpv6 20080615-23.3.el10_1.7 Β· LicenseRef-Callaway-BSD AND GPL-2.0-or-later
- epel 9: wide-dhcpv6 20080615-23.3.el9 Β· BSD and GPLv2+
- fedora 43: wide-dhcpv6 20080615-23.3.fc43.8 Β· LicenseRef-Callaway-BSD AND GPL-2.0-or-later
- fedora 44: wide-dhcpv6 20080615-23.3.fc44.9 Β· LicenseRef-Callaway-BSD AND GPL-2.0-or-later
- ubuntu jammy: wide-dhcpv6-client 20080615-23build1 Β· BSD-3-Clause
- ubuntu noble: wide-dhcpv6-client 20080615-23build1 Β· BSD-3-Clause
- Copyright (C) 2002 WIDE Project
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms