Re: DHCP addresses on LAN
- From: J.J. O'Shea <try.not.to@xxxxxxxxxxx>
- Date: Wed, 19 Apr 2006 07:50:03 -0400
On Wed, 19 Apr 2006 07:02:11 -0400, Karel Koskuba wrote
(in article <karel-4D8126.12021019042006@xxxxxxxxxxxxxxxxxxx>):
I have two Macs <-> Airport Extreme <-> ADSL router
The router (10.0.0.2) acts as a DHCP server.
Recently one of the Macs started to have a 169 address and wouldn't
connect to internet. It looked like the local DHCP server ran out of
addresses so I increased the address range and it all works again.
a 169.254.x.y IP address indicates that the device in question has been set
to use DHCP, but that it can't detect a usable DHCP server.
I had a small address range of 10.0.0.3 - 10.0.0.14
Why? You've got a Class A network. Use it.
as I understood that
the addresses are rotated as lease time expires and my lease time was 0
(which I read somewhere meant 1 day).
A lease time of 0 is _zero_ hours. I don't know if DHCP will work properly
with that lease time.
<http://www.comptechdoc.org/independent/networking/guide/netdhcp.html>
If there are conflicts, addresses
can be 'abandoned' and not re-used again.
Yes they can, once the lease period is up. Except that you don't have a valid
lease period. Why'd you change the default? Usually it's 8 days, or at least
that's what I've usually seen with home/small office routers such as
Airports.
I don't seem to find any
information on what happens to 'abandoned' addresses - can they be put
back into the useable pool?
Yes.
The Airport base station is 10.0.0.3 and stays that way all the time.
You really shouldn't have the router IP in the DHCP lease pool. I'd hard-set
the router IP to, say, 10.0.0.1, and specifically exclude some IPs, so as to
have space for items which require fixed IPs, such as the router, a printer,
a server, etc. My router is set to a Class C network, and the first ten slots
are excluded from the DHCP pool. I have my router, a printer, and a server in
the 1st 10, using fixed IPs. Everyone else gets DHCP from the pool, with a
lease time of the default 8 days.
The two Macs' addresses seem to slowly creep up (until they hit
10.0.0.14 and the other went 169). I don't think there would be any
address conflicts on my LAN so perhaps the addresses are not re-used. Is
leasetime 0 an unlimited time - i.e. leases never expire? Should I set
it to something like 24 hours? And why is the airport's address fixed?
Because you have to have a fixed address for the router or the other devices
won't know where it is. They have to know where it is to get DHCP info, and
so they know where the gateway to other networks (such as, for example, the
internet...) is. No fixed IP for router, serious problems on your net.
I was strongly advised to use DHCP but as we're talking about my (very
small) LAN, what's the problem of assigning local fixed addresses?
Simplicity. Just plug in a device and go. Expandability. Just plug in a _new_
device and go. If you have fixed addresses, you get to record each one and
ensure that you don't use any twice. This can be a pain with the 254
addresses in a Class C. It's begging for trouble with the umpty-ump million
addresses in a Class A.
They
are not seen by the ISP so don't interfere with anything there and I
don't see why would they need to be dynamically assigned on my LAN. I
would be much happier if the LAN addresses remained constant.
If you set the lease info to a reasonable period you should see your IPs
remain constant effectively forever, unless you turn off the machine for an
extended period. The IP my router gets from my ISP is set by DHCP; as my
router has not been turned off for a long time, I've had that very same IP
for a substantial period and will have it for longer still. I've set the
router to hand out 244 IPs on this side of the system; the other 10 in the
Class C are excluded from the pool and are available for use as fixed IPs. My
main machine has both wired and wireless NICs; I usually use the wired
connection, but if I turn on the wireless connection I get the same IP. This
is because the DHCP pool is large enough that _new_ devices get new IPs. The
router builds a routing table which recognises the MAC addresses on the NICs,
and where possible hands back the same IP to that NIC, no matter how long
it's been off... unless the IP has been given to a new device. As I have
under a dozen devices on the net, some of them using the fixed IPs excluded
from DHCP, and I have 244 available IPs, this has not happened. I have one
Windows machine which gets booted infrequently, about once every week-10
days, and it keeps the same IP, despite not being around at the halfway point
in the lease and frequently not being around at the end of the lease.
Could someone shed light on this conundrum?
you set the lease time too low, and you set the DHCP pool too small. Increase
one or both.
And you might want to check your subnet masks. If they're anything other than
255.0.0.0 and you don't have a good reason why not or the term CIDR means
nothing to you, you might consider making them 255.0.0.0. Just a thought.
--
email to oshea dot j dot j at gmail dot com.
.
- References:
- DHCP addresses on LAN
- From: Karel Koskuba
- DHCP addresses on LAN
- Prev by Date: DHCP addresses on LAN
- Next by Date: Re: DHCP addresses on LAN
- Previous by thread: DHCP addresses on LAN
- Next by thread: Re: DHCP addresses on LAN
- Index(es):
Relevant Pages
|