IFCFG-DHCP(5)
π 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, yourDISPLAYvariable 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/hostnameis 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 theDHCLIENT_HOSTNAME_OPTIONvariable is set to a full hostname, that is, when it contains a dot. WhenDHCLIENT_HOSTNAME_OPTIONis set toAUTO, short hostname from/etc/hostnameis 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 theDHCLIENT_HOSTNAME_OPTIONvariable. Default is to update both when hostname is given or none when hostname is empty andDHCLIENT_FQDN_ENABLEDis set to enabled. πDHCLIENT_FQDN_QUALIFY {yes*|no}β Qualify relative sub-domains/hostname in theDHCLIENT_HOSTNAME_OPTIONvariable 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 deprecatedasciiformat limited to a single label (short hostname) for compatibility purposes with draft implementation, which may be unsupported and cause that a DHCP server ignores thefqdnoption 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 is0. π₯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 thewicked-config(5)create-cidoption, the interface type specific client-id type and compile time defaults. Note: e.g. DHCP over Infiniband (IPoIB) mandates anrfc4361client-id. πDHCLIENT_USER_CLASS_FORMAT {string*|rfc3004}β Specifies the format of theDHCLIENT_USER_CLASS_IDvariable. 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, otherwiseDHCLIENT_USER_CLASS_IDis used as string. π§DHCLIENT_USER_CLASS_ID[SUFFIX]β Specifies the user class identifier [array] to send in dhcp requests. TheDHCLIENT_USER_CLASS_FORMATvariable 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 (seewicked-config.5man 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 to0. π΄DHCLIENT_WAIT_AT_BOOTβ The DHCP client will try to get a lease forDHCLIENT_WAIT_AT_BOOTseconds, then inform the waitingifup, that it continues in background. When you increase this time, increase also theWAIT_FOR_INTERFACESvariable e.g. to a value twice as high as the time specified here. Default is15seconds. π°οΈ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 atDHCLIENT_WAIT_AT_BOOTallowing to continue in background instead. Default value is0. π¨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 thedhcp4client modifying the default options used in requests and to update system settings (vianetconfig).
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 fromdhcp-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 withautoandmanagedmode too, i.e.auto+prefixormanaged+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
infomode ("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 π
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
- opensuse-leap 16.0: wicked 0.6.80-bp160.2.1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: wicked 0.6.80-bp160.2.1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: wicked 0.6.80-bp160.2.1 Β· GPL-2.0-or-later
- opensuse-leap 16.0: wicked 0.6.80-bp160.2.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms