LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 06-08-2004, 05:36 AM   #1
pmcdaid
LQ Newbie
 
Registered: Jun 2004
Posts: 9

Rep: Reputation: 0
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.
 
Old 06-08-2004, 07:57 AM   #2
unforgivn
Member
 
Registered: Jul 2003
Location: south africa
Distribution: RH 9 hopefully fedora core 2 soon :P
Posts: 34

Rep: Reputation: 15
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.
Old 06-08-2004, 01:39 PM   #3
Astro
Member
 
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 660

Rep: Reputation: 30
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
 
Old 06-09-2004, 09:09 AM   #4
pmcdaid
LQ Newbie
 
Registered: Jun 2004
Posts: 9

Original Poster
Rep: Reputation: 0
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.
 
Old 06-09-2004, 09:18 AM   #5
Astro
Member
 
Registered: Jan 2003
Location: Ballston Lake, NY
Distribution: Slackware, Debian
Posts: 660

Rep: Reputation: 30
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dhcpd subnet declaration problems in dhcpd.conf vcrispo Linux - Networking 6 07-15-2005 10:32 AM
dhcpd.conf "range" spanning address classes? michaelsanford Linux - Networking 2 04-08-2005 05:19 PM
Dhcpd two IP ranges via two nics rvjaarsveld Linux - Networking 10 10-14-2004 08:29 AM
Blocking Iptables Ranges SuperSadSmile Linux - Security 6 02-09-2004 02:57 AM
network address ranges WeNdeL Linux - Networking 4 03-12-2003 10:56 AM


All times are GMT -5. The time now is 09:25 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration