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 23rd February 2009
vdubjunkie vdubjunkie is offline
Port Guard
 
Join Date: Feb 2009
Posts: 17
Default dhcpd and multiple subnets

All,

Hi, I used to post in bsdforums.org, but dropped off the map for a bit. Recently ice storms took all my hardware down hard, and long story short, I took the opportunity to reload OBSD. I thought I remembered having dhcpd serve two different interfaces with two totally different subnets, but I cannot for the life of me figure out how to make this configuration work. Was I just mistaken, and my AP was doing the dhcp previously? I was sure it wasn't.

Anyway, my config is this.

xl1 - wired net - 10.100.0.0/24
xl2 - wireless net - 172.16.0.0/24

If anybody had a sample config or even a push in the right direction it would be much appreciated.
Reply With Quote
  #2   (View Single Post)  
Old 23rd February 2009
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Real Name: Ben
Spam Refugee
 
Join Date: Jul 2008
Location: Rotterdam, The Netherlands
Posts: 336
Default

I've never done a 'dual dhcpd' setup, but I'd assume something like this could work:

Code:
dhcpd_ifaces="xl1 xl2"
In dhcpd.conf:

Code:
subnet 10.100.0.0 netmask 255.255.255.0 {
  range [...];
  option [...];
  option [...];
  default-lease-time [...];
}

subnet 172.16.0.0 netmask 255.255.255.0 {
  range [...];
  option [...];
  option [...];
  default-lease-time [...];
}
In other words: declare all options in separate subnet containers. This is all under the assumption that dhcpd will know which interface a dhcp request is coming in on and which subnet to associate with that request.
Reply With Quote
  #3   (View Single Post)  
Old 23rd February 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

You really need to stop giving FreeBSD advice in the OpenBSD sections DutchDaemon..

To specify interfaces dhcpd(8) should listen on, add change dhcpd_flags="" to something like dhcpd_flags="xl1 xl2" in /etc/rc.conf.local.

See: http://www.openbsd.org/faq/faq6.html#DHCPserver

Perhaps something like this will work?
Code:
shared-network WIRED {
	option domain-name-servers 10.100.0.1;
	subnet 10.100.0.0 netmask 255.255.255.0 {
		option routers 10.100.0.1;
		range 10.100.0.2 110.100.0.254;
	}
}

shared-network WIRELESS {
	option domain-name-servers 172.16.0.1;
	subnet 172.16.0.0 netmask 255.255.255.0 {
		option routers 172.16.0.1;
		range 172.16.0.2 172.16.0.254;
	}
}
This configuration assumes xl1 and xl2 are configured to have the addresses 10.100.0.1 and 172.16.0.1 respectively, and that a DNS server.. like named(8).. is listening on both interfaces.

Note; I'm not aware of any wireless 3Com/xl(4) devices.. so that was probably a typo.
Reply With Quote
  #4   (View Single Post)  
Old 11th March 2009
vdubjunkie vdubjunkie is offline
Port Guard
 
Join Date: Feb 2009
Posts: 17
Default

Thanks a lot for the reply BSDfan666. I'll try implementing this tonight.
__________________
anything done in the GUI is done more efficiently in cli
Reply With Quote
  #5   (View Single Post)  
Old 11th March 2009
vdubjunkie vdubjunkie is offline
Port Guard
 
Join Date: Feb 2009
Posts: 17
Default

oh. for the record, I did actually do both search google and FAQs. Not sure how I would have missed it in either place, but oh well. I also already had the rc.conf.local issue sorted out, but had my two networks listed under the same "shared-network". When I get home I'll be able to test it.
__________________
anything done in the GUI is done more efficiently in cli
Reply With Quote
  #6   (View Single Post)  
Old 11th March 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Apologies, that is my signature.. it is not directed at you personally.

Sorry for the confusion.
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, vista and wlan hamba FreeBSD Ports and Packages 5 8th September 2009 04:34 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
dhcpd:No Buffer space avaible marsjanq OpenBSD General 8 13th September 2008 07:52 PM
dhcpd problems... dynamic and static leases present edhunter FreeBSD General 7 16th May 2008 02:34 PM


All times are GMT. The time now is 05:18 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