Subject: [dhcwg] Re: Re: Re: udhcpd Win98 interoperability

From: [email-masked]
Date: Fri, 23 Aug 2002 08:59:54 +0200

Russ Dill <[email-masked]> schrieb am 22.08.02 20:24:34: 
> > > if (wrong net) {  
> > >  should nak;  
> > > } else {  
> > >  if (!ok ip) {  
> > >   should nak;  
> > >  }  
> > > }  
> > >   
> > > but then the "If the DHCP server has no record of this client" clause is  
> > > thrown in. At what stage of the block does this go in? I would say this  
> > > clause would go *before* 'if (wrong net)'.  
> > >   
> > > I'll cc this to the Dynamic Host Configuration working group. Hopefully  
> > > they'll have some answers.  
> > >   
> >   
> > I would replace (!ok ip) by (requested ip is ours but is no longer/has never been  
> > assigned to the requesting client). Then the conditions (wrong net) and (requested 
ip  
> > is ours but...) are mutually exclusive.  
> >   
> > So my parsing of the RFC would look loke that:  
> >   
> > if (wrong net) {  
> >   should nak;  
> > } else if (requested ip is ours but...) {  
> >   should nak;  
> > } else {  
> >   remain silent;  
> > }  
>  
> define 'ours' a little better, do you mean if there is a static mapping 
> for the address that we take care of? 
>  
 
OK, I would say the requested address should be NAKed if 
- we have static mapping for it on another client 
- it is already assigned to one of our other clients 
- it was assigned to the requesting client, but the lease has already timed out 
 
Do you think this is reasonable? 
  
______________________________________________________________________________
WEB.DE MyPage - Ultimatives Kommunikationstool! Ihre Message sofort
online! Domain aenderbar! http://www.das.ist.aber.ne.lustige.sache.ms/

_______________________________________________
dhcwg mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/dhcwg

---

From: Ted Lemon <[email-masked]>
Date: Fri, 23 Aug 2002 11:39:42 -0500

> - it was assigned to the requesting client, but the lease has already 

I think you already intended this, but just to be sure, you should also 
send a NAK if the requested network doesn't match the client's current 
location.   In order for this to work properly, though, the DHCP server has 
to have an accurate understanding of what subnets are connected to what 
physical networks, since you don't want the server to send a DHCPNAK just 
because it isn't aware that the client's subnet is valid for the network to 
which it is attached.

---

From: Russ Dill <[email-masked]>
Date: 27 Aug 2002 11:08:56 -0700

> Do you think this is reasonable? 

I'm not sure if nak'ing a lease that timed out is the correct behavior
if the address is still available, the lease can just be extended as if
it never ran out (apparent disagreement on system clocks). Here is the
new behavior my server has if it has no record of the client:

lease = find_lease_by_chaddr(packet.chaddr);

...

if (lease) {

...

/* what to do if we have no record of the client */
} else if (server_id) {
	/* SELECTING State */
                        
} else if (requested) {
	/* INIT-REBOOT State */
	if ((lease = find_lease_by_yiaddr(requested_align))) {
		if (lease_expired(lease)) {
			/* probably best if we drop this lease */
                	memset(lease->chaddr, 0, 16);
		/* make some contention for this address */
		} else sendNAK(&packet);
	} else if (requested_align < server_config.start ||
		   requested_align > server_config.end) {
		sendNAK(&packet);
	} /* else remain silent */

} else {
	/* RENEWING or REBINDING State */
}

note: code is under the terms of the GPL