Dual DNS server farms in dhcpd.conf
Simon Hobson
dhcp1 at thehobsons.co.uk
Tue Apr 28 08:43:06 UTC 2009
John Tabasz (jtabasz) wrote:
>I have a situation where I want to use dhcpd.conf to serve up addresses
>that are statically assigned. I have previously used the following to do
>this:
>
>shared-network TEST {
>
>subnet 192.168.200.0 netmask 255.255.255.0 {
>option routers 192.168.200.1;
> option subnet-mask 255.255.255.0;
> option domain-name-servers 10.1.1.25,10.1.2.25,10.1.3.25;
> option domain-name "mydomain.com";
>deny unknown-clients;
>}
>
> host dev5c.mydomain.com {
> hardware ethernet 0:3:ba:11:b1:75;
> fixed-address 192.168.200.165;
> option host-name "dev5c";
> }
>
>}
>
>This worked fine until a new requirement came up that the PCs on the
>network and the Unix workstations on the same subnet should receive a
>different set of DNS server IP addresses.
First off, ditch the shared-network, it's only going to confuse
things. Putting the host statements inside a scope other than global
isn't generally a good idea - some stuff is inherited from where they
are defined, but the host declaration is globally valid, the result
being that a host can get some options from one subnet, and others
from another.
Also, is there only one subnet ? It makes a big difference to options
available to you.
One option would be to simply add a dns server option to the host
declarations for the Unix boxes. Eg :
host x.mydomain.com {
hardware ethernet 0:3:ba:11:b1:75;
fixed-address 192.168.200.165;
option host-name "x";
option domain-name-servers a.b.c.d;
}
Rather than add this to each host declaration, you can put them in a
group like this :
group
option domain-name-servers a.b.c.d;
host x.mydomain.com {
hardware ethernet 0:3:ba:11:b1:75;
fixed-address 192.168.200.165;
option host-name "x";
}
host y.mydomain.com {
hardware ethernet 0:3:ba:11:b1:76;
fixed-address 192.168.200.166;
option host-name "y";
}
}
--
Simon Hobson
Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
More information about the dhcp-users
mailing list