Download presentation
Presentation is loading. Please wait.
Published byJanis Cooper Modified over 9 years ago
1
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 2: Application Layer Part 3: Client Server - DNS, DHCP 1
2
Domain Name System Services DNS Servers DNS Records and Messages Dynamic Host Configuration Protocol DHCP Client-Server Scenario Overview 2
3
Learning Outcomes 1 To describe the structure of DNS system and its main services 2 To identify the main DNS servers and their roles 3 To analyze how the DNS distributed database operates 4 To describe the DNS messages 5 To explain how to attain IP address using DHCP protocol 3
4
Domain Name System Services DNS Servers DNS Records and Messages Dynamic Host Configuration Protocol DHCP Client-Server Scenario Overview 4
5
DNS: Domain Name System People: many identifiers: SSN, name, passport # Internet hosts : 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 Services 5
6
DNS: Domain Name System The DNS is: 1.Distributed database implemented in hierarchy of many name servers 2. Application-layer protocol that allows hosts to query name servers to resolve names (address/name translation) Domain Name System Services 6
7
DNS: Services, Structure DNS services: 1.Hostname to IP address translation 2.Host aliasing Canonical, alias names 3.Mail server aliasing 4.Load distribution Replicated Web servers: many IP addresses correspond to one name Q: why not centralize DNS? Single point of failure Traffic volume Distant centralized database Maintenance does’t scale! Domain Name System Services 7
8
Client wants IP for www.amazon.com; Client queries root server to find com DNS server Client queries.com DNS server to get amazon.com DNS server Client queries amazon.com DNS server to get IP address for www.amazon.com DNS: A Distributed, Hierarchical Database Root DNS Servers com DNS servers org DNS serversedu DNS servers poly.edu DNS servers umass.edu DNS servers yahoo.com DNS servers amazon.com DNS servers pbs.org DNS servers … … Domain Name System Services 8
9
DNS Servers DNS Records and Messages Dynamic Host Configuration Protocol DHCP Client-Server Scenario Overview 9
10
Domain Name Servers DNS Servers 13 root name “servers” worldwide a. Verisign, Los Angeles CA (5 other sites) b. USC-ISI Marina del Rey, CA l. ICANN Los Angeles, CA (41 other sites) e. NASA Mt View, CA f. Internet Software C. Palo Alto, CA (and 48 other sites) i. Netnod, Stockholm (37 other sites) k. RIPE London (17 other sites) m. WIDE Tokyo (5 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 ) g. US DoD Columbus, OH (5 other sites) 10
11
Domain Name Servers Types 1- Local DNS Name Server: Does not strictly belong to hierarchy Each ISP (residential ISP, company, university) has one Also called “default name server” When host makes DNS query, query is sent to its local DNS server Has local cache of recent name-to-address translation pairs (but may be out of date!) Acts as proxy, forwards query into hierarchy DNS Servers 11
12
Domain Name Servers Types 2- Root Name Servers: Contacted by local name server that can not resolve name Steps: 1.Contacts authoritative name server if name mapping not known 2. Gets mapping 3. Returns mapping to local name server DNS Servers 12
13
Domain Name Servers Types 3- 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 4- 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 DNS Servers 13
14
Host at cis.poly.edu wants IP address for gaia.cs.umass.edu A. Iterated query: Contacted server replies with name of server to contact “I don’t know this name, but ask this server” DNS Name Resolution Example requesting host cis.poly.edu gaia.cs.umass.edu root DNS server local DNS server dns.poly.edu 1 2 3 4 5 6 authoritative DNS server dns.cs.umass.edu 7 8 TLD DNS server DNS Servers - Name Resolution 14
15
B. Recursive query: Heavy load at upper levels of hierarchy? Puts burden of name resolution on contacted name server Typically, the query from the requesting host to the local DNS server is recursive, and the remaining queries are iterative (like the figure in the previous slide) DNS Name Resolution Example 4 5 6 3 requesting host cis.poly.edu gaia.cs.umass.edu root DNS server local DNS server dns.poly.edu 1 2 7 authoritative DNS server dns.cs.umass.edu 8 TLD DNS server DNS Servers - Name Resolution 15
16
Domain Name System Services DNS Servers DNS Records and Messages Dynamic Host Configuration Protocol DHCP Client-Server Scenario Overview 16
17
DNS: Caching, Updating Records Once (any) name server learns mapping, it caches mapping Cache entries timeout (disappear) after some time (TTL) TLD servers typically cached in local name servers Thus root name servers not often visited 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 Update/notify mechanisms proposed IETF (Internet Engineering Task Force) standard RFC 2136 RFC 2136 DNS Records and Messages 17
18
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 name is alias name for mail server value is canonical name of mail server associated with name DNS Records and Messages 18
19
Query and reply messages, both with same message format Msg header Identification: 16 bit # for query, reply to query uses same # Flags: Query or reply Recursion desired Recursion available Reply is authoritative DNS Protocol, Messages identificationflags # questions questions (variable # of questions) # additional RRs # authority RRs # answer RRs answers (variable # of RRs) authority (variable # of RRs) additional info (variable # of RRs) 2 bytes DNS Records and Messages 19
20
name, type fields for a query RRs in response to query records for authoritative servers additional “helpful” info that may be used identificationflags # questions questions (variable # of questions) # additional RRs # authority RRs # answer RRs answers (variable # of RRs) authority (variable # of RRs) additional info (variable # of RRs) 2 bytes DNS Protocol, Messages DNS Records and Messages 20
21
Inserting Records into DNS Example: new startup company called “Network Utopia”, you have to: 1.Register the domain name networkuptopia.com at DNS registrar (e.g., Network Solutions) Provide names, IP addresses of authoritative name server (primary and secondary) For each authoritative name server, Registrar inserts two RRs into.com TLD server: (networkutopia.com, dns1.networkutopia.com, NS) (dns1.networkutopia.com, 212.212.212.1, A) (networkutopia.com, dns2.networkutopia.com, NS) (dns2.networkutopia.com, 212.212.212.2, A) 2.Create: type A record for web server www.networkutopia.com; type MX record for mail server mail.networkutopia.com DNS Records and Messages 21
22
Domain Name System Services DNS Servers DNS Records and Messages Dynamic Host Configuration Protocol DHCP Client-Server Scenario Overview 22
23
IP Addresses: How To Get A Block? Q: how does an ISP get block of addresses? A: ICANN: Internet Corporation for Assigned Names and Numbers http://www.icann.org/ http://www.icann.org/ Allocates addresses Manages DNS Assigns domain names, resolves disputes Dynamic Host Configuration Protocol 23
24
IP Addresses: How To Get One? Q: How does a host get IP address? Hard-coded by system admin in a file Windows: control-panel->network->configuration->tcp/ip->properties UNIX: /etc/rc.config DHCP: Dynamic Host Configuration Protocol: dynamically get address from as server “Plug-and-play ” RFC 2131 Dynamic Host Configuration Protocol 24
25
DHCP: Dynamic Host Configuration Protocol Goal: allow host to dynamically obtain its IP address from network server when it joins network Can renew its lease on address in use Allows reuse of addresses (only hold address while connected/“on”) Support for mobile users who want to join network DHCP overview: Host broadcasts “DHCP discover” msg [optional] DHCP server responds with “DHCP offer” msg [optional] Host requests IP address: “DHCP request” msg DHCP server sends address: “DHCP ack” msg Dynamic Host Configuration Protocol 25
26
Domain Name System Services DNS Servers DNS Records and Messages Dynamic Host Configuration Protocol DHCP Client-Server Scenario Overview 26
27
DHCP: More Than IP Addresses DHCP returns: IP address Address of first-hop router for client Name and IP address of DNS sever Network mask (indicating network versus host portion of address) DHCP Client-Server Scenario 27
28
DHCP Client-server Scenario 223.1.1.0/24 223.1.2.0/24 223.1.3.0/24 223.1.1.1 223.1.1.3 223.1.1.4 223.1.2.9 223.1.3.2 223.1.3.1 223.1.1.2 223.1.3.27 223.1.2.2 223.1.2.1 DHCP server arriving DHCP client needs address in this network DHCP Client-Server Scenario 28
29
DHCP: Example Connecting laptop needs its IP address, addr of first-hop router, addr of DNS server: use DHCP router with DHCP server built into router DHCP request encapsulated in UDP, encapsulated in IP, encapsulated in 802.3 Ethernet Ethernet frame broadcast (dest: FFFFFFFFFFFF) on LAN, received at router running DHCP server Ethernet demuxed to IP demuxed, UDP demuxed to DHCP 168.1.1.1 DHCP UDP IP Eth Phy DHCP UDP IP Eth Phy DHCP DHCP Client-Server Scenario 29
30
DHCP: Example DHCP server formulates DHCP ACK containing client’s IP address, IP address of first-hop router for client, name & IP address of DNS server Encapsulation of DHCP server, frame forwarded to client, demuxing up to DHCP at client router with DHCP server built into router DHCP UDP IP Eth Phy DHCP UDP IP Eth Phy DHCP Client now knows its IP address, name and IP address of DNS server, IP address of its first-hop router. DHCP Client-Server Scenario 30
31
Conclusion DNS is employed by other application layer protocols – including HTTP, SMTP, and FTP – to translate user-supplied hostnames to IP addresses. DNS uses a distributed hierarchical database to solve the scaling problem Caching is essential for DNS to reduce response time DHCP allows host to dynamically obtain its IP address from network server when it joins network DHCP provides the following information: IP address Address of first-hop router for client Name and IP address of DNS sever Network mask (indicating network versus host portion of address) 31
32
References Computer Networking: A Top-Down Approach Featuring the Internet by James Kurose and Keith Ross, Addison Wesley, 2012 (chapter 2 )Computer Networking Dynamic Updates in the Domain Name System (RFC2136) Dynamic Updates in the Domain Name System (RFC2136) Dynamic Host Configuration Protocol (RFC2131) Dynamic Host Configuration Protocol (RFC2131) 32
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.