Amiga Unix — 68040 · 68060

Manual pages › System administration commands (1M)

dhcpc(1M)

get and keep a network address from a DHCP server

Package: dhcpc, added for amigaux.

dhcpc - get and keep a network address from a DHCP server

dhcpc [ -b seconds ] interface
dhcpc -x interface
dhcpc -q interface

dhcpc asks a DHCP server for an address for interface and keeps it: one dhcpc runs in the background for each interface that gets its address this way. It is normally started by ifup(1M) for an interface whose line in /etc/inet/interfaces says dhcp, and stopped by ifdown.

At start it first asks again for the address it held last, if that lease has not ended; otherwise it looks for a server. Before it uses an address a server gives it, dhcpc asks on the network whether another station has it (two ARP probes, a second apart); if one answers, it declines the address to the server and asks again ten seconds later. Once the lease is bound, dhcpc renews it with the same server halfway through, and with any server near its end; when it ends anyway, or a server refuses it, the address is taken off and dhcpc starts looking again, and goes on trying for as long as it runs. These times are counted from the system's start, not by the clock, so a clock set after the lease was bound (as the time step at boot sets it, by hours or by years) moves none of them.

dhcpc changes nothing itself: every address, route, host name and name-server change is made by /usr/lib/inet/dhcpc-hook, the same steps ifup uses for a static line, so a DHCP interface and a static one are set up alike. The machine's name is taken from the server only when /etc/inet/interfaces says hostname dhcp.

wait at most this long for the first lease before returning; without it, wait until there is one.
give the lease back to the server, take the address off, and stop the dhcpc of interface.
print the lease held for interface as name=value lines.

0
a lease is bound and applied (with -q: a lease is held now).
1
the interface cannot do DHCP (no driver for it, or it does not answer as DLPI requires), or another dhcpc already holds it.
2
no lease within seconds yet; the background dhcpc goes on trying.

/var/inet/dhcpc/interface.lease
the lease held, in the hook's DHCP_ names; DHCP_NTP holds the time servers the server named (option 42), which ntpsync(1M) asks first.
/var/inet/dhcpc/interface.pid
the background dhcpc.
/var/adm/dhcpc.log
what each dhcpc did.
/etc/inet/link.d/*
where the interface's device is found.

ifup(1M), ntpsync(1M), interfaces(4)

dhcpc sends no client identifier; servers know it by its station address. A renewal near the end of a lease is sent as a broadcast on the local network only, so a server reached through a relay agent cannot extend a lease that its first server stopped answering for.

6 November 2026 dhcp-client