Dual DNS server farms in dhcpd.conf

John Tabasz (jtabasz) jtabasz at cisco.com
Tue Apr 28 17:07:29 UTC 2009


Hi Simon,

Thanks for the response. So I understand properly,  when you say putting
the host statements inside a scope other than global isn't generally a
good idea, you are referring to the shared network scope plus the second
scope of the subnet, right?

As for your suggestion to add dns server statements to the sun boxes
declaration, I would love to avoid having to differentiate between sparc
and intel or Solaris and Windows, as there isn't a simple and reliable
way of doing this without adding complexity to the whole process of
building the .conf file. (At least in the way I'm doing it now)
In other words, I would have to know which of the hosts are PCs to be
able to do this. I could flag each entry in the database that I pull
this information from, but that means getting reliable information from
the users as they make requests for IPs and hostnames. Not always a good
practice to rely on the users. 

I was hoping there was a way to query the client for host type and use
the response to input the correct dns info.

Thanks,

John  

-----Original Message-----
From: dhcp-users-bounces at lists.isc.org
[mailto:dhcp-users-bounces at lists.isc.org] On Behalf Of Simon Hobson
Sent: Tuesday, April 28, 2009 1:43 AM
To: Users of ISC DHCP
Subject: Re: Dual DNS server farms in dhcpd.conf

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.
_______________________________________________
dhcp-users mailing list
dhcp-users at lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users



More information about the dhcp-users mailing list