Scroll to navigation

IFCFG-DHCP(5) Network configuration IFCFG-DHCP(5)

NAME

ifcfg-dhcp - common DHCPv4 and DHCPv6 elements of network interface configuration

SYNOPSIS

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

VARIABLES

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.

DHVPv4 Specific Variables

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.
Specifies the hostname option field when 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.
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 send via hostname option 12 (same as SLES-11).
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.
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 it's update domain the host- name (e.g. 'foo.bar' -> 'foo.bar.example.net').
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.
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.
This option allows to set a metric/priority for DHCPv4 routes. Default is 0.
When set to yes, the DHCPv4 IP address is set as the preferred source in DHCPv4 provided routes.
Specifies a client identifier string. By default an id derived from the hardware address of the network interface is sent as client identifier.
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.
Specifies the format of the DHCLIENT_USER_CLASS_ID variable. The DHCPv4 option and it's 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.
Specifies the user class identifier [array] to send in dhcp requests. The DHCLIENT_USER_CLASS_FORMAT variable specified how to interpret it.
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).
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.
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.
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.
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.
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.
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.
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.

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

This option allows to specify the request mode used by the DHCPv6 client when the BOOTPROTO is set to dhcp or dhcp6, and overrides the "Managed Address Configuration" and the "Other Configuration" flags provided by the IPv6 router its Router Advertisement (RA) for the network connected to this interface.

Follow IPv6 RA flags, remain silent when no RA flags are set.

Request other configuration (dns,ntp) only, no IP address.

Request IP address as well as other configuration.

Request a prefix for delegation, usable also in combination with auto and managed mode, i.e. auto+prefix or managed+prefix.
This option allows the DHCPv6 client to indicate its desire to accept rapid commit leases using two-packet exchange (solicitation, lease ack) instead of the four packet (solicitation, offer, request, lease ack).
Permits to specify an explicit prefix-length (e.g. ::/56) or a specific prefix with a length (e.g. 2001:db8::/48), that are sent to the DHCPv6 server as hint when prefix delegation request mode is enabled in the DHCLIENT6_MODE variable.
Permits to specify explicit prefix-length to use for the DHCPv6 address, e.g. 64 to use address as 2001:db8::1/64 or 80 for 2001:db8::1/80. When 0 or unspecified (default), 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).
Should the DHCPv6 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.
Specifies the hostname option field when 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.
Default is to use the FQDN option, when the DHCLIENT6_HOSTNAME_OPTION variable provides a hostname. When DHCLIENT6_HOSTNAME_OPTION is set to AUTO, short hostname from the /etc/hostname file is send (same to SLES-11).
Request to update AAAA and PTR or only the PTR DNS records using the hostname specified in 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.
Qualify relative sub-domains/hostname in the DHCLIENT6_HOSTNAME_OPTION variable 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').
This option allows to manually specify a client identifier (DUID) as a colon separated hex byte string for DHCPv6. It disables the default behavior to maintain the client-id automatically, see wicked-config(5) and `wicked duid --help` for more details.
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).

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.
This setting controls whether 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.
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 is a valid lease available, DHCPv6 protocol is using (depending on IPv6 router RA and 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 to use rebind instead of a confirm and thus to refresh lease options and extend the lifetimes.

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.
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 override to use a non-standsrd initial delay. Default is 0.
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.
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 allowing to continue in background instead.
This variable permits to specify a space separated list of built-in facility names supported by the dhcp6 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. The more specific variable DHCLIENT6_SET_HOSTNAME has higher precedence.

COPYRIGHT

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

BUGS

Please report bugs at <https://bugzilla.novell.com/index.cgi>

AUTHOR

Marius Tomaschewski -- wicked

SEE ALSO

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

September 2014 wicked