per-pool routers in dhcpd.conf?
Sten Carlsen
stenc at s-carlsen.dk
Sat Jul 25 15:34:00 UTC 2020
> On 25 Jul 2020, at 16.45, Alexis Huxley <alexishuxley at gmail.com> wrote:
>
> Hi Sten,
>
>> For what it's worth, my setup uses 2 pools in the same network where one pool has a gateway and the other pool has no gateway. These are separated by class and subclass statements. I have another pool for unknown clients, they get a different network and no gateway (can't talk to any other host and no access to internet).
>
> please could you post some of it showing the subnet/pools/class/subclass
> structure please? Thanks!
This should be the main parts.
dhcpd.conf:
~~~~~~~~~~~~
# class definitions
class "gateway-0" {
match hardware;
}
class "gateway-5" {
match hardware;
}
# Subnet Declarations
shared-network hjemme{
authoritative;
subnet 192.168.16.0 netmask 255.255.255.0{
option domain-name "s-carlsen.dk";
option domain-name-servers 192.168.16.20;
option domain-name-servers ns2.s-carlsen.dk;
option subnet-mask 255.255.255.0;
# B-NODE: Broadcast - no WINS
option netbios-node-type 1;
pool{
# NO router - these must not touch the internet
allow members of "gateway-0";
range 192.168.16.160 192.168.16.195;
}
pool{
# these go to the FIBER link
option routers 192.168.16.5;
allow members of "gateway-5";
range 192.168.16.50 192.168.16.150;
}
}
subnet 192.168.161.0 netmask 255.255.255.0{
max-lease-time 300;
default-lease-time 150;
pool{
# These are not known (yet) and shall not see any other host
deny known-clients;
deny members of "gateway-0";
deny members of "gateway-5";
range 192.168.161.100 192.168.161.150;
}
}
subnet 192.168.122.0 netmask 255.255.255.0{
# Not a real network, "virbr0"
}
}
include "/etc/dhcp/subclass.conf";
~~~~~~~~~~~~
subclass.conf:
~~~~~~~~~~~~
subclass "gateway-0" 1:00:80:f0:8f:fd:27; # host argus3
subclass "gateway-0" 1:00:80:f0:a0:02:40; # host argus2
subclass "gateway-0" 1:28:10:7b:10:5c:a2 {ddns-hostname argus4;} # D-Link 932-L
subclass "gateway-0" 1:de:ad:be:ef:fe:ed {ddns-hostname ard;} # host Arduino #1
subclass "gateway-5" 1:00:11:32:05:BB:E9 {always-broadcast on;ddns-hostname ds-209;} # host ds-209
subclass "gateway-5" 1:00:16:cb:95:7a:7c; # host silver2
subclass "gateway-5" 1:00:17:f2:41:7c:ff; # host Silver2-wlan
subclass "gateway-5" 1:00:18:56:22:d6:93; # host eye-fi-01
subclass "gateway-5" 1:00:1b:63:05:99:1b; # host Sus-01
subclass "gateway-5" 1:00:1b:63:1d:1a:f4; # Host Sus
subclass "gateway-5" 1:00:1e:c2:14:ee:7b; # host LX9900261-cable
subclass "gateway-5" 1:00:1e:c2:a6:f5:35; # host LX9900261-wlan
subclass "gateway-5" 1:00:40:63:de:6b:cf; # host sorte-via
~~~~~~~~~~~~
>
> Alexis
> _______________________________________________
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
>
> 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