“Real” Internet delays and routes What do “real” Internet delay & loss look like? Traceroute program: provides delay measurement from source to router along end-end Internet path towards destination. For all i: sends three packets that will reach router i on path towards destination router i will return packets to sender sender times interval between transmission and reply. 3 probes
“Real” Internet delays and routes mpl-idf-vln-122.northwestern.edu ( ) ms ms ms 2 lev-mdf-6-vln-54.northwestern.edu ( ) ms ms ms 3 abbt-mdf-1-vln-902.northwestern.edu ( ) ms ms ms 4 abbt-mdf-4-ge northwestern.edu ( ) ms ms ms 5 starlight-lsd6509.northwestern.edu ( ) ms ms ms ( ) ms ms ms ( ) ms ms ms ( ) ms ms ms 9 sl-gw25-stk-1-2.sprintlink.net ( ) ms ms ms 10 sl-bb21-stk-8-1.sprintlink.net ( ) ms ms ms 11 sl-bb21-hk-2-0.sprintlink.net ( ) ms ms ms 12 sl-gw10-hk-14-0.sprintlink.net ( ) ms ms ms 13 sla-cent-3-0.sprintlink.net ( ) ms ms ms ( ) ms ms ms ( ) ms ms ms 16 shnj4.cernet.net ( ) ms ms ms 17 hzsh3.cernet.net ( ) ms ms ms 18 zjufw.zju.edu.cn ( ) ms ms ms 19 * * * 20 * * * 21 ( ) ms ms ms traceroute: zappa.cs.nwu.edu to Three delay measements from Zappa.cs.cs.nwu.edu to 1890mpl-idf-vln-122.northwestern.edu * means no reponse (probe lost, router not replying) trans-oceanic link
Packet loss queue (aka buffer) preceding link in buffer has finite capacity packet arriving to full queue dropped (aka lost) lost packet may be retransmitted by previous node, by source end system, or not at all A B packet being transmitted packet arriving to full buffer is lost buffer (waiting area)
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, with file of F bits to send to client link capacity R s bits/sec link capacity R c bits/sec server sends bits (fluid) into pipe pipe that can carry fluid at rate R s bits/sec) pipe that can carry fluid at rate R c bits/sec)
Throughput (more) R s < R c What is average end-end throughput? R s bits/sec R c bits/sec R s > R c What is average end-end throughput? R s bits/sec R c bits/sec link on end-end path that constrains end-end throughput bottleneck link
Throughput: Internet scenario 10 connections (fairly) share backbone bottleneck link R bits/sec RsRs RsRs RsRs RcRc RcRc RcRc R per-connection end-end throughput: min(R c,R s,R/10) in practice: R c or R s is often bottleneck
Protocol “Layers” Networks are complex! r many “pieces”: m hosts m routers m links of various media m applications m protocols m hardware, software Question: Is there any hope of organizing structure of network? Or at least our discussion of networks?
Why layering? Dealing with complex systems: r Explicit structure allows identification, relationship of complex system’s pieces m layered reference model for discussion r Modularization eases maintenance, updating of system m change of implementation of layer’s service transparent to rest of system m e.g., change in gate procedure doesn’t affect rest of system r Layering considered harmful?
Internet protocol stack r application: supporting network applications m FTP, SMTP, HTTP r transport: host-host data transfer m TCP, UDP r network: routing of datagrams from source to destination m IP, routing protocols r link: data transfer between neighboring network elements m PPP, Ethernet r physical: bits “on the wire” application transport network link physical
Layering: logical communication application transport network link physical application transport network link physical application transport network link physical application transport network link physical network link physical Each layer: r distributed r “entities” implement layer functions at each node r entities perform actions, exchange messages with peers
Layering: logical communication application transport network link physical application transport network link physical application transport network link physical application transport network link physical network link physical data E.g.: transport r take data from app r add addressing, reliability check info to form “datagram” r send datagram to peer r wait for peer to ack receipt r analogy: post office data transport ack
Layering: physical communication application transport network link physical application transport network link physical application transport network link physical application transport network link physical network link physical data
Protocol layering and data Each layer takes data from above r adds header information to create new data unit r passes new data unit to layer below application transport network link physical application transport network link physical source destination M M M M H t H t H n H t H n H l M M M M H t H t H n H t H n H l message segment datagram frame
Summary r Network access and physical media r Internet structure and ISPs r Delay & loss in packet-switched networks r Protocol layers, service models r More depth, detail to follow!
Application Layer Our goals: r conceptual, implementation aspects of network application protocols m transport-layer service models m client-server paradigm m peer-to-peer paradigm r learn about protocols by examining popular application-level protocols m HTTP m FTP m SMTP / POP3 / IMAP m DNS r programming network applications m socket API
Some network apps r r web r instant messaging r remote login r P2P file sharing r multi-user network games r streaming stored video (YouTube) r voice over IP r real-time video conferencing r cloud computing r … r
Creating a network app write programs that m run on (different) end systems m communicate over network m e.g., web server software communicates with browser software No need to write software for network-core devices m network-core devices do not run user applications m applications on end systems allows for rapid app development, propagation application transport network data link physical application transport network data link physical application transport network data link physical
18 Outline r Principles of network applications m App architectures m App requirements r Web and HTTP r FTP
19 Application architectures r Client-server r Peer-to-peer (P2P) r Hybrid of client-server and P2P
Client-server architecture server: m always-on host m permanent IP address m server farms for scaling clients: m communicate with server m may be intermittently connected m may have dynamic IP addresses m do not communicate directly with each other client/server
Pure P2P architecture r no always-on server r arbitrary end systems directly communicate r peers are intermittently connected and change IP addresses highly scalable but difficult to manage peer-peer 21
Hybrid of client-server and P2P Skype m voice-over-IP P2P application m centralized server: finding address of remote party: m client-client connection: direct (not through server) Instant messaging m chatting between two users is P2P m centralized service: client presence detection/location user registers its IP address with central server when it comes online user contacts central server to find IP addresses of buddies 22
23 Outline r Principles of network applications m App architectures m App requirements r Web and HTTP r FTP
24 Processes communicating Process: program running within a host. r within same host, two processes communicate using inter-process communication (defined by OS). r processes in different hosts communicate by exchanging messages Client process: process that initiates communication Server process: process that waits to be contacted r Note: applications with P2P architectures have client processes & server processes
25 Sockets r process sends/receives messages to/from its socket r socket analogous to door m sending process shoves message out door m sending process relies on transport infrastructure on other side of door which brings message to socket at receiving process process TCP with buffers, variables socket host or server process TCP with buffers, variables socket host or server Internet controlled by OS controlled by app developer r API: (1) choice of transport protocol; (2) ability to fix a few parameters (lots more on this later)