Domain Name System (DNS) Adapted from a presentation by Ayitey Bulley DNS Fundamentals.

Slides:



Advertisements
Similar presentations
Daves DNS Show Read at your own risk. Domain Name Service Maps IP addresses to more human readable domain names Every domain name ultimately resolves.
Advertisements

INTERNET PROTOCOLS Class 9 CSCI 6433 David C. Roberts Entire contents copyright 2011, David C. Roberts, all rights reserved.
Sergei Komarov. DNS  Mechanism for IP hostname resolution  Globally distributed database  Hierarchical structure  Comprised of three components.
Web Server Administration
2.1 Installing the DNS Server Role Overview of the Domain Name System Role Overview of the DNS Namespace DNS Improvements for Windows Server 2008 Considerations.
Domain Name System. DNS is a client/server protocol which provides Name to IP Address Resolution.
1 DNS. 2 BIND DNS –Resolve names to IP address –Resolve IP address to names (reverse DNS) BIND –Berkeley Internet Name Domain system Version 4 is still.
The Domain Name System. CeylonLinux DNS concepts using BIND 2 Hostnames IP Addresses are great for computers –IP address includes information used for.
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao
TDC375 Autumn 03/04 John Kristoff - DePaul University 1 Network Protocols Domain Name System (DNS) largely based on slides from D. Comer.
Domain Name System: DNS
MCTS Guide to Microsoft Windows Server 2008 Network Infrastructure Configuration Chapter 5 Introduction to DNS in Windows Server 2008.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 7: Planning a DNS Strategy.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 19 Domain Name System (DNS)
Domain Name Services Oakton Community College CIS 238.
11.1 © 2004 Pearson Education, Inc. Exam Managing and Maintaining a Microsoft® Windows® Server 2003 Environment Lesson 11: Introducing WINS, DNS,
Domain Name System (DNS) Ayitey Bulley Session-1: Fundamentals.
NET0183 Networks and Communications Lecture 25 DNS Domain Name System 8/25/20091 NET0183 Networks and Communications by Dr Andy Brooks.
Basic DNS Course Lecturer: Ron Aitchison. Module 1 DNS Theory.
1 Domain Name System (DNS). 2 DNS: Domain Name System Internet hosts: – IP address (32 bit) - used for addressing datagrams – “name”, e.g.,
Name Resolution Domain Name System.
Netprog: DNS and name lookups1 Address Conversion Functions and The Domain Name System Refs: Chapter 9 RFC 1034 RFC 1035.
TELE 301 Lecture 11: DNS 1 Overview Last Lecture –Scheduled tasks and log management This Lecture –DNS Next Lecture –Address assignment (DHCP)
Chapter 16 – DNS. DNS Domain Name Service This service allows client machines to resolve computer names (domain names) to IP addresses DNS works at the.
Domain Names System The Domain Name System (DNS) is a hierarchical distributed naming system for computers, services, or any resource connected to the.
DNS and C# SWE 344 Internet Protocols & Client Server Programming.
Petrozavodsk State University, Alex Moschevikin, 2003NET TECHNOLOGIES Domain Name System HISTORY File hosts (the size of Internet became more than 1000.
DNS: Domain Name System
1 DNS: Domain Name System People: many identifiers: m SSN, name, Passport # Internet hosts, routers: m IP address (32 bit) - used for addressing datagrams.
Chapter 17 Domain Name System
DNS Related Commands Sayed Ahmed Computer Engineering, BUET, Bangladesh (Graduated on 2001 ) MSc, Computer Science, U of Manitoba, Canada
Chapter 29 Domain Name System (DNS) Allows users to reference computer names via symbolic names translates symbolic host names into associated IP addresses.
October 8, 2015 University of Tulsa - Center for Information Security Microsoft Windows 2000 DNS October 8, 2015.
CITA 310 Section 1 Name Resolution (Textbook Chapter 4)
Domain Name System. CONTENTS Definitions. DNS Naming Structure. DNS Components. How DNS Servers work. DNS Organizations. Summary.
Netprog: DNS and name lookups1 Address Conversion Functions and The Domain Name System Refs: Chapter 9 RFC 1034 RFC 1035.
Internet and Intranet Protocols and Applications Lecture 5 Application Protocols: DNS February 20, 2002 Joseph Conron Computer Science Department New York.
1 Kyung Hee University Chapter 18 Domain Name System.
Domain Name System Refs: Chapter 9 RFC 1034 RFC 1035.
CPSC 441: DNS 1. DNS: Domain Name System Internet hosts: m IP address (32 bit) - used for addressing datagrams m “name”, e.g., - used by.
Configuring Name Resolution and Additional Services Lesson 12.
Domain Name System (DNS). DNS Server Service Overview of Domain Name System What Is a Domain Namespace? Standards for DNS Naming.
1 Internet Network Services. 2 Module - Internet Network Services ♦ Overview This module focuses on configuring and customizing the servers on the network.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 19 Domain Name System (DNS)
DNS DNS overview DNS operation DNS zones. DNS Overview Name to IP address lookup service based on Domain Names Some DNS servers hold name and address.
Linux Operations and Administration
AfNOG-2003 Domain Name System (DNS) Ayitey Bulley
Web Server Administration Chapter 4 Name Resolution.
1 CMPT 471 Networking II DNS © Janice Regan,
1. Internet hosts:  IP address (32 bit) - used for addressing datagrams  “name”, e.g., ww.yahoo.com - used by humans DNS: provides translation between.
Domain Name System (DNS) Joe Abley AfNOG Workshop, AIS 2014, Djibouti Session-1: Fundamentals.
TCP/IP Protocol Suite 1 Chapter 17 Upon completion you will be able to: Domain Name System: DNS Understand how the DNS is organized Know the domains in.
COMP 431 Internet Services & Protocols
Internet Naming Service: DNS* Chapter 5. The Name Space The name space is the structure of the DNS database –An inverted tree with the root node at the.
Domain Name System INTRODUCTION to Eng. Yasser Al-eimad
Basics of the Domain Name System (DNS) By : AMMY- DRISS Mohamed Amine KADDARI Zakaria MAHMOUDI Soufiane Oujda Med I University National College of Applied.
Domain Name System (DNS) Ayitey Bulley extended by Phil Regnauld DNS Fundamentals AfNOG 2006.
System Administration(SAD622S) Name of Presenter: Shadreck Chitauro Lecturer 18 July 2016 Faculty of Computing and Informatics.
DNS and Inbound Load Balancing
Understand Names Resolution
Domain Name System (DNS)
Session-1: Fundamentals
Chapter 9: Domain Name Servers
Module 5: Resolving Host Names by Using Domain Name System (DNS)
IMPLEMENTING NAME RESOLUTION USING DNS
LINUX ADMINISTRATION 1
Net 323 D: Networks Protocols
Domain Name System (DNS)
Domain Name System Refs: Chapter 9 RFC 1034 RFC 1035.
Computer Networks Primary, Secondary and Root Servers
Presentation transcript:

Domain Name System (DNS) Adapted from a presentation by Ayitey Bulley DNS Fundamentals

Computers use IP addresses. Why do we need names? Names are easier for people to remember Computers may be moved between networks, in which case their IP address will change.

The old solution: HOSTS.TXT A centrally-maintained file, distributed to all hosts on the Internet SPARKY UCB-MAILGATE FTPHOST etc This feature still exists: /etc/hosts (UNIX) c:\windows\hosts

hosts.txt does not scale ✗ Huge file (traffic and load) ✗ Name collisions (name uniqueness) ✗ Consistency ✗ Always out of date ✗ Single point of Administration ✗ Did not scale well

The Domain Name System was born DNS is a distributed database for holding name to IP address (and other) information Distributed: – Shares the Administration – Shares the Load Robustness and performance achieved through – replication – and caching Employs a client-server architecture A critical piece of the Internet's infrastructure

DNS is Hierarchical. (root) keorg com DNS Database / (root) etc usr bin Unix Filesystem Forms a tree structure ke co.ke kenic.or.ke afnog.orgnsrc.org yahoo.com ws.afnog.org usr/localusr/sbin/etc/rc.d usr/local/src

DNS is Hierarchical (contd.) Globally unique names Administered in zones (parts of the tree) You can give away ("delegate") control of part of the tree underneath you Example: – afnog.org on one set of nameservers – ws.afnog.org on a different set – e1.ws.afnog.org on another set

Domain Names are (almost) unlimited Max 255 characters total length Max 63 characters in each part – RFC 1034, RFC 1035 If a domain name is being used as a host name, you should abide by some restrictions – RFC 952 (old!) – a-z 0-9 and minus (-) only – No underscores ( _ )

Using the DNS A Domain Name (like is the KEY to look up information The result is one or more RESOURCE RECORDS (RRs) There are different RRs for different types of information You can ask for the specific type you want, or ask for "any" RRs associated with the domain name

Commonly seen Resource Records (RRs) A (address): map hostname to IP address PTR (pointer): map IP address to hostname MX (mail exchanger): where to deliver mail for CNAME (canonical name): map alternative hostname to real hostname TXT (text): any descriptive text NS (name server), SOA (start of authority): used for delegation and management of the DNS itself

A Simple Example Query: Query type: A Result: IN A In this case a single RR is found, but in general, multiple RRs may be returned. – (IN is the "class" for INTERNET use of the DNS)

Possible results from a Query Positive – one or more RRs found Negative – definitely no RRs match the query Server fail – cannot find the answer Refused – not allowed to query the server

How do you use an IP address as the key for a DNS query Convert the IP address to dotted-quad Reverse the four parts Add ".in-addr.arpa." to the end; special domain reserved for this purpose e.g. to find name for Domain name: in-addr.arpa. Query Type: PTR Result:svr-15.ghana.com. Known as a "reverse DNS lookup" (because we are looking up the name for an IP address, rather than the IP address for a name)

? Any Questions?

DNS is a Client-Server application (Of course - it runs across a network) Requests and responses are normally sent in UDP packets, port 53 Occasionally uses TCP, port 53 – for very large requests (larger than 512-bytes) e.g. zone transfer from master to slave or an IPv6 AAAA (quad A) record.

There are three roles involved in DNS Resolver Caching Nameserver Authoritative Nameserver Application e.g. web browser

Three roles in DNS RESOLVER – Takes request from application, formats it into UDP packet, sends to cache CACHING NAMESERVER – Returns the answer if already known – Otherwise searches for an authoritative server which has the information – Caches the result for future queries – Also known as RECURSIVE nameserver AUTHORITATIVE NAMESERVER – Contains the actual information put into the DNS by the domain owner

Three roles in DNS The SAME protocol is used for resolver cache and cache auth NS communication It is possible to configure a single name server as both caching and authoritative But it still performs only one role for each incoming query Common but NOT RECOMMENDED to configure in this way (we will see why later).

ROLE 1: THE RESOLVER A piece of software which formats a DNS request into a UDP packet, sends it to a cache, and decodes the answer Usually a shared library (e.g. libresolv.so under Unix) because so many applications need it EVERY host needs a resolver - e.g. every Windows workstation has one

How does the resolver find a caching nameserver? It has to be explicitly configured (statically, or via DHCP etc) Must be configured with the IP ADDRESS of a cache (why not name?) Good idea to configure more than one cache, in case the first one fails

How do you choose which cache(s) to configure? Must have PERMISSION to use it – e.g. cache at your ISP, or your own Prefer a nearby cache – Minimises round-trip time and packet loss – Can reduce traffic on your external link, since often the cache can answer without contacting other servers Prefer a reliable cache – Perhaps your own?

Resolver can be configured with default domain(s) If "foo.bar" fails, then retry query as "foo.bar.mydomain.com" Can save typing but adds confusion May generate extra unnecessary traffic Usually best avoided

Example: Unix resolver configuration /etc/resolv.conf domain ws.linuxchix.or.ke nameserver nameserver That's all you need to configure a resolver

Delegation We mentioned that one of the advantages of DNS was that of distribution through shared administration. This is called delegation Delegation is done when there is an administrative boundary and you would like to turn over control of a subdomain to – A department (within a company) – A company (within a TLD) – A country (ccTLD)

Delegation

Creating a delegation is easy – Create the subdomain (zone) on the server which will answer authoritatively for it – Create the NS records for the zone to be delegated pointing it to the Authoritative Server That’s all!

Testing DNS Just put " in a web browser? Why is this not a good test?

Testing DNS with "dig" "dig" is a program which just makes DNS queries and displays the results Better than "nslookup", "host" because it shows the raw information in full dig ws.afnog.org. -- defaults to query type "A" dig afnog.org. mx -- specified query type afnog.org. mx -- send to particular cache (overrides /etc/resolv.conf)

The trailing dot dig ws.afnog.org. ● Prevents any default domain being appended ● Get into the habit of using it always when testing DNS – only on domain names, not IP addresses or addresses

ns# a ; > DiG a ; (1 server found) ;; res options: init recurs defnam dnsrch ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 4, ADDITIONAL: 3 ;; QUERY SECTION: ;; type = A, class = IN ;; ANSWER SECTION: 1D IN CNAME waib.gouv.bj. waib.gouv.bj. 1D IN A ;; AUTHORITY SECTION: gouv.bj. 1D IN NS rip.psg.com. gouv.bj. 1D IN NS ben02.gouv.bj. gouv.bj. 1D IN NS nakayo.leland.bj. gouv.bj. 1D IN NS ns1.intnet.bj. ;; ADDITIONAL SECTION: ben02.gouv.bj. 1D IN A nakayo.leland.bj. 1d23h59m59s IN A ns1.intnet.bj. 1d23h59m59s IN A ;; Total query time: 2084 msec ;; FROM: noc.t1.ws.afnog.org to SERVER: ;; WHEN: Sun Jun 8 21:18: ;; MSG SIZE sent: 29 rcvd: 221

Understanding output from dig STATUS – NOERROR: 0 or more RRs returned – NXDOMAIN: non-existent domain – SERVFAIL: cache could not locate answer – REFUSED: query not available on cache server FLAGS – AA: Authoritative answer (not from cache) – You can ignore the others QR: Query/Response (1 = Response) RD: Recursion Desired RA: Recursion Available ANSWER: number of RRs in answer

Understanding output from dig Answer section (RRs requested) – Each record has a Time To Live (TTL) – Says how long the cache will keep it Authority section – Which nameservers are authoritative for this domain Additional section – More RRs (typically IP addresses for the authoritative nameservers) Total query time Check which server gave the response! – If you make a typing error, the query may go to a default server

Practical Exercise Configure Unix resolver Issue DNS queries using 'dig' Use tcpdump to show queries being sent to cache