Domain Name Server. Training Division National Informatics Centre New Delhi



Similar documents
Domain Name Service (DNS) Training Division, NIC New Delhi

Motivation. Domain Name System (DNS) Flat Namespace. Hierarchical Namespace

DNS. Computer networks - Administration 1DV202. fredag 30 mars 12

DNS. Computer Networks. Seminar 12

Introduction to the Domain Name System

- Domain Name System -

Application Protocols in the TCP/IP Reference Model

Understanding DNS (the Domain Name System)

Application Protocols in the TCP/IP Reference Model. Application Protocols in the TCP/IP Reference Model. DNS - Concept. DNS - Domain Name System

DNS Service on Linux. Supawit Wannapila CCNA, RHCE

Domain Name System (DNS)

DNS. The Root Name Servers. DNS Hierarchy. Computer System Security and Management SMD139. Root name server. .se name server. .

Configuring the BIND name server (named) Configuring the BIND resolver Constructing the name server database files

Introduction to DNS CHAPTER 5. In This Chapter

Copyright

DNS + DHCP. Michael Tsai 2015/04/27

CS3250 Distributed Systems

ECE 4321 Computer Networks. Network Programming

DNS : Domain Name System

APNIC elearning: Reverse DNS for IPv4 and IPv6

Windows 2008 Server. Domain Name System Administración SSII

Understand Names Resolution

Application Protocols in the TCP/IP Reference Model. Application Protocols in the TCP/IP Reference Model. DNS - Domain Name System

Services: DNS domain name system

THE DOMAIN NAME SYSTEM DNS

Lecture 2 CS An example of a middleware service: DNS Domain Name System

Overview. Principles Creating reverse zones Setting up nameservers Reverse delegation procedures IPv6 Reverse DNS

The Domain Name System (DNS)

DNS Domain Name System

Using Webmin and Bind9 to Setup DNS Sever on Linux

Introduction to DNS and Application Issues related to DNS. Kirk Farquhar

DNS and BIND. David White

Copyright International Business Machines Corporation All rights reserved. US Government Users Restricted Rights Use, duplication or disclosure

Creating a master/slave DNS server combination for your Grid Infrastructure

what s in a name? taking a deeper look at the domain name system mike boylan penn state mac admins conference

Part 5 DNS Security. SAST01 An Introduction to Information Security Martin Hell Department of Electrical and Information Technology

Domain Name System. CS 571 Fall , Kenneth L. Calvert University of Kentucky, USA All rights reserved

Lesson 13: DNS Security. Javier Osuna GMV Head of Security and Process Consulting Division

Automated domain name registration: DNS background information

HTG XROADS NETWORKS. Network Appliance How To Guide: EdgeDNS. How To Guide

Goal of this session

The Domain Name System

DNS: How it works. DNS: How it works (more or less ) DNS: How it Works. Technical Seminars Spring Paul Semple psemple@rm.

DNS/DHCP Administration Guide for Linux

Module 2. Configuring and Troubleshooting DNS. Contents:

Configuring DNS. Finding Feature Information

Managing Name Resolution

Networking Domain Name System

How to Configure the Windows DNS Server

How to Add Domains and DNS Records

Section 1 Overview Section 2 Home... 5

DNS Domain Name System

Domain Name System (DNS) Fundamentals

Domain Name Servers. Domain Types WWW host names. Internet Names. COMP476 Networked Computer Systems. Domain Name Servers

IPv6 support in the DNS

IPv6 Support in the DNS. Workshop Name Workshop Location, Date

Internet-Praktikum I Lab 3: DNS

How To Guide Edge Network Appliance How To Guide:

DNS and BIND Primer. Pete Nesbitt linux1.ca. April 2012

Internetworking with TCP/IP Unit 10. Domain Name System

Networking Domain Name System

Agenda. Network Services. Domain Names. Domain Name. Domain Names Domain Name System Internationalized Domain Names. Domain Names & DNS

Distributed Systems. 09. Naming. Paul Krzyzanowski. Rutgers University. Fall 2015

Chapter 23 The Domain Name System (DNS)

Lab 4 Domain Name System - DNS CMPE 150

2 HDE Controller X DNS Server Manual

Domain Name System. Heng Sovannarith

Chapter 7 Implementing Domain Name System (DNS)

Distributed Systems. 22. Naming Paul Krzyzanowski. Rutgers University. Fall 2013

Introduction to Network Operating Systems

CS3600 SYSTEMS AND NETWORKS

DNS and Interface User Guide

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

DNS Session 4: Delegation and reverse DNS. Joe Abley AfNOG 2006 workshop

Securing an Internet Name Server

3. The Domain Name Service

Domain Name System. 188lecture12.ppt. Pirkko Kuusela, Markus Peuhkuri, Jouni Karvo

Domain Name System :49:44 UTC Citrix Systems, Inc. All rights reserved. Terms of Use Trademarks Privacy Statement

How-to: DNS Enumeration

How to Configure Split DNS

Domain Name System (DNS) Session-1: Fundamentals. Ayitey Bulley

Hostnames. HOSTS.TXT was a bottleneck. Once there was HOSTS.TXT. CSCE515 Computer Network Programming. Hierarchical Organization of DNS

Installing and Setting up Microsoft DNS Server

Networking Domain Name System

DNS zone transfers from FreeIPA to non-freeipa slave servers

THE MASTER LIST OF DNS TERMINOLOGY. v 2.0

Domain Name System. DNS is an example of a large scale client-server application. Copyright 2014 Jim Martin

Local DNS Attack Lab. 1 Lab Overview. 2 Lab Environment. SEED Labs Local DNS Attack Lab 1

CSIS 3230 Computer Networking Principles, Spring 2012 Lab 7 Domain Name System (DNS)

DNS/DHCP Services Administration Guide for Linux

The Domain Name System: An Integral Part of the Internet. By Keiko Ishioka

The Domain Name System (DNS)

Internet Security [1] VU Engin Kirda

Implementing Domain Name Service (DNS)

netkit lab dns Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group Version Author(s)

The Use of DNS Resource Records

Domain Name System Security

Glossary of Technical Terms Related to IPv6

19 Domain Name System (DNS)

Computer Networks: Domain Name System

Transcription:

Domain Name Server Training Division National Informatics Centre New Delhi

Domain Name Service (DNS) I. History of DNS II. DNS structure and its components III. Functioning of DNS IV. Possible Configurations in DNS V. DNS Server configuration Files in LINUX VI. DNS Client Configurations in LINUX VII. DNS Tools VIII. Common Errors IX. DNS Debugging Tools X. DNS Operation Guidelines XI. Resolution of DNS query XII. Replication of DNS Information among Name Servers XIII.DNS Security

I.History of DNS Resources on the Internet was originally supported by HOSTS file. Names and the corresponding IP addresses were entered by the network administrators into this file. HOSTS file was maintained by the Network Information Centre (NIC) and contained the Host name to address mappings.

Updating the HOSTS file became difficult with the explosive growth of Internet. The file grew bigger and could not be partitioned as it used a flat namespace. The task became management intensive as networks grew. This called for a more sophistciated and well defined naming service structure that was hierarchically structured.

Thus DNS was introduced in the year 1984 for translating the resource names into IP addresses. The host names reside in a database and can be distributed among multiple servers. The hierarchical namespace also provided rules for dividing the namespace into subsets of names. Information about the host names and IP addresses could be partitioned and distributed.

II. DNS Structure and its components a. DNS domain namespace Structured hierarchy of domains to organize names. b. Resource records Maps DNS domain names to a specific type of resource information when the name is registered or resolved in the namespace. c. DNS Zones Zone is a range of responsibility within the domain name space that spans a subtree or a portion of a sub-tree d. DNS Name servers Stores and answer name queries for resource records. e. DNS clients or resolvers Query servers to look up and resolve names to a type of resource record specified in the query.

a. DNS Domain Namespace Domain name space is a hierarchical tree structure containing the names in a DNS database. The database consists of Hosts name and Domain name. A Domain Can be considered as a subtree of the domain name space. Domain names are of a specific pattern that is concatenation of node names eg.training.nic.in.

The Internet can be thought of as a single DNS namespace. The root or the top-most level of the Internet domain namespace is managed by the Internet name registration authority. The root has no name but is represented by a period or. Below the root DNS domain are the top level domains. The Top level domains are child of the root.

Three Types of Top Level Domains Organisational Are represented by a 3-character code that gives a clear indication of the primary activity of the domain.they are mainly for organisations within the United States. Geographical Are represented by a 2-character code that represents the country,region code.these codes are established by the International Standards organisation (ISO). Reverse Domains This is named as in-addr.arpa which is used for IP addressto-name mappings.

Name Domain levels Child of Domain Top-level domain Root in First-Level Domain Second-Level Domain Third-level Domain Top-level domain First-level domain Second-level domain nic.in delhi.nic.in gamma.delhi.nic.in

.com.arpa.in.gov.edu nic mah asm kar Domain Name System (Inverted Tree Structure)

Top-level domain Domain levels Description Domain name example.com Commercial organisation yahoo.com.edu Education institutions buffalo.edu.gov Government organisations nasa.gov

Zone in com org Zone nic training.nic.in domain nic.in domain Zone training Fig 1:Zones within the Domain Namespace

Zone in com org nic.in domain Zone nic asm Zone training.nic.in domain Zone training Fig 2:

DNS in the in-addr.arpa domain mapping numbers to Names - reverse DNS ROOT DNS net edu com arpa in in-addr apnic 164 165 166 Whois 100 102 101 100.164.in-addr.arpa

Why reverse DNS Service denial That only allow access when fully reverse delegated Ex: Anonymous ftp Diagnostics Assisting in trace routes etc

c. DNS Zones DNS database is comprised of multiple zones. Zones allowed the management of the domain space to be delegated.

Different types of queries from the DNS client to DNS Server A query for resolution of domain name into an IP address. A query for the resolution of an IP address into a domain name (Reverse DNS).

Creating Forward Lookup Query Forward Lookup IP IP address for for trglab.nic.in IP IP address = 192.168.0.16 DNS Server

Creating Reverse Lookup Query Reverse Lookup Name for for 192.168.0.16? Name = trglab.nic.in DNS Server

Different types of Zones and Zone files There are two types of Zones A query uses forward zone when resolution starts with a domain name and result in an IP address. A query uses reverse zone when the resolution starts with an IP address and results in a domain name.

d.dns Name Servers DNS zone database is stored in and accessed through a name server. Name servers can store data for one zone or multiple zones. A name server is said to have authority for the domain namespace that the zone encompasses. There must be at least one name server for a zone

b.resource Records DNS database consists of Resource Records(RR). Each resource record is a member of a class.(internet Class is the most popular) The Class is further broken down into Types. The type corresponds to the type of data stored in the record. eg: server1.com IN A 124.x.y.z (IN stands for INTERNET and A stands for address information.)

RECORD TYPE DESCRIPTION USAGE A An address record Maps FQDN into an IP address PTR A pointer record Maps an IP address into FQDN NS A name server record Denotes a name server for a zone SOA A Start of Authority record Specifies many attributes concerning the zone, such as the name of the domain (forward or inverse), administrative contact, the serial number of the zone, refresh interval, retry interval, etc. CNAME A canonical name record Defines an alias name and maps it to the absolute (canonical) name MX A Mail Exchanger record Used to redirect email for a given domain or host to another host

III.Functioning of DNS DNS uses a client/server architecture. Domain name clients are called name resolvers. DNS client requests information from a DNS Server s database. The request include type of information and a key(either a domain name or IP address).

IV.Possible DNS configurations Master Server Slave Server Caching-only Server Resolver-only client (DNS Client) Also other variants of above configurations

Configuring Standard Zones A Primary Zone DNS Server A Zone Information B Secondary Zone (Master DNS Server = DNS Server A) Secondary Zone (Master DNS Server = DNS Server A) C DNS Server B DNS Server C

V. DNS Files in Linux Zone File Reverse zone file Configuration file (named.conf)

Master File Format of Zone File DIRECTIVES $ORIGIN Syntax: $ORIGIN domain-name ;comments Ex: $ORIGIN nic.in. $ORIGIN ren www A 164.100.10.18 is equivalent to www.ren.nic.in.

Master File Format DIRECTIVES $INCLUDE Syn: $INCLUDE filename origin ; comment Ex: $INCLUDE nicnet.www nic.in $INCLUDE nicnet.www

Master File Format DIRECTIVES $TTL Syn: $TTL default-ttl ;comment Set the default Time to Live (TTL) for subsequent records with undefined TTL s Valid TTL s are of the range 0-2147483647 (TTL is in seconds) Ex: $TTL 1800

Master File Format RESOURCE RECORDS SOA, NS, A, MX, CNAME, PTR(reverse zone) Syn : domain @ ttl class type rdata All resource records have the same basic syntax. Ex: nic.in 60 IN NS nicnet.nic.in. nicnet 180 IN A 164.100.3.1 60 MX 0 nicnet.nic.in.

Master File Format SOA RECORDS Syn : domain @ ttl class SOA host address ( serial number refresh; refresh time retry; retry time expire ; expire time minimum ; default ttl) All resource records have the same basic syntax.

Master File Format SOA RECORD @ IN SOA nicnet.nic.in. root.nicnet.nic.in.( 2001092011 ; Serial (yyyymmddhh) 3600 ; Refresh 1 hour 600 ; Retry 10 mins. 864000 ; Expire 10 days. 108000 ); Minimum 3 hours,default,negative.

Reverse Zone File It should contain following records SOA NS PTR SOA and NS records are similar to previous zone file. Example of PTR Record 107.0.168.192.in.addr.arpa. IN PTR cabin7.training.nic.in.

Named Configuration named.conf in Linux OPTIONS options { directory "/var/named"; allow-transfer{ 164.100/16; }; allow-query{ 164.100/16; }; };

Named Configuration zone "." { type hint; file "nicnet.ca"; }; zone "nic.in"{ type master; file "nicnet.hosts"; allow-transfer{!164.100.19.3; 164.100/16;

Named Configuration }; allow-query{ any; };

Named Configuration zone "delhi.nic.in"{ type master; file "delhi.hosts"; allow-transfer{ 164.100/16; };

Named Configuration zone "ap.nic.in"{ type slave; file "ap.hosts"; masters{ 164.100.12.2; }; allow-query{ any;}; }; zone "12.100.164.in-addr.arpa"{ type slave; file "ap.rev"; masters{ 164.100.12.2; }; allow-query{any;}; };

Named Configuration logging{ channel dnsqry{ file "log/querylog" versions 3 size 10m; print-time yes; }; category queries{ dnsqry; default_debug; };

VI. Client Side Configuration Make following changes in the resolv.conf Search training.nic.in Nameserver 192.168.0.101

VII. DNS TOOLS Nslookup DIG (Domain Information Groper) Host

VIII. Common Errors Domain not fully qualified Entries in Zone which do not belong there NS not reachable, NS not set up CNAME Problem Host name contains unusual characters Ambiguous MX records

IX. DNS Debugging Tools named-checkconf Used for checking the syntax of named.conf file. named-checkzone Used for checking the syntax for the forward and reverse zone files.

X. DNS Operation Guidelines Daily Check up 1.Check whether named is running (# ps -ef grep named ) OR (# ps ax grep named ) If not running, execute the following #/usr/sbin/named Verify whether named process started. If not started, please see the /var/log/messages file for the possible cause.

DNS Operation Guidelines Daily Check up Possible Causes may be : named.conf file is missing or some errors in it. Host files is missing or syntax errors Zone file missing or syntax errors 2.Use nslookup command to query some popular sites like www.nic.in, hotmail.com, yahoo.com etc, in case of any problem try to rectify it on the basis of error message generated by nslookup.

DNS Operation Guidelines Weekly Backup 1. Create bak directory under /var/named or any other directory 2. copy all the dns files of your zone, training.nic.zone and 168.192.rev 3. copy /usr/local/etc/named.conf (In case of SunOS ) or /etc/named.conf (In case of Linux OS ) file which ever is applicable to bak directory.

DNS Operation Guidelines Always Remember!!! After making any addition, deletion and modification following points to be followed: 1.Always increase serial number 2. Kill the named daemon (ps -ef grep named) kill -9 pid (process id) 3. Restart it (/usr/sbin/named). 4.For ensuring it is working fine, refer Daily checkup.

XI. Resolution A DNS Server receives two types of requests Recursive Iterative DNS clients always makes recursive requests whereas DNS server uses both types of requests.

The following is a list of responses : Positive authoritative NonAuthoritative Referral Negative

4 DNS Server Primary zone Root. 6 DNS Server Primary zone in in 3 5 7 8 DNS Server Primary zone nic.in nic DNS Server 1 2 Cache <empty> 9 10 DNS Server Primary zone training.nic.in training 1 11 DNS Client Fig1:Iterative Name Resolution starting from the root name server. training.nic.in domain

4 DNS Server Primary zone Root. 6 DNS Server Primary zone in in 3 5 7 8 DNS Server Primary zone nic.in nic DNS Server 1 2 Cache <empty> 9 10 DNS Server Primary zone training.nic.in training 1 11 DNS Client training.nic.in domain Fig 2

XII. Replication of DNS Replicating a zone file to multiple name servers is called zone transfer. Zone transfer is accomplished by copying the zone file information from master server to slave server. There are two types of zone file replication Full zone transfer (AXFR), replicates the entire zone file. Incremental zone transfer (IXFR), replicates only the changed records of the zone.

Zone Transfer Process DNS Server (Master) DNS Server Master Zone Database File trglab Client Zone Database File expt1 expt2 Zone 1

Zone Types,Zone Names and Zone File Standard Zones Change Zone Transfer Master Zone Slave Zone

XIII. DNS Security Cache Poisoning Client Flooding Dynamic Update Vulnerabilities Information Leakage Compromise of DNS server s authoritative data