DHCP server behavior in case of RENEW

vijay kanala vijaykanala776 at gmail.com
Tue Jun 28 07:35:53 UTC 2011


Hi All,
I am using busybox-1.18.5.

I have this scenario:
I have a standard linux client ( Fedora core 13, dhclient runs on
this) connected to my DSL router ( on which i am using busybox dhcp
sever).

Lets assume the host got an IP address allocated by DHCP server. The
dhcp client tries to renew in approximately half the lease time it
got.
Meanwhile if DSL router powers off and powers on ( either soft reboot
or hard reboot), it looses all lease information. After it powers on,
it continues to ignore all RENEW messages untill the client starts
from scratch.

For example, in case where lease time is 24 hours, it means the dhcp
client can not get renewal from 12 hours onwards ( assuming DSL router
rebooted in 0-12 hours) . The client needs to wait for extra 12 hours
to get a new IP. But shouldnt dhcp server send some kind of NAK so
that client is able to get a new IP?

I saw this code in server:
======================
if (server_id_opt    /* client is in SELECTING state */
			 || requested_ip_opt /* client is in INIT-REBOOT state */
			) {
				/* "No, we don't have this IP for you" */
				send_NAK(&packet);
			} /* else: client is in RENEWING or REBINDING, do not answer */

			break;
=============================

Shouldnt we  send NAK instead of "do not answer" ?
Or is there any other way to solve this problem?


Thanks for your help.
-- Vijay


More information about the busybox mailing list