dhclient

Navigation
computing: software: operating systems: Linux: dhclient

Note: This page needs to be merged with, as they both refer to the same command.

Overview
dhclient, known on some systems as dhcpcd, is a both an interactive command and a daemon for managing a client connection to a DHCP server.

The normal network restart process (invoked either at boot time or manually by "/etc/init.d/networking restart" or similar) automatically runs dhclient for every interface which has the "dhcp" attribute specified in the /etc/network/interfaces file.

Normal Behavior
The standard process, as with most DHCP clients, is for dhclient to send a broadcast request for DHCP service on port 67, corresponding to this message printed by dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67

At some point, dhclient either receives the proper acknowledgment: DHCPACK from 192.168.0.1 ...or it does not, in which case it tries for a little while longer and then takes some default action which may be distro-dependent. The network card being configured may or may not still have access to the network if the request fails, depending on what the default action is and how appropriate it is to the existing situation.

dhclient also overwrites the resolv.conf file, so if you have alternate DNS servers listed in that file, they will get clobbered if you accidentally run dhclient.

Options
The default broadcast address of 255.255.255.255 can be overridden by the -s option to request DHCP service only from a particular DHCP server: dhclient -s server eth0 Where:
 * server is the network name (domain name, WINS name, or whatever will resolve correctly) or IP address of the desired DHCP server
 * eth0 is the name of the network interface to configure via DHCP. "eth0" is the most common, but this can be "eth1", "wlan0", etc. (Need instructions on how to determine what network interfaces are actually available.)