[NTLUG:Discuss] DHCP
Chris Cox
cjcox at acm.org
Thu Sep 8 13:43:21 CDT 2005
Terry wrote:
> Is this an accurate statement (pertaining to a Linux DHCP server
> presiding over [mostly] MS PCs)?
>
> "Having a system with a static IP assignment that is inside the range
> of IPaddress' used by a DHC P server is not acceptable. Reason being:'
True. Long winded answer below to how a pool can be broken apart
to have certain IPs served up statically... even via dhcp.
> If a new computer comes on-line, it may be issued that particular
> IPaddress, and if so, there will be a problem. This may never happen
> on a small network. If there are only a handful of computers on the
> network (half a dozen or so), you may never run into this sort of
> problem. BUT, if and when the network grows and gets to be fifty or a
> hundred strong, sooner or later, this problem will rear it's ugly
> head. A computer will come on-line and be issued an IP address that
> has been set as a static address to another computer, .. . and then,
> later on, that other computer with the static IP address will come
> on-line, and at that point they will both compete for access that only
> one can have. During the competition neither of them will get any
> access and only when one gives up will the other gain any bandwidth or
> access to any outside networks. Fixed IPs should _only_ be assigned to
> IP address that are outside the range used by the DHCP server."
Microsoft doesn't handle this either btw. In each case the "reserved"
IP is taken out of the dhcp pool. You should NEVER have
a "static" IP that falls into a dhcp pool range. NEVER.
So.. with a ISC dhcpd... a subnet might look like:
subnet 192.168.181.0 netmask 255.255.255.0
{
option routers 192.168.181.1 ;
pool
{
range 192.168.181.20 192.168.181.33 ;
range 192.168.181.35 192.168.181.36 ;
range 192.168.181.38 192.168.181.70 ;
range 192.168.181.72 192.168.181.99 ;
range 192.168.181.101 192.168.181.120 ;
}
}
Where you can see that .34, .37, .71 and .100 have
been removed from what would normally be a simple
one liner describing the pool space.
Fixed addresses could still be served up by the ISC
dhcpd server using a bootp like protocol (if you want
to be 100% sure a client gets a particular IP yet
keep the client dhcp.. assuming the MAC address
dosen't change).
group {
ddns-domainname "mydomain.com";
use-host-decl-names on;
host megatron {
hardware ethernet 00:08:c7:bc:ce:78;
fixed-address 192.168.181.34;
}
... more fixed entries...
}
It is a better idea to change a host's IP address
to a value that is NOT defined in a pool rather than
breaking up the pool (gets messy).
More information about the Discuss
mailing list