EE 122: Review for 1st Midterm

Slides:



Advertisements
Similar presentations
6.033: Intro to Computer Networks Layering & Routing Dina Katabi & Sam Madden Some slides are contributed by N. McKewon, J. Rexford, I. Stoica.
Advertisements

Routing - I Important concepts: link state based routing, distance vector based routing.
1 Dijkstra’s Shortest Path Algorithm Gordon College.
CS 268: Router Design Ion Stoica March 1, 2004.
CS 268: Lecture 2 (Layering & End-to-End Arguments)
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Performance Modeling Computer Science Division Department of Electrical Engineering and Computer.
EE 122: Layering and the Internet Architecture Kevin Lai September 4, 2002.
EE 122: Router Design Kevin Lai September 25, 2002.
Katz, Stoica F04 EECS 122: Introduction to Computer Networks Link State and Distance Vector Routing Computer Science Division Department of Electrical.
CS 268: Lecture 12 (Router Design) Ion Stoica March 18, 2002.
Announcement r Project 2 extended to 2/20 midnight r Project 3 available this weekend r Homework 3 available today, will put it online.
1 EE 122: Shortest Path Routing Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern.
Announcement r Project 2 Extension ? m Previous grade allocation: Projects 40% –Web client/server7% –TCP stack21% –IP routing12% Midterm 20% Final 20%
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.5 Routing algorithms m Link state m Distance.
EE 122: Intra-domain routing Ion Stoica September 30, 2002 (* this presentation is based on the on-line slides of J. Kurose & K. Rose)
EECC694 - Shaaban #1 lec #7 Spring The OSI Reference Model Network Layer.
CS 4700 / CS 5700 Network Fundamentals Lecture 9: Intra Domain Routing Revised 7/30/13.
Computer Networks Switching Professor Hui Zhang
CECS 474 Computer Network Interoperability WAN Technologies & Routing
Network Layer Goals: understand principles behind network layer services: –routing (path selection) –dealing with scale –how a router works –advanced topics:
CS 268: Lecture 3 (Layering & End-to-End Arguments)
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
1 WAN Technologies and Routing. 2 Motivation Connect multiple computers Span large geographic distance Cross public right-of-way –Streets –Buildings –Railroads.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_b Protocol Layering Instructor: Dr. Li-Chuan Chen Date: 09/15/2003 Based in part upon slides of Prof.
The Network Layer & Routing
1 Week 5 Lecture 2 IP Layer. 2 Network layer functions transport packet from sending to receiving hosts transport packet from sending to receiving hosts.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 20 Omar Meqdadi Department of Computer Science and Software Engineering University.
Network Layer (2). Review Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations.
4: Network Layer4-1 Chapter 4: Network Layer Last time: r Chapter Goals m Understand network layer principles and Internet implementation r Started routing.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429 Introduction to Computer Networks Lecture 10: Intra-domain routing Slides used with.
IP tutorial - #2 Routing KAIST Dept. of CS NC Lab.
Network layer (addendum) Slides adapted from material by Nick McKeown and Kevin Lai.
Graciela Perera Department of Computer Science and Information Systems Slide 1 of 18 INTRODUCTION NETWORKING CONCEPTS AND ADMINISTRATION CSIS 3723 Graciela.
Network Layer.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CPSC 335 Data Communication.
Distributed Systems CS
Part I. Overview of Data Communications and Networking
CSE390 – Advanced Computer Networks
CS 268: Router Design Ion Stoica February 27, 2003.
CS 457 – Lecture 12 Routing Spring 2012.
Administrative stuff TA: Almudena Konrad Paper reviews:
Network layer functions
Chapter 4 – The Network Layer & Routing
Road Map I. Introduction II. IP Protocols III. Transport Layer
CS 4700 / CS 5700 Network Fundamentals
E2E Arguments & Project Suggestions (Lecture 4, cs262a)
CS 3700 Networks and Distributed Systems
ECE453 – Introduction to Computer Networks
Congestion Control (from Chapter 05)
PRESENTATION COMPUTER NETWORKS
Computer Science Division
CS 3700 Networks and Distributed Systems
Congestion Control (from Chapter 05)
COMP/ELEC 429 Introduction to Computer Networks
EE 122: Lecture 7 Ion Stoica September 18, 2001.
Distributed Systems CS
Congestion Control (from Chapter 05)
ECSE-4730: Computer Communication Networks (CCN)
Network Layer (contd.) Routing
Congestion Control (from Chapter 05)
EE 122: Intra-domain routing: Distance Vector
Congestion Control (from Chapter 05)
Congestion Control (from Chapter 05)
Congestion Control (from Chapter 05)
Network Layer.
EECS 122: Introduction to Computer Networks Packet Scheduling and QoS
EE 122: Intra-domain routing: Link State
Control-Data Plane Separation
Distributed Systems CS
Presentation transcript:

EE 122: Review for 1st Midterm Computer Science Division Department of Electrical Engineering and Computer Science University of California, Berkeley, Berkeley, CA 94720-1776 September 28, 2004

Outline Performance Metrics; Router vs. Switch Layering and End-to-End Arguments Queueing Theory: Little Theorem and M/M/1 Queue Routing: Distance Vector and Link State protocol Router Architecture

Definitions Link bandwidth (capacity): maximum rate (in bps) at which the sender can send data along the link Propagation delay: time it takes the signal to travel from source to destination Packet transmission time: time it takes the sender to transmit all bits of the packet Queuing delay: time the packet need to wait before being transmitted because the queue was not empty when it arrived Processing Time: time it takes a router/switch to process the packet header, manage memory, etc

Sending One Packet R bits per second (bps) Bandwidth: R bps Propagation delay: T sec T seconds P bits time Transmission time = P/R T Propagation delay =T = Length/speed_of_light 1/speed = 3.3 nsec in free space 4 nsec in copper 5 nsec in fiber

Router: Store and Forward A packet is stored (enqueued) before being forwarded (sent) 10 Mbps 5 Mbps 100 Mbps 10 Mbps Receiver Sender time

Switch: Cut-Through A packet starts being forwarded (sent) as soon as its header is received R1 = 10 Mbps R2 = 10 Mbps Receiver Sender Header time What happens if R2 > R1 ?

Outline Performance Metrics; Router vs. Switch Layering and End-to-End Arguments Queueing Theory: Little Theorem and M/M/1 Queue Routing: Distance Vector and Link State protocol Router Architecture

Layering: The Problem (cont’d) HTTP Application Telnet FTP NFS Coaxial cable Fiber optic Packet radio Transmission Media Re-implement every application for every technology? No! But how does the Internet architecture avoid this?

Layering: Solution Introduce an intermediate layer that provides a single abstraction for various network technologies New application just need to be written for intermediate layer New transmission media just need to provide abstraction of intermediate layer Application SMTP SSH NFS HTTP Intermediate layer Coaxial cable Fiber optic Packet radio Transmission Media

Layering Layering is a particular form of modularization System is broken into a vertical hierarchy of logically distinct entities (layers) Service provided by one layer is based solely on the service provided by layer below Rigid structure: easy reuse, performance suffers

ISO OSI Reference Model for Layers Application Presentation Session Transport Network Datalink Physical

OSI Model Concepts Service: what a layer does Service interface: how to access the service Interface for layer above Peer interface (protocol): how peers communicate Set of rules and formats that govern the communication between two network boxes Protocol does not govern the implementation on a single machine, but how the layer is implemented between machines

Layering: Internet Universal Internet layer: Internet has only IP at the Internet layer Many options for modules above IP Many options for modules below IP IP LAN Packet radio TCP UDP Telnet FTP DNS Application Transport Internet Net access/ Physical

Hourglass

Implications of Hourglass Single Internet layer module: Allows networks to interoperate Any network technology that supports IP can exchange packets Allows applications to function on all networks Applications that can run on IP can use any network Simultaneous developments above and below IP

E2E Arguments: Where to Place Functionality? Most influential paper about placing functionality is “End-to-End Arguments in System Design” by Saltzer, Reed, and Clark “Sacred Text” of the Internet Endless disputes about what it means Everyone cites it as supporting their position

E2E Arguments: Moderate Interpretation Think twice before implementing functionality in the network If hosts can implement functionality correctly, implement it a lower layer only as a performance enhancement But do so only if it does not impose burden on applications that do not require that functionality

Outline Performance Metrics; Router vs. Switch Layering and End-to-End Arguments Queueing Theory: Little Theorem and M/M/1 Queue Routing: Distance Vector and Link State protocol Router Architecture

Little’s Theorem Assume a system at which packets arrive at rate λ Let d be mean delay of packet, i.e., mean time a packet spends in the system Q: What is the mean (average) number of packets in the system (N) ? d = mean delay λ – mean arrival rate system A: N = λ x d

Example λ = 1 N = λ x d = 5 d = 5 N = 5 packets packets time d = 5 1 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Queueing: M/M/1 Queue λ – mean arrival rate (1/λ – mean inter-arrival time) µ - mean service rate (1/ µ - mean service time) d – mean delay d = (1/µ)/(1 – u) d 1/µ 1 u (load)

Queueing: More Intuition Q: Why does the delay increases so much when u  1? A: Because in general the arrival process is bursty not uniform

Queueing: Uniform Arrival (a) λ = 0.1 packets/sec; a packet arrives every 10sec µ = 0.2 packets/sec; a packet is transmitted in 5sec (assume all packets have the same size) u = λ/µ = 0.5 red – packet arrival; blue – number of bits in the queue bits in queue d = 5 sec …. 15 25 35 45 55 65 5 10 20 30 40 50 60 time (sec) Packet size Packet transmission starts ends 5 delay

Queueing: Uniform Arrival (b) λ = 0.125 packets/sec; a packet arrives every 8 sec bits in queue d = 5 sec …. 5 8 13 16 19 24 29 32 37 40 45 48 53 time (sec) (c) λ = 0.2 packets/sec; a packet arrives every 5 sec bits in queue d = 5 sec …. 5 10 15 20 25 30 35 time (sec) With uniform traffic delay remains constant when utilization <= 1

Queueing: Bursty Arrival During each 50sec interval: - send packets at rate 2λ in the first 25sec (busy period) - no packets during the last 25sec (idle period) Note: average arrival rate still λ (a) λ = 0.1 packets/sec; during busy period a packet arrives every 5 sec bits in queue d = 5 sec 5 10 15 20 25 50 55 60 65 70 75 time (sec)

Queueing: Bursty Arrival (b) λ = 0.125 packets/sec (u=0.625); during busy period a packet arrives every 4 sec d = 8sec bits in queue 4 8 12 16 20 24 50 time (sec) 5 10 15 20 25 30 35 d = ((5-0) + (10-4) + (15-8) + (20-12) + (25-16) + (30-20) + (35-24))/7 = = (5+6+7+8+9+10+11)/7 = 8

Queueing: Bursty Arrival (c) λ = 0.2 packets/sec (u = 1); during busy period a packet arrives every 2.5 sec d = 16.25sec bits in queue … 5 10 22.5 time (sec) 2.5 7.5 5 10 15 20 25 30 35 40 45 50 d = ((5-0) + (10-2.5) + (15-5) + (20-7.5) + (25-10) + … + 50-22.5)/10 = (5+7.5+10+12.5+15+17.5+20+22.5+25+27.5)/10 = 10 With bursty traffic delay increases as utilization increases

Queueing: Uniform vs. Bursty Arrival d 16.25 8 5 u (load) 0.5 0.625 1 With M/M/1 things get even worse as: Busy periods get larger as load increases Packets have different size (exponentially distributed sizes)

Outline Performance Metrics; Router vs. Switch Layering and End-to-End Arguments Queueing Theory: Little Theorem and M/M/1 Queue Routing: Distance Vector and Link State protocol Router Architecture

Routing Problem Assume A network with N nodes, where each edge is associated a cost A node knows only its neighbors and the cost to reach them How does each node learns how to reach every other node along the shortest path? A E D C B F 2 1 3 5

Routing Protocols Compute and maintain routing tables A node’s routing table contains the information on how to reach every other node in the network Two routing algorithms Distance vector Link state

Distance Vector: Control Traffic When the routing table of a node changes, the node sends its table to its neighbors A node updates its table with information received from its neighbors Host A Host B Host E Host D Host C N1 N2 N3 N4 N5 N7 N6

Example: Distance Vector Algorithm Node A Node B Dest. Cost NextHop B 2 C 7 D ∞ - Dest. Cost NextHop A 2 C 1 D 3 3 B D 2 1 1 A C 7 Node C Node D 1 Initialization: 2 for all neighbors V do 3 if V adjacent to A 4 D(A, V) = c(A,V); 5 else 6 D(A, V) = ∞; … Dest. Cost NextHop A 7 B 1 D Dest. Cost NextHop A ∞ - B 3 C 1

Example: 1st Iteration (C  A) Node A Node B Dest. Cost NextHop B 2 C 7 D ∞ - Dest. Cost NextHop A 2 C 1 D 3 3 B D 2 1 1 A C 7 (D(C,A), D(C,B), D(C,D)) … 7 loop: 12 else if (update D(V, Y) received from V) 13 for all destinations Y do 14 if (destination Y through V) 15 D(A,Y) = D(A,V) + D(V, Y); 16 else 17 D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 19 send D(A, Y) to all neighbors 20 forever Node C Node D Dest. Cost NextHop A 7 B 1 D Dest. Cost NextHop A ∞ - B 3 C 1

Example: 1st Iteration (C  A) Node A Node B Dest. Cost NextHop B 2 C 7 D 8 Dest. Cost NextHop A 2 C 1 D 3 3 B D 2 1 1 A C 7 D(A, D) = min(D(A, D), D(A, C) + D(C,D) = min(∞ , 7 + 1) = 8 … 7 loop: 12 else if (update D(V, Y) received from V) 13 for all destinations Y do 14 if (destination Y through V) 15 D(A,Y) = D(A,V) + D(V, Y); 16 else 17 D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 19 send D(A, Y) to all neighbors 20 forever (D(C,A), D(C,B), D(C,D)) Node C Node D Dest. Cost NextHop A 7 B 1 D Dest. Cost NextHop A ∞ - B 3 C 1

Example: 1st Iteration (C  A) Node A Node B Dest. Cost NextHop B 2 C 7 D 8 Dest. Cost NextHop A 2 C 1 D 3 3 B D 2 1 1 A C 7 … 7 loop: 12 else if (update D(V, Y) received from V) 13 for all destinations Y do 14 if (destination Y through V) 15 D(A,Y) = D(A,V) + D(V, Y); 16 else 17 D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 19 send D(A, Y) to all neighbors 20 forever Node C Node D Dest. Cost NextHop A 7 B 1 D Dest. Cost NextHop A ∞ - B 3 C 1

Example: 1st Iteration (BA, CA) Node A Node B Dest. Cost NextHop B 2 C 3 D 5 Dest. Cost NextHop A 2 C 1 D 3 3 B D 2 1 1 A C 7 … 7 loop: 12 else if (update D(V, Y) received from V) 13 for all destinations Y do 14 if (destination Y through V) 15 D(A,Y) = D(A,V) + D(V, Y); 16 else 17 D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 19 send D(A, Y) to all neighbors 20 forever D(A,D) = min(D(A,D), D(A,B) + D(B,D)) = min(8, 2 + 3) = 5 D(A,C) = min(D(A,C), D(A,B) + D(B,C)) = min(7, 2 + 1) = 3 Node C Node D Dest. Cost NextHop A 7 B 1 D Dest. Cost NextHop A ∞ - B 3 C 1

Example: End of 1st Iteration Node A Node B Dest. Cost NextHop B 2 C 3 D 5 Dest. Cost NextHop A 2 C 1 D 3 B D 2 1 1 A C 7 … 7 loop: 12 else if (update D(V, Y) received from V) 13 for all destinations Y do 14 if (destination Y through V) 15 D(A,Y) = D(A,V) + D(V, Y); 16 else 17 D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 19 send D(A, Y) to all neighbors 20 forever Node C Node D Dest. Cost NextHop A 3 B 1 D Dest. Cost NextHop A 2 B 3 C 1

Example: End of 3nd Iteration Node A Node B Dest. Cost NextHop B 2 C 3 D 4 Dest. Cost NextHop A 2 C 1 D 3 B D 2 1 1 A C 7 … 7 loop: 12 else if (update D(V, Y) received from V) 13 for all destinations Y do 14 if (destination Y through V) 15 D(A,Y) = D(A,V) + D(V, Y); 16 else 17 D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 19 send D(A, Y) to all neighbors 20 forever Node C Node D Dest. Cost NextHop A 3 B 1 D Dest. Cost NextHop A 4 C B 2 1 Nothing changes  algorithm terminates

Link State: Control Traffic Each node floods its local information to every other node in the network Each node ends up knowing the entire network topology  use Dijkstra to compute the shortest path to every other node Host A Host B Host E Host D Host C N1 N2 N3 N4 N5 N7 N6

Link State: Node State Host A Host B Host E Host D Host C N1 N2 N3 N4

Example: Dijkstra’s Algorithm Step 1 2 3 4 5 start S A D(B),p(B) 2,A D(C),p(C) 5,A D(D),p(D) 1,A D(E),p(E) D(F),p(F) 1 Initialization: 2 S = {A}; 3 for all nodes v 4 if v adjacent to A 5 then D(v) = c(A,v); 6 else D(v) = ; … 5 3 B C 2 5 A 2 1 F 3 1 2 D E 1

Example: Dijkstra’s Algorithm Step 1 2 3 4 5 start S A AD D(B),p(B) 2,A D(C),p(C) 5,A 4,D D(D),p(D) 1,A D(E),p(E) 2,D D(F),p(F) … 8 Loop 9 find w not in S s.t. D(w) is a minimum; 10 add w to S; update D(v) for all v adjacent to w and not in S: 12 D(v) = min( D(v), D(w) + c(w,v) ); 13 until all nodes in S; 5 3 B C 2 5 A 2 1 F 3 1 2 D E 1

Example: Dijkstra’s Algorithm Step 1 2 3 4 5 start S A AD ADE D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) 2,D D(F),p(F) 4,E … 8 Loop 9 find w not in S s.t. D(w) is a minimum; 10 add w to S; update D(v) for all v adjacent to w and not in S: 12 D(v) = min( D(v), D(w) + c(w,v) ); 13 until all nodes in S; 5 3 B C 2 5 A 2 1 F 3 1 2 D E 1

Example: Dijkstra’s Algorithm Step 1 2 3 4 5 start S A AD ADE ADEB D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) 2,D D(F),p(F) 4,E … 8 Loop 9 find w not in S s.t. D(w) is a minimum; 10 add w to S; update D(v) for all v adjacent to w and not in S: 12 D(v) = min( D(v), D(w) + c(w,v) ); 13 until all nodes in S; 5 3 B C 2 5 A 2 1 F 3 1 2 D E 1

Example: Dijkstra’s Algorithm Step 1 2 3 4 5 start S A AD ADE ADEB ADEBC D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) 2,D D(F),p(F) 4,E … 8 Loop 9 find w not in S s.t. D(w) is a minimum; 10 add w to S; update D(v) for all v adjacent to w and not in S: 12 D(v) = min( D(v), D(w) + c(w,v) ); 13 until all nodes in S; 5 3 B C 2 5 A 2 1 F 3 1 2 D E 1

Example: Dijkstra’s Algorithm Step 1 2 3 4 5 start S A AD ADE ADEB ADEBC ADEBCF D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) 2,D D(F),p(F) 4,E … 8 Loop 9 find w not in S s.t. D(w) is a minimum; 10 add w to S; update D(v) for all v adjacent to w and not in S: 12 D(v) = min( D(v), D(w) + c(w,v) ); 13 until all nodes in S; 5 3 B C 2 5 A 2 1 F 3 1 2 D E 1

Distance Vector vs. Link State Highly scalable Can converge very slowly when cost of a link increase Not robust Link state: Fast convergence Robust Less scalable (updates are flooded in the network)

Outline Performance Metrics; Router vs. Switch Layering and End-to-End Arguments Queueing Theory: Little Theorem and M/M/1 Queue Routing: Distance Vector and Link State protocol Router Architecture

IP Routers Router consists of Router implements Set of input interfaces where packets arrive Set of output interfaces from which packets depart Some form of interconnect connecting inputs to outputs Router implements (1) Forward packet to corresponding output interface (2) Manage bandwidth and buffer space resources Router 5 7 4 8 6 11 10 2 13 12 3 1

Generic Architecture Input and output interfaces are connected through an interconnect Interconnect can be implemented by Shared memory Low capacity routers (e.g., PC-based routers) Shared bus Medium capacity routers Point-to-point (switched) bus High capacity routers input interface output interface Inter- connect

Interconnect Point-to-point switch allows simultaneous transfer of packet between any two disjoint pairs of input-output interfaces Goal: come-up with a schedule that Provides Quality of Service Maximizes router throughput Challenges: Address head-of-line blocking at inputs Resolve input/output speedups contention Avoid packet dropping at output if possible Note: packets are fragmented in fix sized cells at inputs and reassembled at outputs

Output Queued Routers Only output interfaces store packets Advantages Easy to design algorithms: only one congestion point Disadvantages Requires an output speedup of N, where N is the number of interfaces  not feasible input interface output interface Backplane RO C

Input Queued Routers Only input interfaces store packets Advantages Easy to build Store packets at inputs if contention at outputs Relatively easy to design algorithms Only one congestion point, but not output… Need to implement backpressure Disadvantages Hard to achieve utilization  1 (due to output contention, head-of-line blocking) However, theoretical and simulation results show that for realistic traffic an input/output speedup of 2 is enough to achieve utilizations close to 1 input interface output interface Backplane RO C

Head-of-line Blocking Cell at head of an input queue cannot be transferred, thus blocking the following cells Cannot be transferred because is blocked by red cell Input 1 Output 1 Cannot be transferred because output buffer overflow Input 2 Output 2 Input 3 Output 3

Solution to Avoid Head-of-line Blocking Maintain at each input N virtual queues, i.e., one per output port Input 1 Output 1 Output 2 Input 2 Output 3 Input 3

Midterm Information Date: 30 September 2004 Time: 6:40-8pm Place: 277 Cory Hall Thursday: NO class Extended professor office hours Closed books; 8,5”x11” crib sheet (both sides) No calculators, PDAs, cell phones with cameras, etc Please use PENCIL and ERASER

Other Information Ion’s office hour on Wednesday has moved from 4-5pm to 5-6pm Lecture on October 12 will be given by Sally Floyd She is the authority in the area of TCP