LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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
 
LinkBack Search this Thread
Old 02-22-2008, 10:05 AM   #1
saurabh_pandya4
LQ Newbie
 
Registered: Feb 2008
Posts: 2

Rep: Reputation: 0
How can i exclude an ip address from given range in dhcp server?


How can i exclude an ip or some ip addresses form given range in dhcp server
for example:
if the range is 192.168.0.1 to 192.168.0.254
and i want to exclude 192.168.0.10 to 192.168.0.15 addresses not to be given
 
Old 02-22-2008, 02:58 PM   #2
bwayson
LQ Newbie
 
Registered: Nov 2006
Location: Ventura California USA
Distribution: openSUSE
Posts: 23

Rep: Reputation: 3
Hmmm. I'm not sure of that is possible. My suggestion is to make your range 192.168.0.16 - 192.168.0.254, leaving .001 - .015 for static IPs. Or, move the static range to .001 - .005 and make the DHCP range .006 - .254.
 
Old 02-22-2008, 11:38 PM   #3
saurabh_pandya4
LQ Newbie
 
Registered: Feb 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bwayson View Post
Hmmm. I'm not sure of that is possible. My suggestion is to make your range 192.168.0.16 - 192.168.0.254, leaving .001 - .015 for static IPs. Or, move the static range to .001 - .005 and make the DHCP range .006 - .254.

Yes it will work but is there any file where i can enter some ips to be excluded within the range?
 
Old 02-23-2008, 12:00 AM   #4
bmarx
Member
 
Registered: Dec 2004
Distribution: Slackware, Arch, FreeBSD
Posts: 202

Rep: Reputation: 34
bwayson's solution sounds pretty valid. Why exactly do you want to include all of the addresses in the dhcp server config, then exclude some, rather than just use a range that does not include the addresses that you want excluded?

That said, http://www.linuxjunkies.org/articles...junkified.html has some good info:

Even though DHCP gives out IP address dynamically, it also has the ability to reserve an IP address for a certain computer. In this sense it's almost as if the client computer has a static IP even though it uses DHCP to get it. This is useful if you want to be able to put entries in your /etc/hosts file and not have to worry about the entry becoming invalid over time.

The first thing we must do is to specify a name for the computer as a helpful identifier

host box1

Note that similarly to the subnet grouping, we are now starting a sub-group as seen by the addition of the curly braces. This allows us to have multiple host definitions within one subnet group.

This next line is what allows us to uniquely identify one computer from another. The hardware ethernet address is the same as the MAC address. This information can be found by running the command ifconfig <interface> | grep HWaddr on a client computer for linux and ipconfig /all for a client computer running windows.

hardware ethernet 00:50:AB:AB:AB:AB;

And finally this next line tells the dhcpd server what IP address you always want to be assigned to this computer. Note that I intentionally make all IP's assigned this way outside of the DHCP range we specified earlier. This is not a must as the dhcp server is smart enough to not give out two IP's simultaneously but it helps in being able to quickly recognize which clients used this feature.

fixed-address 192.168.1.7;

If you have multiple ranges of IP addresses on the same subnet, you can add multiple range options to a subnet declaration.

subnet 198.168.1.0 netmask 255.255.255.0
{
range 10.0.1.10 10.0.1.100;
range 10.0.1.300 10.0.1.500;
}
 
Old 03-05-2009, 03:39 AM   #5
danyee22
LQ Newbie
 
Registered: Mar 2009
Posts: 5

Rep: Reputation: 0
DHCP and GateWay

Hi, guys how are you doing?


I have configured the DHCP from the server and entered the Gateway but there is no internet access I mean it is not working i don't now may be they are in deferent subnet or I made a mistake during the configuration?

HERE IS BRIEFLY DURING CONFIGURATION OF DHCP


1. Server IP is in class A which is 10.62.0.1-10.62.0.254 and the included address in the Range are (10.62.0.2-10.62.0.254)

The excluded Address from the Range is the server IP (10.62.0.1) and the printer server (10.62.0.10)

2. The Router Gateway is 192.168.1.1 (which is Dynamic IP Address from ISP)


Please guys I need help I think I miss some thing in the configuration


THANKS

Last edited by danyee22; 03-05-2009 at 04:11 AM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Single DHCP server ,to provide the ip address to a MAC address in two different subne alix123 Linux - Software 5 05-08-2007 11:16 PM
Exclude a mac Address in Dhcp server alnmostafa Linux - Networking 3 12-30-2006 09:20 AM
How To know if a host configured with DHCP has obtained IP address from DHCP server? Prassanta Suse/Novell 1 06-29-2006 09:48 AM
DHCP Server MAC Address found, IP address not assigned wmburke Linux - Wireless Networking 17 11-17-2004 10:33 AM
Apache2 Server - not working outside local ip address range Robstro Linux - Networking 3 06-14-2004 05:32 PM


All times are GMT -5. The time now is 07:24 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