proper behaviour on being refused a dhcp lease

David Collier from_busybox_maillist at dexdyne.com
Fri Dec 3 15:56:00 UTC 2010


If I run a dhcp client, and the server is absent, or refuses, or refuses
to renew, a lease, what should I do with the interface?

I assume that it is very bad form to allow any Ethernet traffic onto the
network with no dhcp assigned address.... but I'm not sure what to do to
avoid it.

I'd like to use the -try-again parameter on the udhcpc app to get dhcp to
keep trying periodically

Are any of these approaches right?
  remove all reference to the adapter from the routing tables?  
  run ifdown?
  set a conventionally ignorable IP address?

I assume that if I do ifdown, then I won't be able to try dhcp again in a
few minutes, as the "if" will be "down", and I won't get any warning from
udhcpc when it wants it "up" to make the request?

I saw some code which did something like ifconfig 0.0.0.0

Any suggestions welcome - is this covered in an RFC that I might
understand?

TVM

David


More information about the busybox mailing list