xref: /dragonfly/contrib/dhcpcd/README.md (revision a31d3627)
1# dhcpcd
2
3dhcpcd is a
4[DHCP](http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol) and a
5[DHCPv6](http://en.wikipedia.org/wiki/DHCPv6) client.
6It's also an IPv4LL (aka [ZeroConf](http://en.wikipedia.org/wiki/Zeroconf))
7client.
8In layman's terms, dhcpcd runs on your machine and silently configures your
9computer to work on the attached networks without trouble and mostly without
10configuration.
11
12If you're a desktop user then you may also be interested in
13[Network Configurator (dhcpcd-ui)](http://roy.marples.name/projects/dhcpcd-ui)
14which sits in the notification area and monitors the state of the network via
15dhcpcd.
16It also has a nice configuration dialog and the ability to enter a pass phrase
17for wireless networks.
18
19dhcpcd may not be the only daemon running that wants to configure DNS on the
20host, so it uses [openresolv](http://roy.marples.name/projects/openresolv)
21to ensure they can co-exist.
22
23See [BUILDING.md](BUILDING.md) for how to build dhcpcd.
24
25If you wish to file a support ticket or help out with development, please
26[visit the Development Area](https://dev.marples.name/project/profile/101/)
27or join the mailing list below.
28
29## Configuration
30
31You should read the
32[dhcpcd.conf man page](http://roy.marples.name/man/html5/dhcpcd.conf.html)
33and put your options into `/etc/dhcpcd.conf`.
34The default configuration file should work for most people just fine.
35Here it is, in case you lose it.
36
37```
38# A sample configuration for dhcpcd.
39# See dhcpcd.conf(5) for details.
40
41# Allow users of this group to interact with dhcpcd via the control socket.
42#controlgroup wheel
43
44# Inform the DHCP server of our hostname for DDNS.
45hostname
46
47# Use the hardware address of the interface for the Client ID.
48#clientid
49# or
50# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
51# Some non-RFC compliant DHCP servers do not reply with this set.
52# In this case, comment out duid and enable clientid above.
53duid
54
55# Persist interface configuration when dhcpcd exits.
56persistent
57
58# Rapid commit support.
59# Safe to enable by default because it requires the equivalent option set
60# on the server to actually work.
61option rapid_commit
62
63# A list of options to request from the DHCP server.
64option domain_name_servers, domain_name, domain_search, host_name
65option classless_static_routes
66# Respect the network MTU. This is applied to DHCP routes.
67option interface_mtu
68
69# Most distributions have NTP support.
70#option ntp_servers
71
72# A ServerID is required by RFC2131.
73require dhcp_server_identifier
74
75# Generate SLAAC address using the Hardware Address of the interface
76#slaac hwaddr
77# OR generate Stable Private IPv6 Addresses based from the DUID
78slaac private
79```
80
81The [dhcpcd man page](/man/html8/dhcpcd.html) has a lot of the same options and more, which only apply to calling dhcpcd from the command line.
82
83
84## Compatibility
85dhcpcd-5 is only fully command line compatible with dhcpcd-4
86For compatibility with older versions, use dhcpcd-4
87
88## Upgrading
89dhcpcd-7 defaults the database directory to `/var/db/dhcpcd` instead of
90`/var/db` and now stores dhcpcd.duid and dhcpcd.secret in there instead of
91in /etc.
92
93dhcpcd-9 defaults the run directory to `/var/run/dhcpcd` instead of
94`/var/run` and the prefix of dhcpcd has been removed from the files.
95
96## ChangeLog
97We no longer supply a ChangeLog.
98However, you're more than welcome to read the
99[commit log](http://roy.marples.name/git/dhcpcd.git/log/) and
100[archived release announcements](http://roy.marples.name/archives/dhcpcd-discuss/).
101