Configure Slave DNS server Solaris
➋ create the DNS confiuration file "named.conf"
➌ edit the "named.conf" file
Block 1
Block 2
Block3
Block4
Block5
➊ create db.cache
➋ Download root servers file
➌ rename named.root to db.cache
➍ create db.127.0.0
➎ type the following information inside "db.127.0.0" file
✔ The serial number is a record of how often this DNS entry has been updated. Every time a change is made to the entry, the serial number must be incremented.
➏ create db.192.168.2
➐ type the following information inside "db.192.168.2" file .
➓ check your configuration syntax
➋ create the DNS confiuration file "named.conf"
➌ edit the "named.conf" file
➍ add the following lines to the "named.conf" file.
➋ Download root servers file
➌ rename named.root to db.cache
➍ create db.127.0.0
➎ type the following information inside "db.127.0.0" file
➏ check your configuration syntax
if there are any errors you will see a warning messages.
➐ enable dns server daemon
➑ check the status of dns/server daemon
Slave DNS server provide DNS services even if the master goes down , Slave DNS server gets its zone data using a zone transfer operation from a zone master (master DNS server) , Zone transfer is the process of receiving data from master server to slave server.
Slave DNS server Configuration : -
➟ Configure Master DNS server
➟ Configure SLave DNS server
Master Server IP address :- 192.168.2.2
Slave Server IP address :- 192.168.2.3
Master Server Name :- ns1.test.domain
Slave Server Name :- ns2.test.domain
➟ Configure Master DNS server
➊ make sure your DNS daemon is disabled.
svcadm disable dns/server
➋ create the DNS confiuration file "named.conf"
touch /etc/named.conf
➌ edit the "named.conf" file
vi /etc/named.conf
The file will be opened for editing , if you don't know how to use VI editor follow this link to be more familiar with VI Editor:- UNIX VI editor
➍ add the following lines to the "named.conf" file , Note : Don't add "Block #" word it's just for illustration purpose.
options {
"/var/named";
};
Block 2
zone "." {
type hint;
file "db.cache";
};
Block3
zone "0.0.127.in-addr.arpa" {
type master;
file "db.127.0.0";
}
Block4
zone "2.168.192.in-addr.arpa" {
type master;
file "db.192.168.2";
};
Block5
zone "domain.test" {
type master;
file "db.domain.test";
};
Note That :-
Block1:-tells the DNS that zone files are located in "/var/named".
Block2:- tells the DNS the address of
root servers and the zone configuration file is called db.cache , if you
don't know what root servers follow this link HOW DNS WORK.
Block3:-tells the DNS server there
are a localhost zone and its called db.127.0.0 This zone allows
resolution of the name 'localhost' to the loopback address 127.0.0.1
when using the DNS server.
Block4:- tells the DNS server that there are reverse lookup zone and the zone configuration file is called db.192.168.2 .
Block5:- tells the DNS server that there are forward zone and the zone configuration file is called db.domain.test.
Now create zone files on master server
as shown in "named.conf" file there are four zone configuration files.
db.cache , db.127.0.0 , db.192.168.2 , domain.test .
➊ create db.cache
mkdir /var/named
cd /var/named
➋ Download root servers file
/usr/sfw/bin/wget ftp://ftp.rs.internic.net/domain/named.root
➌ rename named.root to db.cache
mv named.root db.cache
➍ create db.127.0.0
vi db.127.0.0
➎ type the following information inside "db.127.0.0" file
@ IN SOA server_name.domain.test. admin_mail.domain.test. ( 20110622 ; serial number 7200 ; Refresh Interval 3600 ; Retry Interval 86400 ; Expire 600 ) ; TTL NS ns1
.
NS ns2. 1 IN PTR localhost.
Note :-
ns1. is:-(your DNS server name), to find your server name :-
ns1. is:-(your DNS server name), to find your server name :-
uname -n
✔ The serial number is a record of how often this DNS entry has been updated. Every time a change is made to the entry, the serial number must be incremented.
✔ The "refresh" number stands for how often secondary name servers should check the primary for a change in the serial number.
✔ Expire" is how long the secondary server should use its current entry if it is unable to perform a refresh
✔ "minimum" is how long other nameservers should cache, or save, this entry
➏ create db.192.168.2
vi db.192.168.2
➐ type the following information inside "db.192.168.2" file .
@ IN SOA ns1.domain.test. admin_mail.domain.test. ( 20110622 ; serial number 7200 ; Refresh Interval 3600 ; Retry Interval 86400 ; Expire 600 ) ; TTL NS
ns1.
NS ns2.
2 IN PTR localhost.
Note :
2 IN PTR localhost. => 2 is the last part of the server ip (192.168.2.2)
➑ create db.domain.test
vi db.domain.test
➒ type the following information inside "db.domain.test" file .
@ IN SOA server_name.domain.test. admin_mail.domain.test. (
20110622 ; serial number
7200 ; Refresh Interval
3600 ; Retry Interval
86400 ; Expire
600 ) ; TTL
NS ns1.
NS ns2.
ns1
IN A 192.168.2.2
ns2 IN A 192.168.2.3
➓ check your configuration syntax
named-checkconf -z /etc/named
if there are any errors you will see a warning messages.
- enable dns server daemon
svcadm enable dns/server
- check the status of dns/server daemon
svcs -a | grep dns/server
online 19:42:04 svc:/network/dns/server:default
➟ Configure SLave DNS server
login to your Slave DNS server
➊ make sure your DNS daemon is disabled.
svcadm disable dns/server
➋ create the DNS confiuration file "named.conf"
touch /etc/named.conf
➌ edit the "named.conf" file
vi /etc/named.conf
The
file will be opened for editing , if you don't know how to use VI
editor follow this link to be more familiar with VI Editor.
➍ add the following lines to the "named.conf" file.
options {
directory "/var/named";
};
zone "." {
type hint ;
file "db.cache";
};
zone "0.0.127.in-addr.arpa" {
type slave ;
file "db.127.0.0";
masters {192.168.2.2;};
};
zone "9.109.10.in-addr.arpa" {
type slave ;
file "db.10.109.9" ;
masters {192.168.2.2;};
};
zone "2.168.192.in-addr.arpa" {
type slave ;
file "db.192.168.2" ;
masters {192.168.2.2;};
};
zone "test.internal" {
type slave ;
file "db.test.internal" ;
masters {192.168.2.2;};
} ;
Now create zone files :- db.127.0.0 , db.cache
➊ create db.cache
mkdir /var/named
cd /var/named
➋ Download root servers file
/usr/sfw/bin/wget ftp://ftp.rs.internic.net/domain/named.root
➌ rename named.root to db.cache
mv named.root db.cache
➍ create db.127.0.0
vi db.127.0.0
➎ type the following information inside "db.127.0.0" file
@ IN SOA server_name.domain.test. admin_mail.domain.test. ( 20110622 ; serial number 7200 ; Refresh Interval 3600 ; Retry Interval 86400 ; Expire 600 ) ; TTL NS ns1
.
NS ns2. 1 IN PTR localhost.
➏ check your configuration syntax
named-checkconf -z /etc/named
if there are any errors you will see a warning messages.
➐ enable dns server daemon
svcadm enable dns/server
➑ check the status of dns/server daemon
svcs -a | grep dns/server
online 19:42:04 svc:/network/dns/server:default
0 comments:
Post a Comment