How to add a DNS A record

I need to add an A record for a domain name, "". The DNS server is on a Sun System V Release 4.0 box. My experience with Sun/Unix is very limited. Honestly, I have no clue how to adminster Unix. In plain english, how do I add/modify DNS entries and make the new entry active? Thanks.
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

bluepetConnect With a Mentor Commented:
Hummm looks like your system is not using the dns.... so
check the file nsswitch.conf in /etc

pico the file... or edit it using whatever editor you use.... vi... or whatever

then check that the line where it got

hosts:  files

add a dns at the end like below

hosts:  files  dns


First logon to the DNS server edit this file.... which is a file which tell the DNS daemon - where all the files are located.....


below is what the content looks like (if have been setup properly)

directory    /var/named
cache    .      db.cache

edit the file  located in the directory  /var/named as shown above

@  IN   NS
localhost   IN A
just add the line below....
www     IN    A   <-   this is the IP address of your www machine

or you can do this

mozart   IN   A   where mozart is your web server name.....
www    IN   cname  mozart  

save it....

then do this in the dns server

ps -ef | grep named
you will see something like that
root   304   134   0  11:00 bla bla ....  grep named
root   104   134   0  11:00 bla bla .... named

kill -HUP 104

that is to kill the named daemon and restart it again... the -HUP flag.... the 104 is the process ID....

after that try ping to see whether your setup is okay.... if you can ping it then it's okay

hope that help

mpopalAuthor Commented:
Thanks for the reply. I tried what you told me, but I can't ping the name. THis is what I've done so far.

First of all, I'm trying to add a new domain name to a server so it can be accessd for WWW purposes. This is what I've done.

1. In "/etc", I've edited the file called named.boot.
2. In "named.boot" I entered "Primary    
 I assume that the named.boot tells DNS that is the domain name and the database file for it exists in the /etc/named/ file. (Like the above file).
3. In "/etc/named" I created a file called, refereced above. This file includes the following:

; BIND version named 4.9.5-REL Tue Nov 26 00:08:42 EST 1996
; BIND version wjs@catbert:/var/tmp/bind-4.9.5/named
; zone ''   last serial 4
; from 207.32.*.*   at Mon Jan  1 14:25:57 1999
$ORIGIN net.
domainname      IN      SOA      ns1.* administrator.* (
            7 3600 600 86400 3600 )
            IN      NS      ns1.*
            IN      MX      10 emh.*
www            IN      A      207.197.*.*

4. I save the file (both files) then I ran what you told me to run. (ps -ef | grep named and Kill -HUP 104)

I can't ping the domain name ( Nslookup of course times out for that name as well.

What am I missing. Thanks.
mpopalAuthor Commented:

Thanks for the reply. I finally got it to work. The thing I was doing wrong was the process id. "kill -HUP 104", was the wrong process id. I found the dns process, by ps -ef. Once I type kill -HUP 233, which 233 is the DNS ( process, it worked.

You were almost right. At least you led me to the right direction, therefore I'll award you with the points. Thanks.
All Courses

From novice to tech pro — start learning today.