Chapter 2 Application Layer

Similar documents
CS 3516: Computer Networks

CSC 401 Data and Computer Communications Networks

CSC 4900 Computer Networks:

Lecture 6: Application Layer Web proxies, , and SMTP

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

Chapter 2 part B: outline

WWW: the http protocol

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

The Application Layer: SMTP, FTP

CSCE 463/612 Networks and Distributed Processing Spring 2018

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

Chapter 2: Application layer

Chapter 2 Application Layer

Computer Networking Introduction

Internet and Intranet Protocols and Applications

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

Application Layer: , DNS

The Application Layer: & SMTP

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

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

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

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

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

Application Layer Chapter 2

Chapter 2 Application Layer

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

Different Layers Lecture 21

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

Layered Model. DoD Model. ISO/OSI Model

Chapter 1 Introduction

Computer Networking. Chapter #1. Dr. Abdulrhaman Alameer

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

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

Application Layer Protocols

CC451 Computer Networks

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

Computer Networks and Applications

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

Chapter 3 Transport Layer

Chapter 2 Application Layer

CS457 Applications. Fall 2014

Chapter 1 Introduction

Internet Technology 2/10/2016

Chapter 2: Application Layer

Fig (1) sending and receiving s

Course on Computer Communication and

SMTP. George Porter CSE 124 February 12, 2015

Chapter 2 Application Layer

Part I: Network protocols: HTTP and beyond

Application-layer Protocols

Information Network Systems The application layer. Stephan Sigg

Chapter 2 Application Layer

Chapter 2 Application Layer

Chapter 2: Application Layer. Chapter 2: application layer. outline. Some network apps. Client-server architecture. Application architectures

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

Chapter 8 Network Security

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

Chapter 2 Application Layer

EECS 3214: Computer Network Protocols and Applications

Chapter 2 Application Layer

Chapter 2 APPLICATIONS. Computer Networks Timothy Roscoe Summer 2007

Chapter 3 Transport Layer

Electronic Mail

Chapter 8 Security. Computer Networking: A Top Down Approach

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

Electronic Mail Paradigm

CS 471G Friday, 11 January Introduction 2-1

Chapter 2 Application Layer

CS321: Computer Networks ELECTRONIC MAIL

Web caches (proxy server)

Network Application. Topic. Principle of Network Application. Principle of Network Application

Chapter 8 Security. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Web Protocols and Practice

Network Applications Principles of Network Applications

Chapter 3 Transport Layer

Chapter 9. Multimedia Networking. Computer Networking: A Top Down Approach

Chapter 3: Transport Layer. Chapter 3 Transport Layer. Chapter 3 outline. Transport services and protocols

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

Internet communication

Chapter 7: Multimedia Networking

Chapter 2: Application layer

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

System: Basic Functionality

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

Chapter 2 Application Layer

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

Chapter 2 Application Layer

CSCD 330 Network Programming Winter 2015

Review of Previous Lecture

Chapter 2 Application Layer

Computer Networks Unit I Application layer (2012 pattern)

CSC358 Week 3. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

Internet applications. 2: Application Layer 1

Chapter 2: application layer

Chapter 4. Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, sl April 2009.

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 5

CMSC 332 Computer Networking Web and FTP

Introduction to Computer Networking. Gang Wang Fall 2016

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

Lab 3.4.3: Services and Protocols

Transcription:

Chapter 2 Application Layer A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you see the animations; and can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: v If you use these slides (e.g., in a class) that you mention their source (after all, we d like people to use our book!) v If you post any slides on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 All material copyright 1996-2012 J.F Kurose and K.W. Ross, All Rights Reserved Application Layer 2-1

Chapter 2: outline 2.1 principles of network applications app architectures app requirements 2.2 Web and HTTP 2.3 FTP 2.4 electronic mail SMTP, POP3, IMAP 2.5 DNS 2.6 P2P applications 2.7 socket programming with UDP and TCP Application Layer 2-2

FTP: the file transfer protocol at host FTP interface FTP client local file system file transfer FTP remote file system v transfer file to/from remote host v client/ model client: side that initiates transfer (either to/from remote) : remote host v ftp: RFC 959 v ftp : port 21 Application Layer 2-3

FTP: separate control, data connections v FTP client contacts FTP at port 21, using TCP v client authorized over control connection v client browses remote directory, sends commands over control connection v when receives file transfer command, opens 2 nd TCP data connection (for file) to client v after transferring one file, closes data connection FTP client TCP control connection, port 21 TCP data connection, port 20 FTP v opens another TCP data connection to transfer another file v control connection: out of band v FTP maintains state : current directory, earlier authentication Application Layer 2-4

FTP commands, responses sample commands: v sent as ASCII text over control channel v USER name v PASS password v LIST return list of file in current directory v RETR filename retrieves (gets) file v STOR filename stores (puts) file onto remote host sample return codes v status code and phrase (as in HTTP) v 331 Username OK, password required v 125 data connection already open; transfer starting v 425 Can t open data connection v 452 Error writing file Application Layer 2-5

File à Site Manager

Chapter 2: outline 2.1 principles of network applications app architectures app requirements 2.2 Web and HTTP 2.3 FTP 2.4 electronic mail SMTP, POP3, IMAP 2.5 DNS 2.6 P2P applications 2.7 socket programming with UDP and TCP Application Layer 2-8

Electronic mail Three major components: v s v mail s v simple mail transfer protocol: SMTP User Agent v a.k.a. mail reader v composing, editing, reading mail messages v e.g., Outlook, Thunderbird, iphone mail client v outgoing, incoming messages stored on mail SMTP mail SMTP SMTP outgoing message queue mail mailbox Application Layer 2-9

Electronic mail: mail s mail s: v mailbox contains incoming messages for v message queue of outgoing (to be sent) mail messages v SMTP protocol between mail s to send email messages client: sending mail : receiving mail mail SMTP mail SMTP SMTP mail Application Layer 2-10

Electronic Mail: SMTP [RFC 2821] v uses TCP to reliably transfer email message from client to, port 25 v direct transfer: sending to receiving v three phases of transfer handshaking (greeting) transfer of messages closure v command/response interaction (like HTTP, FTP) commands: ASCII text response: status code and phrase v messages must be in 7-bit ASCI Application Layer 2-11

Scenario: Alice sends message to Bob 1) Alice uses UA to compose message to bob@someschool.edu 2) Alice s UA sends message to her mail ; message placed in message queue 3) client side of SMTP opens TCP connection with Bob s mail 4) SMTP client sends Alice s message over the TCP connection 5) Bob s mail places the message in Bob s mailbox 6) Bob invokes his to read message 1 mail 2 3 4 mail 6 Alice s mail 5 Bob s mail Application Layer 2-12

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 Application Layer 2-13

Try SMTP interaction for yourself: v telnet name 25 v see 220 reply from v enter HELO, MAIL FROM, RCPT TO, DATA, QUIT commands above lets you send email without using email client (reader) Application Layer 2-14

SMTP: final words v SMTP uses persistent connections v SMTP requires message (header & body) to be in 7-bit ASCII v SMTP uses CRLF.CRLF to determine end of message comparison with HTTP: v HTTP: pull v SMTP: push v both have ASCII command/response interaction, status codes v HTTP: each object encapsulated in its own response msg v SMTP: multiple objects sent in multipart msg Application Layer 2-15

Mail message format SMTP: protocol for exchanging email msgs RFC 822: standard for text message format: v header lines, e.g., To: From: Subject: different from SMTP MAIL FROM, RCPT TO: commands! v Body: the message ASCII characters only header body blank line Application Layer 2-16

Mail access protocols SMTP SMTP mail access protocol (e.g., POP, IMAP) sender s mail receiver s mail v SMTP: delivery/storage to receiver s v mail access protocol: retrieval from POP: Post Office Protocol [RFC 1939]: authorization, download IMAP: Internet Mail Access Protocol [RFC 1730]: more features, including manipulation of stored msgs on HTTP: gmail, Hotmail, Yahoo! Mail, etc. Application Layer 2-17

POP3 protocol authorization phase v v client commands: : declare name pass: password responses +OK -ERR transaction phase, client: v v v v list: list message numbers retr: retrieve message by number dele: delete quit S: +OK POP3 ready C: bob S: +OK C: pass hungry S: +OK successfully logged on C: list S: 1 498 S: 2 912 S:. C: retr 1 S: <message 1 contents> S:. C: dele 1 C: retr 2 S: <message 1 contents> S:. C: dele 2 C: quit S: +OK POP3 signing off Application Layer 2-18

POP3 (more) and IMAP more about POP3 v previous example uses POP3 download and delete mode Bob cannot re-read e- mail if he changes client v POP3 download-andkeep : copies of messages on different clients v POP3 is stateless across sessions IMAP v keeps all messages in one place: at v allows to organize messages in folders v keeps state across sessions: names of folders and mappings between message IDs and folder name Application Layer 2-19