School of Information Technologies Application Layer Protocols NETS3303/3603 Week 12.

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 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.
Lecture 5 Chapter 2 Application Layer
COS 420 DAY 25. Agenda Assignment 5 posted Chap Due May 4 Final exam will be take home and handed out May 4 and Due May 10 Latest version of Protocol.
Application architectures
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.
2: Application Layer1 Traceroute – roundtrip times from source to the given hop traceroute to ( ), 30 hops max, 38 byte packets.
9/16/2003-9/18/2003 The Application Layer and Java Programming September 16-18, 2003.
Electronic Mail and SMTP
Ftp: File Transfer Protocol  ftp specification: RFC 959 ( file transfer FTP server FTP user interface FTP client local.
Chapter 2: Application layer  2.1 Web, HTTP and HTML (We will continue…)  2.2 FTP  2.3 SMTP 9/22/2009 Lecture 7, MAT 279, Fall
School of Information Technologies Application Layer Protocols NETS3303/3603 Week 12.
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.
1 Lecture #3 Electronic Mail Protocols HAIT Summer 2005 Shimrit Tzur-David.
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.
2: Application Layer1 Chapter 2 Application Layer These slides derived from Computer Networking: A Top Down Approach, 6 th edition. Jim Kurose, Keith Ross.
Electronic Mail (SMTP, POP, IMAP, MIME)
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.
Communications and Networks Lecture 5 Instructor: Rina Zviel-Girshin.
Intro to Computer Networks Bob Bradley The University of Tennessee at Martin.
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.
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 .
1 Telematica di Base Applicazioni P2P. 2 The Peer-to-Peer System Architecture  peer-to-peer is a network architecture where computer resources and services.
FTP (File Transfer Protocol) & Telnet
Simple Mail Transfer Protocol (SMTP)
TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_c Application Protocols: HTTP, FTP, SMTP Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part.
File Transfer Protocol (FTP)
Application Layer1 Electronic Mail. Application Layer2 Electronic Mail Three major components: r user agents r mail servers r simple mail transfer protocol:
TFTP: Trivial file transfer protocol
CSE 524: Lecture 6 Application layer protocols. Where we’re at… ● Internet architecture and history ● Internet protocols in practice ● Application layer.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
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.
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.
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
Internet and Intranet Protocols and Applications Lecture 6 Application Protocols: Telnet, FTP February 27, 2002 Joseph Conron Computer Science Department.
26.1 Electronic Mail Sending/Receiving Mail Addresses User Agent MIME Mail Transfer Agent Mail Access 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.
Dr. Adil Yousif University of Alneelian – Master of CS - IT Electronic Mail.
Spring 2006 CPE : Application Layer_ 1 Special Topics in Computer Engineering Application layer: Some of these Slides are Based on Slides.
درس مهندسی اینترنت – مهدی عمادی مهندسی اینترنت برنامه‌نویسی در اینترنت 1 SMTP, FTP.
Application layer 1 Principles of network applications 2 Web and HTTP
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
CS4470 Computer Networking Protocols
SMTP, POP3, IMAP.
Chapter 2: Application layer
Internet and Intranet Protocols and Applications
The Application Layer: SMTP, FTP
Chapter 2 Application Layer
Chapter 2: Application Layer
Part II Application Layer.
Presentation transcript:

School of Information Technologies Application Layer Protocols NETS3303/3603 Week 12

School of Information Technologies Some network apps Web Instant messaging Remote login P2P file sharing Multi-user network games Streaming stored video clips Internet telephone Real-time video conference Massive parallel computing

School of Information Technologies Internet apps: application, transport protocols Application remote terminal access Web file transfer streaming multimedia Internet telephony Application layer protocol SMTP [RFC 2821] Telnet [RFC 854] HTTP [RFC 2616] FTP [RFC 959] proprietary (e.g. RealNetworks) proprietary (e.g., Dialpad) Underlying transport protocol TCP TCP or UDP typically UDP

School of Information Technologies App-layer protocol defines Types of messages exchanged, eg, request & response messages Syntax of message types: what fields in messages & how fields are delineated Semantics of the fields, ie, meaning of information in fields Timing - rules for when and how processes send & respond to messages Public-domain protocols: defined in RFCs allows for interoperability eg, HTTP, SMTP Proprietary protocols: eg, KaZaA

School of Information Technologies Remote Login (TELNET and SSH)

School of Information Technologies Remote Interaction Devised when computers used (ASCII) terminals Terminal abstraction extended to remote access over a network

School of Information Technologies Client-Server Interaction Client –Invoked by user –Forms connection to remote server –Passes keystrokes from user’s keyboard to server and displays output from server on user’s screen Server –Accepts connection over the network –Passes incoming characters to OS as if they were typed on a local keyboard –Sends output over connection to client

School of Information Technologies TELNET Standard protocol for remote terminal access over TCP –Allows a user to log into a computer remotely –Passes keystrokes directly to remote machine as if coming from local keyboard Defines network virtual terminal that provides standard interface –NVT describes system independent encoding –TELNET client and server map NVT into local computer’s representation Mechanism that allows client and server to negotiate options (e.g., character set)

School of Information Technologies Illustration Of How NVT Accommodates Heterogeneity

School of Information Technologies Secure Remote Login (ssh) Alternative to TELNET Can be used as a transport layer protocol with service authentication User authentication protocol Connection protocol –Multiplexes multiple transfers –Uses encryption for privacy

School of Information Technologies Applications: File Transfer And Access (FTP, TFTP)

School of Information Technologies On-Line File Sharing Always a popular application Two basic paradigms –Whole-file copying (gets a local copy) –On-line access

School of Information Technologies File Transfer Whole file copying Client –Contacts server –Specifies file –Specifies transfer direction Server –Maintains set of files on local disk –Waits for contact –Honours request from client file transfer FTP server FTP user interface FTP client local file system user at host

School of Information Technologies File Transfer Protocol (FTP) Major TCP/IP protocol for whole-file copying Uses TCP for transport FTP client contacts FTP server at port 21 Features –Interactive access –Format specification (ASCII or EBCDIC) –Authentication control (login and password)

School of Information Technologies FTP Process Model Separate processes handle –Interaction with user –Individual transfer requests Data transfer connections created dynamically when needed The control connection persists throughout a session FTP client FTP server TCP control connection port 21 TCP data connection port 20

School of Information Technologies Control Connection Vs. Data Connection For data transfer, client side becomes server and server side becomes client Client –Creates process to handle data transfer –Allocates port and sends number to server over control connection –Process waits for contact Server –Receives request –Creates process to handle data transfer –Process contacts client-side

School of Information Technologies Out-of-band Control Control connection: “out of band” FTP server maintains “state”: –current directory, earlier authentication What special relationship is required between FTP and NAT?

School of Information Technologies 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

School of Information Technologies Secure File Transfer Protocols Secure Sockets Layer FTP (SSL-FTP) –Uses secure sockets layer technology –All transfers are confidential Secure File Transfer Program (sftp) –Almost nothing in common with FTP –Uses ssh tunnel Secure Copy (scp) –Derivative of Unix remote copy (rcp) –Uses ssh tunnel

School of Information Technologies Trivial File Transfer Protocol (TFTP) Alternative to FTP Whole-file copying Not as much functionality as FTP –Code is much smaller Intended for use on Local Area Network Runs over UDP Diskless machine can use to obtain image at bootstrap

School of Information Technologies TFTP Packet Types

School of Information Technologies TFTP Retransmission Symmetric –both sides implement timeout and retransmission Network File System (NFS) –A protocol for on-line file access, not copying

School of Information Technologies Applications: Electronic Mail (SMTP, POP, IMAP, MIME)

School of Information Technologies Electronic Mail Three major components: user agents mail servers simple mail transfer protocol: SMTP User Agent a.k.a. “mail reader” composing, editing, reading mail messages e.g., Eudora, Outlook, elm, Netscape Messenger outgoing, incoming messages stored on server user mailbox outgoing message queue mail server user agent user agent user agent mail server user agent user agent mail server user agent SMTP

School of Information Technologies Electronic Mail: mail servers Mail Servers mailbox contains incoming messages for user message queue of outgoing (to be sent) mail messages SMTP protocol between mail servers to send messages –client: sending mail server –“server”: receiving mail server mail server user agent user agent user agent mail server user agent user agent mail server user agent SMTP

School of Information Technologies Electronic Mail: SMTP [RFC 2821] uses TCP to reliably transfer message from client to server, port 25 direct transfer: sending server to receiving server three phases of transfer –handshaking (greeting) –transfer of messages –closure command/response interaction –commands: ASCII text –response: status code and phrase messages must be in 7-bit ASCII

School of Information Technologies Scenario: Alice sends message to Bob 1) Alice uses UA to compose message and “to” 2) Alice’s UA sends message to her mail server; message placed in message queue 3) Client side of SMTP opens TCP connection with Bob’s mail server 4) SMTP client sends Alice’s message over the TCP connection 5) Bob’s mail server places the message in Bob’s mailbox 6) Bob invokes his user agent to read message user agent mail server mail server user agent

School of Information Technologies Sample SMTP interaction S: 220 hamburger.edu SMTP Ready C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: S: 250 Sender ok C: RCPT TO: S: 250 Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: Do you like ketchup? C: How about pickles? C:. S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection

School of Information Technologies Try SMTP interaction for yourself: telnet servername 25 see 220 reply from server enter HELO, MAIL FROM, RCPT TO, DATA, QUIT commands above lets you send without using client (reader)

School of Information Technologies SMTP: final words SMTP uses persistent connections SMTP requires message (header & body) to be in 7-bit ASCII SMTP server uses CRLF.CRLF to determine end of message

School of Information Technologies Mail message format SMTP: protocol for exchanging msgs RFC 822: standard for text message format: header lines, e.g., –To: –From: –Subject: different from SMTP commands! body –the “message”, ASCII characters only header body blank line

School of Information Technologies Multipurpose Internet Mail Extension (MIME) Permits nontextual data to be sent in –Graphics image –Voice or video clip Sender –Encodes binary item into printable characters –Places in message for transfer Receiver –Receives message containing encoded item –Decodes message to extract original binary value

School of Information Technologies MIME: multimedia extensions multimedia mail extension - RFC 2045, 2056 additional lines in msg header declare MIME content type and encoding From: To: Subject: Picture of yummy crepe. MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Type: image/jpeg base64 encoded data base64 encoded data multimedia data type, subtype, parameter declaration method used to encode data MIME version encoded data

School of Information Technologies Mail access protocols SMTP: delivery/storage to receiver’s server Mail access protocol: retrieval from server –POP: Post Office Protocol [RFC 1939] authorization (agent server) and download –IMAP: Internet Mail Access Protocol [RFC 1730] more features (more complex) manipulation of stored msgs on server –HTTP: Hotmail, Yahoo! Mail, etc. user agent sender’s mail server user agent SMTP access protocol receiver’s mail server

School of Information Technologies POP3 protocol authorization phase client commands: –user: declare username –pass: password server responses –+OK –-ERR transaction phase, client: list: list message numbers retr: retrieve message by number dele: delete quit C: list S: S: S:. C: retr 1 S: S:. C: dele 1 C: retr 2 S: S:. C: dele 2 C: quit S: +OK POP3 server signing off S: +OK POP3 server ready C: user bob S: +OK C: pass hungry S: +OK user successfully logged on

School of Information Technologies POP3 (more) and IMAP More about POP3 Previous example uses “download and delete” mode. Bob cannot re-read if he changes client “Download-and-keep”: copies of messages on different clients POP3 is stateless across sessions IMAP Keep all messages in one place: the server Allows user to organize messages in folders IMAP keeps user state across sessions: –names of folders and mappings between message IDs and folder name

School of Information Technologies World Wide Web (HTTP)

School of Information Technologies World Wide Web Distributed hypermedia paradigm –various forms of information, as data, text, graphics, video, and audio, are linked together by hyperlinks Major service on the Internet Use surpassed file transfer in 1995

School of Information Technologies Web Page Identifier Known as Uniform Resource Locator (URL) Encodes –Access protocol to use –Domain name of server –Protocol port number (optional) –Path through server’s file system (optional) –Parameters (optional) –Query (optional) Format –http: // hostname [: port] / path [; parameters] [? query]

School of Information Technologies Web Standards Separate standards for –Representation –Transfer

School of Information Technologies Representation HyperText Markup Language (HTML) Document contains text plus embedded links and formatting HTML gives guidelines for display, not details Consequence: two browsers may choose to display same document differently

School of Information Technologies Transfer Used between browser and web server Protocol is HyperText Transfer Protocol (HTTP) Runs over TCP HTTP vs SMTP: Pull vs push paradigm

School of Information Technologies HTTP Characteristics Application level Request / response paradigm Stateless Permits bi-directional transfer Offers capability negotiation Support for caching Support for intermediaries (proxy)

School of Information Technologies HTTP Operation Browser sends requests to which server replies Typical request: GET used to fetch document Example GET HTTP/1.1 Relative URL also permitted GET /current_students/ HTTP/1.1

School of Information Technologies Error Messages HTTP includes set of error responses Server can format error as HTML message for user or use internal form and allow browser to format message

School of Information Technologies Persistent Connections HTTP version 1.0 uses one TCP connection per transfer –Browser forms TCP connection to server –Browser sends GET request –Server returns header describing item –Server returns item –Server closes connection HTTP version 1.1 permits connection to persist across multiple requests

School of Information Technologies HTTP Headers HTTP uses MIME-like headers to carry meta information Both browsers and servers send headers that allow them to negotiate agreement on the document representation and encoding to be used

School of Information Technologies Headers And Length Encoding HTTP headers use same syntax as headers –Lines of text followed by blank line –Lines of text have form keyword:information For persistent connection, header specifies length (in octets) of data item that follows Header Meaning Content-Length Size of item in octets Content-Type Type of item Content-Encoding Encoding used for item Content-Language Language(s) used in item

School of Information Technologies Example Of Header Content-Length: 34 Content-Language: english Content-Encoding: ascii A trivial example. Note: if length is not known in advance, server can inform browser that connection will close following transfer Connection: close Blank line!

School of Information Technologies Conditional Request Allows browser to check cached copy for freshness Eliminates useless latency Sends If-Modified-Since in header of GET request Example: If-Modified-Since: Wed, 28 May :00:01 GMT –Avoids transfer if item older than 28 May 2007

School of Information Technologies Proxy Servers Browser can be configured to contact proxy Permits caching for entire organization Server can specify maximum number of proxies along path (including none)

School of Information Technologies Caching Of Web Pages Caching essential to efficiency Server specifies –Whether page can be cached –Maximum time page can be kept Intermediate caches and browser cache web pages Browser can specify maximum age of page (forces intermediate caches to revalidate)

School of Information Technologies P2P file sharing (Gnutella)

School of Information Technologies P2P file sharing Example Alice runs P2P client application on her notebook computer Intermittently connects to Internet; gets new IP address for each connection Asks for “Hey Jude” Application displays other peers that have copy of Hey Jude. Alice chooses one of the peers, Bob. File is copied from Bob’s PC to Alice’s notebook: HTTP While Alice downloads, other users download from Alice Alice’s peer is both a Web client and a transient Web server All peers are servers = highly scalable!

School of Information Technologies Query flooding: Gnutella fully distributed –no central server public domain protocol many Gnutella clients implementing protocol overlay network: graph edge between peer X and Y if there’s a TCP connection all active peers and edges is overlay net Edge is not a physical link Given peer will typically be connected with < 10 overlay neighbors

School of Information Technologies Gnutella: protocol Query QueryHit Query QueryHit Query QueryHit File transfer: HTTP r Query message sent over existing TCP connections r peers forward Query message r QueryHit sent over reverse path Scalability: limited scope flooding

School of Information Technologies Gnutella: Peer joining 1.Joining peer X must find some other peer in Gnutella network: use list of candidate peers 2.X sequentially attempts to make TCP with peers on list until connection setup with Y 3.X sends Ping message to Y; Y forwards Ping message. 4.All peers receiving Ping message respond with Pong message 5.X receives many Pong messages. It can then setup additional TCP connections

School of Information Technologies Summary typical request/reply message exchange: –client requests info or service –server responds with data, status code message formats: –headers: fields giving info about data –data: info being communicated control vs. data msgs –in-band, out-of-band centralized vs. decentralized stateless vs. stateful The End!