Internet and Intranet Protocols and Applications

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,
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Application Layer – Lecture.
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.
2: Application Layer1 Chapter 2: Application Layer Chapter goals: r conceptual + implementation aspects of network application protocols m client server.
1 Computer Networks Transport Layer Protocols. 2 Application-layer Protocols Application-layer protocols –one “piece” of an app –define messages exchanged.
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.
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.
( Post Office Protocol - Version 3 ) POP3 RFC 1939 報告學生 : 駱正哲.
DNS,SMTP,MIME.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 7 The Application Layer.
2: Application Layer1 Chapter 2: Application Layer Chapter goals: r conceptual + implementation aspects of network application protocols m client server.
2: Application Layer1 Chapter 2: Application Layer Chapter goals: r conceptual + implementation aspects of network application protocols m client server.
2: Application Layer1 Application Layer Chapter goals: r conceptual + implementation aspects of network application protocols m client server paradigm.
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.
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
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)
1 Application Layer Goals: r conceptual + implementation aspects of network application protocols m client server paradigm m service models r learn about.
Application Layer1 Electronic Mail. Application Layer2 Electronic Mail Three major components: r user agents r mail servers r simple mail transfer protocol:
1 End-user Protocols, Services and QoS. 2 Layering: logical communication application transport network link physical application transport network link.
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.
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.
SMTP - Simple Mail Transfer Protocol RFC 821
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
@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.
Dibyajit Computer Security Hacking dibyajit
TODO SMTP, POP, IMAP, NNTP, FTP, RTP maybe Telnet examples spam
SMTP - Simple Mail Transfer Protocol POP - Post Office Protocol
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Chapter 2 Introduction Application Requirements VS. Transport Services
CS4470 Computer Networking Protocols
SMTP, POP3, IMAP.
Chapter 2: Application layer
William Stallings Data and Computer Communications
Chapter 2: Application Layer
The Application Layer: SMTP, FTP
Chapter 2 Application Layer
Chapter 2: Application Layer
Part II Application Layer.
Presentation transcript:

Internet and Intranet Protocols and Applications Lecture 4 Application Protocols and the Internet Transport Protocols, Electronic Mail February 13, 2002 Joseph Conron Computer Science Department New York University jconron@cs.nyu.edu 2/21/2019

Tonight SMTP Project is assigned and due next week Introduction to Internet applications and their protocols Internet Mail Architecture SMTP (RFC 821) Messages (RFC 822) POP3 2/21/2019

What do the most widely used Internet applications have in common? Client/Server paradigm Request/Response Protocol Typically use ASCII protocol TCP or UDP 2/21/2019

Applications and application-layer protocols Application: distributed processes running in network hosts in “user space” exchange messages to implement application Application-layer protocols define messages exchanged by apps and actions taken user services provided by lower layer protocols 2/21/2019

Client-server paradigm Typical network app has two pieces: client and server Client: initiates contact with server (“speaks first”) typically requests service from server, for Web, client is implemented in browser; for e-mail, in mail reader Server: provides requested service to client e.g., Web server sends requested Web page, mail server delivers e-mail 2/21/2019

Transport service requirements of common apps Application file transfer e-mail Web documents real-time audio/video stored audio/video interactive games financial apps Data loss no loss loss-tolerant Bandwidth elastic audio: 5Kb-1Mb video:10Kb-5Mb same as above few Kbps up Time Sensitive no yes, 100’s msec yes, few secs yes and no 2/21/2019

Services provided by Internet transport protocols TCP service: connection-oriented: setup required between client, server reliable transport between sending and receiving process flow control: sender won’t overwhelm receiver congestion control: throttle sender when network overloaded does not provide: timing, minimum bandwidth guarantees UDP service: unreliable data transfer between sending and receiving process does not provide: connection setup, reliability, flow control, congestion control, timing, or bandwidth guarantee Q: Why bother? Why is there a UDP? 2/21/2019

Internet apps: their protocols and transport protocols Application layer protocol smtp [RFC 821] telnet [RFC 854] http [RFC 2068] ftp [RFC 959] proprietary (e.g. RealNetworks) NSF (e.g., Vocaltec) Underlying transport protocol TCP TCP or UDP typically UDP Application e-mail remote terminal access Web file transfer streaming multimedia remote file server Internet telephony 2/21/2019

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 outgoing, incoming messages stored on server 2/21/2019

Mail System Example SMTP user agent mail server outgoing message queue user mailbox outgoing message queue 2/21/2019

Electronic Mail: mail servers mailbox contains incoming messages (yet to be read) for user message queue of outgoing (to be sent) mail messages smtp protocol between mail servers to send email messages client: sending mail server “server”: receiving mail server 2/21/2019

Electronic Mail: smtp [RFC 821] uses TCP to reliably transfer email msg 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 2/21/2019

SMTP Minimum Implementation Commands HELO <SP> <domain> <CRLF> MAIL <SP> FROM:<reverse-path> <CRLF> RCPT <SP> TO:<forward-path> <CRLF> DATA QUIT RSET NOOP 2/21/2019

Sample smtp interaction S: 220 hamburger.edu C: HELO crepes.fr S: 250 Hello crepes.fr, pleased to meet you C: MAIL FROM: <alice@crepes.fr> S: 250 alice@crepes.fr... Sender ok C: RCPT TO: <bob@hamburger.edu> S: 250 bob@hamburger.edu ... 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 2/21/2019

You can 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 email without using email client (reader) 2/21/2019

smtp: Key Points smtp uses persistent connections (WHY?) smtp pushes email smtp requires that message (header & body) be in 7-bit ASCII certain character strings are not permitted in message (e.g., CRLF.CRLF). Thus message has to be encoded (usually into either base-64). smtp server uses CRLF.CRLF to determine end of message 2/21/2019

How to send crlf.crlf ?? If CRLF.CRFL ends the message, how to send this as part of your message? Sender: if line starts with period, insert period at the beginning of the line. Receiver: If the line is composed of a single period it is the end of mail. If the first character is a period and there are other characters on the line, the first character is deleted. 2/21/2019

Mail message format header RFC 822: standard for text message format: header lines, e.g., To: From: Subject: different from smtp commands! body the “message”, ASCII characters only blank line body 2/21/2019

Message format: multimedia extensions MIME: multipart Internet mail extension, RFC 2045, 2056 additional lines in msg header declare MIME content type From: alice@crepes.fr To: bob@hamburger.edu Subject: Picture of yummy crepe. MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Type: image/jpeg base64 encoded data ..... ......................... ......base64 encoded data MIME version method used to encode data multimedia data type, subtype, parameter declaration encoded data 2/21/2019

MIME types Text : plain, html Image: jpeg, gif Audio: basic, 32kadpcm Video: mpeg, quicktime Application: other data that must be processed by reader before “viewable”. Example subtypes: msword, octet-stream. Multipart: used when sending objects of different types 2/21/2019

Multipart Type Multipart separation Potentially recursive boundary="------------C725BD4EC548463C“ Potentially recursive Each part described by a MIME type 2/21/2019

Multipart Example From: alice@crepes.fr To: bob@hamburger.edu Subject: Picture of yummy crepe. MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=98766789 --98766789 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain Dear Bob, Please find a picture of a crepe. Content-Transfer-Encoding: base64 Content-Type: image/jpeg base64 encoded data ..... ......................... ......base64 encoded data --98766789-- 2/21/2019

What is base64 you ask? The Base 64 Conversion Table Problem: how to send binary data? Base64 is hashing method to map 8 bit to 6 bit codes that define a subset of the ASCII Character space. Convert each 24 bits to four 6 bit codes, pad trailing bits with 0’s. Use 6 bit code to index table for mapped ASCII character Note: base64 map table does not include CRLF or other RFC822 special characters (or =, which is a base64 pad character. The Base 64 Conversion Table 2/21/2019

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

POP3 protocol authorization phase transaction phase client commands: user: declare username pass: password server responses +OK -ERR transaction phase list: list msg numbers retr: retrieve msg by number dele: delete msg by number quit S: +OK POP3 server ready C: user alice S: +OK C: pass hungry S: +OK user successfully logged on C: list S: 1 498 S: 2 912 S: . C: retr 1 S: <message 1 contents> C: dele 1 C: retr 2 C: dele 2 C: quit S: +OK POP3 server signing off 2/21/2019

POP3 Commands, by State AUTHORIZATION USER name PASS password APOP name digest - ‘digest' is MD5 of the server’s timestamp and a shared SECRET known only to the client and server 2/21/2019

POP3 Commands, by State, continued TRANSACTION STAT - status LIST – list messages UIDL [msg] - unique-id listing RETR msg – retrieve msg DELE msg – delete msg QUIT – enter UPDATE state UPDATE QUIT – remove messages marked as deleted; release any lock on the maildrop and close the connection 2/21/2019

Secure Email How to implement? What is it that we want protect? In SMTP or in Message? Remember layering concept! What would happen if Mail Servers were required authenticate one another? What is it that we want protect? 2/21/2019

Secure Email: Two Approaches OpenPGP (RFC 2440) based on PGP S/Mime (RFC 2311-2315, 2268) based on RSA Both provide: digital signing (authentication) encryption (privacy) Implementation is in the MUA OpenPGP is further along in IETF standards track and is available for most User Agents. 2/21/2019