Provided by: udhcpc_0.9.8cvs20050303-2_i386
udhcpc - very small DHCP client
The udhcp client negotiates a lease with the DHCP server and executes a
script when it is obtained or lost.
-c CLIENTID, --clientid=CLIENTID
Send the client identifier CLIENTID.
Do not fork after obtaining a lease.
-H HOSTNAME, --hostname=HOSTNAME
Send the client hostname HOSTNAME.
Alias for -H HOSTNAME.
-i INTERFACE, --interface=INTERFACE
Exit with failure if a lease cannot be obtained.
-p FILE, --pidfile=FILE
Write the process ID of the daemon to FILE.
Exit after obtaining a lease.
-r ADDRESS, --request=ADDRESS
Request IP address ADDRESS.
-s FILE, --script=FILE
Use script FILE.
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,
bound 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,
renew 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 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
HOME The inherited HOME, or "/" if it is unset.
PATH The inherited PATH, or "/bin:/usr/bin:/sbin:/usr/sbin" if it is
ip The client IP address.
siaddr The BOOTP next server option.
sname The BOOTP server name option.
The BOOTP boot file option.
subnet The subnet mask.
The timezone offset from UTC in seconds.
router The list of routers.
The list of time servers.
The list of IEN 116 name servers.
dns The list of DNS servers.
logsvr The list of MIT-LCS UDP log servers.
The list of RFC 865 cookie servers.
lprsvr The list of LPR servers.
The host name.
The length in 512-octet blocks of the bootfile.
domain The domain name of the network.
The client’s swap server.
The path of the client’s root dist.
ipttl The TTL.
mtu The MTU.
The broadcast address.
ntpsrv The list of NTP servers.
wins The list of WINS servers.
lease The lease time in seconds.
The DHCP message type (safely ignored).
The server IP address.
Reason for a DHCPNAK.
tftp The TFTP server name.
The bootfile name.
Script run when leases are obtained or lost.
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.