IFCFG-DHCP(5)

πŸ“¦ version 0.6.80, in opensuse-leap 16.0

πŸ’– ifcfg-dhcp(5) β€” common DHCPv4 and DHCPv6 elements of network interface configuration πŸ’–

okay bestie, welcome to the DHCP group chat πŸ’¬βœ¨. This is the ifcfg-dhcp(5) manual page, and it’s all about the DHCPv4 + DHCPv6 variables that live in your network config. Let’s get into it 🫢

🌸 NAME 🌸

ifcfg-dhcp β€” common DHCPv4 and DHCPv6 elements of network interface configuration.

πŸ¦‹ SYNOPSIS πŸ¦‹

/etc/sysconfig/network/dhcp
/etc/sysconfig/network/ifcfg-*

✨ VARIABLES ✨

okay so here’s the tea β˜•: the following is a list of DHCPv4 and DHCPv6 related variables that are globally configured in /etc/sysconfig/network/dhcp. When appropriate, examples are given in parentheses, and default values will either be explicitly mentioned, or will be marked by a *. Please note, that to override any of the variables for a specific interface, simply redefine the variable in the appropriate ifcfg- file. iconic behavior, honestly πŸ’…

πŸ’… DHVPv4 Specific Variables πŸ’…

  • DHCLIENT_SET_HOSTNAME {no*|yes} β€” Should the DHCPv4 client set the hostname? When it is likely that this would occur during a running X session, your DISPLAY variable could be screwed up and you won’t be able to open new windows anymore, then this should be "no". If it happens during booting it won’t be a problem and you can safely say "yes" here. For a roaming notebook with X kept running, "no" makes more sense. 😭
  • DHCLIENT_HOSTNAME_OPTION {AUTO*|<a host name>| } β€” Specifies the hostname option field when the DHCPv4 client sends messages. Some DHCP servers will update nameserver entries (dynamic DNS) to it. Also, some DHCP servers, notably those used by @Home Networks, require the hostname option field containing a specific string in the DHCP messages from clients. When set to "AUTO", the current hostname from /etc/hostname is sent. Use this variable to override it with another hostname, or leave it empty to not send any hostname. πŸŽ€
  • DHCLIENT_FQDN_ENABLED {enabled|disabled|default*| } β€” Default is to use the FQDN option, when the DHCLIENT_HOSTNAME_OPTION variable is set to a full hostname, that is, when it contains a dot. When DHCLIENT_HOSTNAME_OPTION is set to AUTO, short hostname from /etc/hostname is sent via hostname option 12 (same as SLES-11). ✨
  • DHCLIENT_FQDN_UPDATE {both|ptr|none| } β€” Request to update A and PTR or only the PTR DNS records using the hostname specified in the DHCLIENT_HOSTNAME_OPTION variable. Default is to update both when hostname is given or none when hostname is empty and DHCLIENT_FQDN_ENABLED is set to enabled. πŸ’–
  • DHCLIENT_FQDN_QUALIFY {yes*|no} β€” Qualify relative sub-domains/hostname in the DHCLIENT_HOSTNAME_OPTION variable adding a final dot ('foo.bar' -> 'foo.bar.'). When disabled, the DHCP server may append its update domain to the hostname (e.g. 'foo.bar' -> 'foo.bar.example.net'). πŸ¦‹
  • DHCLIENT_FQDN_ENCODE {yes*|no} β€” The FQDN option is encoding hostnames using canonical DNS wire format by default. This flag permits to enable use of the deprecated ascii format limited to a single label (short hostname) for compatibility purposes with draft implementation, which may be unsupported and cause that a DHCP server ignores the fqdn option requests completely. ⚠️ deprecated vibes, bestie β€” be careful with this one.
  • DHCLIENT_SET_DEFAULT_ROUTE {yes*|no} β€” Should the DHCP client set a default route (default Gateway)? When multiple copies of DHCP clients run, it would make sense that only one of them does it. πŸ‘‘
  • DHCLIENT_ROUTE_PRIORITY β€” This option allows to set a metric/priority for DHCPv4 routes. Default is 0. πŸ”₯
  • DHCLIENT_ROUTE_SET_SRC {no*|yes} β€” When set to yes, the DHCPv4 IP address is set as the preferred source in DHCPv4 provided routes. 🌈
  • DHCLIENT_CLIENT_ID β€” Specifies a client identifier string. By default an id derived from the hardware address of the network interface is sent as client identifier. 🫢
  • DHCLIENT_CREATE_CID {|rfc4361|dhcpv6|dhcp6|rfc2132|hwaddr|none|disable} β€” Overrides the DHCPv4 client-identifier type to use specified in the wicked-config(5) create-cid option, the interface type specific client-id type and compile time defaults. Note: e.g. DHCP over Infiniband (IPoIB) mandates an rfc4361 client-id. πŸ’…
  • DHCLIENT_USER_CLASS_FORMAT {string*|rfc3004} β€” Specifies the format of the DHCLIENT_USER_CLASS_ID variable. The DHCPv4 option and its format is specified by RFC3004 as an array of class identifiers, but most DHCP clients/servers aren’t compliant with the specification and send/expect a single string without proper RFC3004 length-value tuple format instead. When set to "rfc3004" DHCLIENT_USER_CLASS_ID[SUFFIX] permit an RFC compliant array, otherwise DHCLIENT_USER_CLASS_ID is used as string. 🧚
  • DHCLIENT_USER_CLASS_ID[SUFFIX] β€” Specifies the user class identifier [array] to send in dhcp requests. The DHCLIENT_USER_CLASS_FORMAT variable specified how to interpret it. 🌸
  • DHCLIENT_REQUEST_OPTION[SUFFIX] β€” Specifies a space separate list of additional DHCPv4 options to request. The options can be specified by their code number or by name when defined as custom dhcp option (see wicked-config.5 man page). ⭐
  • DHCLIENT_LEASE_TIME β€” Specifies the lease time (in seconds), that is suggested to the server. Default is unset which means to use the lease time offered by the server. ⏳
  • DHCLIENT_USE_LAST_LEASE {yes*|no} β€” This setting controls whether the DHCP client should try to use DHCP settings provided in its last lease when the DHCP-server is not reachable and the lease hasn’t expired yet. Set this variable to "no" to disable the fallback to the last lease. πŸ™ˆ
  • DHCLIENT_RELEASE_BEFORE_QUIT {yes|no*} β€” Send a DHCPRELEASE to the server (sign off the address)? This may lead to getting a different address/hostname next time an address is requested. But some servers require it. πŸ’€
  • DHCLIENT_SLEEP β€” Some interfaces need time to initialize and/or do not report correct status. Add the latency time in seconds so these can be handled properly. Should probably set per interface rather than here. This setting causes a sleep time before DHCP clients are started regardless of the link status. Note: RFC 2131 specifies, that the DHCP client should wait a random time between one and ten seconds to desynchronize the use of DHCP at startup. We do not use this initial delay to not slow down start/boot time. By default, this is set to 0. 😴
  • DHCLIENT_WAIT_AT_BOOT β€” The DHCP client will try to get a lease for DHCLIENT_WAIT_AT_BOOT seconds, then inform the waiting ifup, that it continues in background. When you increase this time, increase also the WAIT_FOR_INTERFACES variable e.g. to a value twice as high as the time specified here. Default is 15 seconds. πŸ•°οΈ
  • DHCLIENT_TIMEOUT β€” The DHCP client will stop processing / fail after this time when it does not get a reply from the DHCP server. Before you set this variable, take a look at DHCLIENT_WAIT_AT_BOOT allowing to continue in background instead. Default value is 0. 🚨
  • DHCLIENT_UPDATE {default,none,all,dns,ntp,nis,tz,boot,smb,nds,slp,sip,log} β€” This variable permits to specify a space separated list of built-in facility names supported by the dhcp4 client modifying the default options used in requests and to update system settings (via netconfig).

When empty, default settings configured in wicked-config(5) or built-in defaults are used. The special "default", "all", and "none" sets enable to request none, the built-in default set or all supported options, respectively. A "no-" or "-" in the front of a facility name permit to remove/disable it from the currently applied set, e.g. "default,-nis" disables request for nis options. More specific variables as DHCLIENT_SET_DEFAULT_ROUTE, DHCLIENT_SET_HOSTNAME or the MTU option have higher precedence. 🌈

  • DHCLIENT_BROADCAST {yes|no*} β€” Request broadcast responses from dhcp-server.

The default behaviour is to not request broadcast responses for any type of devices except of Infiniband, where it is enabled by default and not possible to disable. πŸ“‘

πŸ¦‹ DHCPv6 Specific Variables πŸ¦‹

DHCLIENT6_MODE {auto*|info|managed|prefix}

okay so this one lets you pick which request mode the DHCPv6 client uses when BOOTPROTO is set to dhcp or dhcp6 β€” and it overrides the "Managed Address Configuration" and "Other Configuration" flags that the IPv6 router hands out in its Router Advertisement (RA) for the network on this interface. bestie, you're literally overriding the router's vibe check πŸ’…

  • auto β€” follow the IPv6 RA flags, and stay silent when no RA flags are set. lowkey respectful.
  • info β€” request other configuration (dns,ntp) only, NO IP address. just the extras, none of the main character energy.
  • managed β€” request an IP address as well as other configuration. full package, periodt.
  • prefix β€” request a prefix for delegation, and it's usable in combination with auto and managed mode too, i.e. auto+prefix or managed+prefix. cute little combo meal πŸ“

DHCLIENT6_RAPID_COMMIT {yes*|no}

This one lets the DHCPv6 client indicate its desire to accept rapid commit leases using a two-packet exchange (solicitation, lease ack) instead of the four packet one (solicitation, offer, request, lease ack). it's giving speedrun πŸƒβ€β™€οΈπŸ’¨


DHCLIENT6_PREFIX_HINT {prefix/length}

Permits you to specify an explicit prefix-length (e.g. ::/56) or a specific prefix with a length (e.g. 2001:db8::/48), which get sent to the DHCPv6 server as a hint when prefix delegation request mode is enabled in the DHCLIENT6_MODE variable. ngl it's just you dropping hints, respectfully ✨


DHCLIENT6_ADDRESS_LENGTH {length}

Permits you to specify an explicit prefix-length to use for the DHCPv6 address, e.g. 64 to use the address as 2001:db8::1/64 or 80 for 2001:db8::1/80. When 0 or unspecified (default), the prefix-length of the smallest on-link prefix (highest /length number) in the IPv6 router advertisement matching the address is used β€” or 128 (see also rfc5942). iykyk 🧚


DHCLIENT6_SET_HOSTNAME {yes|no*}

Should the DHCPv6 client set the hostname? πŸ‘€ When it's likely this would happen during a running X session, your DISPLAY variable could get screwed up and you won't be able to open new windows anymore β€” in that case this should be "no". If it happens during booting it won't be a problem and you can safely say "yes" here. For a roaming notebook with X kept running, "no" makes more sense. no cap, this is the "don't break my desktop" flag 😭


DHCLIENT6_HOSTNAME_OPTION {AUTO*|a host name| }

Specifies the hostname option field when the DHCPv6 client sends messages. Some DHCP servers will update nameserver entries (dynamic DNS) to it. When set to "AUTO", the current hostname from /etc/hostname is sent. Use this variable to override it with another hostname, or leave it empty to not send any hostname at all. your name, your rules πŸŽ€


DHCLIENT6_FQDN_ENABLED {enabled|disabled|default*| }

Default is to use the FQDN option when the DHCLIENT6_HOSTNAME_OPTION variable provides a hostname. When DHCLIENT6_HOSTNAME_OPTION is set to AUTO, the short hostname from the /etc/hostname file is send (same to SLES-11). iconic legacy behaviour honestly πŸ‘‘


DHCLIENT6_FQDN_UPDATE {both|ptr|none| }

Request to update AAAA and PTR or only the PTR DNS records using the hostname specified in the DHCLIENT6_HOSTNAME_OPTION variable. Default is to update both when hostname is set, or none when hostname is empty and DHCLIENT6_FQDN_ENABLED is set to enabled.


DHCLIENT6_FQDN_QUALIFY {yes*|no}

Qualify relative sub-domains/hostname in the DHCLIENT6_HOSTNAME_OPTION variable by adding a final dot ('foo.bar' -> 'foo.bar.'). When disabled, the DHCP server may append it's update domain the host- name (e.g. 'foo.bar' -> 'foo.bar.example.net'). yes the trailing dot matters, that's the whole plot twist πŸ”₯


DHCLIENT6_CLIENT_ID

This option lets you manually specify a client identifier (DUID) as a colon separated hex byte string for DHCPv6. It disables the default behavior of maintaining the client-id automatically β€” see wicked-config(5) and wicked duid --help for more details. manual mode unlocked πŸ”“


DHCLIENT6_REQUEST_OPTION[SUFFIX]

Specifies a space separate list of additional DHCPv6 options to request. The options can be specified by their code number or by name when defined as custom dhcp option (see wicked-config.5 man page). mix and match, slay 🫢


DHCLIENT6_LEASE_TIME

Specifies the preferred lifetime (in seconds) used as T1/renewal (1/2 of it) and T1/rebind (4/5 of it) in DHCPv6 IA NA requests. Default is to not propose anything but use the times as offered by the DHCPv6 server. let the server decide, honestly kind of demure of it 🌸


DHCLIENT6_USE_LAST_LEASE {yes*|no}

This setting controls whether the DHCPv6 client should try to use settings provided in its last lease when the DHCPv6-server is not reachable and the lease hasn't expired yet. Set this variable to "no" to disable the fallback to the last lease. it's giving backup-plan energy πŸ’œ


DHCLIENT6_REFRESH_LEASE {yes,no*}

When ifup is called, the system or wickedd has been restarted, or the client may have moved to a new link (temporary carrier-lost) β€” and there's a valid lease available β€” the DHCPv6 protocol is using (depending on IPv6 router RA and the DHCLIENT6_MODE variable):

  • information-request in info mode ("other-config" without IP address)
  • rebind message if the lease contains (also) a prefix for delegations
  • confirm message if the lease contains an ("managed") IP address

While information-request and rebind provide "other-config" (dns,ntp and other options) and extend the lifetimes, a confirm reply provides only a status (code) whether the lease IP address(es) are still appropriate to the link.

Enabling this option causes it to use rebind instead of a confirm, and thus to refresh lease options and extend the lifetimes. glow-up for your lease ✨


DHCLIENT6_RELEASE_BEFORE_QUIT {yes|no*}

Send a DHCPv6 RELEASE to the server (sign off the address)? This may lead to getting a different address/hostname next time an address is requested. But some servers require it. so like... it's a breakup that might change your whole identity next time πŸ’€


DHCLIENT6_SLEEP

Some interfaces need time to initialize and/or do not report correct status. By default, DHCPv6 waits until the link-local address (fe80::) is available and then ~1 second as specified by RFC3315. This setting allows an override to use a non-standsrd initial delay. Default is 0. (yes the typo is in the original, we keep it, it's canon πŸ™ˆ)


DHCLIENT6_WAIT_AT_BOOT

The DHCPv6 client will try to get a lease for DHCLIENT6_WAIT_AT_BOOT seconds, then inform the waiting ifup that it continues in background. When you increase this time, increase also the WAIT_FOR_INTERFACES variable, e.g. to a value twice as high as the time specified here. Default is 15 seconds. don't leave ifup on read, bestie 😭


DHCLIENT6_TIMEOUT

The DHCPv6 client will stop processing / fail after this time when it does not get a reply from the DHCPv6 server. Before you set this variable, take a look at DHCLIENT6_WAIT_AT_BOOT, which allows it to continue in background instead. > honestly, background mode is usually the move β€” this one just gives up 🌈


DHCLIENT6_UPDATE {default,none,all,dns,ntp,tz,boot,nis,sip}

This variable permits you to specify a space separated list of built-in facility names supported by the dhcp6 client, modifying the default options used in requests and updating system settings (via netconfig).

When empty, default settings configured in wicked-config(5) or built-in defaults are used. The special "default", "all", and "none" sets enable you to request none, the built-in default set, or all supported options, respectively. A "no-" or "-" in the front of a facility name permits you to remove/disable it from the currently applied set, e.g. "default,-nis" disables request for nis options. The more specific variable DHCLIENT6_SET_HOSTNAME has higher precedence. the way you can just subtract options like that is so satisfying πŸŽ€


Copyright (C) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.


πŸ’€ BUGS πŸ’€

Please report bugs as described at <https://bugs.opensuse.org>. don't suffer in silence bestie, tell the maintainers 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Marius Tomaschewski -- wicked


🌟 SEE ALSO 🌟

/etc/sysconfig/network/dhcp, wicked(8).


and that's the whole page, you're so welcome πŸ’– β€” this beauty came from wicked, dated September 2014, and it lives in the IFCFG-DHCP(5) manual page. go forth and configure, icon ✨

πŸ“¦ where this page comes from