1837785 Members
3980 Online
110119 Solutions
New Discussion

DNS Setup

 
SOLVED
Go to solution
Richard Ace
Frequent Advisor

DNS Setup

Hi

I have been stewing over configuring DNS for the past few days looking at different HP Documents that show differences, to try and pick out the technical info I need.

Im off to DR and I need to get DNS running at the end of the DR to aid connectivaty from other servers. I only need to get one master going but IP addresses have been changed on all servers. 128.1.12.n. I think all I need to do is..................

Have an up to date /etc/hosts file with all IP's

mkdir /etc/named.data
(As it was excluded in the restore)

cd /etc/named.data

hosts_to_named -d joe.blogs.com -n 128.1.12.

(Creates db files -h host is default)

I remember having to edit a file and add a . at the end of the line, and editing another file and adding a Z

I moved a file into /etc

Can someone please clarify the currect chain of events that I need to do for this.

Ta

Rich

I will give loads of points
6 REPLIES 6
harry d brown jr
Honored Contributor
Solution

Re: DNS Setup


You probably need to edit /etc/named.conf and add the external dns servers.

The Z thing, could it be sendmail.cf ??

Do you need to add MX records?

Was your previous DNS server an HPux box?

live free or die
harry d brown jr
Live Free or Die
jpcast_real
Regular Advisor

Re: DNS Setup

Hello Richard,

I really do not rely too much in the host_to_named scritps . I always prefer to create a simple /etc/named.conf file . In this file you define you zones . If this is your first DNS server probably you will be the root server of your organization.

An example of root server:

Dartanan:/etc/rc.config.d> more /etc/named.conf

options {
directory "/etc/named.data";
pid-file "/var/run/named.pid";

};



// Root de intranet

zone "." {
type master;
file "db.root";
};

// Zona loop-back

zone "0.0.127.in-addr.arpa" {
type master;
file "db.127.0.0";
};


// Zonas para las que el servidor es maestro

// Resolucion Directa

zone "sate2.com" {
type master;
file "db.sate2.com";
};


Once you have defined this you just have to add create the db.root and and db for your zones ..
Remmember that the /etc/nsswitch.conf must be configured if you want that your server uses the DNS server .
The nslookup and teh syslog command can help you to troubleshoot the DNS
Be very careful with the tabs while you are typing the file.

Dartanan:/etc/named.data> more db.root
$TTL 10d
@ IN SOA dartanan.sate2.com. root.dartanan.sate2.com. (
2005011601 ; Serial
10800 ; Refresh every 3 hours
3600 ; Retry every hour
604800 ; Expire after a week
86400 ) ; Minimum ttl of 1 day

sate2.com. IN NS dartanan.sate2.com.



Dartanan:/etc/named.data> more db.127.0.0
$TTL 10d
@ IN SOA dartanan.sate2.com. root.dartanan.sate2.com. (
2004021701 ; Serial
10800 ; Refresh every 3 hours
3600 ; Retry every hour
604800 ; Expire after a week
86400 ) ; Minimum ttl of 1 day
NS dartanan.sate2.com.
1 IN PTR dartanan.sate2.com.


Dartanan:/etc/named.data> more db.sate2.com
$TTL 10d
sate2.com. IN SOA dartanan.sate2.com. root.dartanan.sate2.com. (
2005041301 ; Serial
10800 ; Refresh every 3 hours
3600 ; Retry every hour
604800 ; Expire after a week
86400 ) ; Negative Caching TTL

NS dartanan.sate2.com.
NS aramis.sate2.com.

tierra.win.sate2.com IN A 174.1.10.10


$ORIGIN sate2.com.
dartanan IN A 174.1.51.11
aramis IN A 174.1.51.22


Dartanan:/etc/named.data> more /etc/nsswitch.conf
#
# /etc/nsswitch.hp_defaults:
#
# @(#)B.11.11_LR
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# uses NIS (YP) in conjunction with files.
#

hosts: dns [NOTFOUND=continue] files [NOTFOUND=return]

Hope this helps ...


Here rests one who was not what he wanted and didn't want what he was
Pete Randall
Outstanding Contributor

Re: DNS Setup

Rich,

Miscellaneous extracts from my DNS notes:

1. Clients will need /etc/resolv.conf files
domain joeblogs.com
nameserver 128.1.12.__

- and -

/etc/nsswitch.conf

2. Server also needs resolv.conf - nsswitch.conf is irrelevant

3. Setup the name server:
mkdir /etc/named.data
cd /etc/named.data
/usr/sbin/hosts_to_named -d joe.blogs.com -n 128.1.12.
mv /etc/named.data/named.boot /etc/named.boot
update the /etc/named.data/db.cache file with further root name servers

4. Start the name server daemon:
set "NAMED=1" in /etc/rc.config.d/namesvrs
/sbin/init.d/named start


That's it. I don't have anything about adding a . or a Z anywhere.

By the way, you can also use SAM.


Pete



Pete
Richard Ace
Frequent Advisor

Re: DNS Setup


Thanks all. Especially Pete

I have noted all you input.

-Z is for the /etc/named.data/param file

Just found out.

My sever will be the main DNS server with only one domain joe.blogs.com 128.1.12.95

The other servers that need my servers DNS up and running are AIX etc...

Because my HP box is the DNS Master they want it running in the DR so its only 1 zone.


Just a quick one you say update db.cache with further root servers. I presume I dont need to do this in my case as this will be the only server and its a master(DNS Server).

And.... in the db.cache do I need my DNS Server as an entry in it or does it get populated via the hosts_to_named.

Ta

Rich
Pete Randall
Outstanding Contributor

Re: DNS Setup

Rich,

The further root name servers would be for external resolution.

From my notes:

"The cache file, /etc/named.data/db.cache, lists the servers for the root domain. Every name server must have a cache file. When a name server cannot resolve a host name query from its local database or its local cache, it queries a root server.

The hosts_to_named program creates the db.cache file, but it leaves it empty. To add data to this file, copy it from the file /usr/examples/bind/db.cache.arpa."


Pete

Pete
Richard Ace
Frequent Advisor

Re: DNS Setup

Thanks for all your help

Rich

No doubt I will call again in the future.