Exclude an ip range in DHCP server scope
-
Hi,
One of my interfaces is on 192.168.45.0/23
I want to enable a dhcp server with scope range from 192.168.45.50 .. 192.168.46.200 WHILE I also EXCLUDE the range 192.168.46.1 .. 192.168.46.49 from the same scope.
How do I do that…?
regards
Tor
-
http://www.subnet-calculator.com/cidr.php
Based on that calculator, you can't do that.. if you don't believe calculate with binary notation.. -
I didn't want to define it with binary notation, I asked for either a possibility to exclude a subrange from inside a larger scope or a possibility to define two scope ranges. The latter I have always used with dhcpd in linux, like this:
subnet 192.168.100.0 netmask 255.255.254.0 {
range 192.168.101.200 192.168.101.50;
range 192.168.100.200 192.168.100.50;
option subnet-mask 255.255.254.0;
option broadcast-address 192.168.100.255;
option routers 192.168.100.1;
option domain-name-servers 192.168.100.10,192.168.100.11;
option netbios-name-servers 192.168.100.10;
}Can I define something like this manually in pfsense too…?
Secondly, if I do some scripting for such manually settings, where can I put the script to have it run automatically each time after the webinterface has updated or modified something...?
Thanks for comments on this
regards Tor
-
http://www.subnet-calculator.com/cidr.php
Based on that calculator, you can't do that.. if you don't believe calculate with binary notation..Whilst they're on the same network there is no reason why you shouldn't be able to exclude them from DHCP, a completely unrelated network protocol.
In PfSense however, I have no idea.
-
First of all:
192.168.44.0/23 = 192.168.44.0 - 192.168.45.255 is on same network
192.168.46.0/23 = 192.168.46.0 - 192.168.47.255 is on same network192.168.45.0 /23 is not on same network as 192.168.46.0 /23
And secondly: I don't think that excluding is possible, unless you modify php checking and you give those exluded ip's as static entries.
-
only one range is supported, you'd have to hack the source to do that. dhcpd.conf comes from /etc/inc/services.inc IIRC.