0

I have a requirement to create an own DNS server, whose only function is to provide a static IP/hostname mapping. When being queried with hostname, it returns the IP address.

How to implement this?

Thanks

2
  • 4
    That's exactly the most basic definition and function of "DNS"... any DNS server in the world should be able to provide this out-of-the-box.
    – Massimo
    May 15, 2012 at 7:45
  • 1
    In future, you may want to say which OS platform you were thinking of installing this on if you had one in mind. May 15, 2012 at 9:03

3 Answers 3

1

What do you mean by "static"? By definition DNS records are "static" ie there are entries in the zone files which get interpreted to IP addresses (forward) or to host names (reverse). There is nothing dynamic about them.

Now if we are referring to dynamic-updates this is an option (addition) to most DNS servers these days which goes hand in hand (mostly) with the Dynamic Host Configuration Protocol (DHCP) to allow us to reassign names to IPs when DHCP assigns an address. As fas as DNS is concerned you could be changing those records by hand and it wouldn't care less. Not a recommended job indeed, though!!!

0

Most DNS servers are static only. You could install maradns and it would do this for you:

http://abdussamad.com/archives/470-Installing-MaraDNS-on-CentOS-Linux.html

0

DNS records are static from the get-go even if it's possible to have the records automaticly edited and added.

To configure DNS server(s): Using linux, you could use Bind9 for DNS. Adding the zones manually, you would enter the IP-adresses and hostnames in A records.

Here is an How-To on how to run Bind9.

Pay special attention to the sample-zonefile if you are new to this.

The syntax of the A records would look like below:

 mycomputer      IN      A    192.168.1.10

When on the same network, and configured to use the bind9 server as DNS - you can ping/query the hostname "mycomputer" and it will return the IP 192.168.1.10

Solutions are also avalible for Windows Server running the DNS role. More on installing DNS role on Windows Server 2008 here.

As you don't explain what kind of environment this is to be used in and in what scale - this answer is the best I could do!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .