DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 8th May 2014
bsdsource bsdsource is offline
Port Guard
 
Join Date: Apr 2014
Posts: 34
Default dhcpd.conf question

I want my dhcpd server to serve only the specified static ip addresses. My dhcpd.conf looks like this:

Code:
option  domain-name "ph.comcast.net";
option  domain-name-servers 68.105.28.12, 68.105.29.12, 68.105.28.11;

subnet 10.255.255.0 netmask 255.255.255.0 {
   option routers 10.255.255.1;
   range 10.255.255.100 10.255.255.101;

   host PRIMARY {
      fixed-address 10.255.255.100;
      hardware ethernet bc:66:f4:65:66:62;
   }

   host NETBOOK {
      fixed-address 10.255.255.101;
      hardware ethernet 00:33:b1:43:33:18;
   }
I'm not clear on how I would proceed with the range option. I tested by removing the line:

Code:
range 10.255.255.100 10.255.255.101;
Appears to work perfectly fine without it. If I only want only static ip addresses served then is the appropriate solution to just remove the range option?
Reply With Quote
  #2   (View Single Post)  
Old 8th May 2014
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default

Quote:
Originally Posted by azdps View Post
Appears to work perfectly fine without it. If I only want only static ip addresses served then is the appropriate solution to just remove the range option?
I believe this is correct. Have a look at dhcpd.conf(5) :

Quote:
Originally Posted by oman
For any subnet on which addresses will be assigned dynamically, there must be at least one range statement.
Turning that around, if you don't want to serve dynamic addresses, because you only want to serve static, then no range should be needed.
Reply With Quote
  #3   (View Single Post)  
Old 8th May 2014
bsdsource bsdsource is offline
Port Guard
 
Join Date: Apr 2014
Posts: 34
Default

Thanks for the clarification, I appreciate it.
Reply With Quote
  #4   (View Single Post)  
Old 8th May 2014
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by azdps View Post
I'm not clear on how I would proceed with the range option. I tested by removing the line:

Code:
range 10.255.255.100 10.255.255.101;
Appears to work perfectly fine without it. If I only want only static ip addresses served then is the appropriate solution to just remove the range option?
range is required if dynamic addresses are to be provided. If you only want to manage static addresses, the range statement is not necessary.

Besides reading dhcpd.conf(5) as pointed out by IdOp, you may benefit from the short discussion found in Section 6.4.2 of the FAQ.

Last edited by ocicat; 8th May 2014 at 05:46 PM. Reason: added missing participle
Reply With Quote
  #5   (View Single Post)  
Old 11th May 2014
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

Actaully dhcpd.conf man pages are must read for anybody who is maintaining DHCP server whether the one from the base or ISC DHCP from the ports.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCPd questions mikesg OpenBSD General 2 11th October 2013 12:34 PM
pf.conf label question toro7 OpenBSD Security 9 5th January 2012 08:56 PM
dhcpd and dns sputnik OpenBSD General 8 8th May 2009 02:50 PM
dhcpd within ezjail? zelut FreeBSD General 7 10th February 2009 10:31 PM
quick question about optimizations in /etc/make.conf thevirtuesofxen FreeBSD Installation and Upgrading 7 15th July 2008 10:29 AM


All times are GMT. The time now is 03:24 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick