33

Types of DNS Server - WordPress.com · 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

  • Upload
    vonhi

  • View
    269

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Types of DNS Server - WordPress.com · 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
Page 2: Types of DNS Server - WordPress.com · 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

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

Page 3: Types of DNS Server - WordPress.com · 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

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

Page 4: Types of DNS Server - WordPress.com · 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

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

Page 5: Types of DNS Server - WordPress.com · 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

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

Page 6: Types of DNS Server - WordPress.com · 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

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

Page 7: Types of DNS Server - WordPress.com · 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

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

Page 8: Types of DNS Server - WordPress.com · 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

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

Page 9: Types of DNS Server - WordPress.com · 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

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

Page 10: Types of DNS Server - WordPress.com · 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

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.

Page 11: Types of DNS Server - WordPress.com · 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

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 ?

Page 12: Types of DNS Server - WordPress.com · 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

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 ?

Page 13: Types of DNS Server - WordPress.com · 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

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

Page 14: Types of DNS Server - WordPress.com · 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

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

Page 15: Types of DNS Server - WordPress.com · 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

/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";

};

Page 16: Types of DNS Server - WordPress.com · 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

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

Page 17: Types of DNS Server - WordPress.com · 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

/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

Page 18: Types of DNS Server - WordPress.com · 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

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

Page 19: Types of DNS Server - WordPress.com · 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

/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.

Page 20: Types of DNS Server - WordPress.com · 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

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

Page 21: Types of DNS Server - WordPress.com · 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

DNS Server

To restart the DNS services

[root@comp1 ~]# service named restart

Page 22: Types of DNS Server - WordPress.com · 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

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

Page 23: Types of DNS Server - WordPress.com · 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

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

Page 24: Types of DNS Server - WordPress.com · 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

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

Page 25: Types of DNS Server - WordPress.com · 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

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

Page 26: Types of DNS Server - WordPress.com · 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

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;};

Page 27: Types of DNS Server - WordPress.com · 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

DNS Server

To restart the DNS services

[root@comp1 ~]# service named restart

Page 28: Types of DNS Server - WordPress.com · 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

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

Page 29: Types of DNS Server - WordPress.com · 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

Checking from DNS Client

Check by dig command

[root@comp1 ~]# dig www.yahoo.com

Check by ping command

[root@comp1 ~]# ping www.yahoo.com

Page 30: Types of DNS Server - WordPress.com · 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

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

Page 31: Types of DNS Server - WordPress.com · 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

/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; };

};

Page 32: Types of DNS Server - WordPress.com · 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

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

Page 33: Types of DNS Server - WordPress.com · 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

DNS Server

To restart the DNS services

[root@comp1 ~]# service named restart