1 Computer Networks Application layer. 2 Application Layer So far –Socket programming, Network API Today –Application layer functions –Specific applications.

Slides:



Advertisements
Similar presentations
Domain Name System. DNS is a client/server protocol which provides Name to IP Address Resolution.
Advertisements

Domain Name System (or Service) (DNS) Computer Networks Computer Networks Term B10.
Domain Name System (or Service) (DNS) Computer Networks Computer Networks Spring 2012 Spring 2012.
2: Application Layer1 FTP, SMTP and DNS. 2: Application Layer2 FTP: separate control, data connections r FTP client contacts FTP server at port 21, specifying.
1 Domain Name System (DNS). 2 DNS: Domain Name System Internet hosts, routers: –IP address (32 bit) - used for addressing datagrams –“name”, e.g., gaia.cs.umass.edu.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
Application Layer session 1 TELE3118: Network Technologies Week 12: DNS Some slides have been taken from: r Computer Networking: A Top Down Approach.
Domain Name System: DNS
15-744: Computer Networking L-13 Naming. L -13; © Srinivasan Seshan, Naming DNS Service location protocols Assigned reading [MD88] P. Mockapetris.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 19 Domain Name System (DNS)
1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross.
Chapter 9 Application Layer, DNS
CPSC 441: DNS1 Instructor: Anirban Mahanti Office: ICT Class Location: ICT 121 Lectures: MWF 12:00 – 12:50 Notes derived.
Domain Name System ( DNS )  DNS is the system that provides name to address mapping for the internet.
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.
CS640: Computer Networks Aditya Akella Lecture 17 Naming and the DNS.
Computer Networking DNS. Lecture 13: Naming How do we efficiently locate resources? DNS: name  IP address Service location: description.
Electronic Mail Three major components: SMTP user agents mail servers
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
NET0183 Networks and Communications Lecture 25 DNS Domain Name System 8/25/20091 NET0183 Networks and Communications by Dr Andy Brooks.
FTP File Transfer Protocol. Introduction transfer file to/from remote host client/server model  client: side that initiates transfer (either to/from.
CS 4396 Computer Networks Lab
1 Domain Name System (DNS). 2 DNS: Domain Name System Internet hosts: – IP address (32 bit) - used for addressing datagrams – “name”, e.g.,
Domain Name System (DNS)
TELE 301 Lecture 11: DNS 1 Overview Last Lecture –Scheduled tasks and log management This Lecture –DNS Next Lecture –Address assignment (DHCP)
Ch-9: NAME SERVICES By Srinivasa R. Gudipati. To be discussed.. Fundamentals of Naming Services Naming Resolution The Domain Name System (DNS) Directory.
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.
Computer Networks Mozafar Bag-Mohammadi Lecture 5 Naming and the DNS.
DNS,SMTP,MIME.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer.
CS 471/571 Domain Name Server Slides from Kurose and Ross.
DNS: Domain Name System
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
2: Application Layer1 Internet apps: their protocols and transport protocols Application remote terminal access Web file transfer streaming multimedia.
1 DNS: Domain Name System People: many identifiers: m SSN, name, Passport # Internet hosts, routers: m IP address (32 bit) - used for addressing datagrams.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Network Protocols Chapter 25 (Data Communication & Networking Book): Domain Name System (DNS) 1.
Chapter 17 Domain Name System
1 Application Layer Lecture 6 Imran Ahmed University of Management & Technology.
25.1 Chapter 25 Domain Name System Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 DNS: Domain Name System People: many identifiers: m SSN, name, Passport # Internet hosts, routers: m IP address (32 bit) - used for addressing datagrams.
CS640: Computer Networks Aditya Akella Lecture 17 Naming and the DNS.
CSE 524: Lecture 5 Application layer protocols. Where we’re at… ● Internet architecture and history ● Internet protocols in practice ● Application layer.
October 8, 2015 University of Tulsa - Center for Information Security Microsoft Windows 2000 DNS October 8, 2015.
1 CSE 524: Lecture 15 Application layer (Part 2).
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.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 8 Omar Meqdadi Department of Computer Science and Software Engineering University of.
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.
CSE 524: Lecture 6 Application layer protocols. Where we’re at… ● Internet architecture and history ● Internet protocols in practice ● Application layer.
EE 122: Lecture 20 (Domain Name Server - DNS) Ion Stoica Nov 15, 2001 (* based on the some on-line slides of J. Kurose & K. Rose and of Raj Jain)
CS 3830 Day 9 Introduction 1-1. Announcements r Quiz #2 this Friday r Demo prog1 and prog2 together starting this Wednesday 2: Application Layer 2.
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.
Lecture 5: Web Continued 2-1. Outline  Network basics:  HTTP protocols  Studies on HTTP performance from different views:  Browser types [NSDI 2014]
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
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
Networking (Cont’d). Congestion Control l Is achieved by informing nodes along a route that congestion has occurred and asking them to reduce their packet.
Ch 2. Application Layer Myungchul Kim
Spring 2006 CPE : Application Layer_DNS 1 Special Topics in Computer Engineering Application layer: Domain Name System Some of these Slides are.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
Chapter 9: Domain Name Servers
EE 122: Domain Name Server (DNS)
DNS: Domain Name System
Domain Name System Refs: Chapter 9 RFC 1034 RFC 1035.
The Application Layer: Sockets, DNS
FTP, SMTP and DNS 2: Application Layer.
Presentation transcript:

1 Computer Networks Application layer

2 Application Layer So far –Socket programming, Network API Today –Application layer functions –Specific applications DNS FTP

3 Application layer functions Applications –Implement desired functionality within application protocols when no underlying network service provides support –Functionality that is common rolled into libraries and “middleware” Functions –Security (S/MIME, PGP) –Delivery semantics (multicast overlays, anycast) –Reliable data transfer (reliable multicast, reliable UDP) –Quality of service (QoS overlays, scheduling) –Congestion control (Non-TCP applications) –Flow control (Non-TCP applications) –Naming (DNS) –Routing (overlays)

4 AL: Specific application protocols DNS –Background –Nutshell description –DNS server design –DNS client lookups –DNS protocol messages FTP HTTP SMTP

5 AL: Domain Name System (DNS) Internet hosts, routers like to use fixed length addresses (numbers) –IP address (32 bit) - used for addressing datagrams Humans like to use names – –keywords DNS, keywords, naming protocols –Map from IP addresses to names –Map from names to IP addresses

6 AL: Original Name to Address Mapping Flat namespace –/etc/hosts –SRI kept main copy –Downloaded regularly Problems –Count of hosts was increasing: machine per domain  machine per user Many more downloads Many more updates

7 AL: Goals for a new naming system Implement a wide area distributed database –Scalability –Decentralized maintenance –Robustness, fault-tolerance –Global scope Names mean the same thing everywhere –Don’t need Atomicity Strong consistency

8 AL: Goals for a new naming system Why not centralize DNS? Single server with all name-to-IP address mappings –single point of failure –traffic volume –distant centralized database (performance) –maintenance –doesn’t scale!

9 AL: DNS (Domain Name System) distributed database implemented in hierarchy of many name servers decentralized control and management of data application-layer protocol used by hosts, routers, and name servers –communicate to resolve names (address/name translation) –core Internet function implemented as application-layer protocol complexity at network’s “edge” compare to phone network naming

10 AL: DNS nutshell solution Hierarchical canonical name space – root edu net org ukcom ca gwu ucb ogi bu mit cse ece www

11 AL: DNS nutshell solution Distributed database stores names hierarchically Authoritative name servers store parts of the database –Names assigned to authoritative name servers For a host, authority stores that host’s IP address, name Responds to queries for host’s IP address Perform name/address translation for that host’s name –Hierarchy organizes authoritative name servers DNS hierarchy –Each host has a pointer to a local name server for which to query for unknown names –Each local name server knows root of hierarchy –Root points to sub-levels, sub-levels point to deeper sub-levels, …, deeper sub-levels point to leaf name server representing authority for unknown name

12 AL: DNS nutshell figure Root name servers: may not know authoratiative name server may know intermediate name server: who to contact to find authoritative name server multiple root name servers for fault-tolerance requesting host surf.eurecom.fr gaia.cs.umass.edu root name server local name server dns.eurecom.fr authoritative name server dns.cs.umass.edu intermediate name server dns.umass.edu 7 8

13 AL: DNS server database DB contains tuples called resource records (RRs) –RR contains type, class and application data Before types added, only one record type (A) –Classes = Internet (IN), Chaosnet (CH), etc. –Each class defines types, e.g. for IN: A = address, NS = name server, CNAME = canonical name (for aliasing), HINFO = CPU/OS info, MX = mail exchange, PTR = pointer for reverse mapping of address to name

14 AL: DNS record types Resource records (RR) and their types Type=NS –name is domain (e.g. foo.com) –value is IP address of authoritative name server for this domain RR format: (name, value, type,ttl) Type=A –name is hostname –value is IP address Type=CNAME –name is an alias name for some “cannonical” (the real) name –value is cannonical name Type=MX –value is hostname of mailserver associated with name

15 AL: DNS MX record type MX records point to mail exchanger for a name –E.g. mail.acm.org is MX for acm.org Addition of MX record type proved to be a challenge –How to get mail programs to lookup MX record for mail delivery rather than A record? –Needed critical mass of such mailers nslookup example

16 AL: DNS server database distribution Administrative hierarchy –“.” as separator –Zone = contiguous section of name space Zones are created by convincing owner node to create/delegate a subzone –Each zone contains multiple redundant servers –Primary (master) name server updated manually –Secondary (redundant) servers updated by zone transfer of name space –Provides fault-tolerance within zone Host name to address section –Top-level domains  edu, gov, ca, us, etc. –Sub-domains = subtrees –Human readable name = leaf  root path

17 AL: DNS client lookups Each host has a resolver –Typically a library that applications can link gethostbyname() –Local name servers hand-configured (e.g. /etc/resolv.conf) or automatically configured (DHCP) –Host queries local name server for unknown names Name servers –Configured with well-known root servers Currently {a-m}.root-servers.net –Local servers Typically do a recursive lookup of distant host names for local hosts Typically answer queries about local zone

18 AL: Lookup Methods Recursive queries –Server goes out and searches for more info on behalf of the client (recursive) –Only returns final answer or “not found” –Puts burden of name resolution on contacted name server –Heavy load? Root server implosion Iterative –Server responds with as much as it knows (i.e. name of server to contact next) –“I don’t know this name, but ask this server” – Client iteratively queries additional servers

19 AL: Typical Resolution Client does recursive request to local name server Local name server does iterative requests to find name Local name server has knowledge of root of name space Steps for resolving –Application calls gethostbyname() –Resolver contacts local name server (S 1 ) –S 1 queries root server (S 2 ) for ( –S 2 returns NS record for ogi.edu (S 3 ) –S 1 queries S 3 for –S 3 returns A record for Can return multiple addresses  what does this mean?

20 AL: DNS Caching DNS responses are cached –Quick response for repeated translations –Other queries may reuse some parts of lookup NS records for domains DNS negative queries are also cached –Don’t have to repeat past mistakes –E.g. misspellings Cached data periodically times out –Soft state –Lifetime (TTL) of data controlled by owner of data –TTL passed with every record –TTL affects DNS-based load balancing techniques update/notify mechanisms under design by IETF –RFC 2136 –

21 AL: A word about iterated queries and caching Why not do iterative queries from host? –Currently Host issues recursive query to local server Local server issues iterative queries subsequently –Win2k client Does iterative queries from host –Caching implications?

22 AL: DNS Lookup Example Client Local DNS server root & edu DNS server ogi.edu DNS server NS ogi.edu NS cs.ogi.edu www=IPaddr cse.ogi.edu DNS server

23 AL: Subsequent Lookup Example Client Local DNS server root & edu DNS server ogi.edu DNS server cse.ogi.edu DNS server ftp.cse.ogi.edu ftp=IPaddr ftp.cse.ogi.edu cse.ogi.edu entry cached

24 AL: All recursive DNS example host surf.eurecom.fr wants IP address of gaia.cs.umass.edu 1. Contacts its local DNS server, dns.eurecom.fr 2. dns.eurecom.fr contacts root name server, if necessary 3. root name server contacts authoritative name server, dns.umass.edu, if necessary requesting host surf.eurecom.fr gaia.cs.umass.edu root name server authorititive name server dns.umass.edu local name server dns.eurecom.fr

25 AL: DNS root name servers contacted by local name server that can not resolve name root name server: –contacts authoritative name server if name mapping not known –gets mapping –returns mapping to local name server ~ dozen root name servers worldwide nslookup, named example –set iterative –lookup bogus name

26 AL: DNS/nslookup example Real example using nslookup and named –Shows iterative –Shows root name servers –Shows recursive –Shows negative caching nslookup –Set iterative –Lookup bogus name –Get list of root servers –Set recursive –Lookup same bogus name –Get negative response –Set iterative –Lookup bogus name –Get negative response

27 AL: DNS protocol, messages DNS protocol : query and repy messages, both with same message format msg header identification: 16 bit # for query, repy to query uses same # flags: –query or reply –recursion desired –recursion available –reply is authoritative

28 AL: DNS protocol, messages Name, type fields for a query RRs in reponse to query records for authoritative servers additional “helpful” info that may be used

29 AL: DNS issues Poor static configuration (root server list) Lack of exponential backoff No centralized caching per site –Each machine runs on caching local server UDP used for queries –Need reliability  Why not TCP?

30 AL: ftp: the file transfer protocol transfer file to/from remote host client/server model –client: side that initiates transfer (either to/from remote) –server: remote host ftp: RFC 959 ftp server: port 21 file transfer FTP server FTP user interface FTP client local file system remote file system user at host

31 AL: ftp: separate control, data connections ftp client contacts ftp server at port 21, specifying TCP as transport protocol two parallel TCP connections opened: –control: exchange commands, responses between client, server. “out of band control” –data: file data to/from server ftp server maintains “state”: current directory, earlier authentication Allows one ftp client to initiate a transfer between two ftp servers FTP client FTP server TCP control connection port 21 TCP data connection port 20

32 AL: ftp commands, responses Sample commands: sent as ASCII text over control channel USER username PASS password LIST return list of file in current directory RETR filename retrieves (gets) file STOR filename stores (puts) file onto remote host Sample return codes status code and phrase (as in http) 331 Username OK, password required 125 data connection already open; transfer starting 425 Can’t open data connection 452 Error writing file

33 AL: ftp, NAT and the PORT command Normal FTP mode –Server has port 20, 21 reserved –Client initiates control connection by connecting to port 21 on server –Client allocates port X for data connection –Client passes the data connection port (X) and its IP address in a PORT command to server –Server parses PORT command and initiates connection from its own port 20 to the client on port Y –What if client is behind a NAT device? NAT must capture outgoing connections destined for port 21 What if NAT doesn’t parse PORT command correctly? What if ftp server is running on a different port than 21? htmhttp:// htm

34 AL: ftp, NAT, and the PORT command Passive (PASV) mode –Client initiates control connection by connecting to port 21 on server –Client enables “Passive” mode –Server responds with PORT command giving client the IP address and port to use for subsequent data connection (usually port 20, but can be bypassed) –Client initiates data connection by connecting to specified port on server –Most web browsers do PASV-mode ftp –What if server is behind a NAT device? See client issues