LinuxCommandLibrary

dhclient

TLDR

Obtain IP address for interface

$ dhclient [eth0]
copy
Release current lease
$ dhclient -r [eth0]
copy
Release and obtain new lease
$ dhclient -r [eth0] && dhclient [eth0]
copy
Run in foreground with verbose output
$ dhclient -d -v [eth0]
copy
Use specific configuration file
$ dhclient -cf [/etc/dhcp/dhclient.conf] [eth0]
copy
Request specific IP address
$ dhclient -s [192.168.1.100] [eth0]
copy

SYNOPSIS

dhclient [options] [interface...]

DESCRIPTION

dhclient is the Internet Systems Consortium DHCP client. It dynamically configures network interfaces by obtaining IP addresses, subnet masks, gateways, and DNS servers from DHCP servers.
The client implements the DHCP protocol, handling lease negotiation, renewal, and release. Configuration options in dhclient.conf allow customizing requests, including requesting specific options or addresses.
dhclient maintains lease information in lease files, allowing it to request the same address on reconnection. It can manage multiple interfaces simultaneously and supports both DHCPv4 and DHCPv6.

PARAMETERS

INTERFACE

Network interface(s) to configure.
-r
Release the current lease.
-d
Run in foreground (debug mode).
-v
Verbose output.
-cf FILE
Use specified configuration file.
-lf FILE
Use specified lease file.
-s ADDRESS
Request specific IP address.
-4
Use DHCPv4 only.
-6
Use DHCPv6 only.
--help
Display help information.

CAVEATS

Requires root privileges. May conflict with network managers like NetworkManager. Lease files accumulate over time. Some options require server support.

HISTORY

dhclient is part of the ISC DHCP package, originally developed by Ted Lemon at the Internet Systems Consortium. ISC DHCP has been the reference implementation of DHCP since the late 1990s, though it entered maintenance mode as newer implementations emerged.

SEE ALSO

dhcpcd(8), ip(8), ifconfig(8), networkctl(1)

Copied to clipboard