course review: part 1 eecs 122: lecture 29 department of electrical engineering and computer...
Post on 21-Dec-2015
214 views
TRANSCRIPT
Course Review: Part 1 EECS 122: Lecture 29
Department of Electrical Engineering and Computer Sciences
University of California
Berkeley
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
2
Today
Cover the main points from the following topics Router Lookup and Scheduling QoS Distributed Algorithms Multicast Overlay Networks Error Correction Physical Layer
Goal: Emphasize what is important For topics before the midterm look at the slides of
the earlier review
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
3
Review: Switch Architectures
Input Queued Faster switch Two congestion points
HOL
Output Queued Slower switch
Backplane speedup is N One point of congestion
input interface output interface
Backplane
CRO
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
4
How a router manages traffic
Fast routing table lookups Exact and LPM
How to resolve router congestion? Assume output queued Focus on scheduling
Already covered packet dropping
End-to-End peformance yields QoS
input interface output interface
Backplane
CRO
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
5
LPM in IP Routers“Patricia” trie
Example Prefixesa) 00001b) 00010c) 00011d) 001e) 0101f) 011g) 100h) 1010i) 1100
j) 11110000
e
f g
h i
j Skip 51000
0 1
a b c
d
Nick Mckeown
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
6
Fairness
Suppose there are N applications sharing the network Each application j can express its satisfaction with network
performance in terms of Uj(r), where r = (r1,…,rN) is the rate allocated to the applications. Most common utility function is Uj(r) =r for all j
If the user can’t use more than a rate of C then Uj(r) =C for all r≥ C.
What is a fair allocation of the throughputs? Fairness is vague so there are many definitions
Maximize the sum of utilities: May penalize some apps Max-Min Fair
Know how to compute this for applications that traverse multiple links (hw)
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
7
Network Effects on Traffic from a Single Flow
CumulativeBits
Time
delaySource
Router n
bits in thenetwork
Svc function at router 1 is arrival function at
router 2
Router 1
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
8
How to control delay?
1. Overprovision the network Maybe one day for voice and video but not today
2. Circuit Switch
3. Packet switch with more state than a datagram network
Try to be smart about managing limited resources
Per flow? Per aggregate class?
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
9
Scheduling
Scheduling in conjunction with packet dropping control performance within a router
Scheduling mechanisms determine how the bandwidth of an output port is shared Mainly used to manage
delay Scheduling is only
effective if packet buffers are large enough to matter
R(f1)
A(t) D(t)
Model of router queues
R(f2)
R(fM)
A1(t)
A2(t)
AM(t)
SchedulingDiscipline
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
10
Generalized Processor Sharing Each class j has a weight wj If there is traffic to be served from class j at time t
we say that it is Backloged at time t. B(t) is the set of backlogged classes at time t W(t) is the total weight of the backlogged classes at time t
If there is even one backlogged class, the server operates at rate C This is called being work conserving
Serve the classes in proportion to their weights If class j is backlogged at time t, give it service rate
Sj(t) = [wj/W(t)] * C GPS desirable properties
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
11
Generalized Processor Sharing
Delay =4
Delay =5
B(2)={1,2}B(4)={2}
Class 1 Class 2 w1 = w2
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
12
Adjust weights to change delay
Delay =5Delay =4
B(2)={1,2}B(4)={1}
Class 1 Class 2 3w1 = w2
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
13
Weighted Fair Queueing
Work Conserving Tracks GPS
Simulates the arrivals in real-time in a GPS system.
Serves entire packets (only one class at a time) Let Fp be the time that the last bit of packet p
departs the simulated GPS system WFQ attempts to serve packets in order of Fp
Also called “Packetized Generalized Processor Sharing” (PGPS)
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
14
QoS
QoS Building Blocks: Application describes required level of
QoS (Token Buckets) Resource Reservation (RSVP) Per Hop (Router) Mechanisms:
What efforts are underway to move towards QoS in the internet? IntSrv DiffSrv
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
15
The Token Bucket
Tokensat rate,
Token bucketsize,
Packet buffer
Packets Packets
One byte (or packet) per
token
ρ: average rateσ: burstiness
Nick Mckeown
A(s,t) ≤σ+ρ(t-s)
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
16
How the user/flow can conform to the Token Buckets
Tokensat rate,
Token bucketsize
Variable bit-ratecompression
To network
time
bytes
time
bytes
time
bytes
C
A(s,t) ≤σ+ρ(t-s)
Nick Mckeown
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
17
Result
If all of the routers do per-flow WFQ then explicit worst case end to end delay bounds are possible for a variety of different weighting schemes.
Special Case of small packets (GPS): There are N flows and they are where the ith flow has token bucket (σj,ρj). Set the weight of flow j to ρj at each router. Then the worst case delay for flow j is less than σj/ρj The Backlog Clearing Rate is > ρj at each router
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
18
Resource Reservation Protocol: RSVP Establishes end-to-end reservations over a datagram network. Sources
Instead of sending to one receiver send to a GROUP RSVP was designed with multicast in mind
Send TSPEC to the group Receivers
Join a “group” associated with the sender Initiate reservations of the network
Network Establishes the group Helps determine the path Learns the TSPEC Responds to receiver-based reservations
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
19
RSVP Basic Operations
Two message types: PATH and RESV Sender sends PATH message via the data delivery path
TSPEC – use token bucket Set up the path state on each router including the address of
previous hop Receiver sends RESV message on the reverse path
Specify the reservation style, QoS desired Queueing delay and bandwidth requirements
Source traffic characteristics (from PATH) Set up the reservation state at each router
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
20
Intserv Node Architecture
Admission Control
Data InData Out
Con
trol P
lan
eD
ata
Pla
ne
Scheduler
Routing Routing
MessagesRSVP
messages
Classifier
RSVP
Route Lookup
Forwarding Table Per Flow QoS Table
Kinds of Service:1. Guaranteed2. Controlled Load3. Best Effort
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
21
Diffserv Architecture
Ingress routers Police/shape traffic Set Differentiated Service Code Point (DSCP) in Diffserv (DS) field
Core routers Implement Per Hop Behavior (PHB) for each DSCP Process packets based on DSCP
IngressEgressEgress
IngressEgressEgress
DS-1 DS-2
Edge router Core router
Its all about the domain
Kinds of Service:1. Premium2. Assured3. Best Effort
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
22
Comparison
Best-Effort Diffserv Intserv
Service Connectivity
No isolation
No guarantees
Per aggregate isolation
Per aggregate guarantee
Per flow isolation
Per flow guarantee
Service scope
End-to-end Domain End-to-end
Complexity No setup Long term setup Per flow steup
Scalability Highly scalable (nodes maintain only routing state)
Scalable
(edge routers maintains per aggregate state; core routers per class state)
Not scalable (each router maintains per flow state)
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
23
Distributed Algorithms
Focus on the algorithms behind protocols How to move from Centralized to Distributed Alg. Synchronous and Asynchronous computation
Why does the Asynchronous Bellman Ford converge? What are the effects of a changing topology on
algorithm design? How can protocols be designed to protect against
dishonest nodes
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
24
Synchronous v/s Asynchronous Algorithms Synchronous algorithms can be described in terms
of global iterations. The time taken for a given iteration is the time taken for the slowest processor to complete that iteration: time driven E.g. TDM or SONET
Asynchronous algorithms execute at a processor based on received messages and internal state: event driven E.g. IP protocols which must run over heterogeneous
systems Study how this applies to Bellman Ford
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
25
Synchronization Penalty1
34
6
2
5
1
4
1 1
4
2
3
1
1 32
1 32
idle idle idle
Node 1
Node 6
idleidleidle
1 32 Node 5
Slot size is affected by the slow (1,6) link
Penalty can be huge!
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
26
Local Synchronization1
34
6
2
5
1
4
1 1
4
2
3
1
Send update k after you’ve heard update k-1 from all neighbors.
1 32
1 32
idle idle idle
idleidleidle
Node 3
Node 4
1 32 Node 5
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
27
Asynchronous computation1
34
6
2
5
1
4
1 1
4
2
3
1
1 2
1 32
idleidleidle
Node 1
Node 6
1 32 Node 5
No notion of “slot size”
What paths will this compute??
3 4 5 6 7 8 9 10 11 12 13 14 15 16
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
28
Soft State
State with Time-Out Example: A host joins a group by sending a “join” message to a
“host manager”. The manager adds the host to the group for the next T seconds. If the host wants to stay in the group it must send a refresh message within T seconds to the manager. Otherwise it is dropped.
Advantage: Manager robust to host failure Disadvantage: Too many messages Most internet protocols use this way of communicating Trades of simplicity of correctness with complexity of
communication
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
29
Trustworthiness
Three levels Honest: Always in conformance of the protocol Selfish: May lie to get better performance out of
the protocol (BGP) Malicious: Unpredictable
Internet Protocols (for the most part) assume Honest protocol agents Unreliable infrastructure
Infrastructure has gotten more reliable, and agents have gotten less honest…
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
30
The Multicast service Model
R0 joins G
R1 joins G
Rn-1 joins G
S
R0
R1
.
.
.
[G, data]
[G, data]
[G, data]
[G, data]
Rn-1
Net
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
31
Multicast and Layering
Multicast can be implemented at different layers
data link layer e.g. Ethernet multicast
network layer e.g. IP multicast
application layer e.g. as an overlay network like Kazaa
Which layer is best?
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
32
Routing: Approaches
Kinds of Trees Shared Tree Source Specific Trees
Tree Computation Methods Intradomain Update methods
Build on unicast Link State: MOSPF Build on unicast Distance Vector: DVMRP Protocol Independent: PIM
Interdomain routing: BGMP This is still evolving…
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
33
What to do if most of the routers in the internet are not multicast enabled?
Tunnel between multicast enabled routers
Creates an “overlay” network but both operate at Level 3…
This is how multicast was first deployed
MBONE
IP
IPM
IPM
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
34
Core Based Trees (CBT)
Pick a “rendevouz point” for the group called the core.
Shared tree Unicast packet to core and bounce it back to
multicast group Tree construction is receiver-based
Joins can be tunneled if required Only nodes on One tree per group tree involved
Reduce routing table state from O(S x G) to O(G)
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
35
PIM
Popular intradomain method UUNET streaming using this
Recognizes that most groups are very sparse Why have all of the routers participate in keeping
state? Two modes
Dense mode: flood and prune Sparse mode: Core-based shared tree approach
with a twist
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
36
Scalable Reliable Multicast (SRM) Randomize NACKs (request repairs) All traffic including request repairs and repairs are
multicast A repair can be sent by any node that heard the
request A node suppresses its request repair if another node
has just sent a request repair for the same data item
A node suppresses a repair if another node has just sent the repair
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
37
Application Layer Multicast
Provide multicast functionality above the IP unicast Gateway nodes could be the hosts or multicast
gateways in the network Advantages
No multicast dial-tone needed Performance can be optimized to application
Loss, priorities etc. More control over the topology of the tree Easier to monitor and control groups
Disadvantages Scale Performance if just implemented on the hosts (not
gateways)
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
38
A network defined over another set of networks
The overlay addresses its own nodes Links on one layer are network
segments of lower layers Requires lower layer routing to be
utilized Overlaying mechanism is called
tunneling
A’
Overlay network
A
A
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
39
Three kinds of Overlays1. Only Hosts: Peer to Peer Networks (P2P)
Example: Gnutella, Napster
2. Only Gateway nodes: Infrastructure Overlays Content Distribution Networks (CDNs)
Example: Akamai
3. Host and Gateway Nodes: Virtual Private Networks
Overlay node structure Regular: Chord, Pastry Adhoc: Gnutella
Kinds of Overlay Networks
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
40
Two kinds of overlays functions Overlay provides access to distributed resources Overlay facilitates communication among other client applications
Two kinds of client connectivty Direct: P2P Not direct: Akamai
Overlay Network Operations Select Virtual Edges (fast or slow timescales) Overlay Routing Protocol Edge Mapping Resource Location
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
41
Content Addressable Network (CAN) Associate to each node and item a unique id
in an d-dimensional space Properties
Routing table size O(d) Guarantee that a file is found in at most d*n1/d
steps, where n is the total number of nodes Virtual Topology related to actual topology
using “binning”
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
42
Bottom line on Overlays
Overlays are an irreversible trend in network Overlays add new functions to the network
infrastructure much faster than by trying to integrate them in the router relying on a infrastructure service provider on deploy the
function Disadvantages
Overlay nodes can create performance bottlenecks New end-to-end protocols may not work since the overlay
nodes don’t understand them Generally better to improve performance by building
an “underlay” and add functionality by building an overlay
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
43
Link Functions
Functions1. Construct Frame with Error Detection Code2. Encode bit sequence into analog signal3. Transmit bit sequence on a physical medium (Modulation)4. Receive analog signal5. Convert Analog Signal to Bit Sequence6. Recover errors through error correction and/or ARQ
AdaptorAdaptor AdaptorAdaptorSignal
Adaptor: convert bits into physical signal and physical signal back into bits
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
45
Framing
Goal: send a block of bits (frames) between nodes connected on the same physical media
This service is provided by the data link layer Use a special byte (bit sequence) to mark the
beginning (and the end) of the frame Problem: what happens if this sequence
appears in the data payload?
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
46
Approaches
Byte/Bit oriented Stuffing v/s frame count Clock-based (Sonet)
Looks at the path not just the link
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
47
Link Layer Reliable Transmission Prevalent Approach
Detect errors using error detection codes Use retransmission methods (e.g. Go back n)
Alternative Approach Use error correction codes (e.g. perfect parity codes)
Algorithmic challenges: Achieve high link utilization, and low overhead
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
48
Error detection
The frame consists of a header and payload
If all n-bit strings are valid payload strings, the error detection must occur in the header bits
Break the header into two parts
Error detecting code part contains bits that add redundancy
PayloadHeader
Payload EDCFH
n bits
k bitsn bits
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
49
Error Detecting Codes
Goals: Reduce overhead, i.e., reduce the number of
redundancy bits Increase the number and the type of bit error
patterns that can be detected Examples:
Even Parity Rectangular Codes Cyclic Redundancy Check (CRC)
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
50
Hamming Distance
Given codewords A and B, the Hamming distance between them is the number of bits in A that need to be flipped to turn it into B Example H(011101,000000)=4
If all codewords are at least d Hamming distance apart, then up to d-1 bit errors can be detected
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
51
Error Correction
If all the codewords are at least a hamming distance of 2E+1 apart then up to E bit errors can be corrected Just pick the codeword closest to the one received!
How many bits of EDC are required to correct d errors when there are n bits in the payload?
Example: d=1: Suppose n=3. Then any payload can be transformed into 3 other payload strings (000 into 001, 010 or 100). Need at least two bits in the ECD to differentiate between 4
possibilities In general need at least k ≥ log2(n+1) bits A scheme that is optimal is called a perfect parity code
Perfect Codes
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
52
Error correction or Retransmission? Error Correction requires a lot of redundancy
Wasteful if errors are unlikely Retransmission strategies are more popular
As links get reliable this is just done at the transport layer
Error correction is useful when retransmission is costly (satellite links, multicast)
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
53
Noise limits the link rate
Suppose there were no noise and no measurement error E.g. Send s(t) always receive s(t+Δ) Take a message of N bits say b1b2….bN, and send a pulse of
amplitude of size 0.b1b2….bN Can send at an arbitrarily high rate This is true even if the link distorts the signal but in a known way
In practice the signal always gets distorted in an unpredictable (random) way Receiver tries to estimate the effects but this lowers the effective
rate One way to mitigate noise is to jack up the power of the signal Signal to Noise ratio (SNR) measures the extent of the distortion
effects
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
54
Fundamental Result
The affect of noise on the data is modeled probabilistically. It turns out that there is a maximum possible reliable rate for
most channels called the capacity C: There is a scheme to transmit at C with almost no errors Finding this scheme may be tricky but it exists
For a commonly observed kind of noise called Additive White Gaussian Noise (AWGN) the capacity is given by: C = Wlog2(1 + S/N) bits/sec (Shannon) Example: Voice grade line: S/N = 1000, W=3000, C=30Kbps Technology has improved S/N and W to yield higher speeds such
as 56Kb/s
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
55
Encoding
Goal: send bits from one node to another node on the same physical media
This service is provided by the physical layer Problem: specify a robust and efficient
encoding scheme to achieve this goal
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
56
Approaches
Non Return to Zero Non Return to Zero Inverted Manchester 4/5
May 1, 2003 Abhay K. Parekh: EECS122 Lecture 28
57
Review Checklist
Router Performance Input/Output Queuing Lookups Scheduling (GPS/WFQ) Fairness
QoS Token Buckets RSVP Intsrv/Diffsrv
Distributed Algorithms Synchronous/Asynchronous
Algorithms Soft State
Multicast MOSPF, DVMRP, RPB, PIM SRM
Overlays Different Types CAN
Link Layer and below Error Detecting Codes Perfect Parity Codes Encoding Framing