Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I set up DNS

Networking

How do I set up DNS

by  pcunix  Posted    (Edited  )
Most people don't really need to set up a DNS server. Usually your ISP has givern you the addresses of two or more DNS servers that you can use.

You need to create the file /etc/resolv.conf
Be sure it has 644 permissions- it needs to be world readable.

Notice that there is no "e" in resolv.conf.

See "man resolver" for the man page details, but it needs to look like this:

domain whatever.org
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx
hostresorder local bind


You replace "whatever.org" with your local domain name. If you have no idea what that means, look in /etc/hosts- you probably set SOMETHING when you installed the machine. This part isn't really important unless you have an internal network of machines- what it does is tell the resolver which domain names YOU are responsible for. Just don't set it to a real domain like "caldera.com"- that would mess you up.

Replace the xxx.xxx.xxx.xxx in the "nameserver" lines with the addresses your ISP gave you. Note that these HAVE to be numeric addresses, not host.domain names. You can have multiple nameserver lines.

That's it- you don't have to reboot- it will work instantly.

Note however that "hostrseorder" line. That can cause an interesting situation on the local network.

Whenever a telnet session come in, OSR5 wants to know the host name, so it does a reverse DNS lookup. The "hostresorder" line tells it to look "local" first, and that means /etc/hosts.

If it can't resolve the ip address there, it WILL pass the inquiry to the nameservers listed in resolv.conf- and it can take a long time for them to come back with no information.

So- you MAY want to put host entries in /etc/hosts or setup your own local DNS server. The entries in /etc/hosts don't have to be meaningfull- they don't have to match what the other machines think their own name is, so you could just do something like

10.1.1.100 host_100
10.1.1.101 host_101

etc.

Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top