1 / 58

EE 122: Review for 1 st Midterm

EE 122: Review for 1 st 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

rgabriela
Download Presentation

EE 122: Review for 1 st Midterm

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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

  2. 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

  3. 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

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

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

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

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

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

  9. HTTP Packet radio 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 SSH NFS SMTP Application Intermediate layer Coaxial cable Fiber optic Transmission Media

  10. 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

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

  12. 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

  13. Telnet FTP DNS TCP UDP IP Packet radio LAN 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 Application Transport Internet Net access/ Physical

  14. Hourglass

  15. 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

  16. 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

  17. 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

  18. 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

  19. 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

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

  21. 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/µ u (load) 1

  22. 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

  23. 15 25 35 45 65 55 Packet size 0 5 delay Packet transmission starts Packet transmission ends 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 …. 5 time (sec) 0 10 20 30 40 50 60

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

  25. 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 time (sec) 10 60 0 5 15 20 25 50 55 65 70 75

  26. 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 time (sec) 8 0 4 12 16 20 24 50 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

  27. 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 … time (sec) 22.5 5 0 10 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

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

  29. 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

  30. 5 3 5 2 2 1 3 1 2 1 C D B A E F 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?

  31. 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

  32. Host C Host D Host A N2 N1 N3 N5 Host B Host E N4 N6 N7 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

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

  34. C D B A (D(C,A), D(C,B), D(C,D)) Example: 1st Iteration (C  A) Node A Node B 3 2 1 1 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

  35. D(A, D) = min(D(A, D), D(A, C) + D(C,D) = min(∞ , 7 + 1) = 8 D C B A Example: 1st Iteration (C  A) Node A Node B 3 2 1 1 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(C,A), D(C,B), D(C,D)) Node C Node D

  36. C D B A Example: 1st Iteration (C  A) Node A Node B 3 2 1 1 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

  37. 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 D C B A Example: 1st Iteration (BA, CA) Node A Node B 3 2 1 1 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

  38. C D B A Example: End of 1st Iteration Node A Node B 3 2 1 1 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

  39. C D B A Example: End of 3nd Iteration Node A Node B 3 2 1 1 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 Nothing changes  algorithm terminates

  40. Host C Host D Host A N2 N1 N3 N5 Host B Host E N4 N6 N7 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

  41. C C C C C C C A A A A A A A D D D D D D D Host C Host D Host A B B B B B B B E E E E E E E N2 N1 N3 N5 Host B Host E N4 N6 N7 Link State: Node State

  42. C D E A B F Example: Dijkstra’s Algorithm D(B),p(B) 2,A D(D),p(D) 1,A D(C),p(C) 5,A D(E),p(E) Step 0 1 2 3 4 5 start S A 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 5 2 2 1 3 1 2 1

  43. C D E A B F Example: Dijkstra’s Algorithm D(B),p(B) 2,A D(D),p(D) 1,A D(C),p(C) 5,A 4,D D(E),p(E) 2,D Step 0 1 2 3 4 5 start S A AD 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 5 2 2 1 3 1 2 1

  44. C D E A B F Example: Dijkstra’s Algorithm D(B),p(B) 2,A D(D),p(D) 1,A D(C),p(C) 5,A 4,D 3,E D(E),p(E) 2,D Step 0 1 2 3 4 5 start S A AD ADE 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 5 2 2 1 3 1 2 1

  45. C D E A B F Example: Dijkstra’s Algorithm D(B),p(B) 2,A D(D),p(D) 1,A D(C),p(C) 5,A 4,D 3,E D(E),p(E) 2,D Step 0 1 2 3 4 5 start S A AD ADE ADEB 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 5 2 2 1 3 1 2 1

  46. C D E A B F Example: Dijkstra’s Algorithm D(B),p(B) 2,A D(D),p(D) 1,A D(C),p(C) 5,A 4,D 3,E D(E),p(E) 2,D Step 0 1 2 3 4 5 start S A AD ADE ADEB ADEBC 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 5 2 2 1 3 1 2 1

  47. C D E A B F Example: Dijkstra’s Algorithm D(B),p(B) 2,A D(D),p(D) 1,A D(C),p(C) 5,A 4,D 3,E D(E),p(E) 2,D Step 0 1 2 3 4 5 start S A AD ADE ADEB ADEBC ADEBCF 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 5 2 2 1 3 1 2 1

  48. Distance Vector vs. Link State • Distance Vector: • 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)

  49. 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

  50. IP Routers • Router consists of • 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

More Related