types of dns server - wordpress.com · types of dns server • master dns server it is the master...
TRANSCRIPT
Types of DNS Server
• Master DNS Server
It is the Master Copy of all the Zone Information.
It is Read/Write copy.
• Slave DNS Server
It is Slave Backup of Master zone. It is Read Only
How DNS works ?
LinuxClient
DNS Server
LinuxClient
192.168.0.253
ZOOM.COM
server
client1 client2192.168.0.1 192.168.0.2
IP addres
s for
client2.z
oom.com
IP address for
client1.zoom.com
Forward zone
sever
client2
client1
192.168.0.253
192.168.0.2
192.168.0.1
zoom.com
client1 192.168.0.1
DNS ServerFails
IP address is
192.168.0.1NO resolution
How DNS works ?
LinuxClient
DNS Server
LinuxClient
192.168.0.253 server
client1 client2192.168.0.1 192.168.0.2
SlaveDNS Server
server2
Forward zone
sever
client2
client1
192.168.0.253
192.168.0.2
192.168.0.1
zoom.com client2 192.168.0.2
IP address for
client2.zoom.com
IP address is
192.168.0.2
192.168.0.254
ZOOM.COM
How Zone Transfer works ?
LinuxClient
MasterDNS Server
LinuxClient
192.168.0.253 server
client1 client2192.168.0.1 192.168.0.2
SlaveDNS Server
server2192.168.0.254
ZOOM.COM
Master - Forward Zone ZOOM.COM
SOA [42] 192.168.0.253Server 192.68.0.253Client1 192.68.0.1Client2 192.68.0.2
Slave - Forward Zone ZOOM.COM
SOA [42] 192.168.0.253Server 192.68.0.253Client1 192.68.0.1Client2 192.68.0.2
How SOA works ?
LinuxClient
MasterDNS Server
LinuxClient
192.168.0.253
server
client1 client2192.168.0.1 192.168.0.2
SlaveDNS Server
server2192.168.0.254
ZOOM.COM
Master - Forward Zone ZOOM.COM
SOA [42] 192.168.0.253Server 192.68.0.253Client1 192.68.0.1Client2 192.68.0.2
00306090180
SOA QueryMy SOA = 42SOA Query Reply
My SOA = 42
SOA is sameNo Zone Transfer
Slave - Forward Zone ZOOM.COM
SOA [42] 192.168.0.253Server 192.68.0.253Client1 192.68.0.1Client2 192.68.0.2
How SOA works ?
LinuxClient
MasterDNS Server
LinuxClient
192.168.0.253
server
client1 client2192.168.0.1 192.168.0.2
SlaveDNS Server
server2192.168.0.254
ZOOM.COM
Master - Forward Zone ZOOM.COM
SOA [42] 192.168.0.253Server 192.68.0.253Client1 192.68.0.1Client2 192.68.0.2
00306090180
SOA QueryMy SOA = 42SOA Query Reply
My SOA = 45 Slave - Forward Zone ZOOM.COM
SOA [42] 192.168.0.253Server 192.68.0.253Client1 192.68.0.1Client2 192.68.0.2
Server2 192.168.0.254
[45]
SOA is not sameDo Zone Transfer
How SOA works ?
LinuxClient
MasterDNS Server
LinuxClient
192.168.0.253
server
client1 client2192.168.0.1 192.168.0.2
SlaveDNS Server
server2192.168.0.254
ZOOM.COM
Requested for Updated recordsReply with Updated
records Slave - Forward Zone ZOOM.COM
SOA [45] 192.168.0.253Server 192.68.0.253Client1 192.68.0.1Client2 192.68.0.2Server2 192.168.0.254
Zone TransferCompleted
Master / Slave Configuration
LinuxClient
MasterDNS Server
LinuxClient
192.168.0.253 server
client1 client2192.168.0.1 192.168.0.2
SlaveDNS Server
server2192.168.0.254
ZOOM.COM
Types of DNS Server
• Forwarder
Forwards requests to a specific list of DNS servers
for name resolution. If none of the specified DNS
servers can perform the resolution, the resolution
fails.
LinuxClient
DNSServer
LinuxClient
192.168.0.253
192.168.0.1192.168.0.2
ISP DNS
yahoo.com
I’m lo
oking fo
r
www.yahoo.co
m
210.10.152.15
IP address for
client1.zoom.comIP address is
192.168.0.1
Forward zone
sever
client2
client1
192.168.0.253
192.168.0.2
192.168.0.1
zoom.com
client1 192.168.0.1Forward
zonesever
client2
client1
192.168.0.253
192.168.0.2
192.168.0.1
zoom.com
61.0.0.5
No Resolution
How Forwarders works ?
LinuxClient
DNSServer
LinuxClient
192.168.0.253
192.168.0.1192.168.0.2
ISP DNS
yahoo.com
I’m lo
oking fo
r
www.yahoo.co
m
I’m looking for www.yahoo.com
Here’s address of www.yahoo.com address
210.10.152.15
Here’s a
ddress o
f
www.yahoo.co
m
210.10
.152.1
5
210.10.152.15
IP address for
client1.zoom.comIP address is
192.168.0.1
61.0.0.5
Add ForwarderIP address
61.0.0.5
How Forwarders works ?
LinuxClient
DNSServer
LinuxClient
192.168.0.253
192.168.0.1192.168.0.2
ISP DNS
yahoo.com
210.10.152.15
61.0.0.5
Forwarder Configuration
Configuring DNS Server
Install the package by using one of the installation methods
[root@comp1~]# mount 192.168.0.250:/var/ftp/pub/RedHat/RPMS/ /mnt
[root@comp1 ~]# cd /mnt
[root@comp1 ~]# rpm -ivh bind* caching* --force --aid
Open configuration for editing
[root@comp1~]# vi /etc/named.conf
/etc/named.conf
To change the options
zone "zoom.com" IN {
type master;
file “zoom.for";
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file “zoom.rev";
};
Configuring Forward Lookup
Copying Forward lookup zone file
[root@comp1 ~]# cd /var/named/chroot/var/named/
[root@comp1 named]# cp localhost.zone zoom.for
Open configuration for editing
[root@comp1 named]# vi zoom.for
/var/named/chroot/var/named/zoom.for
To add the options
$TTL 86400
@ IN SOA server.zoom.com. root.zoom.com.(
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS server.zoom.com.
server IN A 192.168.0.253
client1 IN A 192.168.0.1
client2 IN A 192.168.0.2
www IN CNAME server
Configuring Reverse Lookup
Copying Forward lookup zone file
[root@comp1 ~]# cd /var/named/chroot/var/named/
[root@comp1 named]# cp named.local zoom.rev
Open configuration for editing
[root@comp1 named]# vi zoom.rev
/var/named/chroot/var/named/zoom.rev
To add the options
$TTL 86400
@ IN SOA server.zoom.com. root.zoom.com.(
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS server.zoom.com.
253 IN PTR server.
1 IN PTR client1.
2 IN PTR client2.
Configuring DNS Server IP address
Open configuration for editing
[root@comp1 ~]# vi /etc/resolv.conf
Add the DNS server IP address in file /etc/resolv.conf
nameserver 192.168.0.253
DNS Server
To restart the DNS services
[root@comp1 ~]# service named restart
Checking from DNS Server
Checking Forward Lookup
[root@comp1 ~]# dig server.zoom.com
[root@comp1 ~]# dig client1.zoom.com
Checking Reverse Lookup
[root@comp1 ~]# dig –x 192.168.0.253
[root@comp1 ~]# dig –x 192.168.0.1
Checking Name resolution
[root@comp1 ~]# ping server.zoom.com
[root@comp1 ~]# ping client2.zoom.com
Debug DNS File
To check main configuration file syntax
[root@comp1 ~]# named-checkconf /etc/named.conf
To check forward zone file syntax
[root@comp1 ~]# named-checkzone zoom.com /var/named
/chroot/var/named/zoom.for
To check reverse zone file syntax
[root@comp1 ~]# named-checkzone zoom.com /var/named
/chroot/var/named/zoom.rev
Configuring DNS Client
Open configuration for editing
[root@comp1 ~]# vi /etc/resolv.conf
Add the DNS server IP address in file /etc/resolv.conf
nameserver 192.168.0.253
nameserver 192.168.0.254
Checking from DNS Client
Dig another PC via FQDN
[root@comp1 ~]# dig server.zoom.com
[root@comp1 ~]# dig client2.zoom.com
Dig DNS server IP
[root@comp1 ~]# dig –x 192.168.0.253
Ping another PC via FQDN
[root@comp1 ~]# ping server.zoom.com
[root@comp1 ~]# ping client2.zoom.com
Configuring Forwarder
Open configuration for editing
[root@comp1~]# vi /etc/named.conf
Add the below line in /etc/named.conf
forwarders { 61.0.0.5;};
DNS Server
To restart the DNS services
[root@comp1 ~]# service named restart
Configuring DNS Client
Open configuration for editing
[root@comp1 ~]# vi /etc/resolv.conf
Add the DNS server IP address in file /etc/resolv.conf
nameserver 192.168.0.253
Checking from DNS Client
Check by dig command
[root@comp1 ~]# dig www.yahoo.com
Check by ping command
[root@comp1 ~]# ping www.yahoo.com
Configuring DNS Server
Install the package by using one of the installation methods
[root@comp1~]# mount 192.168.0.250:/var/ftp/pub/RedHat/RPMS/ /mnt
[root@comp1 ~]# cd /mnt
[root@comp1 ~]# rpm -ivh bind* caching* --force --aid
Open configuration for editing
[root@comp1~]# vi /etc/named.conf
/etc/named.conf
To change the options
zone "zoom.com" IN {
type slave;
file "slaves/zoom.for";
masters { 192.168.0.253; };
};
zone "0.168.192.in-addr.arpa" IN {
type slave;
file "slaves/zoom.rev";
masters { 192.168.0.253; };
};
Configuring DNS Server IP address
Open configuration for editing
[root@comp1 ~]# vi /etc/resolv.conf
Add the DNS server IP address in file /etc/resolv.conf
nameserver 192.168.0.254
DNS Server
To restart the DNS services
[root@comp1 ~]# service named restart