Domain Name System (DNS) Fundamentals

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

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

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

DNS Domain Name System

How-to: DNS Enumeration

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

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

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

Internet-Praktikum I Lab 3: DNS

DNS. Computer Networks. Seminar 12

DNS : Domain Name System

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

- Domain Name System -

ECE 4321 Computer Networks. Network Programming

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

Copyright

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

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

DNS at NLnet Labs. Matthijs Mekking

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

The Domain Name System

Forouzan: Chapter 17. Domain Name System (DNS)

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

CS3600 SYSTEMS AND NETWORKS

DNS Resolving using nslookup

THE DOMAIN NAME SYSTEM DNS

How to Add Domains and DNS Records

The Domain Name System

Domain Name System (DNS)

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

Domain Name System (DNS) RFC 1034 RFC

Configuring DNS. Finding Feature Information

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

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

3. The Domain Name Service

Use Domain Name System and IP Version 6

Application Protocols in the TCP/IP Reference Model

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

Domain Name System DNS

NET0183 Networks and Communications

Understand Names Resolution

DNS Pharming Attack Lab

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

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

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

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

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

Reverse DNS considerations for IPv6

DNS - Domain Name System

DNS Conformance Test Specification For Client

Introduction to DNS CHAPTER 5. In This Chapter

Domain Name System (DNS)

Domain Name System Security

Teldat Router. DNS Client

CS3250 Distributed Systems

How To Guide Edge Network Appliance How To Guide:

DNS. Spring 2016 CS 438 Staff 1

Understanding DNS (the Domain Name System)

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

DNS Service on Linux. Supawit Wannapila CCNA, RHCE

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

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

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

Enabling DNS for IPv6 CSD Fall 2011

19 Domain Name System (DNS)

Domain Name System Richard T. B. Ma

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

The Application Layer: DNS

The Use of DNS Resource Records

Introduction to the Domain Name System

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

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

KB Windows 2000 DNS Event Messages 1 Through 1614

Using Webmin and Bind9 to Setup DNS Sever on Linux

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

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

How to Configure the Windows DNS Server

CSE 127: Computer Security. Network Security. Kirill Levchenko

Building a Linux IPv6 DNS Server

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

Internetworking with TCP/IP Unit 10. Domain Name System

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

1 DNS Packet Structure

THE MASTER LIST OF DNS TERMINOLOGY. v 2.0

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

The Domain Name System

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

How to set up the Integrated DNS Server for Inbound Load Balancing

Domain Name Server. Training Division National Informatics Centre New Delhi

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

Defeating DNS Amplification Attacks. Ralf Weber Senior Infrastructure Architect

Applications and Services. DNS (Domain Name System)

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

DNS Basics. DNS Basics

Clear and Present Danger Increase in Number of DNS AAAA Queries

Introduction to Network Operating Systems

Networking Domain Name System

Transcription:

Domain Name System (DNS) Fundamentals Mike Jager Network Startup Resource Center mike.jager@synack.co.nz These materials are licensed under the Creative Commons Attribution-NonCommercial 4.0 International license (http://creativecommons.org/licenses/by-nc/4.0/)

Slide Title (Arial 44) Initial bullet point (Arial 32) Secondary bullet (Arial 28) Tertiary bullet (Arial 24) Standard text (Arial 32)

Why Use Domain Name System? 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.

HOSTS.TXT The old way: 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 & improved performance through replication and caching Employs a client-server architecture A critical piece of the Internet's infrastructure

DNS is Hierarchical. (root) / (root) ma org com /etc /bin /usr ac.ma afnog.org nsrc.org yahoo.com /etc/rc.d /usr/local /usr/sbin emi.ac.ma ws.afnog.org ws.nsrc.org /usr/local/src DNS Database Unix Filesystem It forms a tree structure

DNS is Hierarchical (continued) Globally unique names Administered in zones (parts of the tree) You can give away ("delegate") control of part of the tree underneath you Example: nsrc.org on one set of nameservers ws.nsrc.org on a different set noc.ws.nsrc.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 IPv4 address AAAA (quad A): map a hostname to IPv6 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: nsrc.org. A nsrc.org. 83855 IN A 128.223.157.19 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

Look up the name for an IP address 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 128.223.157.19 Domain name: 19.157.223.128.in-addr.arpa. Query Type: PTR Result: Reverse Lookups nsrc.org.

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 large requests (larger than 512-bytes) e.g. zone transfer from master to slave or IPv6 AAAA (quad A) record.

The Three Roles of DNS Application e.g. web browser Resolver Caching Nameserver Authoritative Nameserver

RESOLVER The Three Roles of DNS Takes app request, creates a UDP packet, sends to cache CACHING NAMESERVER Returns the answer if already known Or searches for an authoritative server with information Caches the result for future queries Also known as RECURSIVE nameserver AUTHORITATIVE NAMESERVER Contains information put into the DNS by domain owner

The Three Roles of DNS The SAME protocol is used for resolver cache cache auth NS communication One name server can be caching & authoritative It still performs only one role for each incoming query It's NOT RECOMMENDED to use one server for both 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 name server find a caching resolver? 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

Which Cache Should You Use? 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?

Resolvers Can Have Default Domains 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 nameserver 10.10.0.254 domain ws.nsrc.org search ws.nsrc.org That's all you need to configure a resolver

Testing DNS Just put "www.google.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 nsrc.org. -- defaults to query type "A" dig nsrc.org. mx -- specified query type dig @128.223.157.19 nsrc.org. mx -- send to particular cache (overrides /etc/resolv.conf)

The Trailing Dot # dig nsrc.org. Prevents any default domain being appended Always use it when testing DNS only on domain names, not IP addresses or e-mail addresses

Anatomy of a DNS Query [field@term /usr/home/field]$ dig @zoe.dns.gh. downloads.dns.gh. a ; <<>> DiG 9.7.0-P1 <<>> @zoe.dns.gh. downloads.dns.gh. a ; (1 server found) ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34963 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 3, ADDITIONAL: 0 ;; QUESTION SECTION: ;downloads.dns.gh. IN A ;; ANSWER SECTION: downloads.dns.gh. 3600 IN CNAME zoe.dns.gh. zoe.dns.gh. 3600 IN A 147.28.0.23 ;; AUTHORITY SECTION: dns.gh. 3600 IN NS zoe.dns.gh. dns.gh. 3600 IN NS mantse.gh.com. dns.gh. 3600 IN NS snshq902.ghanatel.com.gh. ;; ADDITIONAL SECTION: zoe.dns.gh. 3600 IN AAAA 2001:418:1::23 ;; Query time: 287 msec ;; SERVER: 147.28.0.23#53(147.28.0.23) ;; WHEN: Tue Apr 17 08:04:58 2012 ;; MSG SIZE rcvd: 173

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 addresses for authoritative nameservers) AAAA ( quad A ) record or the IPv6 address 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