DNS
Introduction What is DNS? –Hierarchy or Tree –Dot used as a separator
Top-level domain Domain NameMeaning COMCommercial organizations EDUEducational institutions GOVGovernment institutions MILMilitary groups NETMajor network support ORGOrganizations other than those above ARPATemporary ARPANET domain INTInternational organizations country codeEach country (geographical scheme)
zone Domain Delegation Primary (Master) Name Server –Contains the writable authoritative copy for the zones Secondary (Slave) Name Server –Contains mirror copy of the data from a primary nameserver
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
How Does It Work? Listens at UDP and TCP port 53 –UDP for routine queries –TCP used for zone transfers
Basic DNS Testing of DNS Resolution The Host Command –host The nslookup Command –nslookup –nslookup
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 nameserver
BIND Downloading and Installing the BIND
How To Get BIND Started service named start service named stop service named restart
DNS File Locations named.conf –/etc/named.conf zone files –/var/named
Named.conf This file usually has two zone areas: –Forward zone file –Reverse zone file
Forward zone file zone "my-site.com" { type master; file "my-site.zone"; };
Reverse zone file zone " in-addr.arpa" { type master; notify no; file " zone"; };
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)
Time to Live Value –D signifies days –W signifies weeks –H signifies hours $TTL 3D
Standard Resource Records SOA –Start of Authority, Marks the begining of a zone's data NS –IP address or CNAME of the name server A –IP address of server
MX –Mail server DNS name CNAME –Server name alias PTR –Last octet of server's IP address
The SOA Record Format Name Class Type Name-Server -Address Serial-No Refresh Retry Expiry Minimum-TTL
@ IN SOA ns1.my-site.com. hostmaster.my-site.com. ( ; serial # 4H ; refresh 1H ; retry 1W ; expiry 1D ) ; minimum
the general format: NameClass Type Data
eeunix IN A IN MX 0 eeunix IN MX 1 maine.maine.edu.
Trouble Shoot Domain cmu.ac.th –ns.cmu.ac.th Domain Delegation –eng.cmu.ac.th แก้ / เพิ่ม work ? Transfer zone ?