Download presentation
Presentation is loading. Please wait.
1
EE 122: Review for 1st Midterm
Computer Science Division Department of Electrical Engineering and Computer Science University of California, Berkeley, Berkeley, CA 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
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
5
Router: Store and Forward
A packet is stored (enqueued) before being forwarded (sent) 10 Mbps 5 Mbps 100 Mbps 10 Mbps Receiver Sender time
6
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 ?
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
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?
9
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
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
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
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 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
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/µ 1 u (load)
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
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
24
Queueing: Uniform Arrival
(b) λ = 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
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 5 10 15 20 25 50 55 60 65 70 75 time (sec)
26
Queueing: Bursty Arrival
(b) λ = 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 = = ( )/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 … 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) + … )/10 = ( )/10 = 10 With bursty traffic delay increases as utilization increases
28
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)
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
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
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
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
33
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 if V adjacent to A D(A, V) = c(A,V); 5 else D(A, V) = ∞; … Dest. Cost NextHop A 7 B 1 D Dest. Cost NextHop A ∞ - B 3 C 1
34
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) for all destinations Y do if (destination Y through V) D(A,Y) = D(A,V) + D(V, Y); else D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 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
35
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) for all destinations Y do if (destination Y through V) D(A,Y) = D(A,V) + D(V, Y); else D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 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
36
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) for all destinations Y do if (destination Y through V) D(A,Y) = D(A,V) + D(V, Y); else D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 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
37
Example: 1st Iteration (BA, CA)
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) for all destinations Y do if (destination Y through V) D(A,Y) = D(A,V) + D(V, Y); else D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 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
38
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) for all destinations Y do if (destination Y through V) D(A,Y) = D(A,V) + D(V, Y); else D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 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
39
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) for all destinations Y do if (destination Y through V) D(A,Y) = D(A,V) + D(V, Y); else D(A, Y) = min(D(A, Y), D(A, V) + D(V, Y)); 18 if (there is a new minimum for dest. Y) 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
40
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
41
Link State: Node State Host A Host B Host E Host D Host C N1 N2 N3 N4
42
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 if v adjacent to A then D(v) = c(A,v); else D(v) = ; … 5 3 B C 2 5 A 2 1 F 3 1 2 D E 1
43
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 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: 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
44
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 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: 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
45
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 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: 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
46
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 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: 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
47
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 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: 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
48
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)
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 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
51
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
52
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
53
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
54
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
55
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
56
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
57
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
58
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.