DHCPD issues.
Glenn Satchell
glenn.satchell at uniq.com.au
Thu Jan 12 04:09:52 UTC 2012
Looks like it's getting closer. Note that the dhcpd network and subnet
descriptions must match what the real network setup looks like. If you
have a single 172.31.0.0/16 subnet then that's what dhcpd.conf must reflect.
Normal practise is to put your host{} declarations outside the subnet.
They are global in scope, meaning that defining them in the subnet does
*not* bind them to tht subnet in any way. Trust us, for this setup it's
just better to do it that way.
Where you have multiple pools in a subnet, you must define a way for
given clients to only be valid in the pool you want. The default is for
them to be valid in all pools. You can do this with a class, a group of
host statements, or leet them be randomly assigned.
You say you want dynamic DNS updates to be working, but I can't see and
zone statements in there to define the setup of how dhcpd should toalk
to named. In named.conf you need to allow dhcpd to update the zones,
either using a key or allowing by IP address. For Ip address you should
use localhost plus any addresses on interfaces. Check your bind logs to
see if it's denying updates. There is an example config for named.conf
and dhcpd.conf in the dhcpd.conf man page.
Also in dhcpd.conf is an example using classes and subclasses for
assigning membership of the class by hardware (MAC) address.
class "allocation-class-1" {
match pick-first-value (option dhcp-client-identifier, hardware);
}
class "allocation-class-2" {
match pick-first-value (option dhcp-client-identifier, hardware);
}
subclass "allocation-class-1" 1:8:0:2b:4c:39:ad;
subclass "allocation-class-2" 1:8:0:2b:a9:cc:e3;
subclass "allocation-class-1" 1:0:0:c4:aa:29:44;
An example for PXE clients is:
# PXE boots for x86 boxes
class "PXE" {
match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
next-server tftp.example.com;
filename "pxegrub.I86PC.Solaris_10-1";
# 10 minutes should be long enough for PXE
max-lease-time 600;
# don't use multicast tftp option - may not need this
vendor-option-space PXE;
option PXE.mtftp-ip 0.0.0.0;
}
So now you could have a few different classes. Each of the ranges should
be distinct, and not overlap with any others. Allowing one class denies
members of all other classes.
pool {
range ...
allow members of "PXE";
}
pool {
range ...
allow members of "allocation-class-1";
}
pool {
range ...
allow members of "allocation-class-2";
}
# catchall for anything that didn't match a class
pool {
range ...
}
regards,
-glenn
On 01/12/12 11:24, ~Stack~ wrote:
>> On 01/11/2012 05:37 PM, Sten Carlsen wrote:
>>> On 12/01/12 0:15, ~Stack~ wrote:
>>> option domain-name "project.local";
>>> option domain-name-servers 172.31.200.2;
>>> authoritive;
>>> ddns-updates on;
>> You may want this as well:
>> /ddns-update-style xxx;/
>
> Thanks. The man page doesn't have a ton of detail on the options so I
> just chose interim.
>
>>> ddns-domainname "project.local";
>>> ddns-rev-domainname "in-addr.arpa.";
>>>
>>> shared-network project.local{
>>> option routers 172.31.0.1;
>>> default-lease-time 86400;
>>> max-lease-time 86400;
>>> deny unknown-clients;
>>> subnet 172.31.0.0 netmask 255.255.0.0 {}
>>>
>>> host dev001.project.local { hardware ethernet 08:00:27:11:4B:E8;
>>> fixed-address 172.31.201.1; }
>>>
>>> group {
>>> filename "pxelinux.0";
>>> next-server 172.31.200.2;
>>> host aa001.project.local { hardware ethernet 08:00:27:15:BF:F5;
>>> fixed-address 172.31.202.1; }
>>> host hp001.project.local { hardware ethernet 08:00:27:15:A3:1D;
>>> fixed-address 172.31.203.1; }
>>> }
>>> }
>> I wonder why you have a shared-network as there is only one subnet here?
>
> Left over from all the various incarnations of this file. I have removed
> it now. Thanks.
>
> I just tried it all again. Even with a fresh PXE install the host still
> is not picking up its name nor is it able to ping any other host by DNS
> name except for the DNS/DHCP/TFTP server.
>
> Thanks for replying!
>
> ~Stack~
>
More information about the dhcp-users
mailing list