Using DHCP /and/ name recognition w/o running BIND
m.seaman at infracaninophile.co.uk
Tue Jul 6 03:23:26 PDT 2004
On Mon, Jul 05, 2004 at 01:20:19PM -0700, Clint Olsen wrote:
> I am running a small network behind a D-Link firewall router, and I have a
> multitude of machines running on the NAT side. Generally, I use static IPs
> on the network for the FreeBSD machines (since they are often servers) and
> the Windows clients use DHCP. It would be nice if there was some way to be
> able to use the symbolic name for the windows clients since their IP
> addresses are free to change all the time. The D-Link does have the
> concept of static DHCP where each MAC address is assigned an IP to always
> be issued when requested, but I'm concerned that if/when the D-Link gives
> up the ghost that I'll have to scramble and find something that's a bit
> more robust and not tied to my router capabilities.
You could run a DHCP server on one of your FreeBSD boxes. Install the
net/isc-dhcp3-server port -- it's fairly easy to set up for a small
home network, and you can back up the configuration and even the
database of DHCP leases should you have a sudden need to transfer the
service to a different machine.
If the machines you are providing DHCP service for are permanently
installed on your network, you might want to bump up the DHCP lease
times to several months. Which is a fairly simple way of allowing
machines to keep the same address for a reasonable amount of time.
Alternatively you can hardwire the lease on a particular IP number to
MAC address -- in which case your DHCP server is really doing BOOTP,
but that's neither here nor there from the client's point of view.
The third option is to setup Dynamic DNS -- so that the clients can
attach their hostnames to the IP addresses your DHCP server gives
them. This always seemed over-complicated to me, and gives too much
potential for hackery and other mischief. Better to predefine the
names corresponding to the IP number, and force the client machine to
look up and use that.
> It seems to be overkill to run BIND for just my small network here of 4 or
> so machines, so I was hoping there was a more lightweight way to handle
I don't think so. Lack of DNS performance is something that will
cause the most harm to your experience of using the net. Running your
own DNS recursive server is the best way to get good DNS performance.
For a home network, you can also run authoritive local domains from
the same server without to much trouble. So long as your DNS server
is on your private network and not accessible externally this should
be OK. For public use though, mixing up authoritative and recursive
DNS functions on the same server is bad juju, and should only be done
> There seems to be a current undocumented feature of most of these routers
> that if you use the router as a DNS server entry that it automagically
> forwards those requests to the DNS entries on the WAN side. However, for
> tools like nslookup that make explicit connections to the server, this does
> not work correctly.
Yes -- that's simply DNS recursion. You ask the DNS server on your
router "what is the IP number corresponding to www.freebsd.org": a
recursive server will track the answer down for you, by asking in turn
the root servers, the .org TLD servers and the freebsd.org servers on
your behalf. Or it will tell you the cached answer it got from doing
all that a few minutes previously. An authoritative server will just
answer "dunno", unless it happens to be one of the freebsd.org
You should still be able to use the usual DNS tools to query other
servers directly. eg:
% dig @ns0.freebsd.org. www.freebsd.org. IN A
If your router is filtering out DNS traffic other than through it's
own server, then you'll have to adjust it's programming. It could
just be a matter of tweaking the packet filters for UDP traffic on
port 53. If your router won't let you do that, get a better one.
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040706/06c63f89/attachment.bin
More information about the freebsd-questions