Sortix volatile manual
This manual documents Sortix volatile, a development build that has not been officially released. You can instead view this document in the latest official manual.
NAME
dhclient.conf — dhcp client configurationDESCRIPTION
dhclient(8) configures the network interface according to its dhclient.conf configuration file, searching for the first file path to exist:- /etc/dhclient.${mac}.conf - where mac is the network interface's hardware address. (Example: dhclient.00:00:5e:00:53:00.conf)
- /etc/dhclient.${if}.conf - where if is the network interface's name. (Example: dhclient.if0.conf)
- /etc/dhclient.conf - the shared configuration file.
FORMAT
dhclient.conf contains a series of whitespace delimited tokens akin to an ifconfig(8) invocation. The ‘#’ character begins a comment and the rest of the line is ignored. If a token names a protocol, then that protocol is selected. If a token names a configuration inside the current protocol or a top level statement, then that configuration is set to the value of the subsequent token.- if [name | etherhw:mac | id:linkid]
- The following configurations only applies to the network interface if it matches by its name, its hardware address mac, or its unstable index number linkid. The if statement can only be used in the shared /etc/dhclient.conf file and allows defining a section for each network interface. Configurations are applied to all network interfaces until the if statement appears.
- address [ip | auto | none]
- The local address in inet(4) address notation. (Default: auto)
- router [ip | auto | none]
- The default route in inet(4) address notation. (Default: auto)
- subnet [ip | auto | none]
- The subnet mask in inet(4) address notation. (Default: auto)
- servers [ip1,ip2,... | auto | none]
- The comma separated list of DNS servers in inet(4) address notation. A singular comma means the empty list. (Default: auto)
- address [mac | auto | none]
- The local address in ether(4) address notation. auto sets it to the hardware address. (Default: auto)
EXAMPLES
Manually configuring an interface
To fully manually configure the network interface if0, even if the network interface's device name changes over time, first first look up its ethernet hardware address:$ ifconfig -l if0 ether hwaddress 00:00:5e:00:53:00
if etherhw:00:00:5e:00:53:00 inet address 192.0.2.4 router 192.0.2.1 subnet 255.255.255.0 dns servers 192.0.2.2 192.0.2.3
Obtaining the DNS servers on only one interface
The DNS server list is global and a system with multiple network interfaces can obtain the list on only the preferred interface by disabling DNS configuration and enabling it on the desired interface:dns none if etherhw:00:00:5e:00:53:00 dns auto
Disabling dhclient
dhclient(8) can be disabled on an interface by disabling configuration of the inet and dns protocols:inet none dns none