DNS: Domain Name System



Similar documents
How To Map Between Ip Address And Name On A Domain Name System (Dns)

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

DNS: Domain Name System

Chapter 2 Application Layer

Domain Name System Richard T. B. Ma

CS 43: Computer Networks Naming and DNS. Kevin Webb Swarthmore College September 17, 2015

internet technologies and standards

DATA COMMUNICATOIN NETWORKING

The Application Layer: DNS

CMPE 80N: Introduction to Networking and the Internet

DNS and P2P File Sharing

Domain Name System (DNS)

Domain Name System (DNS) RFC 1034 RFC

CS 355. Computer Networking. Wei Lu, Ph.D., P.Eng.

Domain Name System DNS

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

DNS Domain Name System

Naming and the DNS. Focus. How do we name hosts etc.? Application Presentation Topics. Session Domain Name System (DNS) /URLs

NET0183 Networks and Communications

Application Layer. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross

Ch 6: Networking Services: NAT, DHCP, DNS, Multicasting

Domain Name System (DNS)

FTP: the file transfer protocol

DNS. Spring 2016 CS 438 Staff 1

Domain Name System (DNS) Reading: Section in Chapter 9

Ch 6: Networking Services: NAT, DHCP, DNS, Multicasting, NTP

DNS Domain Name System

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

2.5 DNS The Internet s Directory Service

DNS and electronic mail. DNS purposes

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

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

Internet-Praktikum I Lab 3: DNS

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

Computer Networks & Security 2014/2015

CSE/ISE 311: Systems Administra5on Networking 2

C 1. Last Time. CSE 486/586 Distributed Systems Domain Name System. Review: Causal Ordering. Review: Causally Ordered Multicast.

3. The Domain Name Service

DNS: Domain Names. DNS: Domain Name System. DNS: Root name servers. DNS name servers

Network programming, DNS, and NAT. Copyright University of Illinois CS 241 Staff 1

Application-layer protocols

Resilient Networking. Overview of DNS Known attacks on DNS Denial-of-Service Cache Poisoning. Securing DNS Split-Split-DNS DNSSEC.

Application Protocols in the TCP/IP Reference Model

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

Chapter 23 The Domain Name System (DNS)

FTP: the file transfer protocol

CS640: Computer Networks. Naming /ETC/HOSTS

THE DOMAIN NAME SYSTEM DNS

HW2 Grade. CS585: Applications. Traditional Applications SMTP SMTP HTTP 11/10/2009

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

The Domain Name System

Computer Networks: Domain Name System

Names & Addresses. Names & Addresses. Names vs. Addresses. Identity. Names vs. Addresses. CS 194: Distributed Systems: Naming

The Domain Name System (DNS)

Understanding DNS (the Domain Name System)

DNS records. RR format: (name, value, type, TTL) Type=NS

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

Introduction to the Domain Name System

CS3600 SYSTEMS AND NETWORKS

DNS : Domain Name System

Domain Name System (DNS) Fundamentals

Introduction to DNS CHAPTER 5. In This Chapter

Lecture 5: Network Attacks I. Course Admin

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

- Domain Name System -

Introduction to Network Operating Systems

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

ECE 4321 Computer Networks. Network Programming

The Domain Name System (DNS)

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

416 Distributed Systems. Feb 24, 2016 DNS and CDNs

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

The Domain Name System

INTERNET DOMAIN NAME SYSTEM

Domain Name System (DNS)

Domain Name System (DNS) Omer F. Rana. Networks and Data Communications 1

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

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

DNS: Domain Name System

CS244A Review Session Routing and DNS

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

The Domain Name System

19 Domain Name System (DNS)

CS3250 Distributed Systems

Types of hypertext. Hypertext documents can either be 1.Static 2.Dynamic

Internetworking with TCP/IP Unit 10. Domain Name System

Transcription:

DNS: Domain Name System CMPSCI 491G: Computer Networking Lab V. Arun Slides adapted from Liebeherr & Zarki, Kurose & Ross, Kermani

DNS: domain name system people: many identifiers: SSN, name, passport # Internet hosts, routers: IP address (32 bit) - used for addressing datagrams name, e.g., www.yahoo.com - used by humans Q: how to map between IP address and name, and vice versa? Domain Name System: v distributed database implemented in hierarchy of many name servers v application-layer protocol: hosts, name servers communicate to resolve names à addresses note: core Internet function, implemented as applicationlayer protocol complexity at network s edge Application Layer 2-2

DNS: services, structure DNS services v Resolution hostname à IP address v Aliasing canonical, alias names mail server aliasing v Load balancing with replicated web servers: many addresses map to one name why not centralize DNS? v single point of failure v traffic volume v distant centralized database v maintenance doesn t scale! Application Layer 2-3

Before there was DNS.. there was the HOSTS.TXT file Before DNS (until 1985), name resolution was done by FTP ing a single file (hosts.txt) from a central server. Names in hosts.txt are not structured. hosts.txt still works on most operating systems. It can be used to define local names.

Design principle of DNS DNS naming system based on a hierarchical and logical tree structure called domain namespace. An organization obtains authority for parts of the name space, and can add additional layers of the hierarchy Names of hosts can be assigned without regard of location on a link layer network, IP network or autonomous system In practice, allocation of the domain names generally follows the allocation of IP address, e.g., All hosts with network prefix 128.119/16 have domain name suffix umass.edu All hosts on network 128.119.240/24 are in the School of Computer Science at UMass Amherst.

DNS Name hierarchy DNS hierarchy can be represented by a tree Root and top-level domains are administered by an Internet central name registration authority (ICANN) org edu. (root) gov com Top-level Domains Below top-level domain, administration of name space is delegated to organizations Each organization can delegate further uci.edu math.toronto.edu toronto.edu ece.toronto.edu Managed by UofT Managed by ECE Dept. neon.ece.toronto.edu

Domain name system Each node in the DNS tree represents a DNS name Each branch below a node is a DNS domain. DNS domain can contain hosts or other domains (subdomains). edu virginia.edu Example: DNS domains are., edu, virginia.edu, cs.virginia.edu www.virginia.edu cs.virginia.edu neon.cs.virginia.edu

Top-level domains Three types of top-level domains: Organizational: 3-character code indicates the function of the organization Used primarily within the US Examples: gov, mil, edu, org, com, net Geographical: 2-character country or region code Examples: us, va, jp, de Expanded top-level domains (gtlds) Essentially arbitrary TLDs Reverse domains: A special domain (in-addr.arpa) used for IP address-to-name mapping

Organizational top-level domains com edu gov int mil net org Commercial organizations Educational institutions Government institutions International organizations U.S. military institutions Networking organizations Non-profit organizations

Hierarchy of name servers The resolution of the hierarchical name space is done by a hierarchy of name servers root server Each server is responsible (authoritative) for a contiguous portion of the DNS namespace, called a zone. org server edu server gov server com server Zone is a part of the subtree DNS server answers queries about hosts in its zone uci.edu server.virginia.edu server cs.virginia.edu server

Authority and delegation Authority for the root domain is with the Internet Corporation for Assigned Numbers and Names (ICANN) ICANN delegates to accredited registrars (for gtlds) and countries for country code top level domains (cctlds) Authority can be delegated further Chain of delegation can be obtained by reading domain name from right to left. Unit of delegation is a zone.

DNS domain and zones Each zone is anchored at a specific domain node, but zones are not domains. A DNS domain is a branch of the namespace A zone is a portion of the DNS namespace generally stored in a file (could consist of multiple nodes) Zone. (root).edu.uci.edu math.virginia.edu.virginia.edu cs.virginia.edu A server can divide part of its zone and delegate it to other servers Zone and domain Domain

Primary and secondary name servers For each zone, there must be a primary name server and a secondary name server The primary server (master server) maintains a zone file which has information about the zone. Updates are made to the primary server The secondary server copies data stored at the primary server. Adding a host: When a new host is added ( gold.cs.virginia.edu ) to a zone, the administrator adds the IP information on the host (IP address and name) to a configuration file on the primary server

DNS resolution: distributed, hierarchical Top-level domain servers Root DNS Servers com DNS servers org DNS servers edu DNS servers yahoo.com DNS servers amazon.com DNS servers Authoritative name servers pbs.org DNS servers poly.edu umass.edu DNS servers DNS servers client wants IP for www.amazon.com; 1 st approx: v client queries root server to find.com TLD DNS server v client queries.com TLD DNS server for amazon.com auth server v client queries amazon.com DNS auth server to get IP address for www.amazon.com Application Layer 2-14

DNS: root name servers v contacted when no info about top-level or auth server v root name server can: return top-level or auth name server address or contact auth server and return final resolved address e. NASA Mt View, CA f. Internet Software C. Palo Alto, CA (and 48 other sites) c. Cogent, Herndon, VA (5 other sites) d. U Maryland College Park, MD h. ARL Aberdeen, MD j. Verisign, Dulles VA (69 other sites ) a. Verisign, Los Angeles CA (5 other sites) b. USC-ISI Marina del Rey, CA l. ICANN Los Angeles, CA (41 other sites) g. US DoD Columbus, OH (5 other sites) k. RIPE London (17 other sites) i. Netnod, Stockholm (37 other sites) m. WIDE Tokyo (5 other sites) 13 root name servers worldwide Application Layer 2-15

TLD, authoritative servers top-level domain (TLD) servers: responsible for com, org, net, edu, aero, jobs, museums, and all top-level country domains, e.g.: uk, fr, ca, jp Network Solutions maintains servers for.com TLD Educause for.edu TLD authoritative DNS servers: organization s own DNS server(s), providing authoritative hostname to IP mappings for organization s named hosts can be maintained by organization or service provider Application Layer 2-16

Local DNS name server v does not strictly belong to hierarchy v deployed by ISP (residential, company, university) also called default name server v acts as proxy between host and DNS hierarchy has local cache of recent name-to-address translation pairs (but may be out of date!) Application Layer 2-17

DNS name resolution example root DNS server v host at cis.poly.edu wants IP address for gaia.cs.umass.edu 2 3 4 5 TLD DNS server iterated query: v contacted server replies with name of server to contact v I don t know this name, but ask this server local DNS server dns.poly.edu 1 8 requesting host cis.poly.edu 7 6 authoritative DNS server dns.cs.umass.edu gaia.cs.umass.edu Application Layer 2-18

DNS name resolution example root DNS server recursive query: 2 7 6 3 v puts burden of name resolution on contacted name server local DNS server dns.poly.edu 5 4 TLD DNS server v heavy load at upper levels of hierarchy? 1 8 requesting host cis.poly.edu authoritative DNS server dns.cs.umass.edu gaia.cs.umass.edu Application Layer 2-19

DNS: caching, updating records v any name server can cache learned mappings cache entries timeout (disappear) after some time (TTL) TLD servers typically cached in local name servers, so root name servers not often visited v cached entries may be out-of-date (best effort name-to-address translation!) if name host changes IP address, may not be known Internet-wide until all TTLs expire v update/notify mechanisms proposed IETF standard RFC 2136 Application Layer 2-20

DNS records DNS: distributed db storing resource records (RR) RR format: (name, value, type, ttl) type=a name is hostname value is IP address type=ns name is domain (e.g., foo.com) value is hostname of authoritative name server for this domain type=cname name is alias name for some canonical (the real) name www.ibm.com is really servereast.backup2.ibm.com value is canonical name type=mx value is name of mailserver associated with name Application Layer 2-21

DNS protocol, messages v query and reply messages, both with same message format 2 bytes 2 bytes msg header v v identification: 16 bit # for query, reply to query uses same # flags: query or reply recursion desired recursion available reply is authoritative identification flags # questions # answer RRs # authority RRs # additional RRs questions (variable # of questions) answers (variable # of RRs) authority (variable # of RRs) additional info (variable # of RRs) Application Layer 2-22

DNS protocol, messages 2 bytes 2 bytes identification # questions flags # answer RRs name, type fields for a query RRs in response to query records for authoritative servers additional helpful info that may be used # authority RRs # additional RRs questions (variable # of questions) answers (variable # of RRs) authority (variable # of RRs) additional info (variable # of RRs) Application Layer 2-23

Inserting records into DNS v example: new startup Network Utopia v register name networkuptopia.com at DNS registrar (e.g., Network Solutions) provide names, IP addresses of authoritative name server (primary and secondary) registrar inserts two RRs into.com TLD server: (networkutopia.com, dns1.networkutopia.com, NS) (dns1.networkutopia.com, 212.212.212.1, A) v create authoritative server type A record for www.networkuptopia.com; type MX record for networkutopia.com Application Layer 2-24

Resource Records Resource records are stored in configuration files (zone files) at name servers. Example resource records for a zone: db.mylab.com $TTL 86400 mylab.com. IN SOA PC4.mylab.com. hostmaster.mylab.com. ( 1 ; serial 28800 ; refresh 7200 ; retry 604800 ; expire 86400 ; ttl ) ; mylab.com. IN NS PC4.mylab.com. ; localhost A 127.0.0.1 PC4.mylab.com. A 10.0.1.41 PC3.mylab.com. A 10.0.1.31 PC2.mylab.com. A 10.0.1.21 PC1.mylab.com. A 10.0.1.11

Resource Records db.mylab.com $TTL 86400 mylab.com. IN SOA PC4.mylab.com. hostmaster.mylab.com. ( 1 ; serial 28800 ; refresh 7200 ; retry 604800 ; expire 86400 ; ttl ) ; mylab.com. IN NS PC4.mylab.com. ; localhost A 127.0.0.1 PC4.mylab.com. A 10.0.1.41 PC3.mylab.com. A 10.0.1.31 PC2.mylab.com. A 10.0.1.21 PC1.mylab.com. A 10.0.1.11 Max. age of cached data in seconds * Start of authority (SOA) record. Means: This name server is authoritative for the zone Mylab.com * PC4.mylab.com is the name server * hostmaster@mylab.com is the email address of the person in charge Name server (NS) record. One entry for each authoritative name server Address (A) records. One entry for each hostaddress

Lab 7 (DHCP/NAT) review

Exercise 1(B) ConfiguraEon: Router2(config)#ip nat inside source static 10.0.1.2 200.0.0.2.... PC4% route add net 200.0.0.0 netmask 255.255.255.0 gw 128.195.7.32 Which ping works and why? PC3% ping c3 10.0.1.3 PC3% ping c3 128.143.136.1 Router1% ping c3 10.0.1.2 Router1% ping c3 128.143.136.1 PC4% ping c3 10.0.1.2 PC4% ping c3 200.0.0.2 NAT Table on Router2 Router2#show ip nat translations Pro Inside global Inside local Outside local Outside global --- 200.0.0.2 10.0.1.2 --- --- 28

Exercise 1(B) ConfiguraEon: Router2(config)#ip nat inside source static 10.0.1.2 200.0.0.2.... PC4% route add net 200.0.0.0 netmask 255.255.255.0 gw 128.195.7.32 Which ping works and why? PC3% ping c3 10.0.1.3 PC3% ping c3 128.143.136.1 Router1% ping c3 10.0.1.2 Router1% ping c3 128.143.136.1 PC4% ping c3 10.0.1.2 PC4% ping c3 200.0.0.2 NAT Table on Router2 Router2#show ip nat translations Pro Inside global Inside local Outside local Outside global --- 200.0.0.2 10.0.1.2 --- --- 29

Exercise 1(B) ConfiguraEon: Router2(config)#ip nat inside source static 10.0.1.2 200.0.0.2 Router2(config)#ip nat inside source static 10.0.1.1 200.0.0.1 Router2(config)#ip nat inside source static 10.0.1.3 200.0.0.3 Which ping works and why? PC3% ping c3 10.0.1.3 PC3% ping c3 128.143.136.1 Router1% ping c3 10.0.1.2 Router1% ping c3 128.143.136.1 PC4% ping c3 10.0.1.2 PC4% ping c3 200.0.0.2 NAT Table on Router2 Router2#show ip nat translations Pro Inside global Inside local Outside local Outside global --- 200.0.0.1 10.0.1.1 --- --- --- 200.0.0.2 10.0.1.2 --- --- --- 200.0.0.3 10.0.1.3 --- --- 30

Exercise 1(B) ConfiguraEon: Router2(config)#ip nat inside source static 10.0.1.2 200.0.0.2 Router2(config)#ip nat inside source static 10.0.1.1 200.0.0.1 Router2(config)#ip nat inside source static 10.0.1.3 200.0.0.3 Which ping works and why? PC3% ping c3 10.0.1.3 PC3% ping c3 128.143.136.1 Router1% ping c3 10.0.1.2 Router1% ping c3 128.143.136.1 PC4% ping c3 10.0.1.2 PC4% ping c3 200.0.0.2 NAT Table on Router2 Router2#show ip nat translations Pro Inside global Inside local Outside local Outside global --- 200.0.0.1 10.0.1.1 --- --- --- 200.0.0.2 10.0.1.2 --- --- --- 200.0.0.3 10.0.1.3 --- --- 31

Exercise 1(B) Show IP source/desenaeon addresses before/aoer Router2 PC3% ping c3 128.143.136.1 Before Router2: Src: 10.0.1.2 (10.0.1.2), Dst: 128.143.136.1 (128.143.136.1) AOer Router2: Src: 200.0.0.2 (200.0.0.2), Dst: 128.143.136.1 (128.143.136.1) NAT Table on Router2 Router2#show ip nat translations Pro Inside global Inside local Outside local Outside global --- 200.0.0.1 10.0.1.1 --- --- --- 200.0.0.2 10.0.1.2 --- --- --- 200.0.0.3 10.0.1.3 --- --- 32

Exercise 1(C)- NAT/PAT/Masquerade telnet commands; which one successful? PC1% telnet 10.0.1.3 (Router1) PC1% telnet 128.143.136.1 (PC4) Router1# telnet 10.0.1.2 (PC1) Router1# 128.143.136.1 (PC4) PC4: telnet 10.0.1.2 (PC3) 33

Exercise 1(C)- NAT/PAT/Masquerade telnet commands; which one successful? PC1% telnet 10.0.1.3 (Router1) PC1% telnet 128.143.136.1 (PC4) Router1# telnet 10.0.1.2 (PC1) Router1# 128.143.136.1 (PC4) PC4: telnet 10.0.1.2 (PC3) 34

Exercise 1(C)- NAT & telnet PC1% telnet 128.143.136.1 (PC4) Before translaeon (PC2) Internet Protocol Source: 10.0.1.2 Destination: 128.143.136.1 Transmission Control Protocol Source port: 32774 Destination port: telnet (23) Sequence number: 1857633137 AOer translaeon (PC2) Internet Protocol Source: 128.143.136.22 Destination: 128.143.136.1 Transmission Control Protocol Source port: 32774 Destination port: telnet (23) Sequence number: 1857633137 35

Exercise 1(C)- PAT & ICMP (ping) Ping (ICMP) does not use port number IdenEficaEon is used to help with NAT PC1% ping 128.143.136.1 (PC4) Internet Protocol, Src Addr: 10.0.1.2, Dst Addr: 128.143.136.1 Identification: 0x0000 Protocol: ICMP (0x01) Source: 10.0.1.2 Destination: 128.143.136.1 Internet Protocol, Src Addr: 128.143.136.22, Dst Addr: 128.143.136.1 Identification: 0x0000 Protocol: ICMP (0x01) Source: 128.143.136.22 Destination: 128.143.136.1 36

Exercise 1(D)- NAT & FTP n FTP uses 2 ports Control conneceon, port 21 Data conneceon port 20 n No problem with NAT & control conneceon. n For data conneceon, the server inieates a conneceon from its port 20 to a (random) port on client Causes problem with NAT Only client can inieate conneceon n PASSIVE mode solves this problem 37

Exercise 1(D)- NAT & FTP PC3% ftp 128.143.136.22 (PC2) 38