CSC 401 Data and Computer Communications Networks

Similar documents
CSC 4900 Computer Networks:

Chapter 2 Application Layer

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

Lecture 6: Application Layer Web proxies, , and SMTP

CS 3516: Computer Networks

CSCE 463/612 Networks and Distributed Processing Spring 2018

CSC 257/457 Computer Networks. Fall 2017 MW 4:50 pm 6:05 pm CSB 601

Chapter 2 Application Layer

WWW: the http protocol

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

Chapter 2 part B: outline

Chapter 2: Application layer

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

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

Internet and Intranet Protocols and Applications

The Application Layer: SMTP, FTP

Application Layer: , DNS

HyperText Transfer Protocol

1-1. Switching Networks (Fall 2010) EE 586 Communication and. September Lecture 10

Application Layer: HTTP

Computer Networking Introduction

CMSC 332 Computer Networking Web and FTP

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

The Application Layer: & SMTP

Computer Networks and Applications

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

Chapter 2 Application Layer

Chapter 2 Application Layer

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

Chapter 2 Application Layer

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

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

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

Web, HTTP and Web Caching

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

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

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

CS 355. Computer Networking. Wei Lu, Ph.D., P.Eng.

Chapter 2 Application Layer

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

Layered Model. DoD Model. ISO/OSI Model

Chapter 2 Application Layer

Lecture 04: Application Layer (Part 01) Principles and the World Wide Web (HTTP) Dr. Anis Koubaa

Chapter 2: Application Layer. Chapter 2 Application Layer. Some network apps. Application architectures. Chapter 2: Application layer

Application Layer Protocols

Application Layer Chapter 2

Chapter 2 Application Layer

Review of Previous Lecture

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

Computer Networks. Wenzhong Li. Nanjing University

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

Overview Content Delivery Computer Networking Lecture 15: The Web Peter Steenkiste. Fall 2016

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

CSEN 404 Introduction to Networks. Mervat AbuElkheir Mohamed Abdelrazik. ** Slides are attributed to J. F. Kurose

Different Layers Lecture 21

CSEN 503 Introduction to Communication Networks

Chapter 2 Application Layer

EECS 3214: Computer Network Protocols and Applications

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

EECS 3214: Computer Network Protocols and Applications

Network Applications Principles of Network Applications

COSC4377. Chapter 2: Outline

Web caches (proxy server)

Computer Networking. Chapter #1. Dr. Abdulrhaman Alameer

Application-layer Protocols

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

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

Chapter 2: application layer

Chapter 2 Application Layer

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

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

CS457 Applications. Fall 2014

CC451 Computer Networks

Chapter 1 Introduction

Internet communication

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

Application Layer: The Web and HTTP Sec 2.2 Prof Lina Battestilli Fall 2017

Foundations of Telematics

CSCI 466 Midterm Networks Fall 2013

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

Review for Internet Introduction

CS321: Computer Networks ELECTRONIC MAIL

Computer Networks Unit I Application layer (2012 pattern)

Application Layer. Pure P2P architecture. Client-server architecture. Processes communicating. Hybrid of client-server and P2P. Creating a network app

Introduction to Computer Networking. Gang Wang Fall 2016

Computer Networks. HTTP and more. Jianping Pan Spring /20/17 CSC361 1

Chapter 8 Security. Computer Networking: A Top Down Approach

Application Layer. Pure P2P architecture. Client-server architecture. Processes communicating. Hybrid of client-server and P2P. Creating a network app

Chapter 2: Application Layer

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

Chapter 2 Application Layer

Chapter 1 Introduction

CS 43: Computer Networks. HTTP September 10, 2018

Internet applications. 2: Application Layer 1

Information Network Systems The application layer. Stephan Sigg

ECE697AA Lecture 2. Today s lecture

Chapter 2. Application Layer. 2: Application Layer 1

4. The transport layer

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

Transcription:

CSC 401 Data and Computer Communications Networks Application Layer: Cookies, Web Caching, SMTP Sec 2.2.4-2.4 Prof. Lina Battestilli Fall 2017

Outline Application Layer (ch 2) 2.1 principles of network applications 2.2 Web and HTTP Cookies, Caching 2.3 electronic mail SMTP, POP3, IMAP 2.4 DNS 2.5 P2P applications 2.6 Video streaming and Content Distribution Networks 2.7 socket programming with UDP and TCP 10

User- state: cookies Many Web sites use cookies enabled by four components: 1) cookie header line of HTTP response message 2) cookie header line in next HTTP request message 3) cookie file kept on s host, managed by s browser 4) back-end database at Web site example: Susan always access Internet from PC visits specific e-commerce site for first time when initial HTTP requests arrives at site, site creates: unique ID entry in backend database for ID 11

Cookies: keeping state client ebay 8734 cookie file ebay 8734 amazon 1678 usual http request msg usual http response set-cookie: 1678 Amazon creates ID 1678 for create entry backend database usual http request msg cookie: 1678 usual http response msg cookiespecific action access one week later: ebay 8734 amazon 1678 usual http request msg cookie: 1678 usual http response msg cookiespecific action access 12

Cookies (continued) what cookies can be used for: authorization shopping carts recommendations session state (Web e-mail) stateful protocol: protocol endpoints: maintain state at sender/receiver over multiple transactions cookies: http messages carry state aside cookies and privacy: cookies permit sites to learn a lot about you you may supply name and e-mail to sites privacy risk Cookies are not enough to buy staff. You still need to authenticate/authorization. Let s visit at http://www.nytimes.com/ Let s look at some cookies Incognito Mode 13

Monitor Cookies & Trackers Ghostery Cookie Inspector Check Cookies for your browser: 14

Web Caches (proxy ) goal: satisfy client request without involving origin sets browser: Web accesses via cache browser sends all HTTP requests to cache object in cache: cache returns object else cache requests object from origin, then returns object to client client client proxy origin origin 15

More about Web caching cache acts as both client and for original requesting client client to origin typically cache is installed by ISP (university, company, residential ISP) Why Web caching? reduce response time for client request reduce traffic on an institution s access link reduces origin web load 16

Caching Example: slow access Link assumptions: avg object size: 1 Mbits avg request rate from browsers to origin s:15/sec avg data rate to browsers: 15 Mbps public Internet origin s access link rate: 15 Mbps RTT from institutional router R1 to any origin : 2 sec consequences: problem! LAN utilization: 15% access link utilization = 100% institutional network R2 R1 15 Mbps access link 100 Mbps LAN total delay = Internet delay + access delay + LAN delay = 2 sec + minutes + µsecs Way too long! 17

Caching example: fatter access link assumptions: avg object size: 1 Mbits avg request rate from browsers to origin s:15/sec avg data rate to browsers: 15 Mbps public Internet origin s access link rate: 15 Mbps 100 Mbps RTT from institutional router to any origin : 2 sec consequences: LAN utilization: 15% access link utilization = 100% 15% institutional network R2 R1 15 Mbps access link 100 Mbps 100 Mbps LAN total delay = Internet delay + access delay + LAN delay = 2 sec + min + µsecs msecs Cost: increased access link speed (not cheap!) 18

Caching example: install local cache assumptions: avg object size: 1 Mbits avg request rate from browsers to origin s:15/sec avg data rate to browsers: 15 Mbps access link rate: 15 Mbps RTT from institutional router to any origin : 2 sec consequences: LAN utilization: 15% access link utilization = total delay =?? How to compute link utilization, delay? institutional network public Internet R2 R1 15 Mbps access link origin s 100 Mbps LAN local web cache Cost: web cache (cheap!) 19

Caching example: install local cache Calculating access link utilization, delay with cache: suppose cache hit rate is 0.4 40% requests satisfied at cache 60% requests satisfied at origin access link utilization: 60% of requests use access link data rate to browsers over access link = 0.6*15 Mbps = 9 Mbps utilization = 9/15 => 47% total delay = 0.6 * (delay from origin s) +0.4 * (delay when satisfied at cache) = 0.6 (2.01sec) + 0.4 (~msecs) = ~ 1.2 secs institutional network public Internet 15 Mbps access link origin s 100 Mbps LAN local web cache less than with 100 Mbps link (and cheaper too!) 20

Conditional GET Goal: don t send object if cache has up-to-date cached version no object transmission delay lower link utilization cache: specify date of cached copy in HTTP request client HTTP request msg If-modified-since: <date> HTTP response HTTP/1.0 304 Not Modified object not modified before <date> If-modified-since: <date> : response contains no object if cached copy is up-todate: HTTP/1.0 304 Not Modified HTTP request msg If-modified-since: <date> HTTP response HTTP/1.0 200 OK <data> object modified after <date> 21

Outline Application Layer (ch 2) 2.1 principles of network applications 2.2 Web and HTTP 2.3 FTP 2.4 electronic mail SMTP, IMAP, POP3 2.5 DNS 2.6 P2P applications 2.7 socket programming with UDP and TCP 23

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

Electronic mail: mail s mail s: mailbox contains incoming messages for message queue of outgoing (to be sent) mail messages SMTP protocol between mail s to send email messages client: sending mail : receiving mail mail SMTP mail SMTP SMTP mail 25

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

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 27

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

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

Comparison HTTP Persistent or non-persistent connections Pull ASCI request/response + status codes each object encapsulated in its own response message SMTP Persistent connections Push 7-bit ASCII request/response + status codes multiple objects sent in same message. ASCII command/response, status codes CRLF.CRLF for end of message ASCII command/response, status codes CRLF or CRLFCRLF for end of

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

Mail access protocols SMTP SMTP sender s mail receiver s mail mail access protocol (e.g., POP3, IMAP, HTTP) PULL operation! SMTP: delivery/storage to receiver s mail access protocol: retrieval from POP3: 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. 2-32

POP3 and IMAP POP3 POP3 download and delete mode Bob cannot re-read e-mail if he changes client POP3 download-and-keep : copies of messages on different clients POP3 is stateless across sessions IMAP keeps all messages in one place: at allows to organize messages in folders keeps state across sessions: names of folders and mappings between message IDs and folder name 2-33

Web-based Email Introduced by Hotmail in mid 1990s User is a web browser Connection from User Agent to Mail Servers uses HTTP 34

References Some of the slides are identical or derived from 1. Slides for the 7 th edition of the book Kurose & Ross, Computer Networking: A Top-Down Approach, 2. Slides by Jim Kurose for his CSC453 course at Umass