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



Similar documents
DNS : Domain Name System

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

THE DOMAIN NAME SYSTEM DNS

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

The Domain Name System (DNS)

Forouzan: Chapter 17. Domain Name System (DNS)

The Domain Name System

Domain Name System (DNS) Fundamentals

DNS Domain Name System

Domain Name System (DNS)

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

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

Teldat Router. DNS Client

Application Protocols in the TCP/IP Reference Model

19 Domain Name System (DNS)

Applications and Services. DNS (Domain Name System)

1 DNS Packet Structure

ECE 4321 Computer Networks. Network Programming

Internetworking with TCP/IP Unit 10. Domain Name System

DNS - Domain Name System

Understanding DNS (the Domain Name System)

CS3250 Distributed Systems

Internet-Praktikum I Lab 3: DNS

DNS. Computer Networks. Seminar 12

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

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

CS3600 SYSTEMS AND NETWORKS

Motivation. Users can t remember IP addresses. Implemented by library functions & servers. - Need to map symbolic names (

- Domain Name System -

DNS Domain Name System

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

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

Domain Name Server. Training Division National Informatics Centre New Delhi

The Application Layer. CS158a Chris Pollett May 9, 2007.

Introduction to DNS CHAPTER 5. In This Chapter

DNS. Some advanced topics. Karst Koymans. (with Niels Sijm) Informatics Institute University of Amsterdam. (version 2.6, 2013/09/19 10:55:30)

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

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

CS 348: Computer Networks. - DNS; 22 nd Oct Instructor: Sridhar Iyer IIT Bombay

DNS Conformance Test Specification For Client

Copyright

Applications & Application-Layer Protocols: The Domain Name System and Peerto-Peer

3. The Domain Name Service

Introduction BIND. The DNS Protocol. History (1) DNS. History (2) Agenda

Table of Contents DNS. How to package DNS messages. Wire? DNS on the wire. Some advanced topics. Encoding of domain names.

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

The Use of DNS Resource Records

Domain Name System Richard T. B. Ma

Introduction to Network Operating Systems

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

DNS at NLnet Labs. Matthijs Mekking

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

Chapter 24 The Domain Name System (DNS)

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

DNS: Domain Name System

NET0183 Networks and Communications

Computer Networks Prof. S. Ghosh Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 34 DNS & Directory

Domain Name System. Heng Sovannarith

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

CS640: Computer Networks. Naming /ETC/HOSTS

The Domain Name System

Outline. Definition. Name spaces Name resolution Example: The Domain Name System Example: X.500, LDAP. Names, Identifiers and Addresses

How to Add Domains and DNS Records

The Application Layer: DNS

Domain Name System (DNS) RFC 1034 RFC

Chapter 23 The Domain Name System (DNS)

How To Guide Edge Network Appliance How To Guide:

The Domain Name System (DNS)

Introduction to the Domain Name System

API of DNS hosting. For DNS-master and Secondary services Table of contents

Use Domain Name System and IP Version 6

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

How-to: DNS Enumeration

Domain Name System DNS

HTG XROADS NETWORKS. Network Appliance How To Guide: DNS Delegation. How To Guide

Understand Names Resolution

Chapter 25 Domain Name System Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Section 1 Overview Section 2 Home... 5

My Services Online Service Support. User Guide for DNS and NTP services

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

Domain Name System. Overview. Domain Name System. Domain Name System

Domain Name System (or Service) (DNS) Computer Networks Term B10

Application-layer Protocols

Some advanced topics. Karst Koymans. Friday, September 11, 2015

Basic DNS Course. Module 1. DNS Theory. Ron Aitchison ZYTRAX, Inc. Page 1 of 24

Coordinación. The background image of the cover is desgned by GUIDE TO DNS SECURITY 2

Domain Name System (DNS)

DNS + DHCP. Michael Tsai 2015/04/27

Chapter 9: Name Services. 9.1 Introduction 9.2 Name services and the DNS 9.3 Directory services 9.6 Summary

Names vs. Addresses. Flat vs. Hierarchical Space. Domain Name System (DNS) Computer Networks. Lecture 5: Domain Name System

DNS and Interface User Guide

DNS Resolving using nslookup

Transcription:

Motivation Domain Name System (DNS) IP addresses hard to remember Meaningful names easier to use Assign names to IP addresses Name resolution map names to IP addresses when needed Namespace set of all names Flat Hierarchical Flat Namespace Hierarchical Namespace Each host given a name Special file to keep name-address mapping (ex. /etc/hosts file in Linux) All hosts must know the current mapping for all other hosts with which they want to communicate Central authority to maintain authoritative host file with which all other hosts sync (ex. HOSTS.TXT at NIC in the old days) Makes the hostname file too large and the entire scheme unmanageable and impractical in any large network (ex., Internet) Break complete namespace into domains Domains broken up recursively into subdomains to create any level of hierarchy Delegate task of name allocation / resolution Name allocation for any subdomain left to subdomain authority Name resolution done by name server for subdomain 1

DNS Naming system for the internet Specifies A hierarchical naming scheme Name resolution mechanism Can handle multiple object types within one system Type associated with each name to distinguish different types of entities Ex. the name cse.iitkgp.ernet.in can be a domain name, a simple host name, an email server name etc. RFC 1034/1035, many other related ones (See http://www.dns.net/dnsrd/rfc/ for a list of DNS related RFCs (incl. ones that updates 1034/1035) DNS-relevant important websites www.iana.org www.icann.org www.internic.net DNS Namespace DNS Namespace (contd) Complete namespace is a tree of domains Root is a special domain (no name) Top level domains domains at second level of tree com, edu, gov, net, mil, int, org, arpa, in, country specific domains (us, in, kr etc.) Managed by delegated authorities Ex. for.in domain, NCST/National Internet Exchange of India Domains from third level Managed by local authorities A portion of the Internet domain name space. 2

DNS Names Every node in the tree has a label (max 63 bytes, case insensitive) Sibling nodes must have different labels DNS name of a node = sequence of labels from that node to root, separated by. Absolute names names that end with. Relative names names that does not end with., meaning they will be completed by appending something Nodes can be domains or hosts Arbitrary hierarchy allowed (but implementations usually limit name length to 255 bytes) Domain : subtree of the DNS namespace tree Zone : part of the tree for which the naming authority has been delegated to some name server Domain x.y and Zone x.y may not be same, as part of x.y domain may have its own naming authority and is not part of x.y zone Name Servers Root Servers Contains mapping information for one or more zones (zone files - text files in standard format) Maps names to IPs (forward lookup, mandatory) or IPs to names (reverse lookup, optional) Primary/Master name server : gets mapping data for zone from zone file on the host it runs on Secondary name server: pulls zone file data from primary name server (zone transfer) Authoritative server for a zone: either a primary or secondary server for that zone A host can be primary for some zones and secondary for others at the same time Name servers for root zone Contains name server for all top level domains Currently 13 root servers spread all over the world (all are secondaries of a hidden primary, a.root-servers.net through m.root-servers.net) All DNS name servers knows at least one root server 3

Name Servers Part of the DNS name space showing the division into zones. Domain Name Resolution: Overall Steps User program issues the request Query to name server is formulated The name server checks if name in database. If not, ask the higher level name server Finally the user program gets IP Address or error Name Resolution Resolver Accesses name server for name resolution Knows the address of at least one name server Sends a DNS request to the name server Standard access routine: gethostbyname() Name server Gets request from resolver Looks up the name and sends back response Name Resolution Basics Contact root server for name server of top level domain Name server for top level domain gives name server for next level domain Process continues until mapping is found or error 4

Example To resolve www.yahoo.com, first contact root server to get name server for com Querying name server for com gives name server for yahoo.com Querying name server for yahoo.com gives IP address of www.yahoo.com Three queries needed to resolve the name in the worst case Recursive/Iterative Query Recursive Query DNS server either gives the mapping, or forwards the request to the name server that may have it Original requestor finally gets either the mapping or an error May be ok for lower level domains with less request volumes Not suitable for higher level domains with high request volumes Caching Iterative If DNS server does not have mapping, it gives the address of the name server that may have it (referral) Original requestor contacts the new name server Repeated until mapping is found or no referral is obtained (error) Servers must implement iterative query, may implement recursive query Caching employed at both client and server for efficiency Lookup results in cache (both final IP address, or name server addresses for intermediate domains) Refreshed at regular intervals Caching Name Servers: not authoritative for any zone, only caches entries for other zones 5

Resource Records (RR) Each zone file contains a set of resource records for that zone Each RR has: name, type, TTL, Rdata, plus some other fields RR Types (16 bit value): SOA : Start of authority NS : authoritative name server for the domain A : hostname MX : mail server CNAME : alias name HINFO : CPU and OS Info PTR : pointer to another part of namespace SRV : Service name (RFC 2782) Others. TTL : indicates how long the RR can be cached (32 bit integer in seconds) RDATA : a type specific value (for ex., an IP address for A type etc.) Some other fields in RR not of interest to us $TTL 3D @ IN SOA mc1.land-5.com. root.land-5.com. ( 199609206 ; serial, todays date + todays serial # 8H ; zone file refresh period for secondaries 2H ; retry period for secondaries if primary is unreachable 4W ; expiry time if zone file cannot be b e refreshed 1D ) ; minimum TTL of any RR NS mc1.land-5.com. NS ns2.psi.net. MX 10 mailsrv.land-5.com. ; Primary Mail Exchanger MX 20 backupmail.land5.com. TXT "LAND-5 5 Corporation" router A 206.6.177.1 mc1.land-5.com. A 206.6.177.2 mc2.land-5.com. A 206.6.177.3 mailsrv A 206.6.177.4 ftp CNAME mc1.land-5.com. news CNAME mc1.land-5.com. funn A 206.6.177.2 www telnet.tcp CNAME mc1.land-5.com. CNAME mc2.land-5.com. SRV 10 1 23 mc2.land-5.com. SRV 10 3 23 mc1.land-5.com. subdomain1.land-5.com. NS ns1.subdomain1.land-5.com. subdomain2.land-5.com. NS ns2.subdomain2.land-5.com. ns1.subdomain1 A 202.122.132.7 ns2.subdomain2 A 202.122.136.9 6

Forwarders Protocol Details A DNS server X to which DNS queries can be sent by another DNS server Y if it cannot resolve it X resolves it and sends back the result to Y. X also caches. Motivation: No internet connection for Y Forwarder cache builds up over time Forwarder may be able to resolve most queries X may or may not be authoritative for any zone Y does not need to know root servers Usually runs on UDP port 53 Uses TCP for zone transfers (and some large responses) TCP can also be used for normal operation, though not used normally Same message format for query and response DNS Message Format Header Format 2 bytes 2 bytes HEADER (12 bytes) QUESTIONS Identification Flags ANSWERS AUTHORITY ADDITIONAL (Resource Records) (Resource Records) (Resource Records) # of questions # of answer RRs Identifier is set by the client (a query ID). # of authority recs. # of additional RRs DNS client 4-7

1 QR DNS Header FLAGS field 4 1 1 1 1 3 4 OPCODE AA TC RD RA 000 RCODE QR: 0 means message is query, 1 means response. OPCODE: 0 is standard query (use 0). AA: 1 means authoritative answer (set by server). TC: 1 means response was truncated (set by server). RD: 1 means recursion desired (set by client). RA: 1 means recursion available (set by server). 000: must be three zero bits. RCODE: return code. 0 is no error, 3 is name error, etc. Question Format Each question includes a variable length query name that specifies a hostname Each question also includes query type (what type of RRs are asked for, ex., A, SRV etc.) query class is 1 for Internet Addresses Question Format Query Name Example? bytes 2 bytes query name 2 bytes query type query class Query Name is a sequence of one or more labels. Each label is a single byte count, followed by that many characters. The last label must have a count of 0. The name www.iitkgp.edu would be sent like this: 3 w w w 6 i i t k g p 3 e d u 0 1 byte count Each count byte is a binary value in the range 0-63 count bytes are not ASCII! last count must be 0! 8

Some Query Type Field Values Answer Format A NS CNAME 1 2 5 IP Address Name Server Canonical Name The answers, authority and additional information parts of a response are all provided via the same format a Resource Record (RR). PTR HINFO MX 12 13 15 Pointer Host Info Mail Exchanger Each Resource Record specifies the value of a single resource along with information about the resource (what kind it is, how long the information is valid, etc.) ANY 255 everything Resource Record Format Reverse Lookup 2 bytes 2 bytes domain name (variable length) type class time-to-live data len data (len bytes) IP to name mapping Not mandatory to implement, but most DNS servers support All IP addresses are part of the special zone in-addr.arpa Ex. 10.5.17.2 will map to the name 2.17.5.10.in-addr.arpa PTR type RR kept to map this to a name Lookup similar otherwise 9

Dynamic Update Simple DNS requires the primary name server to be updated manually when a mapping changes not good for working with protocols like DHCP Dynamic DNS updates allow dynamic updates to zone files by messages For more details, see RFC 2136 10