Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
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 '12 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. –  EightBitTony May 15 '12 at 9:03
add comment

3 Answers

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!!!

share|improve this answer
add comment

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

share|improve this answer
add comment

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!

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.