Blocking IP Address ranges in dhcpd.conf
Hi,
I need to block a range of IP Addresses in dhcpd.conf on my Linux system. I would like to exclude the range 192.168.20.200 - 192.168.20.220 Here's a snippet of my dhcpd.conf file which defines a range 192.168.20.100 - 192.168.20.150 subnet 192.168.20.0 netmask 255.255.255.0 { pool { range 192.168.20.100 192.168.20.150; } } Can I add a pool, range using allow or deny to block the dhcpd daemon from issuing IP addresses in the range 192.168.20.200 - 192.168.20.220? Thanks, Paul. |
Hmmmmmmmm...
I don't know how on earth those addresses can be leased with your current configuration that you gave here...or maybe i'm just not looking straight today:P I usually just use: subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.2 192.168.0.250; } for the whole range of adress 2 - 250 In your example your pool is only 100 - 150 meanining that addresses between 200-220 will never be leased to computers from the DHCP server, because it isn't set! in my example to exclude them from a list do the following... subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.2 192.168.0.199; range 192.168.0.221 192.168.0.250; } thats what I use |
The correct configuration to do excludes, even tho these dont exist in linux, only windows, is as follows...
subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.2 192.168.0.199; range 192.168.0.222 192.168.0.250; } You missed one number unforgivn, 192.168.0.222 instead of 221, *pushes your head back to the other side* there ya go |
Thanks for the response. I'm implementing a DHCP Configuration utility for Linux and I was looking at Windows as an example. I didn't know that excludes didn't exist in Linux.
Paul. |
It's a technicality really. In windows you have to set the exclusions... in linux with dhcpd you set the ranges you want but no exclusions. you can pick a range from .100 - .200 and then another range from .205 - .210 and the technical "exclusion" if you, will is from .201 to .204
|
All times are GMT -5. The time now is 06:56 PM. |