The Application Layer: SMTP, FTP

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.
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.
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
Chapter 30 Electronic Mail Representation & Transfer
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.
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 .
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)
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.
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.
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
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.
© 2010 Computer Science Faculty, Kabul University FTP AND ELECTRONICE MAIL 5 TH LECTURE 4, May, 2010 Baseer Ahmad Baheer.
Application Layer instructors at St. Clair College in Windsor, Ontario for their slides. Special thanks to instructors at St. Clair College in Windsor,
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
SMTP - Simple Mail Transfer Protocol POP - Post Office Protocol
Networking Applications
Remote Logging, Electronic Mail, and File Transfer
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
Chapter 2: Application layer
Internet and Intranet Protocols and Applications
Chapter 2: Application Layer
Chapter 7 Network Applications
Chapter 2 Application Layer
Chapter 2: Application Layer
Part II Application Layer.
Presentation transcript:

The Application Layer: SMTP, FTP CS 352, Lecture 5 http://www.cs.rutgers.edu/~sn624/352-S19 Srinivas Narayana

Recap: Application-layer protocols DNS: lookup a (machine-readable) address using a (human- readable) name? Used by many applications as a building block Recursive lookups for scale and administrative convenience HTTP: Transfer content over the Internet with portability Very familiar to users of the Internet Many, many, applications use HTTP Today: SMTP (email) and FTP (file transfer)

Simple Mail Transfer Protocol SMTP Simple Mail Transfer Protocol

Electronic Mail Three major components: User agents SMTP SMTP SMTP user mailbox outgoing message queue user agent Three major components: User agents a.k.a. “mail reader” e.g., Applemail, Outlook Web-based user agents (ex: gmail) mail server user agent SMTP mail server user agent SMTP mail server SMTP user agent user agent user agent

Electronic Mail: Mail servers user agent Mail Servers Mailbox contains incoming messages for user Message queue of outgoing (to be sent) mail messages Sender mail server makes connection to Receiver mail server IP address, port 25 SMTP protocol Used to send messages Client: sending user agent or sending mail server server: receiving mail server mail server user agent SMTP mail server user agent SMTP mail server SMTP user agent user agent user agent

Scenario: Alice sends message to Bob 1) Alice uses UA to compose message and “to” bob@someschool.edu 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 mail server mail server 1 user agent user agent 2 3 6 4 5

Sample SMTP interaction 220 hill.com SMTP service ready HELO town.com 250 hill.com Hello town.com, pleased to meet you MAIL FROM: <jack@town.com> 250 <jack@town.com>… Sender ok RCPT TO: <jill@hill.com> 250 <jill@hill.com>… Recipient ok DATA 354 Enter mail, end with “.” on a line by itself Jill, I’m not feeling up to hiking today. Will you please fetch me a pail of water? . 250 message accepted QUIT 221 hill.com closing connection

MAIL command response codes

Mail message (stored on server) format SMTP: protocol for exchanging email msgs RFC 822: standard for text message format: header lines, e.g., To: From: Subject: different from SMTP commands! (these would still be under “DATA”) body the “message”, ASCII characters only header blank line body

Message format: multimedia extensions MIME: multimedia 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

Mail access protocols POP3 or IMAP4 SMTP SMTP access protocol user agent user agent sender’s mail server receiver’s mail server SMTP: delivery/storage to receiver’s server Mail access protocol: retrieval from server POP: Post Office Protocol [RFC 1939] Client connects to POP3 server on TCP port 110 IMAP: Internet Mail Access Protocol [RFC 1730] Client connects to TCP port 143 HTTP: gmail, Yahoo! Mail, etc. Why not use SMTP here? Why do we need a sender side mail server?

POP vs IMAP POP3 Stateless server UA-heavy processing UA retrieves email from server, then typically deleted from server Latest changes are at the UA Simple protocol (list, retr, del within a POP session) IMAP4 Stateful server UA and server processing Server sees folders, etc. which are visible to UAs Changes visible at the server Complex protocol

What about web-based email? Connect to mail servers via web browser Ex: gmail, outlook, etc. Browsers speak HTTP Email servers speak SMTP Need a bridge to retrieve email using HTTP!

Web based email SMTP SMTP server Client Internet HTTP server HTTP

Comparing SMTP with HTTP HTTP: pull SMTP: push both have ASCII command/response interaction, status codes HTTP: each object encapsulated in its own response msg SMTP: multiple objects sent in multipart msg HTTP: can put non-ASCII data directly in response SMTP: need ASCII-based encoding!

Try an SMTP interaction!

File Transfer Protocol FTP File Transfer Protocol

Client server connection DNS Host name IP Address IP Address, port 21 ftp commands Data transfer, port 20

FTP: the file transfer protocol user interface client file transfer FTP server user at host local file system remote file system 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, port 20 (data connection)

FTP: separate control & data connections “out of band” control Control connection: Authorization Directory browse Commands Data connection Transfer files FTP server maintains “state”: current directory, earlier authentication FTP client server TCP control connection port 21 TCP data connection port 20

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

FTP Active connection Data connection initiated from the server Client opens a connection from port x for sending commands to server port 21 Server opens a connection from port 20 to send data at port x+1

FTP passive connection (always client initiated) Connections always initiated from the client Client opens a connection from port x for sending commands to server port 21 Client sends a request for PASSIVE connection with PASV command Server replies with a new port number Sp on which it is listening Client opens a connection from port x+1 to server port Sp

Problems with FTP Sends passwords in plain ASCII text Eavesdropper can recover passwords Fatal flaw, turned off at a lot of sites Replaced with scp, sftp instead

Recall the Internet protocol stack… Application HTTPS … FTP HTTP SMTP DNS TCP UDP IP 802.11 X.25 ATM Transport Network Host-to-Net

Themes from application-layer protocols Request/response nature of protocols Headers determine the actions of all the parties of the protocol Separation of concerns: Examples: Content rendering for users (browser, UA) separated from protocol ops (mail server) Reliable mail reception: Retrieve email at an “always on” receiver mail server Reliable mail sending: Send mail using a different machine rather than UA In-band vs. out-of-band control: SMTP+HTTP vs. FTP Q: How are commands recognized as distinct from data? Keep it simple until you really need complexity Examples: ASCII-based design; stateless servers IMAP for email organization Secure extensions for FTP and HTTP

Next: Transport Application Transport Network Host-to-Net … HTTPS HTTP FTP HTTP SMTP DNS TCP UDP IP 802.11 X.25 ATM Transport Network Host-to-Net