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 19th July 2015
bceverly bceverly is offline
Shell Scout
 
Join Date: Mar 2015
Posts: 88
Question Resolving DHCP hostnames - OpenBSD router

Hi everyone. I've been googling myself to death and have come up dry so I'm hoping some kind person will point me in the right direction.

I finally took the plunge and built a small server (dual Intel gigabit NICs and an Intel Atom processor) that I'm running stable 5.7 on to use as my firewall / router for my home network.

Everything is working great, I'm using unbound with dnscrypt for resolving IPs from the internal network and dhcpd to assign IP addresses to my local client machines. The key servers on the network are resolvable from their hostnames by hardcoded local-data and local-data-ptr records in my unbound.conf file.

However, I'd like for the systems that get IP addresses assigned by DHCPd to be resolvable by hostname as well. I have seen some tutorials that recommended using multiple DNS servers (unbound, NSD, and DNSMasq - http://www.22decembre.eu/2014/04/14/...nd-unbound-en/) but I was wondering if there was an easier way.

For exmaple, is there an integration between dnsd and unbound yet?

Thanks in advance for any suggestions / help.
Reply With Quote
  #2   (View Single Post)  
Old 19th July 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

I'm not sure what you're asking for, exactly. Please excuse me if I misunderstand.

Do you want to give dynamically assigned pool addresses specific domain names? If so, you can use domain names such as "pool-<nnn>" so that you can refer to devices assigned temporary leases from the pool.

If you have devices that you would like to configure with a lease that is effectively static and unchanging, so that you can give these devices permanently assigned domain names ... yet use each device's DHCP client to simplify configuration... then set fixed addresses in dhcpd.conf(5) by using a combination of the hardware ethernet and fixed-address provisioning rules for each device. These addresses must be outside the range of any pool of dynamic addresses. There's an example of this in /etc/examples/dhcpd.conf should this be what you wished to accomplish.
Reply With Quote
  #3   (View Single Post)  
Old 19th July 2015
bceverly bceverly is offline
Shell Scout
 
Join Date: Mar 2015
Posts: 88
Default

Sorry - rereading what I wrote originally shows me that I wasn't very clear.

I would like to dynamically assign IP addresses to clients on the local network out of a pool using dhcpd. However, I would like all clients on the network to be able to resolve each other by hostname without me having to manually maintain a list of static entries in my unbound.conf file.

For example, hostname foo connects to the network and is assigned the IP address 10.0.127.102 by dhcpd. Then hostname bar connects and is assigned the IP address 10.0.127.103 by dhcpd. I would like to be able to (from host bar) issue:

ping foo

and have it resolve to 10.0.127.102 without me having to make manual entries in unbound.conf along the lines of:

local-data: "foo. IN A 10.0.127.102"
local-data-ptr: "10.0.127.102 foo"

Thanks again for any suggestions / pointers.
Reply With Quote
  #4   (View Single Post)  
Old 19th July 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Ah, thank you for the clarification. There are no built-in solutions, and I'm unsure about third party offerings. The built-in dhcpd(8) server has integration with PF, but that is not what you're looking for.

Whatever solution you devise, it will need to account for devices which do not communicate a client hostname during DHCP negotiation. Hostnames are optional, and not all devices that have DHCP clients use them.

I'm not aware of any toolset to do this for OpenBSD -- but my ignorance doesn't mean one doesn't already exist.

If you are a Perl programmer, you might be able to use net/p5-Net-DHCP as a component to an ultimate solution.

PFSense has announced the ability to do this, but whether that is their dhcpleases tool -- which integrates dhcpd lease entries with /etc/hosts -- or an actual DHCP <-> Unbound integration as you desire, I do not know.

Last edited by jggimi; 19th July 2015 at 03:46 PM. Reason: two typos
Reply With Quote
  #5   (View Single Post)  
Old 19th July 2015
bceverly bceverly is offline
Shell Scout
 
Join Date: Mar 2015
Posts: 88
Default

Thanks Jggimi. I appreciate the follow-up.
Reply With Quote
Reply


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
OpenBSD 5.7 Router Issues Peter_APIIT OpenBSD General 8 18th June 2015 06:31 AM
OpenBSD Router & Wireless AP setup chigurh OpenBSD General 14 7th April 2015 06:56 PM
OpenBSD unable to configure DHCP on eth0 cravuhaw2C OpenBSD Installation and Upgrading 17 14th July 2014 07:43 AM
Google, hostnames and Middle Earth. xmorg General software and network 1 21st February 2012 12:38 PM
Using OpenBSD as a second router paran0iaX OpenBSD Security 32 20th March 2009 04:51 AM


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