One subnet, two pools, one with a default gateway, the other without
Ugo Bellavance
ugob at lubik.ca
Mon Aug 12 15:29:13 UTC 2013
Hi,
I'm running dhcpd on RHEL5, package version dhcp-3.0.5-33.el5_9. Here
is what I'm trying to achieve:
- One subnet (192.168.x.0/24)
- Two pools (ranges)
- One pool will be given all the network parameters (including the
default gateway of 192.168.x.1. This pool will be the "default" pool
- The other pool will have the same network parameters than the first
one, except for the fact that it will provide no default gateway at all
to the dhcp clients. The clients that will be in this pool are only the
ones defined in a class (mac address).
Here is what I tried:
[...]
class "Win-test" {
match hardware;
}
subclass "Win-test" 1:64:31:50:33:B5:23;
subclass "Win-test" 1:F4:CE:46:31:43:E2;
subnet 192.168.x.0 netmask 255.255.255.0 {
option domain-name-servers 192.168.x.x,192.168.x.x3;
option domain-name "sampledomain.local";
option routers 192.168.x.1;
option subnet-mask 255.255.255.0;
# Reservations
host HOST1 { hardware ethernet 00:50:56:94:3C:6F; fixed-address
192.168.x.152; }
host HOST2 { hardware ethernet 00:0f:fe:8a:5a:cf; fixed-address
192.168.x.151; }
# Pools
pool {
range 192.168.x.170 192.168.x.200;
option domain-name-servers 192.168.x.x,192.168.x.x;
option domain-name "sampledomain.local";
option subnet-mask 255.255.255.0;
allow members of "Win-test";
}
pool {
range 192.168.x.50 192.168.x.150;
option domain-name-servers 192.168.x.x,192.168.x.x;
option domain-name "sampledomain.local";
option routers 192.168.x.1;
option subnet-mask 255.255.255.0;
allow unknown-clients;
deny members of "Win-test";
}
Using that configuration, all clients get the subnet's config (so even
the ones I want to have no default gateway get one). If I remove the
subnet's config, the "Reservations" hosts don't get a default gateway
while they should.
Any insight would be greatly appreciated.
Thanks,
Ugo
More information about the dhcp-users
mailing list