CS162 Operating Systems and Systems Programming Lecture 13 Packet Switching March 7, 2011 Ion Stoica

Slides:



Advertisements
Similar presentations
CSE 413: Computer Networks
Advertisements

1 Introduction to Network Layer Lesson 09 NETS2150/2850 School of Information Technologies.
Internet Routing (COS 598A) Today: Multi-Protocol Label Switching Jennifer Rexford Tuesdays/Thursdays.
1 IK1500 Communication Systems IK1330 Lecture 3: Networking Anders Västberg
1 If the Internet is the answer, then what was the question? EE122 Fall 2012 Scott Shenker Materials with thanks.
© Jörg Liebeherr ECE 1545 Packet-Switched Networks.
Intro (continued) and Design Principles Nick Feamster CS 3251: Computer Networking I Spring 2013.
Aleksandar, Accounts have been created for any students in EECS 340 who did not already have one. Physical access to the labs has also been granted. If.
1 Katz, Stoica F04 EECS 122: Introduction to Computer Networks Network Service and Applications Computer Science Division Department of Electrical Engineering.
1 An Introduction to Computer Networks Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden Prof.
1 If the Internet is the answer, then what was the question? EE122 Fall 2011 Scott Shenker Materials with thanks.
Chapter 8 Switching Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Computer Networks Switching Technologies. 2 Switched Network Long distance transmission typically done over a network of switched nodes End devices.
8.1 Chapter 8 Switching Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data Communications and Networking
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
29-Aug-154/598N: Computer Networks Switching and Forwarding Outline –Store-and-Forward Switches.
Communication Networks
1 Computer Communication & Networks Lecture 4 Circuit Switching, Packet Switching, Delays Waleed.
Slides originally from Professor Williamson at U Calgary1-1 Introduction Part II  Network Core  Delay & Loss in Packet-switched Networks  Structure.
CS 447 Networks and Data Communication
Data Comm. & Networks Instructor: Ibrahim Tariq Lecture 3.
Review of Networking Concepts Part 1: Switching Networks
Chapter 2 – X.25, Frame Relay & ATM. Switched Network Stations are not connected together necessarily by a single link Stations are typically far apart.
Switched network.
ECE 466 Switching Networks. ECE 466 A communication network provides a scalable solution to connect a large number of end systems Communication Networks.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 4: Fundamental network design issues Slides.
Circuit & Packet Switching. ► Two ways of achieving the same goal. ► The transfer of data across networks. ► Both methods have advantages and disadvantages.
Chapter 1 Introduction Circuit/Packet Switching Protocols Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley,
TELE202 Lecture 5 Packet switching in WAN 1 Lecturer Dr Z. Huang Overview ¥Last Lectures »C programming »Source: ¥This Lecture »Packet switching in Wide.
Sami Al-wakeel 1 Data Transmission and Computer Networks The Switching Networks.
Switching Techniques Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
ECE 4450:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 2: Overview of Computer Network.
333: DISCUSS THE FUNDAMENTALS OF NETWORKING.  1. Discuss networking concepts (20 hrs)  2. Discuss hardware & software requirement to setup a Local Area.
William Stallings Data and Computer Communications 7 th Edition Chapter 1 Data Communications and Networks Overview.
Ch 1. Computer Networks and the Internet Myungchul Kim
Computer Networks with Internet Technology William Stallings
CS 453 Computer Networks Lecture 18 Introduction to Layer 3 Network Layer.
BZUPAGES.COM Presentation On SWITCHING TECHNIQUE Presented To; Sir Taimoor Presented By; Beenish Jahangir 07_04 Uzma Noreen 07_08 Tayyaba Jahangir 07_33.
Lecture 8 Virtual Switching (contd.) & Message Switching.
Data Comm. & Networks Instructor: Ibrahim Tariq Lecture 3.
Lecture # 03 Switching Course Instructor: Engr. Sana Ziafat.
Unit III Bandwidth Utilization: Multiplexing and Spectrum Spreading In practical life the bandwidth available of links is limited. The proper utilization.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 CH. 8: SWITCHING & DATAGRAM NETWORKS 7.1.
Department of Computer and IT Engineering University of Kurdistan
WAN Transmission Media
CSE 413: Computer Network Circuit Switching and Packet Switching Networks Md. Kamrul Hasan
1 Switching and Forwarding Sections Connecting More Than Two Hosts Multi-access link: Ethernet, wireless –Single physical link, shared by multiple.
Computer Networks Chapter 8 – Circuit Switching versus Packet Switching.
Computer Communication & Networks Lecture # 03 Circuit Switching, Packet Switching Nadeem Majeed Choudhary
Network Layer Lecture Network Layer Design Issues.
1 Kyung Hee University Chapter 8 Switching. 2 Kyung Hee University Switching  Switching  Switches are devices capable of creating temporary connections.
Data Communication Networks Lec 13 and 14. Network Core- Packet Switching.
Lecture # 3: WAN Data Communication Network L.Rania Ahmed Tabeidi.
Prepaid by: Guided by: ashwin goswami.
1. Layered Architecture of Communication Networks: Circuit Switching & Packet Switching.
Data and Computer Communications Chapter 7 Circuit Switching and Packet Switching.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Muhammad Waseem Iqbal Lecture # 20 Data Communication.
Point-to-Point Network Switching
A Taxonomy of Communication Networks
Packet Switching Outline Store-and-Forward Switches
Packet Switching Datagram Approach Virtual Circuit Approach
Computer Science Division
Networks & Protocols EE 122: Intro to Communication Networks
SWITCHING Switched Network Circuit-Switched Network Datagram Networks
Anthony D. Joseph and Ion Stoica
Network Core and QoS.
Data Communication Networks
EE 122: Lecture 7 Ion Stoica September 18, 2001.
Network Core and QoS.
Presentation transcript:

CS162 Operating Systems and Systems Programming Lecture 13 Packet Switching March 7, 2011 Ion Stoica

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Goals for Today Communication network taxonomy –Circuit switching –Packet switching Statistical multiplexing Note: Some slides and/or pictures in the following are adapted from notes by Vern Paxson, and Randy Katz.

What Global (non-digital) Communication Network Do You Use Every Day? Roughly speaking, how does it work?

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Postal System Write address Put stamp Close envelop Drop letter Take letter to local post office Verify postage “Route” letter Take letter to destination’s postal office Check destination address Take letter to destination Check address Open envelope

What’s Another Such Network That You Use Every Day?

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Examples of Other Information Networks Fire signalsSending messages by birds

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Other Network Examples

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Communication networks can be classified based on the way in which the nodes exchange information: Taxonomy of Communication Networks Communication Network

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Communication networks can be classified based on the way in which the nodes exchange information: Taxonomy of Communication Networks Communication Network Broadcast Communication Network

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Information transmitted by any node is received by every other node in the network –Examples? –Usually in LANs (Local Area Networks) »E.g., Ethernet (classical), WiFi »E.g., lecture! What problems does this raise? Problem #1: limited range Problem #2: privacy of communication Problem #3: coordinating access to the shared communication medium (Multiple Access Problem) Broadcast Communication Networks

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Communication networks can be classified based on the way in which the nodes exchange information: Taxonomy of Communication Networks Communication Network Switched Communication Network Broadcast Communication Network

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Information transmitted along a path of intermediary nodes (“routers” or “switches”) Basic issue: how the routers figure out the next hop along the path Switched Communication Networks

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Communication networks can be classified based on the way in which the nodes exchange information: Taxonomy of Communication Networks Communication Network Switched Communication Network Broadcast Communication Network Circuit-Switched Communication Network

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Circuit Switching (e.g., Phone Network) Establish: source creates circuit to destination –Nodes along the path store connection info –Nodes generally reserve resources for the connection –If circuit not available: “Busy signal” Transfer: source sends data over the circuit –No destination address, since nodes know path Teardown: source tears down circuit when done

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Circuit Switching Node (switch) in a circuit switching network incoming linksoutgoing links Node How does the node connect the incoming link to the outgoing?

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Telephone Network Alexander Graham Bell –1876: Demonstrates the telephone at US Centenary Exhibition in Philadelphia

Lec /7Ion Stoica CS162 ©UCB Spring Circuit Switching With Human Operator

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Telephone Network Almon Brown Strowger ( ) –1889: Invents the “girl-less, cuss-less” telephone system -- the mechanical switching system

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Timing in Circuit Switching Host 1Host 2 Switch 1Switch 2 time

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Timing in Circuit Switching Circuit Establishment Host 1Host 2 Switch 1Switch 2 propagation delay between Host 1 and Switch1 time

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Timing in Circuit Switching Circuit Establishment Host 1Host 2 Switch 1Switch 2 propagation delay between Host 1 and Switch1 Transmission delay time

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Timing in Circuit Switching Circuit Establishment Host 1Host 2 Switch 1Switch 2 propagation delay between Host 1 and Switch1 Transmission delay time

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Timing in Circuit Switching Circuit Establishment Host 1Host 2 Switch 1Switch 2 propagation delay between Host 1 and Switch1 propagation delay between Host 1 and Host 2 Transmission delay time

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Timing in Circuit Switching Information Circuit Establishment Transfer Host 1Host 2 Switch 1Switch 2 propagation delay between Host 1 and Switch1 propagation delay between Host 1 and Host 2 Transmission delay time

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Timing in Circuit Switching Information Circuit Establishment Transfer Circuit Teardown Host 1Host 2 Switch 1Switch 2 propagation delay between Host 1 and Switch1 propagation delay between Host 1 and Host 2 Transmission delay time

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Circuit Switching Node (switch) in a circuit switching network incoming linksoutgoing links Node How do the black and red circuits share the outgoing link?

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Circuit Switching: Multiplexing a Link Time-division –Each circuit allocated certain time slots Frequency-division –Each circuit allocated certain frequencies time frequency time

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Time-Division Multiplexing/Demultiplexing Time divided into frames; frames into slots Relative slot position inside a frame determines to which circuit data belongs –E.g., slot 0 belongs to red circuit Requires synchronization between sender and receiver— surprisingly non-trivial! In case of non-permanent circuits –Need to dynamically bind a slot to a circuit –How to do this? If sender does not send data the circuit’s capacity is lost! Frames Slots =

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Administrivia Midterm next lecture: –Wednesday, March 9 th –Closed book, one page cheat sheet (both sides) Midterm Topics: Everything up to last lecture (excluding “Introduction to Networking”), March 2 nd Review session: Today 6-8pm (306 Soda Hall)

Lec /7Ion Stoica CS162 ©UCB Spring min Break

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Communication networks can be classified based on the way in which the nodes exchange information: Taxonomy of Communication Networks Communication Network Switched Communication Network Broadcast Communication Network Circuit-Switched Communication Network Packet-Switched Communication Network

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Packet Switching Data sent as chunks of formatted bit-sequences (Packets) Packets have following structure: »Header and Trailer carry control information (e.g., destination address, checksum) Each packet traverses the network from node to node along some path (routing) based on header info Usually, once a node receives the entire packet, it stores it (hopefully briefly) and then forwards it to the next node (Store-and-Forward Networks) HeaderData Trailer (sometimes)

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Packet Switching Node in a packet switching network incoming linksoutgoing links Node Memory

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Packet Switching: Multiplexing/Demultiplexing Data from any flow can be transmitted at any given time –Single flow can use the entire link capacity if it is alone How to tell them apart? –Use meta-data (header) to describe data Note: for packet switching we use flow (instead of circuit) to denote packets sent by a sender to a receiver

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Communication networks can be classified based on the way in which the nodes exchange information: Taxonomy of Communication Networks Communication Network Switched Communication Network Broadcast Communication Network Circuit-Switched Communication Network Packet-Switched Communication Network Datagram Network

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Datagram Packet Switching Each packet is independently switched –Each packet header contains full destination address No resources are pre-allocated (reserved) in advance Leverages “statistical multiplexing” (or stat-muxing) –Essentially: “chances are good that packets from different flows won’t all arrive at the same time, so we can get by without enough capacity for all of them at their peak transmission rate” –Assuming independence of traffic sources, can compute probability that there is enough capacity Example: IP networks; postal system

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Statistical Multiplexing Use trivial time-driven simulation to illustrate statistical multiplexing Probabilistically generate the bandwidth of a flow at each time unit, e.g., –With probability 0.2, bandwidth is 6 –With probability 0.8, bandwidth is 1 Average bandwidth, avg=0.2* *1 = 2 peak/avg = 6/2 = 3

Lec /7Ion Stoica CS162 ©UCB Spring 2011 One Flow peak=6 avg=2 peak / avg = 3

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Two Flows agg_peak=7 agg_avg=3.75 agg_peak / agg_avg = 7/3.75 = 1.86 (agg_avg = average of aggregate bandwidth) (agg_peak=maximum value of aggregate bandwidth)

Lec /7Ion Stoica CS162 ©UCB Spring Flows agg_peak=135 agg_avg= agg_peak / agg_avg = 7/3.75 = 135/ = 1.28

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Statistical Multiplexing (cont’d) As number of flows increases, agg_peak/agg_avg decreases –For 1000 flows, peak/avg = 2125/2009=1.057 Q: What does this mean? A: Multiplexing a large enough number of flows “eliminates” burstiness –Use average bandwidth to provision capacity, instead of peak bandwidth –E.g., For 1000 flows »Average of aggregate bandwidth = 2,000 »Sum of bandwidth peaks = 6,000

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Timing of Datagram Packet Switching Packet 1 Host 1Host 2 Node 1Node 2 propagation delay between Host 1 and Node 1

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Timing of Datagram Packet Switching Packet 1 Host 1Host 2 Node 1Node 2 propagation delay between Host 1 and Node 1 transmission time of Packet 1 at Host 1

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Packet 1 Timing of Datagram Packet Switching Packet 1 processing delay of Packet 1 at Node 2 Host 1Host 2 Node 1Node 2 propagation delay between Host 1 and Node 1 transmission time of Packet 1 at Host 1

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Packet 1 Packet 2 Packet 3 Packet 1 Packet 2 Packet 3 Timing of Datagram Packet Switching Packet 1 Packet 2 Packet 3 processing delay of Packet 1 at Node 2 Host 1Host 2 Node 1Node 2 propagation delay between Host 1 and Node 1 transmission time of Packet 1 at Host 1

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Datagram Packet Switching Host A Host B Host E Host D Host C Node 1 Node 2 Node 3 Node 4 Node 5 Node 6 Node 7

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Datagram Packet Switching Host A Host B Host E Host D Host C Node 1 Node 2 Node 3 Node 4 Node 5 Node 6 Node 7

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Datagram Packet Switching Host A Host B Host E Host D Host C Node 1 Node 2 Node 3 Node 4 Node 5 Node 6 Node 7

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Communication networks can be classified based on the way in which the nodes exchange information: Taxonomy of Communication Networks Communication Network Switched Communication Network Broadcast Communication Network Circuit-Switched Communication Network Packet-Switched Communication Network Datagram Network Virtual Circuit Network A hybrid of circuits and packets; headers include a “circuit identifier” established during a setup phase

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Advantages of Circuit Switching Guaranteed bandwidth –Predictable communication performance Simple abstraction –Reliable communication channel between hosts –No worries about lost or out-of-order packets Simple forwarding –Forwarding based on time slot or frequency –No need to inspect a packet header Low per-packet overhead –Forwarding based on time slot or frequency –No IP (and TCP/UDP) header on each packet

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Disadvantages of Circuit Switching Wasted bandwidth –Bursty traffic leads to idle connection during silent period –Unable to achieve gains from “statistical multiplexing” Blocked connections –Connection refused when resources are not sufficient –Unable to offer “okay” service to everybody Connection set-up delay –No communication until the connection is set up –Unable to avoid extra latency for small data transfers Network state –Network nodes must store per-connection information –Unable to avoid per-connection storage and state –This makes failures more disruptive!

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Packet-Switching vs. Circuit- Switching Critical advantage of packet-switching over circuit switching: Exploitation of statistical multiplexing Another: since routers don’t know about individual flows, when a router or link fails, it’s: Easy to fail over to a different path A third: easier for different parties to link their networks together because they’re not promising to reserve resources for one another However, packet-switching must handle congestion: –More complex routers –Harder to provide good network services (e.g., delay and bandwidth guarantees)

Lec /7Ion Stoica CS162 ©UCB Spring 2011 Summary Packet switching: –Store and forward: a packet is stored at routers before being forwarded –Each packet can take a different path –No resource reservation: leverage statistical multiplexing Circuit switching: –Set-up path in advance –Reserve resources for each connection Statistically multiplexing: –Peak aggregate bandwidth much lower than sum of the peak of individual connections