DHCP and DNS for local machines on network

I have been using static IP addresses for a long time now, and updating every hosts file with changes, but with the number of new devices needing IP addresses, and the turnover on older stuff, DHCP needs to be tidied up to handle things. I’ve managed to configure dhcp on an 11.4 server with a block of static hosts for the routers and main rack mounted machines, leaving the rest to use dynamic addresses, but despite several attempts at getting ddns set up over to named I’m not able to do lookups for any of the local machines. While I can retain the hosts files, I’d rather get things set up so that new machines just become available on the network. So what am I missing? ddns-howto seems to petter out when it comes to setting up a zone for the local static and dynamic addresses and linking with that.

To add to the fun, we have 4 wireless hubs on the network, with two of them providing separate ADSL links which manually switching the gateway on a machine allows us to switch paths. Not sure if that can be emulated with dhcp :slight_smile:

IMO you’re asking a question which isn’t necessarily related to the gumbo of information you describe, but I’m going to take a stab recommending something I think might help…

Instead of configuring static addresses, for those Hosts configure DHCP reserved leases.

The effect would be to integrate those Hosts into your DHCP/DNS discovery.


The ‘static addresses’ are added as ‘host’ entries in the dhcpd.conf … which is how I thought it should be done? I’ve put them in a group, with a zone definition which is what I am passing to ddns, and the dynamic section is in the same zone, but what I am missing is how to get the ddns bit to actually work and transfer something to the DNS server. I can access machines fine with the IP address, but not by name.

One of the best programs I have found for this is Dnsmasq. It is installed by default I believe but if not it’s in the offical repos. If you use open source firmware in your router such as DD-WRT, Tomato,or OpenWRT you can setup the server inside the router saving your machine a few cycles. Here are a couple of links that will explain it more.

Dnsmasq - a DNS forwarder for NAT firewalls.
Chapter 13. Using dnsmasq
HOWTO: Setup dnsmasq on Fedora as DNS DHCP and tftp for PXE

Good Luck:)

Put up to 3 external DNS servers in the forwarders option in /etc/named.conf of your DNS (and set up your DNS to use these DNS of course).

You’d have to post your specific entry to know for sure, but if you’re following “best practices” probably not… Normally you should enable Reserved Leases in the dhcp.conf, then list the actual entries in another file. But, my guess is that it might also be possible to list the entries in a massive dhcp.conf, so can’t be sure.

Post what you think are anything related to your Reserved Leases.


Unless I misunderstand the post, I don’t think that DNS Forwarders affects his problem. DNS Forwarding assumes that if the name can’t be resolved in the current DNS cache, then the name can be resolved on another DNS server and I don’t see that to be the case here.


Dnsmasq is working for me … AND has some extra bits that I will need later. But I did have to add a ‘domain’ for the local network names, I could not get them to work without a .something after them I am sure that is should be possible to drop that, but while it’s working …

Flux Capacitor Penguin - The dns forwarding was working fine, and all dynamically configured users were seeing the internet happily. It was just the local machine names that were not being resolved.