- From: Stewart Brodie <stewart.brodie@xxxxxxxxxxxx>
- Date: Mon, 03 Jul 2006 19:49:48 GMT
Theo Markettos <theom+news@xxxxxxxxxxxxxxxxxxxxxx> wrote:
Steven Pampling <steve.pampling@xxxxxxxxxxxxx> wrote:without
In article <49f*pOFkr@xxxxxxxxxxxxxxxxxxxxxxxxxxx>, Theo Markettos
Note also in this case it's inadvisable to power down the router
all the other machines being powered down first. It won't damage
anything, but when the router is switched off it forgets which IP
addresses it has handed out. When switched on again it might hand out
an address that's it gave another machine before being switched off,
which could cause a clash.
Machines using DHCP *properly* deal with this situation.
How does this work? My understand was that DHCP hands out a 'lease' for a
particular IP address, which means the machine checks out an IP address
for that period of time then, when the lease has expired, it has to check
back in to the DHCP server to receive a new IP address (which might be the
same one as before). If the DHCP server is rebooted, how do the machines
know their address has been invalidated until they renew their lease?
Ah, right, it seems the server can invalidate all clients by broadcasting
a DHCPNAK message. This doesn't seem to be mandated in the specification
- do servers actually do this when they boot up?
The server usually maintains a database which it keeps in non-volatile
storage so it can reload the database on a restart. Where it doesn't, it
just doesn't know, so it's up to the clients to be vigilant too.
From memory of implementing all this many years ago (i.e. E&OE :-), when youask for an address (DHCPREQUEST) and the server offers you one (DHCPOFFER),
it is up to the client to verify that it is not a duplicate and to reject
the address by sending a DHCPNAK. Of course the server ought to be doing
the same checks (you just broadcast an arp who-has for the IP address and
see if anybody shouts).
Clients try to renew their leases *before* the expiry date. First attempt
is typically half way through the lease's life, and intervals between retry
attempts become shorter the closer the cut-off time gets. You don't want to
get to the deadline and then try to renew (in fact, you can't use the
address after the cut-off time - you have to go back to DHCPREQUEST again).
TTOTD: When you configure the lease time in the DHCP server, don't foret to
check the units in which the expiry time is specified. When you set it to 1
thinking it's in minutes (because you're testing your client you want leases
to expiry quickly) and actually it's in seconds, you get an awful lot of
DHCP traffic very fast. :-)
- Prev by Date: Re: Risc PC for web server
- Next by Date: Re: Router
- Previous by thread: Re: Router
- Next by thread: Re: Router