Domain Name System (DNS) Session-1: Fundamentals. Ayitey Bulley abulley@ghana.com



Similar documents
Domain Name System (DNS) Fundamentals

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

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

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

DNS Domain Name System

How-to: DNS Enumeration

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

Internet-Praktikum I Lab 3: DNS

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

DNS. Computer Networks. Seminar 12

DNS : Domain Name System

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

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

ECE 4321 Computer Networks. Network Programming

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

Copyright

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

- Domain Name System -

The Domain Name System

DNS at NLnet Labs. Matthijs Mekking

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

DNS Resolving using nslookup

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

How to Add Domains and DNS Records

THE DOMAIN NAME SYSTEM DNS

Forouzan: Chapter 17. Domain Name System (DNS)

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

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

CS3600 SYSTEMS AND NETWORKS

Domain Name System (DNS)

3. The Domain Name Service

Domain Name System (DNS) RFC 1034 RFC

How to Enable Internet for Guest Virtual Machine using Wi-Fi wireless Internet Connection.

Application Protocols in the TCP/IP Reference Model

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

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

The Domain Name System

KAREL UCAP DNS AND DHCP CONCEPTS MANUAL MADE BY: KAREL ELEKTRONIK SANAYI ve TICARET A.S. Organize Sanayi Gazneliler Caddesi 10

Use Domain Name System and IP Version 6

CS3250 Distributed Systems

DNS (Domain Name System) is the system & protocol that translates domain names to IP addresses.

Configuring DNS. Finding Feature Information

NET0183 Networks and Communications

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

DNS - Domain Name System

Understand Names Resolution

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 Security

DNS Conformance Test Specification For Client

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

DNS Pharming Attack Lab

Domain Name System DNS

Teldat Router. DNS Client

Introduction to DNS CHAPTER 5. In This Chapter

Reverse DNS considerations for IPv6

DNS. Spring 2016 CS 438 Staff 1

How To Guide Edge Network Appliance How To Guide:

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

Understanding DNS (the Domain Name System)

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

DNS Service on Linux. Supawit Wannapila CCNA, RHCE

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

The Use of DNS Resource Records

19 Domain Name System (DNS)

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

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

DNS & IPv6. Agenda 4/14/2009. MENOG4, 8-9 April Raed Al-Fayez SaudiNIC CITC rfayez@citc.gov.sa, DNS & IPv6.

Configuring DNS on Cisco Routers

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

Using Webmin and Bind9 to Setup DNS Sever on Linux

Applications and Services. DNS (Domain Name System)

Introduction to the Domain Name System

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

Non-authoritative answer: home.web.cern.ch canonical name = drupalprod.cern.ch. Name: drupalprod.cern.ch Address:

1 DNS Packet Structure

Deploying & Configuring a DNS Server on OpenServer 6 or UnixWare 7. Kirk Farquhar

Domain Name System (DNS)

CSE 127: Computer Security. Network Security. Kirill Levchenko

Enabling DNS for IPv6 CSD Fall 2011

Domain Name System Richard T. B. Ma

The Domain Name System

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

Introduction to Network Operating Systems

Enterprise Architecture Office Resource Document Design Note - Domain Name System (DNS)

Internetworking with TCP/IP Unit 10. Domain Name System

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

Domain Name Server. Training Division National Informatics Centre New Delhi

The Application Layer: DNS

DNS SECURITY TROUBLESHOOTING GUIDE

Building a Linux IPv6 DNS Server

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

Domain Name System (DNS)

How to Configure the Windows DNS Server

THE MASTER LIST OF DNS TERMINOLOGY. v 2.0

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

Transcription:

Domain Name System (DNS) Session-1: Fundamentals Ayitey Bulley abulley@ghana.com

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 128.4.13.9 UCB-MAILGATE 4.98.133.7 FTPHOST 200.10.194.33... 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) / (root) ke org com etc bin usr co.ke afnog.org nsrc.org yahoo.com /etc/rc.d usr/local usr/sbin usr/local/src kenic.or.ke ws.afnog.org DNS Database Unix Filesystem Forms a tree structure

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 www.ws.afnog.org) 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 user@domain 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: Result: www.afnog.org. A www.afnog.org. 14400 IN A 196.216.2.4 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 193.194.185.15 Domain name: 15.185.194.193.in-addr.arpa. Query Type: PTR Result: ashanti.gh.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 Application e.g. web browser Resolver Caching Nameserver Authoritative Nameserver

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 search e1.ws.afnog.org nameserver 196.200.219.200 nameserver 196.200.222.1 That's all you need to configure a resolver

Testing DNS Just put "www.yahoo.com" 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 dig @196.200.222.1 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 e-mail addresses

ns# dig @84.201.31.1 www.gouv.bj a ; <<>> DiG 8.3 <<>> @84.201.31.1 www.gouv.bj 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: ;; www.gouv.bj, type = A, class = IN ;; ANSWER SECTION: www.gouv.bj. 1D IN CNAME waib.gouv.bj. waib.gouv.bj. 1D IN A 208.164.179.196 ;; 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 208.164.179.193 nakayo.leland.bj. 1d23h59m59s IN A 208.164.176.1 ns1.intnet.bj. 1d23h59m59s IN A 81.91.225.18 ;; Total query time: 2084 msec ;; FROM: noc.t1.ws.afnog.org to SERVER: 84.201.31.1 ;; WHEN: Sun Jun 8 21:18:18 2003 ;; 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