What are the valid values (and what are they used for) for the static option in /etc/dhcpcd.conf file?
I'm configuring a network interface of a Raspberry (running raspbian stretch) by editing the /etc/dhcpcd.conf file.
Altough I was able to set up it correctly, I am curious about all the configuration options provided through this file, specifically for static configuration.
I read the man page of dhcpcd.conf and didn't find any explanation of the values the static option accepts. I wasn't able to find anything on google neither.
The man page of dhcpcd.conf just says this:
static value
Configures a static value. If you set ip_address then dhcpcd
will not attempt to obtain a lease and will just use the value
for the address with an infinite lease time. If you set
ip6_address, dhcpcd will continue auto-configuation as normal.
Here is an example which configures two static address,
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
Here is 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=
destination routers
After reading some tutorials all valid options I know are these:
ip_address
routers
domain_name_servers
domain_search
domain_name
JFYI my /etc/dhcpcd.conf configuration file looks like this:
# Inform the DHCP server of our hostname for DDNS.
hostname
# Use the hardware address of the interface for the Client ID.
clientid
# Persist interface configuration when dhcpcd exits.
persistent
# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit
# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# A ServerID is required by RFC2131.
require dhcp_server_identifier
# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private
# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname
# Static IP configuration for eth0.
interface eth0
static ip_address=192.168.12.234/24
static routers=192.168.12.1
static domain_name_servers=192.168.12.1
nogateway