[CentOS] DHCP static hosts and subnet configuration

Sat Oct 18 15:15:55 UTC 2008
Marcus Moeller <mm at gcug.de>

Dear John.

> The two commands I posted for you to set it up that way can be done in a
> Single File Configuration. The last config file I posted for you was for two
> NICS on two different Subnets.

I am not yet sure if we are talking about the same problem, so here is
my current configuration. Unless I add an host definition WITH
fixed-address statement to the 10.2.0.0 subnet, too LaptopWLAN won't
get an IP address within this network range.

...
authoritative;
ddns-update-style interim;
ddns-updates on;

update-static-leases true;

key "rndckey" {
        algorithm       hmac-md5;
        secret          "my-rndckey";
}

zone extra.net
{
        primary 127.0.0.1;
        key rndckey;
}

zone 2.10.in-addr.arpa
{
        primary 127.0.0.1;
        key rndckey;
}

zone intra.net
{
        primary 127.0.0.1;
        key rndckey;
}

zone 2.168.192.in-addr.arpa
{
        primary 127.0.0.1;
        key rndckey;
}

failover peer "intra-net" {
         primary;
         address 192.168.2.2;
         port 647;
         peer address 192.168.2.50;
         peer port 647;
         max-response-delay 60;
         max-unacked-updates 10;
         mclt 3600;
         split 128;
         load balance max seconds 3;
}

subnet 10.2.0.0 netmask 255.255.0.0
{
        pool {
                allow unknown-clients;
                ignore client-updates;
                deny dynamic bootp clients;
                option routers 10.2.1.2;
                option router-discovery false;
                option domain-name "extra.net";
                option domain-name-servers 10.2.1.2;
                option ip-forwarding false;
                option ntp-servers 10.2.1.2;
                ddns-domainname "extra.net";
                range 10.2.2.1 10.2.2.254;
        }

}

subnet 192.168.2.0 netmask 255.255.255.0
{
        pool {
                failover peer "intra-net";
                deny unknown-clients;
                ignore client-updates;
                deny dynamic bootp clients;
                option routers 192.168.2.2;
                option router-discovery false;
                option domain-name "intra.net";
                option domain-name-servers 192.168.2.2, 192.168.2.50;
                option netbios-name-servers 192.168.2.50;
                option netbios-dd-server 192.168.2.50;
                option netbios-node-type 2;
                option ip-forwarding false;
                option ntp-servers 192.168.2.50;
                ddns-domainname "intra.net";
                range 192.168.2.150 192.168.2.151;

                host LaptopWLAN {
                        hardware ethernet 00:15:17:17:0E:A8;
                        fixed-address 192.168.2.201;
                        ddns-hostname "LaptopWLAN";
                }
                # ... a LOT of other host declarations ...
        }
}
...

Best Regards
Marcus