DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

26
DNS

Transcript of DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

Page 1: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

DNS

Page 2: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

Introduction

• What is DNS? – Hierarchy or Tree– Dot used as a separator

Page 3: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

Top-level domain

Domain Name MeaningCOM Commercial organizationsEDU Educational institutionsGOV Government institutionsMIL Military groupsNET Major network support ORG Organizations other than those aboveARPA Temporary ARPANET domainINT International organizationscountry codeEach country (geographical scheme)

Page 4: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.
Page 5: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

zone

• Domain Delegation

Primary (Master) Name Server– Contains the writable authoritative copy for th

e zones

Secondary (Slave) Name Server– Contains mirror copy of the data from a

primary nameserver

Page 6: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.
Page 7: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

Introduction to DNS

• DNS Clients – /etc/resolv.conf

• Authoritative DNS Servers – provide the information for your DNS domain

• Caching DNS Server – Most servers don’t ask authoritative servers

for DNS directly – ask a caching DNS server

Page 8: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

How Does It Work?

• Listens at UDP and TCP port 53 – UDP for routine queries – TCP used for zone transfers

Page 9: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.
Page 10: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

Basic DNS Testing of DNS Resolution

• The Host Command– host www.google.com

• The nslookup Command– nslookup www.google.com– nslookup

Page 11: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

The /etc/resolv.conf File

• Nameserver– IP address of your DNS nameserver

• Search

• Domain– localdomain use by default

search my-site.com my-site.net my-site.org

nameserver 192.168.1.100

nameserver 192.168.1.102

Page 12: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

BIND

• Downloading and Installing the BIND

Page 13: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

How To Get BIND Started

• service named start

• service named stop

• service named restart

Page 14: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

DNS File Locations

• named.conf– /etc/named.conf

• zone files– /var/named

Page 15: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

Named.conf

• This file usually has two zone areas: – Forward zone file – Reverse zone file

Page 16: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

Forward zone file

zone "my-site.com" { type master;

file "my-site.zone";

};

Page 17: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

Reverse zone file

zone "1.168.192.in-addr.arpa" { type master;

notify no;

file "192-168-1.zone";

};

Page 18: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

Configuring The Zone Files

• By default located in the directory /var/named

• Each zone file contains a variety of records (SOA, NS, MX, A, and CNAME)

Page 19: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

Time to Live Value

– D signifies days– W signifies weeks– H signifies hours

$TTL 3D

Page 20: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

Standard Resource Records

• SOA– Start of Authority, Marks the begining of a zon

e's data

• NS – IP address or CNAME of the name server

• A– IP address of server

Page 21: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

• MX– Mail server DNS name

• CNAME– Server name alias

• PTR– Last octet of server's IP address

Page 22: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

The SOA Record

• FormatName Class Type Name-Server Email-Address Serial-No Refresh

Retry Expiry Minimum-TTL

Page 23: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

@ IN SOA ns1.my-site.com. hostmaster.my-site.com. ( 2004100801  ; serial #

4H  ; refresh

1H  ; retry

1W  ; expiry

1D )  ; minimum

Page 24: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

the general format:

Name Class Type Data

Page 25: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

eeunix IN A 130.111.148.45

IN MX 0 eeunix

IN MX 1 maine.maine.edu.

Page 26: DNS. Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator.

Trouble Shoot

• Domain cmu.ac.th– ns.cmu.ac.th

• Domain Delegation – eng.cmu.ac.th

• แก้�/เพิ่��ม work ?

• Transfer zone ?