Re: Router



Theo Markettos <theom+news@xxxxxxxxxxxxxxxxxxxxxx> wrote:

Steven Pampling <steve.pampling@xxxxxxxxxxxxx> wrote:
In article <49f*pOFkr@xxxxxxxxxxxxxxxxxxxxxxxxxxx>, Theo Markettos
<theom+news@xxxxxxxxxxxxxxxxxxxxxx> wrote:
Note also in this case it's inadvisable to power down the router
without
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 you
ask 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. :-)


--
Stewart Brodie
.



Relevant Pages

  • Re: DNS issue - clients not registering
    ... DHCP servers and clients can register with DNS to provide ... this update service if the DNS server supports DNS with dynamic updates. ... A Windows 2000 DHCP server can register with a DNS server and update pointer ...
    (microsoft.public.windows.server.active_directory)
  • Re: A/D Dynamic DNS Update Problems
    ... When I say DHCP clients, I don not refer to Static ip clients. ... By default XP clients request IPs to an available DHCP server, and the DHCP server takes care of the rest. ... When the client dynamically updates its DNS information in this situation, the client's DNS time stamp is not updated until the Refresh interval takes effect. ...
    (microsoft.public.windows.server.active_directory)
  • ie 6.0
    ... > laptop moves from one network to another, its IP address lease might need ... > request might go to a different server that will not extend the lease ... > for a period of time, it will not provide the time to requesting clients. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • RE: DHCP Scope split
    ... Reserved clients, recognised by MAC number, who must always be given a lease ... the DHCP server is not allowed to assign these. ... has a reservation on the address which is registered with the DHCP server. ...
    (microsoft.public.windows.server.networking)
  • Re: dhcp-client cleanup
    ... it would be sad if a client could reset a server. ... and might refuse to give me another lease because it thinks I already have one And since I have no access to my ISP's dhcp server configuration I cannot verify the above assumption. ... I've even tried copying over the lease file from the sarge /var/run/ but that did not work either. ...
    (comp.os.linux.networking)