Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a LAN at home sitting behind the router (Linksys WRT54G). The IP addresses assigned to the Linux boxes are


The Router is also connected to the modem provided by my ISP, to access the internet. Now, the router is assigned the IP address and is also configured to start assigning IP addresses starting from using DHCP protocol.

Now I have an application which requires to have FQDNs (Fully Qualified Domain names) for like each machine - something like


Is this possible to do?

share|improve this question

migrated from Jul 8 '11 at 9:28

This question came from our site for professional and enthusiast programmers.

… or you could keep all of your machines with dynamically-assigned addresses, and:

  • have local DNS servers providing split horizon DNS service, with all of your DHCP clients configured to register themselves with the local content DNS server when they obtain leases off the DHCP server; or
  • have local DNS servers, again providing split horizon DNS service, and a DHCP server (ISC's DHCP server for one can do this. Your router's DHCP server probably cannot.) that registers name→address mappings itself with the local content DNS server, directly, so that the DHCP clients don't have to.

The second has the considerable advantage that one only needs to give the DHCP server permissions to perform DNS updates, not every machine on the entire LAN. But it does lock you in to particular vendors' DNS servers. BillThor mentions dnsmasq, which is one of a few softwares that is both content DNS server and DHCP server all in one.

share|improve this answer

Look at dnsmasq to serve up DNS and cache DNS results. You can install this on one system and edit /etc/resolv.conf for other hosts. You can either use dnsmasq to replace your router as the DHCP server, or assign static addresses. For servers I would assign fixed addresses, client are fine either way.

share|improve this answer

First, you need to start by assigning them static IP addresses, or if your router supports it, you can give them a reserved IP address using your DHCP server. I would just assign them IP addresses out of the DHCP Server's range, like This is so the IP addresses will not change, and break the next step. The other poster did not mention this.

Then, unless you want to also set up a DNS server (I agree with the other poster: Overkill), you will need to add the entries to the HOSTS file as he said.

share|improve this answer

There's several ways to do it, one being to setup one of your machines to be your nameserver (and have it tell your network is, etc). This is a less hack-ey approach, but it's harder to implement and might be overkill.

An easier approach, would be just tricking the machine that hosts the FQDN-application using a hosts file (it exists on both Linux and Windows under /etc/hosts and Windir\system32\drivers\etc\hosts). If required, you could even add those same entries on all machines on your network.

This assumes my understanding of the issue is correct, and you do not actually have a real domain you'd like to use. If I've misunderstood you, then the solution would still be the first one, except you'd want to set that NS to be the primary nameserver for your domain.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.