dhclient
100%

Network Config · Lesson 3

dhclient

Learn when and how to use dhclient without conflicting with the system's network manager.

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.

Why avoid starting dhclient on an already managed interface?

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.

Why specify enp1s0 in a manual request?

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.

What is the operational risk of dhclient -r enp1s0?

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.

What should be verified after obtaining a lease?

Lesson complete

You finished dhclient

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.

Keep your learning progress

Create a free account to save this lesson and continue learning on any device.

Create a free account
Next Lesson
Back to Network Config