Charles.Forsyth20060303-partialeea662d19 years agoHistory
117 lines · 2.3 KB · Text
RawDownload
.TH DHCP 8.SH NAMEdhcp \- configure network interface details using DHCP.SH SYNOPSIS.B ip/dhcp[.B -bdmpr] [.BI -g " gateway"] [.BI -h " hostname"] [.BI -x " net].I ifcdir[.I localip[.I localmask]].SH DESCRIPTION.I Dhcpuses the Dynamic Host Configuration Protocol (DHCP) to configure the.IR ip (3)interface represented by.I ifcdir(eg,.BR /net/ipifc/1 ).The interface must have a device already bound to it..I Dhcpuses the MAC address of that device in its requests..PP.I Dhcpbroadcasts 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 andparameter values, in.IR ndb (6)format, to.BR /net/ndb ,where.IR cs (8),.IR dns (8)and others will find them.If the address is provided with a limited lease,.I dhcpitself returns, but it leavesa process in the background that periodically renews the lease (or requests a new address if the lease is not renewed)..PPIf.I localipis given,.I dhcpattempts 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 broadcasts a request for a new address, as above..PPThe options are:.TP.B -bUse plain BOOTP without the DHCP options.TP.B -dEnable debugging output on standard output.TP.BI -g " gateway"Suggest.I gatewayas the default gateway (the server might change it).TP.BI -h " hostname"Use.I hostnameas the current host's name in DHCP messages.TP.B -mMonitor the DHCP status and print a summary on standard output whenever it changes.TP.B -nDo not configure the interface.TP.B -pPrint the resulting configuration on standard output.TP.B -rRetry DHCP periodically until it succeeds.TP.BI -x " net"Use mount point.I netto access the network,and write the results to.IB net /ndb(default:.BR /net ).PD.SH EXAMPLEAllocate a new interface, bind an ether device to it, and configure it with.IR dhcp :.IP.EXx=`{cat /net/ipifc/clone}echo bind ether /net/ether0 >/net/ipifc/$x/ctl &&ip/dhcp /net/ipifc/$x.EE.SH SOURCE.B /appl/cmd/ip/dhcp.b.SH SEE ALSO.IR ip (3),.IR ndb (6),.IR cs (8),.IR dns (8).SH DIAGNOSTICS.I Dhcpreturns an error status if it receives no acceptable reply, unless the.B -roption is given to force retries.