Course Review: Part 1 EECS 122: Lecture 29 Department of Electrical Engineering and Computer Sciences University of California Berkeley.

Download Report

Transcript Course Review: Part 1 EECS 122: Lecture 29 Department of Electrical Engineering and Computer Sciences University of California Berkeley.

Course Review: Part 1
EECS 122: Lecture 29
Department of Electrical Engineering and Computer Sciences
University of California
Berkeley
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
2
Review: Switch Architectures

Input Queued
input interface
output interface
Faster switch
 Two congestion points



Backplane
HOL
Output Queued

Slower switch


May 1, 2003
Backplane speedup is N
One point of congestion
Abhay K. Parekh: EECS122 Lecture 28
RO
C
3
How a router manages traffic

Fast routing table
lookups



output interface
Exact and LPM
How to resolve router
congestion?


input interface
Assume output queued
Focus on scheduling
 Already covered packet
dropping
End-to-End peformance
yields QoS
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
Backplane
RO
C
4
LPM in IP Routers
“Patricia” trie
0
f
d
e
a bc
1
g
h
i
Example Prefixes
a) 00001
b) 00010
c) 00011
d) 001
e) 0101
j
f) 011
Skip 5
1000 g) 100
h) 1010
i) 1100
j) 11110000
Nick Mckeown
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
5
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 U (r) =r for all j
j
 If the user can’t use more than a rate of C then U (r) =C for all r≥
j
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
6
Network Effects on Traffic from a Single
Flow
Router 1
Cumulative
Bits
Source
Router n
bits in the
network
delay
Svc function at router 1
is arrival function at
router 2
Time
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
7
How to control delay?
Overprovision the network
1.
Maybe one day for voice and video but not today

Circuit Switch
Packet switch with more state than a
datagram network
2.
3.
Try to be smart about managing limited
resources



May 1, 2003
Per flow?
Per aggregate class?
Abhay K. Parekh: EECS122 Lecture 28
8
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
May 1, 2003
Model of router queues
A(t)
Abhay K. Parekh: EECS122 Lecture 28
A1(t)
R(f1)
A2(t)
R(f2)
D(t)
AM(t)
R(fM)
Scheduling
Discipline
9
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.



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


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 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
10
Generalized Processor Sharing
Class 1
w1 = w 2
Class 2
Delay =5
Delay =4
B(2)={1,2}
B(4)={2}
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
11
Adjust weights to change delay
Class 1
3w1 = w2
Class 2
Delay =4
Delay =5
B(2)={1,2}
B(4)={1}
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
12
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
13
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
14
The Token Bucket
ρ: average rate
σ: burstiness
Tokens
at rate, r
Token bucket
size, s
Packets
Packets
A(s,t) ≤σ+ρ(t-s)
Packet buffer
One byte (or
packet) per token
Nick Mckeown
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
15
How the user/flow can conform to the
Token Buckets
Tokens
at rate, r
Variable bit-rate
compression
Token bucket
size s
C
To network
r
bytes
bytes
bytes
time
time
A(s,t) ≤σ+ρ(t-s)
time
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
Nick Mckeown
16
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
17
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
18
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



May 1, 2003
Queueing delay and bandwidth requirements
Source traffic characteristics (from PATH)
Set up the reservation state at each router
Abhay K. Parekh: EECS122 Lecture 28
19
Intserv Node Architecture
RSVP
Admission
Control
Forwarding Table
Data In
May 1, 2003
Route Lookup
Per Flow QoS Table
Classifier
Abhay K. Parekh: EECS122 Lecture 28
Scheduler
Control Plane
Routing
RSVP
messages
Data Plane
Routing
Messages
Kinds of Service:
1. Guaranteed
2. Controlled Load
3. Best Effort
Data Out
20
Diffserv Architecture
Its all about the domain

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
DS-2
DS-1
Ingress
Ingress
Egress
Edge router
May 1, 2003
Core router
Abhay K. Parekh: EECS122 Lecture 28
Egress
Kinds of Service:
1. Premium
2. Assured
3. Best Effort
21
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
Scalable
(nodes maintain only (edge routers maintains per
routing state)
aggregate state; core
routers per class state)
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
Not scalable (each
router maintains per
flow state)
22
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
23
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


Asynchronous algorithms execute at a processor
based on received messages and internal state:
event driven


E.g. TDM or SONET
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
24
Synchronization Penalty
1
2
1
Slot size is affected by the slow (1,6) link
idle
idle
4
6
1
2
4
1
5
4
idle
2
3
Node 1
1
2
3
Node 6
1
2
3
Node 5
idle
3
1
1
idle
3
idle
Penalty can be huge!
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
25
Local Synchronization
1
2
1
Send update k after you’ve heard update k-1 from
all neighbors.
idle
idle
1
3
2
idle
May 1, 2003
6
1
4
1
5
4
Node 4
Node 5
3
idle
1
2
Node 3
3
2
1
3
idle
2
1
4
3
idle
Abhay K. Parekh: EECS122 Lecture 28
26
Asynchronous computation
1
2
1
No notion of “slot size”
1
2
3
4
5
6
7
8
4
9
10
11
12
13
14
15
6
1
2
4
1
5
4
16 Node 1
2
3
Node 6
1
2
3
Node 5
idle
3
1
1
idle
3
idle
What paths will this compute??
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
27
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
28
Trustworthiness

Three levels




Internet Protocols (for the most part) assume
Honest protocol agents


Honest: Always in conformance of the protocol
Selfish: May lie to get better performance out of
the protocol (BGP)
Malicious: Unpredictable
Unreliable infrastructure
Infrastructure has gotten more reliable, and
agents have gotten less honest…
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
29
The Multicast service Model
R0
S
[G, data]
Net
R1
.
.
.
Rn-1
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
30
Multicast and Layering

Multicast can be implemented at different
layers

data link layer


network layer


e.g. IP multicast
application layer


e.g. Ethernet multicast
e.g. as an overlay network like Kazaa
Which layer is best?
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
31
Routing: Approaches

Kinds of Trees




Tree Computation Methods
Intradomain Update methods




Shared Tree
Source Specific Trees
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
32
MBONE


What to do if most of the routers in the internet are
not multicast enabled?
Tunnel between multicast enabled routers
IPM
IP


IPM
Creates an “overlay” network but both operate at
Level 3…
This is how multicast was first deployed
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
33
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
34
PIM

Popular intradomain method


Recognizes that most groups are very sparse


UUNET streaming using this
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
35
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
36
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
37
Overlay network



A network defined over another set of
networks
The overlay addresses its own nodes
Links on one layer are network
segments of lower layers


A
A’ A
Requires lower layer routing to be
utilized
Overlaying mechanism is called
tunneling
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
38
Kinds of Overlay Networks

Three kinds of Overlays
Only Hosts: Peer to Peer Networks (P2P)
1.

Example: Gnutella, Napster
Only Gateway nodes: Infrastructure Overlays
2.

Content Distribution Networks (CDNs)

Host and Gateway Nodes:
3.


Example: Akamai
Virtual Private Networks
Overlay node structure


May 1, 2003
Regular: Chord, Pastry
Adhoc: Gnutella
Abhay K. Parekh: EECS122 Lecture 28
39

Two kinds of overlays functions



Two kinds of client connectivty



Overlay provides access to distributed resources
Overlay facilitates communication among other client applications
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
40
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
41
Bottom line on Overlays


Overlays are an irreversible trend in network
Overlays add new functions to the network
infrastructure much faster than



Disadvantages



by trying to integrate them in the router
relying on a infrastructure service provider on deploy the
function
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
42
Link Functions
Signal
Adaptor
Adaptor
Adaptor: convert bits into physical signal and physical signal back into bits

1.
2.
3.
4.
5.
6.
Functions
Construct Frame with Error Detection Code
Encode bit sequence into analog signal
Transmit bit sequence on a physical medium (Modulation)
Receive analog signal
Convert Analog Signal to Bit Sequence
Recover errors through error correction and/or ARQ
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
43
Link Components
NRZI
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
44
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
45
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
46
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:

May 1, 2003
Achieve high link utilization, and low overhead
Abhay K. Parekh: EECS122 Lecture 28
47
Error detection

The frame consists of a header and payload
Payload
Header
n bits


If all n-bit strings are valid payload strings, the error
detection must occur in the header bits
Break the header into two parts
FH
Payload
n bits

EDC
k bits
Error detecting code part contains bits that add
redundancy
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
48
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
49
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
50
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
51
Error correction or Retransmission?

Error Correction requires a lot of redundancy


Retransmission strategies are more popular


Wasteful if errors are unlikely
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
52
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
53
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
54
Encoding

Goal: send bits from one node to another
node on the same physical media


May 1, 2003
This service is provided by the physical layer
Problem: specify a robust and efficient
encoding scheme to achieve this goal
Abhay K. Parekh: EECS122 Lecture 28
55
Approaches




Non Return to Zero
Non Return to Zero Inverted
Manchester
4/5
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
56
Review Checklist

Router Performance







Overlays



Link Layer and below


Token Buckets
RSVP
Intsrv/Diffsrv
Different Types
CAN


Error Detecting Codes
Perfect Parity Codes
Encoding
Framing
Distributed Algorithms



Input/Output Queuing
Lookups
Scheduling (GPS/WFQ)
Fairness
QoS



Synchronous/Asynchronous
Algorithms
Soft State
Multicast


MOSPF, DVMRP, RPB, PIM
SRM
May 1, 2003
Abhay K. Parekh: EECS122 Lecture 28
57