NAME | SYNOPSIS | FEATURES | DESCRIPTION | WARNINGS | EXTENDED DESCRIPTION | COMMAND LINE | CONFIGURATION | FILES | ATTRIBUTES | SEE ALSO | AUTHOR
BPF
The dhclient command is a target utility.
The Internet Software Consortium DHCP client, dhclient, provides a means for configuring one or more network interfaces using the Dynamic Host Configuration Protocol, BOOTP protocol, or, if these protocols fail, by statically assigning an address.
Many options are defined for DHCP. The implementation of dhclient in this release takes only the subnet-mask option into account. Other options are silently ignored.
The DHCP protocol allows a host to contact a central server which maintains a list of IP addresses which may be assigned on one or more subnets. A DHCP client may request an address from this pool, and then use it on a temporary basis for communication on the network. The DHCP protocol also provides a mechanism whereby a client can learn important details about the network to which it is attached, such as the location of a default router, the location of a name server and so on.
On startup, dhclient reads the /image/sys_bank/dhclient.cf for configuration instructions. It then gets a list of all the network interfaces that are configured in the current system. For each interface, it attempts to configure the interface using the DHCP protocol.
A mobile host which may sometimes need to access a network on which no DHCP server exists may be preloaded with a lease for a fixed address on that network. When all attempts to contact a DHCP server have failed, dhclient will try to validate the static lease, and if it succeeds, will use that lease until it is restarted.
A mobile host may also travel to some networks on which DHCP is not available but BOOTP is. In that case, it may be advantageous to arrange with the network administrator for an entry on the BOOTP database, so that the host can boot quickly on that network rather than cycling through the list of old leases.
The names of the network interfaces that dhclient should attempt to configure may be specified on the command line. If no interface names are specified on the command line dhclient will identify all network interfaces, elimininating non-broadcast interfaces if possible, and attempt to configure each interface.
The dhclient command will normally run in the foreground until it has configured an interface, and then will revert to running in the background. To run force dhclient to always run as a foreground process, the -d flag should be specified. This is useful when running dhclient under a debugger, or when running it out of inittab on System V systems.
If dhclient should listen and transmit on a port other than the standard (port 68), the -p flag may be used. It should be followed by the udp port number that dhclient should use. This is mostly useful for debugging purposes. If the -p flag is specified, the client will transmit responses to servers at a port number that is one less than the one specified - i.e., if you specify -p 68, then the client will listen on port 68 and transmit to port 67. Datagrams that must go through relay agents are sent to the port number specified with the -p flag - if you wish to use alternate port numbers, you must configure any relay agents you are using to use the same alternate port numbers.
The -lf flag may be used to change the lease output file from the default of /var/db/dhclient.leases.
The -pf flag may be used to change the PID file from the default of /var/run/dhclient.pid.
The -q flag may be used to reduce the amount of screen output from dhclient.
The -1 flag cause dhclient to try once to get a lease. If it fails, dhclient exits with exit code two.
The syntax of the dhclient.cf(4CC) file is discussed separately.
/image/sys_bank/dhclient.cf
/var/db/dhclient.leases
/var/db/dhclient.leases~
/var/run/dhclient.pid
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
The dhclient command was written by Ted Lemon <mellon@vix.com> under a contract with Vixie Labs. Funding for this project was provided by the Internet Software Consortium. Information about the Internet Software Consortium can be found at http://www.isc.org/isc.
This client was substantially modified and enhanced by Elliot Poger for use on Linux while he was working on the MosquitoNet project at Stanford.
The current version owes much to Elliot's Linux enhancements, but was substantially reorganized and partially rewritten by Ted Lemon so as to use the same networking framework that the Internet Software Consortium DHCP server uses.
NAME | SYNOPSIS | FEATURES | DESCRIPTION | WARNINGS | EXTENDED DESCRIPTION | COMMAND LINE | CONFIGURATION | FILES | ATTRIBUTES | SEE ALSO | AUTHOR