configure DNS server on solaris

Hello evrybody

I need to know how i can implement and configure DNS server in solaris9 and i need to understand which files i modified it to do that

Thanks all

Download this template(Oracle Java Technologies | Oracle) to a work directory, such as /var.
To unpack the file, at the command line type:

zcat name.tar.Z | tar xvf \-

For quick installation, do the following:

1.Determine what type of DNS you want and what support information you need from your network provider, such as global caching DNS.

2.Edit the named.* files you need. For releases prior to Solaris 7, use named.boot, named.local, named.cache, named.mydomain, and named.mydomain.rev. For Solaris 7 and Solaris 8, the map files are the same, but edit the named.conf instead of named.boot.

3.Edit the /etc/resolv.conf file. It should look like the following:

domain mydomain.com
nameserver 127.0.0.1     ;if DNS server runs on this host
nameserver 129.200.9.1   ;if this is a remote client

4.Create a symbolic link in /etc/ to either the named.boot or named.conf file and start the DNS (/usr/sbin/in.named).

5.You can verify the DNS is working properly by running some queries to test forward and reverse resolution.

Full details are avalable here:

Thanks for you ut when i try to download this file and unpackage it i got that file is damaged

I need to know what the configuration i will edit in /etc/named.conf

I just tried to download it now... It worked fine.
Try to download it again.

Here is the named.conf template file from the download.

//
//james liu 2/23/96
//revised 3/23/2000
//
//dns configuration file compatible with solaris 2.7 and later. This
//configuration is targeted at primary and secondary dns server setups.
//
//for solaris 2.6 and earlier, do not edit this file, but
//see the "named.boot" file for instructions.
//
//installation instructions:
//
//we assume you've unpacked this distribution.
//
//step 1;
//-------
//edit named.conf, named.local, named.cache, named.mydomain, and
//named.domain.rev and globally change all instances of "myhost" to
//the actual hostname, and "mydomain" to the desired domain name.
//also, change the ip numbers for the domain to match those for your
//network. for the reverse domain, just reverse the numbers for the
//class of address. this template is designed for a single class c.
//
//step 2:
//-------
//to use this, and create a symbolic link to this in /etc filesystem
//link to this file: ie:
//
//# ln -s [path-to-this]/named.conf /etc/named.conf
//
//step 3:
//-------
//start the dns server. /usr/sbin/in.named.
//
//
//
//for secondary domain name servers, use these entries; format is:
//<dns type> <domain> <prim. ip(s)> <filename>
//note, you can spec more than one prim. ip to download from
//in addition, the filename is the name to store the map in. you don't
//have to create this file. the common practice is to assign filenames
//as *.bak for files this server caches as a secondary dns relative to
//some other dns primary.
//
//almost all dns's can use themselves to resolve the local host
//you usually will leave this entry alone
//
//all dns's need to spec top-level cache servers that resolve world internet
//hostnames. there can be one or more entries and are spec'd in the cache
//file.
//
//if you are a subnet as a part of a larger network, (e.g. your domain is
//"mysubnet.mydomain.com", you may want to set forwarding to a higher
//level server (the one that serves names for "mydomain.com". if so,
//uncomment the 'forwarders' line below and edit it for your network
//parameters.
//

//specify the directory prefix where you plan to store the dns map files.
//the default here is /var/named.
options {
 	directory	 "/var/named";
//
//uncomment if you want to send queries outside of the primary to a
//a forwarders server.
//	forwarders       {
//		129.150.254.2;
//	};
};

//choose between primary or being a secondary server. a secondary dns is
//simply a server that downloads the dns maps from some other primary or
//secondary. the default here is to be a primary and have only one
//class c subnet. the dns needs a "forward map" that looks up ip address
//for a given hostname, and a "reverse map" that looks up hostname for
//a given ip address. if you have multiple subnets and domain name spaces,
//you should have multiple forward maps, and/or multiple reverse maps.
//in many networks, there is a single domain name space that spans several
//subnets, in which case, there will be one forward map, and many reverse
//maps.

zone "mydomain.com" in {
	type master;
	file "named.mydomain";
};

add more zones if you have multiple subnets as primary

zone "9.200.129.in-addr.arpa" in {
	type master;
	file "named.mydomain.rev";
};
//
//you can make this a secondary rather than primary by uncommenting
//these lines and commenting out the above primary zones and replacing
//with these below.  The masters IP address(es) are set to whatever your
//masters are.
//zone "mydomain.com" in {
//        type slave;
//        file "named.mydomain.bak";
//        masters { 129.200.9.1; 129.200.9.2 };
//};

//zone "9.200.129.in-addr.arpa" in {
//        type slave;
//        file "named.mydomain.9.bak";
//        masters { 129.200.9.1; 129.200.10.1 };
//};

//zone "10.200.129.in-addr.arpa" in {
//        type slave;
//        file "named.mydomain.10.bak";
//        masters { 129.200.10.1; 129.200.9.1 };
//};

// don't usually need to mess with this entry. You may need to edit
// the map file, named.local, however.
zone "0.0.127.in-addr.arpa" in {
	type master;
	file "named.local";
};

// nothing to do here.
zone "." in {
	type hint;
	file "named.cache";
};

//---------------end named.conf------------------

i conigure /etc/named.conf

and under /var/named create files as mentioned
when I type nslookup i got
Can't find server name for address 192.168.11.36: Server failed
*** Default servers are not available

please advice what is the problem.

It looks like you have 192.168.11.36 in your /etc/resolv.conf file and 192.168.11.36 is not a DNS server, or it is a DNS server but you can't get to it from the server you are running nslookup on.

thanks for your reply

but how i can solve this issue

I configure /etc/named.conf
# The root nameservers
zone "." {
type hint;
file "db.rootcache";
};
# localhost - forward zone
zone "localhost" {
type master;
file "db.localhost";
notify no;
};
# localhost - inverse zone
zone "0.0.127.in-addr.arpa" {
type master;
file "db.127.0.0";
notify no;
};
zone "egynet.com.eg" { // Configure the domain cse.sc.edu
type master; // We are primary for it
file "egynet.com.eg";
allow-query { any; };
notify yes;

 \};

zone "11.168.192.in-addr.arpa" { // Configure the reverse zon
type master; // We are primary for it
file "11.168.192";
allow-query { any; };

 \};

-------------------------------------------------------------------------

and under /var/named i create

11.168.192 db.127.0.0 db.localhost db.rootcache egynet.com.eg named.local files

in /var/name/11.168.192
;
; Data file for reverse address to hostname.
;
$TTL 1D
@ IN SOA nts.egynet.com.eg. asaleh.egynet.com.eg. (
2005032203 ; Serial
28800 ; Refresh - 1 day
14400 ; Retry - 2 hours
2419200 ; Expire - 30 days
86400 ) ; Minimum - 4 days
@ IN NS nts.egynet.com.eg.
@ IN NS nts2.egynet.com.eg.
@ IN NS nts22.egynet.com.eg.
;
;
; Subnet 35 data for reverse address to hostname.
;
20 IN PTR nts.egynet.com.eg.
25 IN PTR mrtg.egynet.com.eg.
35 IN PTR nts22.egynet.com.eg.
30 IN PTR mrtgnu.egynet.com.eg.
40 IN PTR mail.operations.egynet.com.eg.
40 IN PTR operations.egynet.com.eg.
45 IN PTR adslorder.egynet.com.eg
--------------------------------------------------------------------------in /var/named/db.127.0.0
$TTL 86400 @ IN SOA nts.egynet.com.eg. root.nts.egynet.com.eg. (
2 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS nts.egynet.com.eg.
1 IN PTR nts.egynet.com.eg.
--------------------------------------------------------------------------

/var/named/db.localhost

$TTL 86400 @ IN SOA nts.egynet.com.eg. root.nts.egynet.com.eg. (
45 ; serial
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

           IN NS        @
           IN A         127.0.0.1

--------------------------------------------------------------------------

/var/named/egynet.com.eg.

;
$TTL 1D
@ IN SOA nts.egynet.com.eg. sbably.egynet.com.eg. (
2005082307 ; Serial
28800 ; Refresh - 1 day
14400 ; Retry - 2 hours
2419200 ; Expire - 30 days
86400 ) ; Minimum - 4 days
IN NS ns2.egynet.com.eg.
IN NS ns22.egynet.com.eg.
IN NS ns222.egynet.com.eg.
;
localhost A 127.0.0.1
;
; Subnet 213.152.67
;
www.egynet.com.eg. IN A 213.154.54.51
www.dsl.egynet.com.eg. IN CNAME wifi.soficom.com.eg.
;
; Subnet 80.75.163
;
egynet.com.eg. IN A 62.139.130.138
server.egynet.com.eg. IN A 62.139.130.138
NozhaSrv.egynet.com.eg. IN A 62.139.130.139
adslorder.egynet.com.eg. IN A 80.75.163.45
ns2.egynet.com.eg. IN A 80.75.163.20
mrtgnu.egynet.com.eg. IN A 80.75.163.30
ns222.egynet.com.eg. IN A 84.36.0.250
mrtg.egynet.com.eg. IN A 80.75.163.25
ns22.egynet.com.eg. IN A 80.75.166.250
monitor.egynet.com.eg. IN A 80.75.166.141
bmonitor.egynet.com.eg. IN A 80.75.166.137
ispweb.egynet.com.eg. IN A 80.75.166.180
webmail.egynet.com.eg. IN A 81.29.101.3
imap IN CNAME webmail.egynet.com.eg.
mail IN CNAME server.egynet.com.eg.
pop3 IN CNAME server.egynet.com.eg.
;ns2 IN CNAME ns2.egynet.com.eg.
;mrtg IN CNAME mrtg.egynet.com.eg.
;mrtgnu IN CNAME egynet.com.eg.
;
--------------------------------------------------------------------------

i need to know where is the problem

Have you tried adding 192.168.11.36 into your DNS ?

Basically what the error means is that you have told it to use 192.168.11.36 for DNS in your resolv.conf file, But it can not resolve that IP address.

sorry what you mean by add 192.168.11.36 to DNS i can't understand what you mean ??