CSS432 Applications Textbook Ch 9.1 and 9.3.1

Slides:



Advertisements
Similar presentations
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Advertisements

1 Higher level protocols Domain Naming System, DNS HTTP.
1 Electronic Mail u Three major components: u user agents u mail servers u simple mail transfer protocol: SMTP u User Agent u a.k.a. “mail reader” u composing,
2: Application Layer1 ECE5650 FTP, , DNS, and P2P.
Layer Aplikasi Risanuri Hidayat. Applications and application-layer protocols Application: communicating, distributed processes –e.g., , Web, P2P.
CPSC 441: FTP & SMTP1 Application Layer: FTP & Instructor: Carey Williamson Office: ICT Class.
Chapter 2: Application layer  2.1 Web and HTTP  2.2 FTP 2-1 Lecture 5 Application Layer.
Electronic Mail and SMTP
Ftp: File Transfer Protocol  ftp specification: RFC 959 ( file transfer FTP server FTP user interface FTP client local.
Esimerkki: Sähköposti. Lappeenranta University of Technology / JP, PH, AH Electronic Mail Three major components: user agents mail servers simple mail.
Simple Mail Transfer Protocol
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
Mail Server Fitri Setyorini. Content SMTP POP3 How mail server works IMAP.
Electronic Mail Three major components: SMTP user agents mail servers
Introduction 1-1 Chapter 2 FTP & Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 IC322 Fall.
FTP File Transfer Protocol. Introduction transfer file to/from remote host client/server model  client: side that initiates transfer (either to/from.
2: Application Layer1 Chapter 2 Application Layer These slides derived from Computer Networking: A Top Down Approach, 6 th edition. Jim Kurose, Keith Ross.
SMTP, POP3, IMAP.
1 Application Layer Lecture 5 Imran Ahmed University of Management & Technology.
Trying out HTTP (client side) for yourself
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Lecture51 Administrative Things r Grader: Yona Raekow Office hours: Wed. 1pm-3pm or Th. 11am-1pm r Homeworks.
CSE401N: Computer Networks Lecture-5 Electronic Mail S. M. Hasibul Haque Lecturer Dept. of CSE, BUET.
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.
Review: –How do we address “a network end-point”? –What services are provided by the Internet? –What is the network logical topology observed by a network.
Application Layer Protocols Simple Mail Transfer Protocol.
1 Computer Communication & Networks Lecture 27 Application Layer: Electronic mail and FTP Waleed.
Lecturer: Maxim Podlesny Sep CSE 473 File Transfer and Electronic in Internet.
DNS,SMTP,MIME.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer.
Network Applications Outline Simple Mail Transfer Protocol
2: Application Layer1 Reminder r Homework 1 for Wednesday: m Problems #3-5,11,16,18-20 m Half of the problems will be graded r Feel free to send me .
Sending and Receiving Mails
FTP (File Transfer Protocol) & Telnet
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
Simple Mail Transfer Protocol (SMTP)
File Transfer Protocol (FTP)
CSS432: Applications 1 CSS432 Domain Name System Textbook Instructor: Joe McCarthy (based on Prof. Fukuda’s slides)
Krerk Piromsopa. Application Protocols & System Services. 1 Krerk Piromsopa. Department of Computer Engineering. Chulalongkorn University.
1 SMTP - Simple Mail Transfer Protocol –RFC 821 POP - Post Office Protocol –RFC 1939 Also: –RFC 822 Standard for the Format of ARPA Internet Text.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 8 Omar Meqdadi Department of Computer Science and Software Engineering University of.
CSS432: Applications 1 CSS432 Applications Textbook Ch 9.1 Instructor: Joe McCarthy (based on Prof. Fukuda’s slides)
CSE 524: Lecture 6 Application layer protocols. Where we’re at… ● Internet architecture and history ● Internet protocols in practice ● Application layer.
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.
CSS432: Applications 1 CSS432 Applications Textbook Ch 9.1 Professor: Munehiro Fukuda Augmented by Rob Nash.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
CS440 Computer Networks 1 Neil Tang 12/01/2008.
Slides based on Carey Williamson’s: FTP & SMTP1 File Transfer Protocol (FTP) r FTP client contacts FTP server at port 21, specifying TCP as transport protocol.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
1 10. DNS, HTTP, Unix Socket Programming DNS (Domain Name Service) Domain Name Name Resolution HTTP (Hyper Text Transfer Protocol) Request Response Persistent.
World Wide Web r Most Web pages consist of: m base HTML page, and m several referenced objects addressed by a URL r URL has two components: host name and.
COMP 431 Internet Services & Protocols
@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.
Spring 2006 CPE : Application Layer_ 1 Special Topics in Computer Engineering Application layer: Some of these Slides are Based on Slides.
درس مهندسی اینترنت – مهدی عمادی مهندسی اینترنت برنامه‌نویسی در اینترنت 1 SMTP, FTP.
CSS432 Applications Textbook Ch 9.1 and 9.3.1
SMTP - Simple Mail Transfer Protocol POP - Post Office Protocol
HTTP – An overview.
Networking CS 3470, Section 1 Sarah Diesburg
Application layer 1 Principles of network applications 2 Web and HTTP
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Chapter 2: Application layer
Internet and Intranet Protocols and Applications
Chapter 2: Application Layer
The Application Layer: SMTP, FTP
FTP, SMTP and DNS 2: Application Layer.
Chapter 2 Application Layer
Chapter 2: Application Layer
Presentation transcript:

CSS432 Applications Textbook Ch 9.1 and 9.3.1 Professor: Munehiro Fukuda CSS432: Applications

Applications Client – Server Paradigm Client: initiates contact with server Server: provides client with a response Applications use their corresponding protocol Defined in RFC by Internet Engineering Task Force (http://www.ietf.org/) Implemented on top of TCP or UDP Client Server outlook browser mail/web server SMTP, HTTP, FTP SMTP, HTTP, FTP socket socket TCP with buffers, variables TCP with buffers, variables Applications Protocol RFC Port Name service DNS 1035 53 Email SMTP IMAP 821 25 143 Web HTTP 2616 80 File transfer FTP 959 21 Remote terminal access telnet 854 23 Internet CSS432: Applications

Name Service Hosts Files Users (UID + host IP) DNS Name Server Value System-provided fixed value Location dependent Name Variable length and mnemonic Location independent Hosts cheltenham.cs.princeton.edu 192.12.69.17 192.12.69.17 80:23:A8:33:5B:9F Files /usr/llp/tmp/foo (server, inode) Users Larry Peterson llp@cs.princeton.edu (UID + host IP) CSS432: Applications

Name service (cont) lpr/a2ps commands Unix system call DNS lpr struct hostent h = gethostbyname( const char *hostname ); *(struct in_addr *)*h->h_addr_list; // returns IP list Name server lpr program User TCP IP 2 uw1-320-p1 216.186.75.218 3 lpr –Puw1-320-p1 manual.ps 1 4 5 CSS432: Applications

Domain Naming System Hierarchy Name DNS uw1-320-00.bothell.washington.edu (Currently, uw1-320-00.uwb.edu) edu com washington … mit u cs uw1-320-00 medusa bothell cisco yahoo nasa nsf arpa navy acm ieee gov mil org net uk fr homer goodall CSS432: Applications

Name Servers Partition hierarchy into zones DNS Name Servers administrative unit Partition hierarchy into zones Network Information Center manages edu com washington … mit u cs uw1-320-00 medusa bothell cisco yahoo nasa nsf arpa navy acm ieee gov mil org net uk fr homer goodall Managed by UW C&C Root name server washington Cisco bothell cs … Each zone implemented by two or more name servers CSS432: Applications

DNS Resource Records Each name server maintains a collection of resource records (Name, Value, Type, Class, TTL) Name/Value: not necessarily host names to IP addresses Type A: Value returns IP address NS: Value returns the corresponding name server’s name CNAME: Value returns aliases. MX: Value returns the domain name of this host’s mail Class: IN (Internet class) TTL: how long the resource record is valid CSS432: Applications

Name Servers From Root to Bottom Level DNS Name Servers From Root to Bottom Level Find a root name server dig edu ns edu a.gtld-server.net NS IN a.gtld-server.net 192.5.6.30 A IN Find uwb.edu’s name servers dig @192.5.6.30 uwb.edu ns uwb.edu, dns2.uwb.edu NS IN uwb.edu, dns4.uwb.edu NS IN dns2.uwb.edu 69.91.206.28 A dns4.uwb.edu 69.91.206.29 A Find mercury.uwb.edu dig @69.91.206.28 metis.uwb.edu A metis.uwb.edu 69.91.206.17 A CSS432: Applications

Name Resolution Client DNS Name Resolution Root name server Princeton CS Local Client 1 cicada.cs.princeton.edu 192.12.69.60 8 princeton.edu, 128.196.128.233 cicada.cs.princeton.edu, cs.princeton.edu, 192.12.69.5 2 3 4 5 6 7 Client Initialized with its local name server’s address appends its domain name to a given name before a submission. Local server needs to know root at only one place (not each host). caches recent responses from remote servers. CSS432: Applications

Electronic Mail (SMTP, MIME, IMAP) Email user agents (client) a.k.a. “mail reader” composing, editing, reading mail messages e.g., Eudora, Outlook, elm, Netscape Messenger, Thunderbird mail servers (server) outgoing, incoming messages stored on server mail server outgoing mail queue User mailbox user agent SMTP/TCP SMTP IMAP CSS432: Applications

SMTP TCP port 25 – Persistent connection Email sending protocol From User agent to his/her local mail server From a local to an intermediate/destination mail server (direct transfer) From an intermediate to a destination server (relay) Three phases of transfer Handshaking: HELO Transfer of messages: MAIL FROM, RCPT TO, and DATA Closure: QUIT Command/response interaction Commands: ASCII text Response: status code and phrase CSS432: Applications

SMTP Example Email [mfukuda@uw1-320-20]$ telnet smtp.washington.edu 25 Trying 140.142.33.9… Connected to smpt.washington.edu (140.142.33.9). Escape character is ‘^]’. 220 smtp.washington.edu ESMTP Sendmail 8.12.11+UW04.02/8.12.11+UW04.02; Sat, 21 Feb 2004 20:00:56 -0800 HELO mfukuda 250 smtp.washington.edu Hello UW1-320-20.bothell.washington.edu [216.186.75.195] , pleased to meet you MAIL FROM:mfukuda@u.washington.edu 250 2.1.0 <mfukuda@u.washington.edu>... Sender ok RCPT TO:MunehiroFukuda@yahoo.net 250 2.1.5 MunehiroFukuda@yahoo.net... Recipient ok DATA 354 Enter mail, end with “.” on a line by iteself Blah blah blah… …etc. etc. etc. . 250 2.0.0 i1M40uc3013699 Message accepted fro delivery QUIT 221 2.0.0 smtp.washington.edu closing connection Connection closed by foreign host. [mfukuda@uw1-320-20]$ _ CSS432: Applications

RFC 822 Message Format Header A series of line<crlf>s Body Email Header To: Subject: Date: From: Received: Body A blank line Header A series of line<crlf>s Body ASCII characters only. Then, what about multimedia information? CSS432: Applications

MIME MIME: multimedia mail extension, RFC 2045, 2056 Email MIME: multimedia mail extension, RFC 2045, 2056 Additional lines in msg header declare MIME content type MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=“-------417CA6E2DE4ABCAFBC5” From: mfukuda@u.washington.edu To: css432a_au04@u.washington.edu Subject: promised material Date: Mon, 01 Apr 2004 12:34:56 -0800 -------417CA6E2DE4ABCAFBC5 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Dear CSS432 students, Here is the jpeg image and draft report I promised. -- Fukuda Content-Type: image/jpeg Content-Transfer-Encoding: base64 … Unreadable encoding of a jpeg figure Content-Type: application/postscript; name=“draft.ps” … Readable encoding of a postscript document Carry more than one data type Type of the data How the data is encoded Definitions for content types 3bytes = 3 * 8bits = 24bits = 4 * 6bit-chars, each mapped onto one of 64 ASCII chars (A~Z,a~z,0~9,+,/) CSS432: Applications

Mail Reader - IMAP Email TCP to 143 Connection established Server greeting Server: OK Server: PREAUTH Server: BYE Not authenticated Client LOGOUT Client: LOGIN or AUTHENTICATE Authenticated Client: CLOSE Client LOGOUT Client SELECT or EXAMINE Selected Client: FETCH, STORE, DELETE, EXPUNGE Client LOGOUT Logout Both sides close the connection CSS432: Applications

File Transfer Protocol FTP local file system remote FTP server client user interface TCP port 20 for data transfer (not persistent) TCP port 21 for control (persistent) Transfer file to/from remote host Client/server model Client: initiates a control TCP connection to a server on port 21. Client: sends a user ID and password as part of FTP commands. Server: authorizes the client Client: opens a data TCP connection to a server on port 20. Server: maintains state: current directory, earlier authentication. A ftp client is allowed to initiate a transfer between two ftp servers. CSS432: Applications

FTP Commands <CRLF> delimits each command (and reply). Commands consist of four uppercase ASCII characters, some with optional arguments: USER username : sends a user identification to server. PASS password : sends the user password to the server. PASV: requests the server to send back its IP and port on which it listens to a data TCP connection from the user. LIST : ask the server to send back its current directory contents through the data connection. RETR filename : gets a file from the current remote directory. STOR filename : stores a file into the current remote directory. Each command is followed by a reply: 331 Username OK, password required 125 Data connection already open; transfer starting 425 Can't open data connection 452 Error writing file CSS432: Applications

FTP Example FTP [mfukuda@uw1-320-20]$ telnet ftp.tripod.com 21 Trying 209.202.240.80… Connected to ftp.tripod.com (209.202.240.80). Escape character is ‘^]’. 220 Welcome to Tripod FTP. USER css432 331 Username set to css432. Now enter your password. PASS ******** 230 User ‘css432’ logged on. LIST 425 Can’t open data connection for LIST. PASV 227 Entering Passiv Mode (209,202,240,80,195,210) // Open another xterm and telnet 209.202.240.80 50130 (=195*256+210) // Trying 209.202.240.80… // Connected to ftp.tripod.com (209.202.240.80). // Escape character is ‘^]’. // drwxr-xr-x 1 css432 Tripod 0 Sep 15 21:22 cgi-bin // -rw-r--r-- 1 css432 Tripod 26169 Sep 16 18:28 ttcp.c // -rw-r--r-- 1 css432 Tripod 8236 Sep 15 21:22 index.htm // drwxr-xr-x 1 css432 Tripod 0 Sep 16 18:33 project // Connection closed by foreign host. 150 Opening ASCII mode data connection for LIST. 226 Transfer complete. QUIT 221 Goodbye Connection closed by foreign host. [mfukuda@uw1-320-20]$ _ CSS432: Applications

FTP passive mode FTP client FTP server TCP port 21 for control (persistent) Client request: connect( ), USER, PASS, LIST Server Reply: 220 server ready, 331 send password, 230 login ok, 425 connection timeout TCP port 20 for data transfer (one time) FTP client FTP server TCP port 21 for control (persistent) Client request: connect( ), USER, PASS, PASV, LIST Server Reply: 220 server ready, 331 send password, 230 login ok, 227 Entering Passive Mode (140,142,12,173,195,54), 226 complete TCP port 195*256 + 54 = 49974 for data transfer (one time) data CSS432: Applications

FTP proxy command ftp> open server1 ftp> proxy open server2 (3’) 227 Entering Passive Mode (140,142,12,173,195,54) FTP client (1) USER, PASS, SYST (2) USER, PASS, SYST (3) TYPE I, PASV (4) TYPE I, PORT (140,142,12,173,195,54), STOR file (5) RETR file ftp> open server1 ftp> proxy open server2 ftp> proxy get file …(1) …(2) …(3)~(5) FTP Server 1 FTP Server 2 TCP port 195*256 + 54 = 49974 for data transfer (one time) data CSS432: Applications

World Wide Web - HTTP Web /public_html HTTP server Netscape TCP port 80 (one-time connection) IE HTTP request HTTP response Hypertext Transfer Protocol: one-time TCP port 80 connection for each response/reply client: Browser requests, receives, and displays Web objects server: Web server sends objects in response to the request CSS432: Applications

HTTP Commands Web Client Initiates a TCP connection to a server on port 80. Sends an HTTP request over this TCP connection OPTIONS: request information about available options GET: retrieve document identified in URL HEAD: retrieve document metainformation in URL POST: give inofrmation (annotation, servlet invocation) to server PUT: store document under specified URL DELETE, TRACE, CONNECT Receives an HTTP response Server Accepts a TCP connection from a client on port 80. Receives an HTTP request Returns an HTTP response and disconnects the connection. 1xx: Informational 2xx: success 3xx: Redirection 4xx: Client error 5xx: Server error CSS432: Applications

HTTP Example Web [mfukuda@uw1-320-20]$ telnet www.washington.edu 80 Trying 140.142.11.167... Connected to www.washington.edu (140.142.11.167). Escape character is '^]'. GET HTTP/1.1 200 OK Date: Sun, 22 Feb 2004 09:06:17 GMT Server: Apache/1.3.28 (Unix) PHP/4.3.3 mod_perl/1.29 mod_backhand/1.2.2 Connection: close Content-type: text/html <!doctype html public “-//W3C/DTD HTML 4.0 Transitional//EN”> <html><head> … </body></html> Connection closed by foreign host. [mfukuda@uw1-320-20]$ _ CSS432: Applications

Performance Improvement in Web Persistent TCP connections Advantages Eliminate the connection setup overhead Eliminate repetitions of slow start phase Disadvantages Need to know the time period of connection – server times out the connection. Caching Recently access pages can be cached at browsers and ISPs Reduce the number of HTTP accesses Need to purge out-of-date version of pages – use expiration date and cache directives to cache or not to cache a given page CSS432: Applications

Exercises: try the following examples by yourself. Reviews RFC Naming service: DNS Email: SMTP, MIME, and IMAP File transfer: FTP WWW: HTTP Exercises: try the following examples by yourself. Slide p8 (DNS) Slide p12 (SMTP) Slide p18 (FTP) Slide p21 (HTTP) CSS432: Applications