Configuration problem

Sten Carlsen stenc at s-carlsen.dk
Sun May 3 15:39:07 UTC 2009


I think it does exactly what you have asked it to do. You may want to
ask a bit differently. See below:

MickB wrote:
> Hi,
>
> I post on this mailing-list because I encounter a configuration
> problem of my DHCP server. After many tests and careful read of the
> man pages, I didn't succeed to solve it. I even suspect a bug.
>
> Configuration used:
>    * Linux 2.6.28.9
>    * Glibc 2.8
>    * DHCPd v4.1.0
>
> Here's some explanations.
> I have a single subnet: 192.168.0.0/28. I have declared two clients
> classes:
>    - one for clients which MAC address begins by 00:FF,
>    - one for clients which MAC address doesn't begin by 00:FF.
>
> Objective:
> - In the first class, clients get an IP in the pool 192.168.0.4 -
> 192.168.0.12, and get a router address
> - In the second class, clients get an IP in the pool 192.168.0.13 -
> 192.168.0.14, and no router address
>
> For this purpose, this DHCP server configuration is working correctly:
>
> ### Classes ###
> class "test" {
>        match if substring (hardware, 1, 2) = 00:FF;
> }
>
> ### Subnets ###
> subnet 192.168.0.0 netmask 255.255.255.240 {
>
>        pool {
>                deny members of "test";
>                range 192.168.0.4 192.168.0.12;
>                option routers 192.168.0.1;
This is the only option routers statement, placed in a pool it applies
to that pool only.
>        }
>
>        pool {
>                allow members of "test";
>                range 192.168.0.13 192.168.0.14;
>        }
>
>        option subnet-mask 255.255.255.240;
>        option broadcast-address 192.168.0.15;
>
> }
>
> However, it doesn't work anymore when I had a host declaration with a
> fixed-address like this:
>
> host toto {
>        hardware ethernet 00:12:A8:13:E1:40;
>        fixed-address 192.168.0.3;
This address is outside the pools, so it will take only options from the
general scope, not from the first pool. The address must be outside the
pools to avoid that address being given away to somebody else
dynamically; a host statement does not reserve the address from being
used in pools.
You may want to add the routers statement also to the host statement;
more likely you want to look at the group statement.

man dhcpd.conf is your friend.
> }
>
> In such case, the host "toto" doesn't get the router address. I
> believe it isn't coherent. Host "toto" doesn't belong to the "test"
> class, so the first pool in the subnet should match. The range is only
> for the case of dynamic address allocation and is no use in this case.
> But "option routers 192.168.0.1" should be taken into account, no ?
>
> Any help would be appreciated :)
>
>
> Mickaël
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

-- 
Best regards

Sten Carlsen

No improvements come from shouting:

       "MALE BOVINE MANURE!!!" 




More information about the dhcp-users mailing list