Chapter 8 Security. Computer Networking: A Top Down Approach

Similar documents
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

Chapter 2 Application Layer

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

Chapter 8 roadmap. Network Security

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

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

Application Layer: HTTP

DATA COMMUNICATOIN NETWORKING

EECS 3214: Computer Network Protocols and Applications

Chapter 2 Application Layer

Review for Internet Introduction

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

Chapter 2: Application layer

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

Chapter II: Application Layer

Chapter 1 Introduction

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

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

Chapter 1 Introduction

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

CSC 401 Data and Computer Communications Networks

Chapter 2 Application Layer

Chapter 2 Application Layer

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

Chapter 2 Application Layer

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

CS4/MSc Computer Networking. Lecture 3: The Application Layer

CSC 4900 Computer Networks:

Application Layer: , DNS

Chapter 2: Application layer

Chapter 2 Application Layer

EECS 3214: Computer Network Protocols and Applications

Chapter 2 Application Layer

internet technologies and standards

Computer Networking Introduction

Chapter 2 part B: outline

Chapter 2 Application Layer

Review of Previous Lecture

Protocol Layers, Security Sec: Application Layer: Sec 2.1 Prof Lina Battestilli Fall 2017

Chapter 2. Application Layer. Chapter 2: Application Layer. Application layer - Overview. Some network apps. Creating a network appication

Chapter 2 Application Layer

Introduction to Computer Networking. Guy Leduc. Chapter 2 Application Layer. Chapter 2: outline

Chapter 2 Application Layer. Lecture 4: principles of network applications. Computer Networking: A Top Down Approach

Application Layer Protocols

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

CSC 4900 Computer Networks: Security Protocols (2)

Introduction to computer networking

Chapter 1 Introduction

CS 3516: Advanced Computer Networks

Chapter 2 Application Layer. Lecture 5 DNS. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Lecture 05: Application Layer (Part 02) Domain Name System. Dr. Anis Koubaa

Introduction to Computer Networking. Guy Leduc. Chapter 2 Application Layer. Chapter 2: outline

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

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

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

Chapter 1: roadmap. 1.1 what is the Internet? 1.2 network edge. 1.3 network core

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

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

Application Layer. Applications and application-layer protocols. Goals:

CS 43: Computer Networks. HTTP September 10, 2018

Lecture 6: Application Layer Web proxies, , and SMTP

CMSC 332 Computer Networking Web and FTP

Application Layer. Goals: Service models. Conceptual aspects of network application protocols Client server paradigm

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

CC451 Computer Networks

CSEN 503 Introduction to Communication Networks

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

Chapter 1. Computer Networks and the Internet

Chapter 2: application layer

CSCE 463/612 Networks and Distributed Processing Spring 2018

Web caches (proxy server)

COSC4377. Chapter 2: Outline

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

Since enrollment is very small this semester, we have flexibilty. Traditional lecture Assigned reading, and then student(s) present during class time

HyperText Transfer Protocol

CS 43: Computer Networks. Layering & HTTP September 7, 2018

FIREWALLS. Firewall: isolates organization s internal net from larger Internet, allowing some packets to pass, blocking others

Information Network Systems The application layer. Stephan Sigg

Chapter 2 Application Layer

CS 204: Advanced Computer Networks

Chapter 1 Introduction

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

Network Applications Principles of Network Applications

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

Computer Networks and Applications

Chapter I: Introduction

Domain Name System (DNS) 김현철 ( 화 ) 정보통신융합서울대학교컴퓨터공학부

COMP 562: Advanced Topics in Networking

Internet communication

Computer Networks and the Internet. CMPS 4750/6750: Computer Networks

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

Layered Model. DoD Model. ISO/OSI Model

Chapter 2 Application Layer

Introduction to the Application Layer. Computer Networks Term B14

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

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

Application Layer. Goals:

Application Layer. Applications and application-layer protocols. Goals:

Web, HTTP and Web Caching

Transcription:

Chapter 8 Security A note on the use of these Powerpoint 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: 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!) 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 All material copyright 1996-2016 J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down Approach 7 th edition Jim Kurose, Keith Ross Pearson/Addison Wesley April 2016 Security 8-1

Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography 8.3 Message integrity 8.4 Securing e-mail 8.5 Securing TCP connections: SSL 8.6 Network layer security: IPsec 8.7 Securing wireless LANs 8.8 Operational security: firewalls and IDS Security 8-2

Firewalls firewall isolates organization s internal net from larger Internet, allowing some packets to pass, blocking others administered network trusted good guys firewall public Internet untrusted bad guys Security 8-3

Firewalls: why prevent denial of service attacks: SYN flooding: attacker establishes many bogus TCP connections, no resources left for real connections prevent illegal modification/ of internal data e.g., attacker replaces CIA s homepage with something else allow only authorized to inside network set of authenticated users/hosts three types of firewalls: stateless packet filters stateful packet filters application gateways Security 8-4

Stateless packet filtering Should arriving packet be allowed in? Departing packet let out? internal network connected to Internet via router firewall router filters packet-by-packet, decision to forward/drop packet based on: source IP address, destination IP address TCP/UDP source and destination port numbers ICMP message type TCP SYN and ACK bits Security 8-5

Stateless packet filtering: example example 1: block incoming and outgoing datagrams with IP protocol field = 17 and with either source or dest port = 23 result: all incoming, outgoing UDP flows and telnet connections are blocked example 2: block inbound TCP segments with ACK=0. result: prevents external clients from making TCP connections with internal clients, but allows internal clients to connect to outside. Security 8-6

Stateless packet filtering: more examples Policy No outside Web. No incoming TCP connections, except those for institution s public Web server only. Prevent Web-radios from eating up the available bandwidth. Prevent your network from being used for a smurf DoS attack. Prevent your network from being tracerouted Firewall Setting Drop all outgoing packets to any IP address, port 80 Drop all incoming TCP SYN packets to any IP except 130.207.244.203, port 80 Drop all incoming UDP packets - except DNS and router broadcasts. Drop all ICMP packets going to a broadcast address (e.g. 130.207.255.255). Drop all outgoing ICMP TTL expired traffic Security 8-7

Access Control Lists ACL: table of rules, applied top to bottom to incoming packets: (action, condition) pairs: looks like OpenFlow forwarding (Ch. 4)! action source address dest address protocol source port dest port flag bit allow 222.22/16 outside of 222.22/16 TCP > 1023 80 any allow outside of 222.22/16 222.22/16 TCP 80 > 1023 ACK allow 222.22/16 allow outside of 222.22/16 outside of 222.22/16 222.22/16 UDP > 1023 53 --- UDP 53 > 1023 ---- deny all all all all all all Security 8-8

Stateful packet filtering stateless packet filter: heavy handed tool admits packets that make no sense, e.g., dest port = 80, ACK bit set, even though no TCP connection established: action source address dest address protocol source port dest port flag bit allow outside of 222.22/16 222.22/16 TCP 80 > 1023 ACK stateful packet filter: track status of every TCP connection track connection setup (SYN), teardown (FIN): determine whether incoming, outgoing packets makes sense timeout inactive connections at firewall: no longer admit packets Security 8-9

Stateful packet filtering ACL augmented to indicate need to check connection state table before admitting packet action source address dest address proto source port dest port flag bit check conxion allow 222.22/16 outside of 222.22/16 TCP > 1023 80 any allow outside of 222.22/16 222.22/16 TCP 80 > 1023 ACK x allow 222.22/16 outside of 222.22/16 UDP > 1023 53 --- allow outside of 222.22/16 222.22/16 UDP 53 > 1023 ---- x deny all all all all all all Security 8-10

Application gateways filter packets on application data as well as on IP/TCP/UDP fields. example: allow select internal users to telnet outside host-to-gateway telnet session application gateway router and filter gateway-to-remote host telnet session 1. require all telnet users to telnet through gateway. 2. for authorized users, gateway sets up telnet connection to dest host. Gateway relays data between 2 connections 3. router filter blocks all telnet connections not originating from gateway. Security 8-11

Limitations of firewalls, gateways IP spoofing: router can t know if data really comes from claimed source if multiple app s. need special treatment, each has own app. gateway client software must know how to contact gateway. e.g., must set IP address of proxy in Web browser filters often use all or nothing policy for UDP tradeoff: degree of communication with outside world, level of security many highly protected sites still suffer from attacks Security 8-12

Intrusion detection systems packet filtering: operates on TCP/IP headers only no correlation check among sessions IDS: intrusion detection system deep packet inspection: look at packet contents (e.g., check character strings in packet against database of known virus, attack strings) examine correlation among multiple packets port scanning network mapping DoS attack Security 8-13

Intrusion detection systems multiple IDSs: different types of checking at different locations firewall internal network Internet IDS sensors Web server FTP server DNS server demilitarized zone Security 8-14

Network Security (summary) basic techniques... cryptography (symmetric and public) message integrity end-point authentication. used in many different security scenarios secure email secure transport (SSL) IP sec 802.11 operational security: firewalls and IDS Security 8-15

Chapter 1 Introduction A note on the use of these Powerpoint 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: 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!) 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 All material copyright 1996-2016 J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down Approach 7 th edition Jim Kurose, Keith Ross Pearson/Addison Wesley April 2016 Introduction 1-16

Chapter 1: introduction our goal: get feel and terminology more depth, detail later in course approach: use Internet as example overview: what s the Internet? what s a protocol? network edge; hosts, net, physical media network core: packet/circuit switching, Internet structure performance: loss, delay, throughput security protocol layers, service models history Introduction 1-17

What s the Internet: nuts and bolts view Internet: network of networks Interconnected ISPs protocols control sending, receiving of messages e.g., TCP, IP, HTTP, Skype, 802.11 Internet standards RFC: Request for comments IETF: Internet Engineering Task Force mobile network home network global ISP regional ISP institutional network Introduction 1-18

What s the Internet: a service view infrastructure that provides services to applications: Web, VoIP, email, games, e- commerce, social nets, provides programming interface to apps hooks that allow sending and receiving app programs to connect to Internet provides service options, analogous to postal service mobile network home network institutional network global ISP regional ISP Introduction 1-19

A closer look at network structure: network edge: hosts: clients and servers servers often in data centers networks, physical media: wired, wireless communication links mobile network home network global ISP regional ISP network core: interconnected routers network of networks institutional network Introduction 1-20

Host: sends packets of data host sending function: takes application message breaks into smaller chunks, known as packets, of length L bits transmits packet into network at transmission rate R link transmission rate, aka link capacity, aka link bandwidth 2 host 1 two packets, L bits each R: link transmission rate packet transmission delay time needed to transmit L-bit packet into link = = L (bits) R (bits/sec) Introduction 1-21

Packet-switching: store-and-forward L bits per packet source 3 2 1 R bps R bps destination takes L/R seconds to transmit (push out) L-bit packet into link at R bps store and forward: entire packet must arrive at router before it can be transmitted on next link end-end delay = 2L/R (assuming zero propagation delay) one-hop numerical example: L = 7.5 Mbits R = 1.5 Mbps one-hop transmission delay = 5 sec more on delay shortly Introduction 1-22

Packet Switching: queueing delay, loss A R = 100 Mb/s C B queue of packets waiting for output link R = 1.5 Mb/s D E queuing and loss: if arrival rate (in bits) to link exceeds transmission rate of link for a period of time: packets will queue, wait to be transmitted on link packets can be dropped (lost) if memory (buffer) fills up Introduction 1-23

Packet switching versus circuit switching packet switching allows more users to use network! example: 1 Mb/s link each user: 100 kb/s when active active 10% of time N users 1 Mbps link circuit-switching: 10 users packet switching: with 35 users, probability > 10 active at same time is less than.0004 * Q: how did we get value 0.0004? Q: what happens if > 35 users? * Check out the online interactive exercises for more examples: http://gaia.cs.umass.edu/kurose_ross/interactive/ Introduction 1-24

Internet structure: network of networks But if one global ISP is viable business, there will be competitors. which must be interconnected Internet exchange point net net net ISP A net net IXP net net net IXP ISP B net net net ISP C net net peering link net net net Introduction 1-25

Internet structure: network of networks and content provider networks (e.g., Google, Microsoft, Akamai) may run their own network, to bring services, content close to end users net net net ISP A net net IXP net net net Content provider network IXP ISP B net net ISP C net net net regional net net net net Introduction 1-26

Internet structure: network of networks Tier 1 ISP Tier 1 ISP Google IXP IXP IXP Regional ISP Regional ISP ISP ISP ISP ISP ISP ISP ISP ISP at center: small # of well-connected large networks tier-1 commercial ISPs (e.g., Level 3, Sprint, AT&T, NTT), national & international coverage content provider network (e.g., Google): private network that connects it data centers to Internet, often bypassing tier-1, regional ISPs 1-27 Introduction

Four sources of packet delay A transmission propagation B nodal processing queueing d nodal = d proc + d queue + d trans + d prop d proc : nodal processing check bit errors determine output link typically < msec d queue : queueing delay time waiting at output link for transmission depends on congestion level of router Introduction 1-28

Four sources of packet delay A transmission propagation B nodal processing queueing d nodal = d proc + d queue + d trans + d prop d trans : transmission delay: L: packet length (bits) R: link bandwidth (bps) d trans = L/R d trans and d prop very different d prop : propagation delay: d: length of physical link s: propagation speed (~2x10 8 m/sec) d prop = d/s * Check out the online interactive exercises for more examples: http://gaia.cs.umass.edu/kurose_ross/interactive/ * Check out the Java applet for an interactive animation on trans vs. prop delay Introduction 1-29

Throughput throughput: rate (bits/time unit) at which bits transferred between sender/receiver instantaneous: rate at given point in time average: rate over longer period of time server server, sends withbits (fluid) file of into F bits pipe to send to client link pipe capacity that can carry R s bits/sec fluid at rate R s bits/sec) link pipe capacity that can carry R c bits/sec fluid at rate R c bits/sec) Introduction 1-30

Internet protocol stack application: supporting network applications FTP, SMTP, HTTP transport: process-process data transfer TCP, UDP network: routing of datagrams from source to destination IP, routing protocols link: data transfer between neighboring network elements Ethernet, 802.111 (WiFi), PPP physical: bits on the wire application transport network link physical Introduction 1-31

ISO/OSI reference model presentation: allow applications to interpret meaning of data, e.g., encryption, compression, machine-specific conventions session: synchronization, checkpointing, recovery of data exchange Internet stack missing these layers! these services, if needed, must be implemented in application needed? application presentation session transport network link physical Introduction 1-32

segment datagram frame message H l H t H n H t H n H t M M M M source application transport network link physical Encapsulation link physical switch H l H n H n H t H t H t M M M M destination application transport network link physical H l H n H n H t H t M M network link physical H n H t M router Introduction 1-33

Chapter 2 Application Layer A note on the use of these Powerpoint 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: 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!) 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 All material copyright 1996-2016 J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down Approach 7 th edition Jim Kurose, Keith Ross Pearson/Addison Wesley April 2016 Application Layer 2-34

Application 2-35 Layer Chapter 2: outline 2.1 principles of network applications 2.2 Web and HTTP 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

Application 2-36 Layer Chapter 2: application layer our goals: conceptual, implementation aspects of network application protocols transport-layer service models client-server paradigm peer-to-peer paradigm content distribution networks learn about protocols by examining popular application-level protocols HTTP FTP SMTP / POP3 / IMAP DNS creating network applications socket API

Application 2-37 Layer Some network apps e-mail web text messaging remote login P2P file sharing multi-user network games streaming stored video (YouTube, Hulu, Netflix) voice over IP (e.g., Skype) real-time video conferencing social networking search

Client-server architecture server: always-on host permanent IP address data centers for scaling client/server clients: communicate with server may be intermittently connected may have dynamic IP addresses do not communicate directly with each other Applicat 2-38

P2P architecture no always-on server arbitrary end systems directly communicate peers request service from other peers, provide service in return to other peers self scalability new peers bring new service capacity, as well as new service demands peers are intermittently connected and change IP addresses complex management peer-peer Applicat 2-39

Sockets process sends/receives messages to/from its socket socket analogous to door sending process shoves message out door sending process relies on transport infrastructure on other side of door to deliver message to socket at receiving process application process socket application process controlled by app developer transport transport network link Internet network link controlled by OS physical physical Applicat 2-40

Application 2-41 Layer Internet transport protocols services TCP service: 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 throughput guarantee, security connection-oriented: setup required between client and server processes UDP service: unreliable data transfer between sending and receiving process does not provide: reliability, flow control, congestion control, timing, throughput guarantee, security, or connection setup, Q: why bother? Why is there a UDP?

Application 2-42 Layer Securing TCP TCP & UDP no encryption cleartext passwds sent into socket traverse Internet in cleartext SSL provides encrypted TCP connection data integrity end-point authentication SSL is at app layer apps use SSL libraries, that talk to TCP SSL socket API cleartext passwords sent into socket traverse Internet encrypted see Chapter 8

Application 2-43 Layer HTTP overview HTTP: hypertext transfer protocol Web s application layer protocol client/server model client: browser that requests, receives, (using HTTP protocol) and displays Web objects server: Web server sends (using HTTP protocol) objects in response to requests PC running Firefox browser iphone running Safari browser server running Apache Web server

Application 2-44 Layer HTTP overview (continued) uses TCP: client initiates TCP connection (creates socket) to server, port 80 server accepts TCP connection from client HTTP messages (application-layer protocol messages) exchanged between browser (HTTP client) and Web server (HTTP server) TCP connection closed HTTP is stateless server maintains no information about past client requests aside protocols that maintain state are complex! past history (state) must be maintained if server/client crashes, their views of state may be inconsistent, must be reconciled

Non-persistent HTTP: response time RTT (definition): time for a small packet to travel from client to server and back HTTP response time: one RTT to initiate TCP connection one RTT for HTTP request and first few bytes of HTTP response to return file transmission time non-persistent HTTP response time = 2RTT+ file transmission time initiate TCP connection RTT request file RTT file received time time time to transmit file Applicat 2-45

Application 2-46 Layer Persistent HTTP non-persistent HTTP issues: requires 2 RTTs per object OS overhead for each TCP connection browsers often open parallel TCP connections to fetch referenced objects persistent HTTP: server leaves connection open after sending response subsequent HTTP messages between same client/server sent over open connection client sends requests as soon as it encounters a referenced object as little as one RTT for all the referenced objects

Application 2-47 Layer HTTP request message two types of HTTP messages: request, response HTTP request message: ASCII (human-readable format) request line (GET, POST, HEAD commands) header lines carriage return, line feed at start of line indicates end of header lines * Check out the online interactive exercises for more examples: http://gaia.cs.umass.edu/kurose_ross/interactive/ carriage return character line-feed character GET /index.html HTTP/1.1\r\n Host: www-net.cs.umass.edu\r\n User-Agent: Firefox/3.6.10\r\n Accept: text/html,application/xhtml+xml\r\n Accept-Language: en-us,en;q=0.5\r\n Accept-Encoding: gzip,deflate\r\n Accept-Charset: ISO-8859-1,utf-8;q=0.7\r\n Keep-Alive: 115\r\n Connection: keep-alive\r\n \r\n

Application 2-48 Layer HTTP response message status line (protocol status code status phrase) header lines data, e.g., requested HTML file HTTP/1.1 200 OK\r\n Date: Sun, 26 Sep 2010 20:09:20 GMT\r\n Server: Apache/2.0.52 (CentOS)\r\n Last-Modified: Tue, 30 Oct 2007 17:00:02 GMT\r\n ETag: "17dc6-a5c-bf716880"\r\n Accept-Ranges: bytes\r\n Content-Length: 2652\r\n Keep-Alive: timeout=10, max=100\r\n Connection: Keep-Alive\r\n Content-Type: text/html; charset=iso-8859-1\r\n \r\n data data data data data... * Check out the online interactive exercises for more examples: http://gaia.cs.umass.edu/kurose_ross/interactive/

Application 2-49 Layer Cookies: keeping state (cont.) client server ebay 8734 cookie file ebay 8734 amazon 1678 usual http request msg usual http response set-cookie: 1678 Amazon server creates ID 1678 for user create entry backend database usual http request msg cookie: 1678 usual http response msg cookiespecific action one week later: ebay 8734 amazon 1678 usual http request msg cookie: 1678 usual http response msg cookiespecific action

Application 2-50 Layer Web caches (proxy server) goal: satisfy client request without involving origin server user sets browser: Web es via cache browser sends all HTTP requests to cache object in cache: cache returns object else cache requests object from origin server, then returns object to client client proxy server origin server client origin server

Application 2-51 Layer Caching example: assumptions: avg object size: 100K bits avg request rate from browsers to origin servers:15/sec avg data rate to browsers: 1.50 Mbps RTT from institutional router to any origin server: 2 sec link rate: 1.54 Mbps consequences: LAN utilization: 15% link utilization = 99% total delay = Internet delay + delay + LAN delay = 2 sec + minutes + usecs problem! institutional network public Internet 1.54 Mbps link origin servers 1 Gbps LAN

Application 2-52 Layer 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 e.g., Outlook, Thunderbird, iphone mail client outgoing, incoming messages stored on server mail server SMTP mail server user agent user agent SMTP SMTP user agent outgoing message queue mail server user mailbox user agent user agent user agent

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 Applicat 2-53

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

DNS: a distributed, hierarchical database Root DNS Servers com DNS servers org DNS servers edu DNS servers yahoo.com DNS servers amazon.com DNS servers pbs.org DNS servers poly.edu umass.edu DNS serversdns servers client wants IP for www.amazon.com; 1 st approximation: client queries root server to find com DNS server client queries.com DNS server to get amazon.com DNS server client queries amazon.com DNS server to get IP address for www.amazon.com Applicat 2-55

Application 2-56 Layer TLD, authoritative servers top-level domain (TLD) servers: responsible for com, org, net, edu, aero, jobs, museums, and all top-level country domains, e.g.: uk, fr, ca, jp Network Solutions maintains servers for.com TLD Educause for.edu TLD authoritative DNS servers: organization s own DNS server(s), providing authoritative hostname to IP mappings for organization s named hosts can be maintained by organization or service provider

Application 2-57 Layer DNS name resolution example root DNS server host at cis.poly.edu wants IP address for gaia.cs.umass.edu 2 3 4 5 TLD DNS server iterated query: contacted server replies with name of server to contact I don t know this name, but ask this server local DNS server dns.poly.edu 1 8 requesting host cis.poly.edu 7 6 authoritative DNS server dns.cs.umass.edu gaia.cs.umass.edu

DNS name resolution example recursive query: puts burden of name resolution on contacted name server heavy load at upper levels of hierarchy? local DNS server dns.poly.edu 1 2 8 requesting host cis.poly.edu root DNS server 7 6 5 3 4 TLD DNS server authoritative DNS server dns.cs.umass.edu gaia.cs.umass.edu Applicat 2-58

Application 2-59 Layer DNS records DNS: distributed database storing resource records (RR) RR format: (name, value, type, ttl) type=a name is hostname value is IP address type=ns name is domain (e.g., foo.com) value is hostname of authoritative name server for this domain type=cname name is alias name for some canonical (the real) name www.ibm.com is really servereast.backup2.ibm.com value is canonical name type=mx value is name of mailserver associated with name

Pure P2P architecture no always-on server arbitrary end systems directly communicate peers are intermittently connected and change IP addresses examples: file distribution (BitTorrent) Streaming (KanKan) VoIP (Skype) Applicat 2-60

Minimum Distribution Time Client-server vs. P2P: example client upload rate = u, F/u = 1 hour, u s = 10u, d min u s 3.5 3 2.5 P2P Client-Server 2 1.5 1 0.5 0 0 5 10 15 20 25 30 35 N Applicat 2-61

Application 2-62 Layer P2P file distribution: BitTorrent file divided into 256Kb chunks peers in torrent send/receive file chunks tracker: tracks peers participating in torrent torrent: group of peers exchanging chunks of a file Alice arrives obtains list of peers from tracker and begins exchanging file chunks with peers in torrent

2-63 Video Streaming and CDNs: context video traffic: major consumer of Internet bandwidth Netflix, YouTube: 37%, 16% of downstream residential ISP traffic ~1B YouTube users, ~75M Netflix users challenge: scale - how to reach ~1B users? single mega-video server won t work (why?) challenge: heterogeneity different users have different capabilities (e.g., wired versus mobile; bandwidth rich versus bandwidth poor) solution: distributed, application-level infrastructure Application Layer

2-64 Streaming multimedia: DASH DASH: Dynamic, Adaptive Streaming over HTTP server: divides video file into multiple chunks each chunk stored, encoded at different rates manifest file: provides URLs for different chunks client: periodically measures server-to-client bandwidth consulting manifest, requests one chunk at a time chooses maximum coding rate sustainable given current bandwidth can choose different coding rates at different points in time (depending on available bandwidth at time) Application Layer