Scroll to navigation

UDHCPC(8) GNU/Linux Administrator's Manual UDHCPC(8)

NAME

udhcpc - very small DHCP client

SYNOPSIS

udhcpc [OPTION]...

DESCRIPTION

The udhcp client negotiates a lease with the DHCP server and executes a script when it is obtained or lost.

OPTIONS

Send the client identifier CLIENTID.
Do not fork after obtaining a lease.
Send the client hostname HOSTNAME.
Alias for -H HOSTNAME.
Configure INTERFACE.
Exit with failure if a lease cannot be obtained.
Write the process ID of the daemon to FILE.
Exit after obtaining a lease.
Request IP address ADDRESS.
Use script FILE.
Display version.

USAGE

When an event occurs, udhcpc executes a script. There are four possible arguments to this script:

deconfig is used when udhcpc starts, and when a lease is lost. The script should put the interface in an up, but deconfigured, state.
bound is used when udhcpc moves from an unbound to a bound state. The script should configure the interface and set any other relevant parameters (e.g., default gateway, dns server, etc.).
renew is used when udhcpc when a lease is renewed. The interface is already configured, so the IP address will not change. Other parameters (e.g., default gateway, subnet mask, dns server) may.
nak is used when udhcpc receieves a NAK packet from the server. The enviromental variable $message will contain the reason for the NAK message if the server included one. Processing this message is optional, as the script will also be called with deconfig if need be.

Parameters are passed to the script via the following environment variables:

The inherited HOME, or "/" if it is unset.
The inherited PATH, or "/bin:/usr/bin:/sbin:/usr/sbin" if it is unset.
The interface.
The client IP address.
The BOOTP next server option.
The BOOTP server name option.
The BOOTP boot file option.
The subnet mask.
The timezone offset from UTC in seconds.
The list of routers.
The list of time servers.
The list of IEN 116 name servers.
The list of DNS servers.
The list of MIT-LCS UDP log servers.
The list of RFC 865 cookie servers.
The list of LPR servers.
The host name.
The length in 512-octet blocks of the bootfile.
The domain name of the network.
The client's swap server.
The path of the client's root dist.
The TTL.
The MTU.
The broadcast address.
The list of NTP servers.
The list of WINS servers.
The lease time in seconds.
The DHCP message type (safely ignored).
The server IP address.
Reason for a DHCPNAK.
The TFTP server name.
The bootfile name.

FILES

/usr/share/udhcpc/default.script
Script run when leases are obtained or lost.

NOTES

udhcpc responds to the following signals:

This signal causes udhcpc to renew the current lease or, if it does not have one, obtain a new lease.
This signal caused udhcpc to release the current lease.
2001-09-26 GNU/Linux