DHCPCD.CONF(5)

๐Ÿ’– NAME ๐Ÿ’–

okay bestie, this is the DHCPCD.CONF(5) page from the File Formats Manual, and it's literally all about dhcpcd.conf โ€” the dhcpcd configuration file. periodt. ๐Ÿ’…


โœจ DESCRIPTION โœจ

so like, yeah, dhcpcd can do everything from the command line, but sometimes it's just easier to write it down once in a config file and never think about it again. most of the options from dhcpcd(8) work here too. no cap.

the first word on a line is the option, and the rest of the line is the value. leading and trailing whitespace for both the option and the value get trimmed. you can escape characters in the value with the \ character. comments can start with the # character. string values should be quoted with the " character. ๐ŸŽ€

here's the list of available options, bestie โ€” every single one, so don't skip:

  • allowinterfaces pattern โ€” when discovering interfaces, the interface name has to match pattern, which is a space or comma separated list of patterns passed to fnmatch(3). if the same interface is matched in denyinterfaces, it's still denied, periodt.
  • denyinterfaces pattern โ€” when discovering interfaces, the interface name must not match pattern, which is a space or comma separated list of patterns passed to fnmatch(3).
  • anonymous โ€” turns on Anonymity Profiles for DHCP, RFC 7844. any DUID is ignored and ClientID is set to LL only. then dhcpcd.conf will only allow essential options. non essential options can be allowed by using allow or request. the anonymous option should be the last option in the configuration unless you really want to send something that could identify you. dhcpcd will not try and reboot an old lease, it goes straight into DISCOVER/SOLICIT. ๐Ÿ’€
  • randomise_hwaddr โ€” forces a hardware address randomisation when the interface is brought up or when the carrier is lost. this is generally used in tandem with the anonymous option.
  • arping address [address] โ€” dhcpcd will arping each address in order before attempting DHCP. if an address is found, we will select the replying hardware address as the profile, otherwise the IP address. example:
interface bge0
arping 192.168.0.1

# My specific 192.168.0.1 network
profile dd:ee:aa:dd:bb:ee
static ip_address=192.168.0.10/24

# A generic 192.168.0.1 network
profile 192.168.0.1
static ip_address=192.168.0.98/24
  • authprotocol protocol [algorithm [rdm]] โ€” authenticate DHCP messages. see the Supported Authentication Protocols section. if protocol is token then algorithm is snd_secretid/rcv_secretid so you can send and receive different tokens. ๐Ÿ”ฅ
  • authtoken secretid realm expire key โ€” define a shared key for use in authentication. realm can be "" for use with the delayed protocol. expire is the date the token expires and should be formatted "yyy-mm-dd HH:MM". you can use the keyword forever or 0, which means the token never expires. for the token protocol, secretid needs to be 0 and realm needs to be "". if dhcpcd has the error
dhcp_auth_encode: Invalid argument

then it means that dhcpcd could not find the correct authentication token in your configuration.

  • background โ€” fork to the background immediately. this is useful for startup scripts which don't disable link messages for carrier status.
  • blacklist address[/cidr] โ€” ignores all packets from address[/cidr].
  • whitelist address[/cidr] โ€” only accept packets from address[/cidr]. blacklist is ignored if whitelist is set.
  • bootp โ€” be a BOOTP client. basically, this just doesn't send a DHCP Message Type option and will only interact with a BOOTP server. all other DHCP options still work.
  • broadcast โ€” instructs the DHCP server to broadcast replies back to the client. normally this is only set for non-Ethernet interfaces, such as FireWire and InfiniBand. in most cases, dhcpcd will set this automatically.
  • controlgroup group โ€” members of this user group can control dhcpcd, including but not limited to stopping and starting interfaces.
  • readgroup group โ€” members of this user group can read dhcpcd interface configuration.
  • debug โ€” echo debug messages to the stderr and syslog.
  • dev value โ€” load the value /dev management module. dhcpcd will load the first one found to work, if any.
  • env value โ€” push value to the environment for use in dhcpcd-run-hooks(8). for example, you can force the hostname hook to always set the hostname with env force_hostname=YES. or set which driver wpa_supplicant(8) should use with env wpa_supplicant_driver=nl80211. ๐Ÿ‘‘

if the hostname is set, it will be will set to the FQDN if possible as per RFC 4702, section 3.1. if the FQDN option is missing, dhcpcd will still try and set a FQDN from the hostname and domain options for consistency. to override this, set env hostname_fqdn=[YES|NO|SERVER]. a value of SERVER means just what the server says, don't manipulate it. this could lead to an inconsistent hostname on a DHCPv4 and DHCPv6 network where the DHCPv4 hostname is short and the DHCPv6 has an FQDN. DHCPv6 has no hostname option. ๐Ÿ˜ญ

  • clientid string โ€” send the clientid. if the string is of the format 01:02:03 then it is encoded as hex. for interfaces whose hardware address is longer than 8 bytes, or if the clientid is an empty string then dhcpcd sends a default clientid of the hardware family and the hardware address.
  • duid [ll | lt | uuid | value] โ€” use a DHCP Unique Identifier. if persistent storage is available then a DUID-LLT (link local address + time) is generated, otherwise DUID-LL is generated (link local address). the DUID type can be hinted as an optional parameter if the file /var/lib/dhcpcd/duid does not exist. if not ll, lt or uuid then value will be converted from 00:11:22:33 format. this, plus the IAID will be used as the clientid. the DUID generated will be held in /var/lib/dhcpcd/duid and should not be copied to other hosts. this file also takes precedence over the above rules except for setting a value.
  • iaid iaid โ€” set the Interface Association Identifier to iaid. this option must be used in an interface block. this defaults to the VLANID (prefixed with 0xff) for the interface if set, otherwise the last 4 bytes of the hardware address assigned to the interface. each instance of this should be unique within the scope of the client and dhcpcd warns if a conflict is detected. if there is a conflict, it is only a problem if the conflicted IAIDs are used on the same network. ๐Ÿฆ‹
  • dhcp โ€” enable DHCP on the interface, on by default.
  • dhcp6 โ€” enable DHCPv6 on the interface, on by default.
  • ipv4 โ€” enable IPv4 on the interface, on by default.
  • ipv6 โ€” enable IPv6 on the interface, on by default.
  • request [address] โ€” request the address in the DHCP DISCOVER message. there is no guarantee this is the address the DHCP server will actually give. if no address is given then the first address currently assigned to the interface is used.
  • inform [address[/cidr[/broadcast_address]]] โ€” behaves like request as above, but sends a DHCP INFORM instead of DISCOVER/REQUEST. this does not get a lease as such, just notifies the DHCP server of the address in use. you should also include the optional cidr network number in case the address is not already configured on the interface. dhcpcd remains running and pretends it has an infinite lease. dhcpcd will not de-configure the interface when it exits. if dhcpcd fails to contact a DHCP server then it returns a failure instead of falling back on IPv4LL.
  • inform6 โ€” performs a DHCPv6 Information Request. no address is requested or specified, but all other DHCPv6 options are allowed. this is normally performed automatically when an IPv6 Router Advertisement indicates that the client should perform this operation. this option is only needed when dhcpcd is not processing IPv6 RA messages and the need for a DHCPv6 Information Request exists.
  • persistent โ€” dhcpcd normally de-configures the interface and configuration when it exits. sometimes, this isn't desirable if, for example, you have root mounted over NFS or SSH clients connect to this host and they need to be notified of the host shutting down. you can use this option to stop this from happening. ๐Ÿ™ˆ
  • fallback profile โ€” fall back to using this profile if DHCP fails. this allows you to configure a static profile instead of using ZeroConf.
  • initial_interval seconds โ€” set the initial DHCPv4 retransmission interval to seconds. the minimum value is 1 and the maximum is 4. the default is 4 seconds as per RFC 2131. this option only affects DHCPv4; DHCPv6 retransmission is governed by RFC 8415. see also backoff_cutoff and backoff_jitter.
  • backoff_cutoff seconds โ€” cap the DHCPv4 exponential backoff interval at seconds. the minimum value is 1 and the maximum is 64. the default is 64 seconds as per RFC 2131. if seconds is less than initial_interval it will be raised to match it, since the cutoff is a cap on the exponential growth and must not shrink the initial interval. setting both initial_interval and backoff_cutoff to 1 effectively disables exponential growth, so retransmissions use only the initial interval plus jitter. this option only affects DHCPv4; DHCPv6 retransmission is governed by RFC 8415. see also initial_interval and backoff_jitter.
  • backoff_jitter milliseconds โ€” set the random jitter applied to each DHCPv4 retransmission interval. the jitter is applied as ยฑ milliseconds. the default is 1000 (ยฑ1 second) as per RFC 2131, which is also the maximum. a value of 0 disables jitter, producing deterministic retransmission timing. this option only affects DHCPv4; DHCPv6 retransmission is governed by RFC 8415. see also backoff_cutoff and initial_interval.

and that's only part 1 bestie, there are more options coming so stay tuned ๐Ÿ’–โœจ

  • fallback_time seconds โ€” kicks off fallback after seconds have passed. The default is 5 seconds. โณ periodt.
  • hostname name โ€” sends your hostname name to the DHCP server so it can get registered in DNS. ๐Ÿ’Œ If name is an empty string, the current system hostname gets sent instead. And if name is a FQDN (aka it contains a .) then itโ€™s encoded as such. iykyk
  • hostname_short โ€” sends the short hostname to the DHCP server instead of the FQDN. This is lowkey useful because DHCP servers wonโ€™t register the FQDN in their DNS if the domain part doesnโ€™t match theirs. ๐Ÿšซ Also, peep the env option above to control how the hostname gets set on the host. fr fr
  • ia_na [iaid [/ address]] โ€” asks for a DHCPv6 Normal Address for iaid. iaid defaults to the iaid option as described above. You can request more than one ia_na by giving each one a unique iaid. ๐Ÿ†” slay
  • ia_ta [iaid] โ€” asks for a DHCPv6 Temporary Address for iaid. You can request more than one ia_ta by giving each one a unique iaid. โœจ iconic
  • ia_pd [iaid [/ prefix / prefix_len] [interface [/ sla_id [/ prefix_len [/ suffix]]]]] โ€” requests a DHCPv6 Delegated Prefix for iaid. This one must be used inside an interface block, no cap. ๐Ÿšง

Unless a sla_id of 0 is assigned with the same resultant prefix length as the delegation, a reject route gets installed for the Delegated Prefix to stop unallocated addresses from being resolved upstream. If no interface is given, then weโ€™ll assign a prefix to every other interface with a sla_id equivalent to the interface index assigned by the OS. Otherwise addresses are only assigned for each interface and sla_id. To avoid delegating to any interface, use - as the invalid interface name. Each assigned address will have a suffix, defaulting to 1. If the suffix is 0 then a SLAAC address is assigned. You cannot assign a prefix to the requesting interface unless the DHCPv6 server supports the RFC 6603 Prefix Exclude Option. dhcpcd has to be running for all the interfaces it is delegating to. A default prefix_len of 64 is assumed, unless the maximum sla_id does not fit. In this case prefix_len is increased to the highest multiple of 8 that can accommodate the sla_id. sla_id is an integer which must be unique inside the iaid and is added to the prefix which must fit inside prefix_len less the length of the delegated prefix. You can specify multiple interface / sla_id / prefix_len per ia_pd, space separated. IPv6RS should be disabled globally when requesting a Prefix Delegation. ๐ŸŒ

In the following example eth0 is the externally facing interface to be configured for both IPv4 and IPv6. The DHCPv4 server will provide us with an IPv4 address and a default route. The DHCPv6 server is going to provide us with an IPv6 address, a default route and a /64 subnet to be delegated to the internal interface. The eth1 interface will be automatically configured for IPv6 using the first address (::1) from the delegated prefix. A second prefix is requested and assigned to two other interfaces. rtadvd(8) can be used with an empty configuration file on eth1, eth2 and eth3, to provide automatic IPv6 address configuration for the internal network. ๐Ÿฆ‹

noipv6rs                 # disable routing solicitation
denyinterfaces eth2      # Don't touch eth2 at all
interface eth0
  ipv6rs                 # enable routing solicitation for eth0
  ia_na 1                # request an IPv6 address
  ia_pd 2 eth1/0         # request a PD and assign it to eth1
  ia_pd 3 eth2/1 eth3/2  # req a PD and assign it to eth2 and eth3
  ia_pd 4 -              # request a PD but don't assign it
  • ipv4only โ€” only configure IPv4, periodt. 4๏ธโƒฃ ate
  • ipv6only โ€” only configure IPv6, bestie. 6๏ธโƒฃ ate
  • fqdn [disable | none | ptr | both] โ€” none wonโ€™t ask the DHCP server to update DNS. ptr just asks the DHCP server to update the PTR record of the host in DNS, whereas both also updates the A record. disable will disable the FQDN option. The default is both. dhcpcd itself never does any DNS updates. dhcpcd encodes the FQDN hostname as specified in RFC 1035. ๐Ÿ“œ no cap
  • interface interface โ€” the options that come after this are only parsed for this interface. Pattern matching is allowed by fnmatch(3). ๐ŸŽฏ vibe check
  • ipv4ll_time seconds โ€” waits for seconds before starting IPv4LL. The default is 5 seconds. โฑ๏ธ lowkey
  • ipv6ra_autoconf โ€” generates SLAAC addresses for each Prefix advertised by an IPv6 Router Advertisement message with the Auto flag set. On by default. โœ… slay
  • ipv6ra_noautoconf โ€” disables the above option. โŒ not me
  • ipv6ra_fork โ€” by default, when dhcpcd receives an IPv6 Router Advertisement, dhcpcd will only fork to the background if the RA contains at least one unexpired RDNSS option and a valid prefix or no DHCPv6 instruction. Set this option to make dhcpcd always fork on a RA. ๐Ÿด obsessed
  • ipv6rs โ€” enables IPv6 Router Advertisement solicitation. This is on by default, but itโ€™s documented here in case itโ€™s disabled globally but needs to be enabled for one interface. ๐Ÿ“ก main character energy
  • lastlease โ€” if dhcpcd canโ€™t obtain a lease, then it tries to use the last lease acquired for the interface. ๐Ÿ”„ periodt
  • lastleaseextend โ€” same as the above, but the lease will be retained even if it expires. dhcpcd will give it up if any other host tries to claim it for their own via ARP. This violates RFC 2131, section 3.7, which states the lease should be dropped once it has expired. ๐Ÿšจ danger
  • leasetime seconds โ€” requests a DHCP lease time of seconds. -1 represents an infinite lease time. By default dhcpcd does not request any lease time and leaves it in the hands of the DHCP server. It is not possible to request a DHCPv6 lease time as this is not RFC compliant. See RFC 8415 21.4, 21.6, 21.21 and 21.22. ๐Ÿ“… iykyk
  • link_rcvbuf size โ€” overrides the size of the link receive buffer from the kernel default. While dhcpcd will recover from link buffer overflows, this may not be desirable on heavily loaded systems. ๐Ÿ“ฆ fr fr
  • logfile logfile โ€” writes to the specified logfile. dhcpcd still writes to syslog(3). The logfile is reopened when dhcpcd receives the SIGUSR2 signal. ๐Ÿ“ slay
  • metric metric โ€” metrics are used to prefer an interface over another one, lowest wins. dhcpcd will supply a default metric of 1000 + if_nametoindex(3). This will be offset by 2000 for wireless interfaces, with additional offsets of 1000000 for IPv4LL and 2000000 for roaming interfaces. ๐Ÿ† iconic
  • mudurl url โ€” specifies the URL for a Manufacturer Usage Description (MUD). The description is used by upstream network devices to instantiate any desired access lists. See draft-ietf-opsawg-mud for more information. ๐Ÿ”— no cap
  • noalias โ€” any pre-existing IPv4 addresses will be removed from the interface when adding a new IPv4 address. ๐Ÿงน clean
  • noarp โ€” donโ€™t send any ARP requests. This also disables IPv4LL. ๐Ÿšซ nope
  • arp_persistdefence โ€” keep the IP address even if defence fails upon IP Address conflict. ๐Ÿ›ก๏ธ defend
  • noauthrequired โ€” donโ€™t require authentication even though we requested it. Also allows FORCERENEW and RECONFIGURE messages without authentication. ๐Ÿ”“ open
  • nodelay โ€” donโ€™t delay for an initial randomised time when starting protocols. โšก fast
  • nodev โ€” donโ€™t load /dev management modules. ๐Ÿšซ no
  • nodhcp โ€” donโ€™t start DHCP or listen to DHCP messages. This is only useful when allowing IPv4LL. ๐Ÿ™… skip
  • nodhcp6 โ€” donโ€™t start DHCPv6 or listen to DHCPv6 messages. Normally DHCPv6 is started by an IPv6 Router Advertisement instruction or configuration. ๐Ÿ™…โ€โ™€๏ธ skip
  • nogateway โ€” donโ€™t install any default routes. ๐Ÿšง no route
  • gateway โ€” install a default route if available (default). โœ… yes
  • nohook script โ€” donโ€™t run this hook script. Matches full name, or prefixed with 2 numbers optionally ending with .sh. So to stop dhcpcd from touching your DNS settings or starting wpa_supplicant you would do: nohook resolv.conf, wpa_supplicant. ๐Ÿช hook off
  • noipv4 โ€” donโ€™t attempt to configure an IPv4 address. ๐Ÿšซ no ipv4
  • noipv4ll โ€” donโ€™t attempt to obtain an IPv4LL address if we failed to get one via DHCP. See RFC 3927. ๐Ÿšซ no ipv4ll
  • noipv6 โ€” donโ€™t solicit or accept IPv6 Router Advertisements and DHCPv6. ๐Ÿšซ no ipv6
  • noipv6rs โ€” donโ€™t solicit or accept IPv6 Router Advertisements. ๐Ÿšซ no ra
  • nolink โ€” donโ€™t receive link messages about carrier status. You should only set this for buggy interface drivers. ๐Ÿ› buggy
  • nosyslog โ€” disable writing to syslog(3). ๐Ÿšซ no syslog
  • noup โ€” donโ€™t bring the interface up when in manager mode. ๐Ÿšซ no up
  • option option โ€” requests the option from the server. It can be a variable to be used in dhcpcd-run-hooks(8) or the numerical value. You can specify more options separated by commas, spaces or more option lines. Prepend dhcp6_ to option to request a DHCPv6 option. If no DHCPv6 options are configured, then DHCPv4 options are mapped to equivalent DHCPv6 options. Prepend nd_ to option to handle ND options. To see a list of options you can use, call dhcpcd with the -V, --variables argument. ๐Ÿ“‹ options
  • allow option โ€” opposite of nooption. If there are no allow options then we negate nooption when working out what options we can send and receive. option is always allowed. โœ… allow
  • nooption option โ€” remove the option from the message before itโ€™s processed. โœ‚๏ธ remove
  • require option โ€” requires the option to be present in all messages, otherwise the message is ignored. To enforce that dhcpcd only responds to DHCP servers and not BOOTP servers, you can require dhcp_message_type. This isnโ€™t an exact science though because a BOOTP server can send DHCP-like options. ๐Ÿ” require
  • reject option โ€” reject a message that contains the option. This is useful when you cannot use require to select / de-select BOOTP messages. ๐Ÿšซ reject
  • destination option โ€” the second dhcpcd.conf spots an address added to a point to point interface (PPP, TUN, all of those), it'll set the DHCP options you listed to the destination address of that interface. ๐Ÿ’ซ
  • profile name โ€” everything after this line only gets parsed if you're on the profile called name. ๐ŸŽ€
  • quiet โ€” hush hush, no dhcpcd output to the console at all. Errors still come through, bestie, obviously. ๐Ÿคซ
  • reboot seconds โ€” allows seconds of reboot time before hopping to the DISCOVER phase, if there's an old lease we can use. Also allows seconds before starting fallback states out of the DISCOVER phase. IPv4LL starts the moment that first reboot timeout hits. The default is 5 seconds. A setting of 0 seconds makes dhcpcd.conf skip the reboot phase entirely and go straight into DISCOVER. And this is literally the dream for mobile users, because if you move from network A to network B and they use the same subnet and the address from network A isn't in use on network B, then the DHCP server stays silent even if it's authoritative, which means dhcpcd will time out before it ever moves back to the DISCOVER phase. No effect on DHCPv6 other than skipping the reboot phase. ๐Ÿš€
  • release โ€” dhcpcd releases the lease before it stops the interface. โœŒ๏ธ
  • script script โ€” use script instead of the default /usr/libexec/dhcpcd-run-hooks. ๐Ÿช„
  • request_time seconds โ€” request the lease for seconds before going back to DISCOVER. Default is 180 seconds.
  • ssid ssid โ€” subsequent options are only parsed for this wireless ssid. ๐Ÿ“ถ
  • slaac hwaddr | private | token token [temp | temporary] โ€” picks the interface identifier used for SLAAC generated IPv6 addresses. If private is used, an RFC 7217 address is generated. If token token is used then the token is combined with the prefix to make the final address. The temporary directive will create a temporary address for the prefix as well. โœจ
  • static value โ€” configures a static value. If you set ip_address then dhcpcd won't even attempt to obtain a lease, it'll just use the value for the address with an infinite lease time. If you set an empty value this removes all prior static allocations to the same value. This is so useful when you're using profiles, and in the case of ip_address it will remove the static allocation. Note that setting 0.0.0.0 keeps the static allocation but waits for a 3rdparty to configure the address. If you set ip6_address, dhcpcd will continue auto-configuration as normal. ๐Ÿ› ๏ธ

Here's an example which configures two static addresses, overriding the default IPv4 broadcast address, an IPv4 router, DNS and disables IPv6 auto-configuration. You could also use the inform6 command here if you wished to obtain more information via DHCPv6. For IPv4, you should use the inform ipaddress option instead of setting a static address.

interface eth0
noipv6rs
static ip_address=192.168.0.10/24
static broadcast_address=192.168.0.63
static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
fd51:42f8:caae:d92e::1

And here's an example for PPP which gives the destination a default route. It uses the special destination keyword to insert the destination address into the value. ๐ŸŒˆ

interface ppp0
static ip_address=0.0.0.0
destination routers
  • timeout seconds โ€” time out after seconds, instead of the default 30. A setting of 0 seconds causes dhcpcd to wait forever to get a lease. If dhcpcd is working on a single interface then dhcpcd will exit when a timeout occurs, otherwise dhcpcd will fork into the background. If using IPv4LL then dhcpcd starts the IPv4LL process after the timeout and then waits a little longer before really timing out. โณ
  • userclass string โ€” tag the DHCPv4 message with the userclass. You can specify more than one. ๐Ÿท๏ธ
  • msuserclass string โ€” tag the DHCPv4 message with the Microsoft userclass. Unlike the userclass option, this one can only be added once. It should only be used for Microsoft DHCP servers and the vendorclassid should be set to "MSFT 98" or "MSFT 5.0". Heads up: this option is not RFC compliant. ๐Ÿ™ˆ
  • vendor code,value โ€” add an encapsulated vendor-specific information option (DHCP Option 43). code should be between 1 and 254 inclusive. To add a raw vendor string, omit code but keep the comma. Examples, bestie:

Set the vendor option 01 with an IP address.

vendor 01,192.168.0.2

Set the vendor option 02 with a hex code.

vendor 02,01:02:03:04:05

Set the vendor option 03 with an IP address as a string.

vendor 03,\"192.168.0.2\"

Set un-encapsulated vendor option to hello world.

vendor ,"hello world"
  • vsio en code,value โ€” add an encapsulated vendor-specific information option (DHCP Option 125) with IANA assigned Enterprise Number en proceeding with the code which should be between 1 and 255 inclusive, and the value after the comma. Examples:

Set the vsio for enterprise number 155 option 01 with an IPv4 address.

vsio 155 01,192.168.1.1

Set the vsio for enterprise number 155 option 02 with a string.

vsio 155 02,"hello world"

Set the vsio for enterprise number 255 option 01 with a hex code.

vsio 255 01,01:02:03:04:05
  • vsio6 en code,value โ€” add an encapsulated vendor-specific information option (DHCPv6 Option 17) with IANA assigned Enterprise Number en proceeding with the code which should be between 1 and 65535 inclusive, and the value after the comma. Examples:

Set the vsio for enterprise number 155 option 01 with an IPv6 address.

vsio6 155 01,2001:0db8:85a3:0000:0000:8a2e:0370:7334

Set the vsio for enterprise number 155 option 02 with a string.

vsio6 155 02,"hello world"

Set the vsio for enterprise number 255 option 01 with a hex code.

vsio6 255 01,01:02:03:04:05
  • vendorclassid string โ€” set the DHCP Vendor Class. DHCPv6 has its own option, shown below. The default is dhcpcd-<version>:<os>:<machine>:<platform>. For example:
dhcpcd-5.5.6:NetBSD-6.99.5:i386:i386

If not set then none is sent. Some badly configured DHCP servers reject unknown vendorclassids. To work around it, try and impersonate Windows by using the MSFT vendorclassid. ๐ŸชŸ

  • vendclass en data โ€” add the DHCPv6 Vendor Identifying Vendor Class with the IANA assigned Enterprise Number en with the data. This option can be set more than once to add more data, but the behaviour, as per RFC 3925, is undefined if the Enterprise Number differs. ๐Ÿ˜ฌ
  • waitip [4 | 6] โ€” wait for an address to be assigned before forking to the background. 4 means wait for an IPv4 address to be assigned. 6 means wait for an IPv6 address to be assigned. If no argument is given, dhcpcd.conf will wait for any address protocol to be assigned. It's possible to wait for more than one address protocol and dhcpcd.conf will only fork to the background when all waiting conditions are satisfied. ๐Ÿซถ
  • xidhwaddr โ€” use the last four bytes of the hardware address as the DHCP xid instead of a randomly generated number. ๐ŸŽฒ

โœจ Defining new options โœจ

DHCP, ND and DHCPv6 all allow for the use of custom options, and RFC 3925 vendor options for DHCP can also be supplied. Each option needs to be started with the define, definend, define6 or vendopt directive. This can optionally be followed by both embed or encap options. Both can be specified more than once and embed must come before encap. โš ๏ธ

  • define code type variable โ€” defines the DHCP option code of type with a name of variable exported to dhcpcd-run-hooks(8).
  • definend code type variable โ€” defines the ND option code of type with a name of variable exported to dhcpcd-run-hooks(8), with a prefix of nd_.
  • define6 code type variable โ€” defines the DHCPv6 option code of type with a name of variable exported to dhcpcd-run-hooks(8), with a prefix of dhcp6_.
  • vendopt code type variable โ€” defines the Vendor-Identifying Vendor Options. The code is the IANA Enterprise Number which will uniquely describe the encapsulated options. type is normally encap. variable names the Vendor option to be exported.
  • embed type variable โ€” defines an embedded variable within the defined option. The length is determined by the type. If the variable is not the same as defined in the parent option, it is prefixed with the parent variable first with an underscore. If the variable has the name of reserved then it is not processed. ๐Ÿ’…
  • encap code type variable โ€” defines an encapsulated variable within the defined option. The length is determined by the type. If the variable is not the same as defined in the parent option, it is prefixed with the parent variable first with an underscore.

๐Ÿฆ‹ Type prefix ๐Ÿฆ‹

These keywords come before the type itself, to describe it more fully. You can use more than one, but they must appear in the order listed below, no shuffling the lineup. ๐Ÿ‘‘

  • request โ€” requests the option by default without having to be specified in user configuration.
  • norequest โ€” this option cannot be requested, regardless of user configuration.
  • optional โ€” this option is optional. Only makes sense for embedded options like the client FQDN option, where the FQDN string itself is optional.
  • index โ€” the option can appear more than once and will be indexed.
  • array โ€” the option data is split into a space separated array, each element being the same type.
  • truncated โ€” the option might truncated from its normal length. The end of the normal size is zero padded on expansion. Currently this is only supported for ip6address where it's a prefix.

๐Ÿ’– Types to define ๐Ÿ’–

ok so bestie, the type lowkey controls how many bytes get eaten up inside the option. any leftover data? normally just yeeted into the void. you can slap a length on string and binhex types, but ngl that's usually when there's other stuff embedded after it in the same option. iykyk.

  • ipaddress โ€” a whole IPv4 address, 4 bytes. small but mighty.
  • ip6address โ€” an IPv6 address, 16 bytes. she's long, she's iconic.
  • string [: length] โ€” a NVT ASCII string of printable characters โœจ
  • byte โ€” one singular byte. one. ๐Ÿซถ
  • bitflags: flags โ€” a byte shown as a string of flags, most significant bit first. so like, if you use ABCDEFGH then A = 10000000, B = 01000000, C = 00100000, etc. if the bit is not set, the flag doesn't get printed. and a flag of 0 is not printed even if that bit position is set โ€” this is so you can reserve the first bits while assigning the last ones. a flag of 1 prints the bit, set or unset.
  • int16 โ€” a signed 16bit integer, 2 bytes.
  • uint16 โ€” an unsigned 16bit integer, 2 bytes.
  • int32 โ€” a signed 32bit integer, 4 bytes.
  • uint32 โ€” an unsigned 32bit integer, 4 bytes.
  • flag โ€” a fixed value (1) meaning "yes bestie this option is present", 0 bytes. free real estate.
  • domain โ€” an RFC 3397 encoded string.
  • dname โ€” an RFC 1035 validated string.
  • uri โ€” if it's an array, the first two bytes are the URI length inside the option data. otherwise the whole option data is the URI. and bc a space isn't allowed in URI encoding, the URIs are space separated.
  • binhex [: length] โ€” binary data living its best life as hexadecimal.
  • embed โ€” contains embedded options (this implies encap too, they're a package deal ๐Ÿ’…).
  • encap โ€” contains encapsulated options (and yep, this implies embed as well).
  • option โ€” references an option from the global definition.

๐ŸŒธ Example definition ๐ŸŒธ

here's the vibe, in code, verbatim, no notes:

# DHCP option 81, Fully Qualified Domain Name, RFC 4702
define 81 embed fqdn
embed byte flags
embed byte rcode1
embed byte rcode2
embed domain fqdn

# DHCP option 125, Vendor Specific Information Option, RFC 3925
define 125 encap vsio
embed uint32 enterprise_number
# Options defined for the enterprise number
encap 1 ipaddress ipaddress

๐Ÿ” Supported Authentication Protocols ๐Ÿ”

  • token โ€” sends a plain text token the server expects and matches a token the server sends back. plot twist: the tokens do not have to be the same. if it's unspecified, the token with a secretid of 0 gets used for sending messages and validating the ones you receive.
  • delayedrealm โ€” Delayed Authentication. dhcpcd sends an authentication option with no key or MAC. the server clocks this option, picks a key for dhcpcd.conf, and writes the realm and secretid into it. then dhcpcd goes looking for an unexpired token with a matching realm and secretid. that token authenticates every other message. main character energy fr.
  • delayed โ€” same as above, but no realm. minimal queen.

๐Ÿงš Supported Authentication Algorithms ๐Ÿงš

if you specify none, hmac-md5 is the default. that's the whole list, bestie.

  • hmac-md5

โฐ Supported Replay Detection Mechanisms โฐ

if none is specified, monotonic is the default.

okay this is the important bit, don't scroll past ๐Ÿ‘‘ โ€” if this gets changed from what was previously used, or the means of calculating or storing it is broken, then the DHCP server will probably have to have its notion of the client's Replay Detection Value reset. so like, heads up.
  • monocounter โ€” reads the number in the file /var/lib/dhcpcd/dhcpcd-rdm.monotonic and adds one to it.
  • monotime โ€” creates an NTP timestamp from the system time.
  • monotonic โ€” same as monotime.

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

fnmatch(3), if_nametoindex(3), dhcpcd(8), dhcpcd-run-hooks(8)

๐Ÿ’œ AUTHORS ๐Ÿ’œ

Roy Marples <roy@marples.name> โ€” the icon, the legend, the moment.

๐Ÿ› BUGS ๐Ÿ›

found one?? please report them to https://roy.marples.name/projects/dhcpcd โ€” the devs wanna know, and honestly we love a bug report that's actually useful ๐Ÿ’–


and that's the whole page bestie, we ate and left no crumbs ๐ŸŽ€ this Debian build is dated July 29, 2026 and it's the DHCPCD.CONF(5) page โ€” periodt. now go configure something iconic โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from