The Application Layer: SMTP, FTP

Similar documents
Electronic Mail. Three Components: SMTP SMTP. SMTP mail server. 1. User Agents. 2. Mail Servers. 3. SMTP protocol

Chapter 2 Application Layer

CSC 4900 Computer Networks:

Applications & Application-Layer Protocols: FTP and (SMTP & POP)

The Application Layer: & SMTP

WWW: the http protocol

Chapter 2: Application layer

Lecture 6: Application Layer Web proxies, , and SMTP

CSCE 463/612 Networks and Distributed Processing Spring 2018

CS 43: Computer Networks. 12: and SMTP September 28, 2018

Internet and Intranet Protocols and Applications

CSC 401 Data and Computer Communications Networks

CS 3516: Computer Networks

Chapter 2 part B: outline

Chapter 2 Application Layer

FTP. Mail. File Transfer Protocol (FTP) FTP commands, responses. Electronic Mail. TDTS06: Computer Networks

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

Internet Protocol Stack! Principles of Network Applications! Some Network Apps" (and Their Protocols)! Application-Layer Protocols! Our goals:!

Lecture 7 Application Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Computer Networking Introduction

CS348: Computer Networks (SMTP, POP3, IMAP4); FTP

CompSci 356: Computer Network Architectures. Lecture 23: Application Layer Protocols Chapter 9.1. Xiaowei Yang

Networking. Layered Model. DoD Model. Application Layer. ISO/OSI Model

Layered Model. DoD Model. ISO/OSI Model

Internet Technology. 03r. Application layer protocols: . Paul Krzyzanowski. Rutgers University. Spring 2016

SMTP. George Porter CSE 124 February 12, 2015

Application Layer Chapter 2

Different Layers Lecture 21

Computer Networking. Chapter #1. Dr. Abdulrhaman Alameer

CC451 Computer Networks

Application Layer: , DNS

Electronic Mail Paradigm

Socket Programming. Dr. -Ing. Abdalkarim Awad. Informatik 7 Rechnernetze und Kommunikationssysteme

Electronic Mail

File transfer. Internet Applications (FTP,WWW, ) Connections. Data connections

Fig (1) sending and receiving s

Internet Technology 2/10/2016

Application Layer Protocols

Applications & Application-Layer Protocols: (SMTP) and DNS

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

CS321: Computer Networks ELECTRONIC MAIL

CS 418 Web Programming Spring 2013 SENDING SCOTT G. AINSWORTH.

Introduction to Computer Networks

CN Assignment I. 1. With an example explain how cookies are used in e-commerce application to improve the performance.

Network Applications Principles of Network Applications

Lecture 25. Tuesday, November 21 CS 475 Networks - Lecture 25 1

The Application Layer HTTP and FTP

System: Basic Functionality

CS457 Applications. Fall 2014

Review for Internet Introduction

Computer Networks Unit I Application layer (2012 pattern)

Chapter 2: Application Layer

Electronic Mail. Prof. Indranil Sen Gupta. Professor, Dept. of Computer Science & Engineering Indian Institute of Technology Kharagpur

Lecture 05: Application Layer (Part 02) FTP, Peer-to-Peer, . Dr. Anis Koubaa

Chapter 2 APPLICATIONS. Computer Networks Timothy Roscoe Summer 2007

Ethernet / TCP-IP - Training Suite Application level protocols

Application-layer Protocols

Simple Network Management Protocol (SNMP)

Chapter 2 Application Layer

SCS3004 Networking Technologies Application Layer Protocols

Computer Network 1 1

Chapter 26 Remote Logging, Electronic Mail, and File Transfer 26.1

CS 716: Introduction to communication networks th class; 11 th Nov Instructor: Sridhar Iyer IIT Bombay

EECS 3214: Computer Network Protocols and Applications

Review of Previous Lecture

Application: Electronic Mail

INTERNET & WORLD WIDE WEB (UNIT-1) MECHANISM OF INTERNET

Electronic Mail. Electronic Mailboxes

Computer Networks 2 *+ # $ $!,( -. ( - ( - # ( / $!

Course on Computer Communication and

Protocols. Networking CS 3470, Section 1 Sarah Diesburg

13. Internet Applications 최양희서울대학교컴퓨터공학부

Computer Networks and Applications

Internet Electronic Mail

WEBppliance for Windows User Administrator's Help

Chapter 1 Introduction

Part I: Network protocols: HTTP and beyond

Electronic mail, usually called , consists of simple text messages a piece of text sent to a recipient via the internet.

EEC-682/782 Computer Networks I

Chapter 2 Application Layer

Application Protocol Examples

Application Level Protocols

Electronic Mail (SMTP)

Applications. Chong-kwon Kim. Running in end systems (hosts) over transport layer protocols Ex: , Web, FTP, instant messaging

Internet Applications. Dr Steve Gordon ICT, SIIT

Chapter P2P file sharing network applications 2.22 Web and HTTP 2.3 FTP DNS

CSCD 330 Network Programming Winter 2015

ECE697AA Lecture 2. Today s lecture

Application layer. Some network apps. Client-server architecture. Hybrid of client-server and P2P. Pure P2P architecture. Creating a network app

4. The transport layer

Lecture 2 - Application Layer. Lecture 1 Review. Application Layer. Principles of network applications. Notes. Notes. Notes. Notes

CMSC 332 Computer Networking Web and FTP

SETUP FOR OUTLOOK (Updated October, 2018)

Information Network Systems The application layer. Stephan Sigg

Internet Architecture

Outline. EEC-484/584 Computer Networks. Slow Start Algorithm. Internet Congestion Control Algorithm

Foundations of Python

WEB TECHNOLOGIES CHAPTER 1

TFTP and FTP Basics BUPT/QMUL

How do I setup Outlook Express to get my s?

Transcription:

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

Recap: Application-layer protocols DNS: lookup a (machine-readable) address using a (humanreadable) 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 s of the Internet Many, many, applications use HTTP Today: SMTP (email) and FTP (file transfer)

SMTP Simple Mail Transfer Protocol

Electronic Mail outgoing message queue mailbox Three major components: 1. User s a.k.a. mail reader e.g., Applemail, Outlook Web-based s (ex: gmail) mail server SMTP SMTP mail server mail server SMTP 4

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

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 to read message 1 mail server 2 3 4 mail server 5 6 6

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 7

MAIL command response codes 8

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 ) header body blank line body the message, ASCII characters only 9

Message format: multimedia extensions MIME: multimedia mail extension, RFC 2045, 2056 additional lines in msg header declare MIME content type MIME version method used to encode data multimedia data type, subtype, parameter declaration encoded data 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 10

Mail access protocols POP3 or IMAP4 SMTP SMTP access protocol 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? 11

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 12

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! 13

Web based email HTTP server HTTP server SMTP Client Internet SMTP server 14

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! 15

Try an SMTP interaction!

17

FTP File Transfer Protocol

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

FTP: the file transfer protocol at host FTP interface FTP client local file system file transfer FTP server 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) 21

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 TCP control connection port 21 TCP data connection port 20 FTP server 22

FTP commands, responses Sample commands sent as ASCII text over control channel USER name 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 23

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 24

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 S p on which it is listening Client opens a connection from port x+1 to server port S p 25

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 26

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

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 s (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 28

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