Embed
Email

Domain Name Server

Document Sample

Shared by: jianghongl
Categories
Tags
Stats
views:
1
posted:
1/7/2012
language:
pages:
4
Lab4. Domain Name Server Comp2650







Domain Name Server



1) Domain name server master zone configuration

Suppose the server "servxxxx" (xxxx is the last 4 digits of your student ID) is running at host

"l58.l82.8.xxx" (your server IP address) in the domain "comp2650.com". Assume that this subnet has a

workstation ''mydesk" with IP address "l58.182.8.xxx". Create configuration files for this Domain Name

Server (the details are given in the tutorial notes). Check each configuration file to ensure it is error free.



(Note: You can get the IP address of the client computer with the command “ipconfig” under the DOS

prompt in Windows 98. In Redhat Linux, Use command “ifconfig”)



a) Configuration files creation

i) Edit configuration file "/etc/named.conf".

ii) Create configuration file"/var/named/named.comp2650.com.zone".

iii) Create configuration file "/var/named/named.l58.l82.8.zone".

iv) Create configuration file "/var/named/named.0.0.l 27.in-addr.arpa.zone".

v) Create configuration file" /var/named/named.localhost.zone".



“/etc/named.conf”



options

{

directory "/var/named/";

};



//root servers

zone "."

{

type hint;

file "named.ca";

};



//reversing zone for localhost

zone "0.0.127.in-addr.arpa" //zone name

{

type master;

file "named.0.0.127.in-addr.arpa.zone";

};

// internet zone for localhost

zone "localhost"

{

type master;

file "named.localhost.zone";

};

// internet zone for comp2650

zone "comp2650.com"

{

type master; // server type

file "named.comp2650.com.zone"; //DNS file for domain

}; // end zone file

//reversing zone for comp2650

zone "8.182.158.in-addr.arpa"

{

type master; // server type

file "named.158.182.8.zone"; // DNS file for domain

}; // end reverse zone file





Page 1 of 4

Lab4. Domain Name Server Comp2650



“/var/named/named.comp2650.com.zone” //Zone file for “comp2650.com”



$TTL 86400

@ IN SOA serv4272.comp2650.com. root.comp2650.com. (

1 ; serial number, YYYYMMDDxx

28800 ; refresh rate in sec. (8 hrs)

14400 ; retry in seconds (4 hours)

3600000 ; expire in seconds (1000 hours)

86400) ; minimum in seconds (24 hours)



IN NS serv4272.comp2650.com.

IN MX 10 serv4272.comp2650.com.



Localhost IN A 127.0.0.1

serv4272 IN A 158.182.8.170

mydesk IN A 158.182.8.169

www IN CNAME serv4272.comp2650.com.



“/var/named/named.158.182.8.zone” // Reverse Mapping for “comp2650.com”



$TTL 86400

@ IN SOA serv4272.comp2650.com. root.comp2650.com. (

2

28800

14400

3600000

86400)



IN NS serv4272.comp2650.com.



170 IN PTR serv4272.comp2650.com.

169 IN PTR mydesk.comp2650.com.



“/var/named/named.localhost.zone” // Zone file for localhost



$TTL 86400

@ IN SOA localhost. root.localhost. (

3

28800

14400

3600000

86400)



@ IN NS localhost.

@ IN A 127.0.0.1







“/var/named/named.0.0.127.in-addr.arpa.zone” // Reverse mapping for localhost

$TTL 86400

@ IN SOA localhost. root.localhost. (

4

28800

14400

360000

86400)



@ IN NS localhost.

1 IN PTR localhost.









Page 2 of 4

Lab4. Domain Name Server Comp2650





b) Configuration file debugging

All configuration files must be error-free, otherwise your computer may fail to reboot. If the

configuration file is correct, the returned message is "OK".

i) Debug the "/etc/named.conf'

> named-checkconf /etc/named.conf

ii) Debug the zone files



> named-checkzone -d comp2650.com /var/named/named.comp2650.com.zone



> named-checkzone -d 8.182.158.in-addr.arpa

/var/named/named.l58.l82.8.zone

> named-checkzone -d 0.0.l27.in-addr.arpa /var/named/named.0.0.l27.

in-addr.arpa.zone

> named-checkzone -d localhost /var/named/named.localhost.zone







c) Binded the fixed IP at server side



Use command in Linux

1, #setup

2, choose network configure

3, type the fixed IP

IP: 158.182.8.xxx (your server IP address)

Network mask: 255.255.255.0

Default gateway: 158.182.8.2

Primary nameserver: 158.182.8.xxx (your server IP address)

4, save the setting then quit.





d) Configure the file “/etc/resolv.conf”, “/etc/hosts” , “/etc/sysconfig/network” at server side



i) Configure file “/etc/resolv.conf”

search comp2650.com

nameserver 158.182.8.xxx (your server IP address)



ii) Configure “/etc/hosts”

127.0.0.1 servxxxx.comp2650.com servxxxx



iii) Configure file “/etc/sysconfig/network”



NETWORKING=yes

HOSTNAME=servxxxx.comp2650.com





2) Domain Name Server: Start and Stop

At this stage, all configurations of Domain Name Server have been done. Start, stop and restart this server

manually with root user account as follows, or use "ntsysv" command to enable the DNS daemon "named"

to be started automatically upon boot up.

> /etc/rc.d/init.d/named start

> /etc/rc.d/init.d/named stop

> /etc/rc.d/init.d/named restart





Page 3 of 4

Lab4. Domain Name Server Comp2650





3) DNS testing at server side

Use "nslookup" command to test whether the server is working properly. Type the following commands in

the shell prompt of the server side and see what messages are returned.

> nslookup servxxxx.comp2650.com

> nslookup mydesk.comp2650.com

> nslookup l58.l82.8.x (the main server and workstation's IP)

What other tools can be used to test whether the DNS server is working properly?

Use command “dig” or “host”.





4) DNS testing at client side (windows98)

In Windows 98, set the DNS Configuration in TCP/IP properties (see Figure 1) as follows:

Host name: mydesk

Domain: comp2650.com

DNS search Order: the IP address of your DNS server (e.g. 158.182.8.107, 158.182.9.1 and 158.182.9.4

Domain Suffix Search Order: comp2650.com and comp.hkbu.edu.hk









7



How can you test whether the DNS server is working properly?

Ping any one DNS in internet, then check the DNS IP. If the DNS server work, you can find

this IP by the DNS. If not, the DNS server does not work.



For example:

ping www.yahoo.com.hk

you will see the ip [202.43.221.34]









Page 4 of 4


Shared by: jianghongl
Other docs by jianghongl
“Well Seasoned CHEFS”
Views: 15  |  Downloads: 0
“PREZ
Views: 8  |  Downloads: 0
“GENERATION G”
Views: 8  |  Downloads: 0
“Cooking Class Venues”
Views: 15  |  Downloads: 0
“Bundle” of Joy
Views: 11  |  Downloads: 0
Related docs