Network Config · Lesson 3 of 5
dhclient
0 / 4 checkpoints answered
dhclient is an ISC DHCP client found on some Linux systems. Many current installations instead let NetworkManager, systemd-networkd, or another service run its own DHCP client. Starting a second client on a managed interface can create competing addresses, routes, DNS settings, and lease state.
Identifying the Active Client
Before invoking dhclient, inspect the configuration owner and processes:
$ nmcli device status
$ networkctl status
$ ps -ef | grep '[d]hclient'
Use the tools that exist on the host. If a manager owns the interface, request DHCP through that manager rather than launching a separate client.
CheckWhy avoid starting dhclient on an already managed interface?
press 1/2/3 to answer · → next lesson
Requesting a Lease Explicitly
On an unmanaged test interface where dhclient is the intended owner, specify the interface and use verbose output:
$ sudo dhclient -v enp1s0
Running without an interface can act on multiple eligible interfaces. Configuration and lease paths vary by package and invocation; common names include dhclient.conf and dhclient.leases, but do not assume one fixed location.
CheckWhy specify enp1s0 in a manual request?
press 1/2/3 to answer · → next lesson
Releasing a Lease
dhclient -r INTERFACE requests release and can remove usable configuration. It is disruptive and does not guarantee the server is reachable to receive the release. Do not release a lease merely to inspect it, especially on a remote-management path.
CheckWhat is the operational risk of dhclient -r enp1s0?
press 1/2/3 to answer · → next lesson
Verifying the Applied Lease
After a controlled request, verify more than the address:
$ ip address show dev enp1s0
$ ip route show
$ resolvectl status
Inspect the manager or client logs and lease lifetime, then test the intended name resolution and application. A DHCPACK can carry incorrect options, and successfully assigning an address does not prove gateway or DNS reachability.
CheckWhat should be verified after obtaining a lease?
press 1/2/3 to answer · → next lesson
Summary
You can now use dhclient only when it is the intended owner of an interface.
- Discover the active network manager and DHCP client.
- Avoid competing clients on one interface.
- Scope a manual request to a named test interface.
- Treat release as disruptive and verify the complete lease result.
Lesson complete
You finished dhclient. Nice work — keep the momentum going.