DHCP(8) DHCP(8) NAME dhcp - configure network interface details using DHCP SYNOPSIS ip/dhcp [ -bdmpr ] [ -g gateway ] [ -h hostname ] [ -x net ] ifcdir [ localip [ localmask ]] DESCRIPTION Dhcp uses the Dynamic Host Configuration Protocol (DHCP) to configure the ip(3) interface represented by ifcdir (eg, /net/ipifc/1). The interface must have a device already bound to it. Dhcp uses the MAC address of that device in its requests. Dhcp broadcasts a DHCP request for an address and various network parameters. It takes the first acceptable offer, sets the interface to that address, and writes the address and parameter values, in ndb(6) format, to /net/ndb, where cs(8), dns(8) and others will find them. If the address is provided with a limited lease, dhcp itself returns, but it leaves a process in the background that periodically renews the lease (or requests a new address if the lease is not renewed). If localip is given, dhcp attempts to reacquire that address. If successful, it configures the interface with that address (and mask if supplied), maintaining any lease as before. If it cannot reacquire the address, it broad- casts a request for a new address, as above. The options are: -b Use plain BOOTP without the DHCP options -d Enable debugging output on standard output -g gateway Suggest gateway as the default gateway (the server might change it) -h hostname Use hostname as the current host's name in DHCP mes- sages -m Monitor the DHCP status and print a summary on standard output whenever it changes -n Do not configure the interface -p Print the resulting configuration on standard output Page 1 Plan 9 (printed 12/22/24) DHCP(8) DHCP(8) -r Retry DHCP periodically until it succeeds -x net Use mount point net to access the network, and write the results to net/ndb (default: /net) EXAMPLE Allocate a new interface, bind an ether device to it, and configure it with dhcp: x=`{cat /net/ipifc/clone} echo bind ether /net/ether0 >/net/ipifc/$x/ctl && ip/dhcp /net/ipifc/$x SOURCE /appl/cmd/ip/dhcp.b SEE ALSO ip(3), ndb(6), cs(8), dns(8) DIAGNOSTICS Dhcp returns an error status if it receives no acceptable reply, unless the -r option is given to force retries. Page 2 Plan 9 (printed 12/22/24)