Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-08-2004, 06:36 AM
|
#1
|
LQ Newbie
Registered: Jun 2004
Posts: 9
Rep:
|
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.
|
|
|
06-08-2004, 08:57 AM
|
#2
|
Member
Registered: Jul 2003
Location: south africa
Distribution: RH 9 hopefully fedora core 2 soon :P
Posts: 34
Rep:
|
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
|
|
1 members found this post helpful.
|
06-08-2004, 02:39 PM
|
#3
|
Member
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 665
Rep:
|
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
|
|
|
06-09-2004, 10:09 AM
|
#4
|
LQ Newbie
Registered: Jun 2004
Posts: 9
Original Poster
Rep:
|
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.
|
|
|
06-09-2004, 10:18 AM
|
#5
|
Member
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 665
Rep:
|
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 12:15 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|