Test 2 L7 Flashcards
Traffic Classification motivation
Motivation:
- control network resources
- no traffic flow exceeds a particular pre-specified rate
Traffic Shaping
Constant Bit Rate (CBR) Source
—Shaped according to peak rate
Variable Bit Rate (VBR):
—Shaped according to peak rate and average rate
The “regulator” is the part of the traffic shaper that allows packets to be send (or not) based on the traffic shaper parameters (rho, beta).
Leaky Bucket Traffic Shaper
Traffic arrives in a bucket of size beta and drains from bucket at a rate rho
Rho controls average rate. Data can arrive faster or slower but cannot drain at a rate faster than rho
So max average rate that traffic can be sent is smooth rate rho
Size of bucket controls max burst size. Even though average cannot exceed rho, but at times sender can exceed rate if total size of burst does not overflow the bucket
Leaky bucket allows flows to periodically burst and regulator ensures average rate does not exceed the drain rate of the bucket
(r,T) Traffic Shaper
Traffic divided into T-bit frames and traffic can flow inject less than or equal to r bits into any T-bit frame
rT smooth traffic shape: To send more than one packet of r bits, sender must wait until next T-frame. Cannot sent packet that is larger than r bits long
- –so limited to fixed rate flows
- –variable flows have to request data rates equal to peak flow, which is wasteful. Configuring shaper such that average rate supports peak rate
Relaxed from leaky bucket because rather than sending one packet every time unit, flow can sent certain number of bits every time unit.
If flow exceeds its rate, the excess packets in the flow are given lower priority or maybe dropped if congestion. Sender can mark its own packets.
Token Bucket Traffic Shaper
For shaping bursty traffic patterns but still ensure flow does not exceed some average rate
Token arrive in a bucket at a rate Rho, and Beta is again the capacity of the bucket. Traffic arrives at an average rate Lambda average and a peak rate Lambda peak. Traffic can be sent by the regulator as long as there are tokens in the bucket.
Different from leaky bucket: if token bucket is full, packet is sent and b tokens removed. But if bucket empty, must wait until b tokens arrive. If bucket partially full, will send if at least little b tokens. Otherwise wait.
Limitation: any traffic interval of length T, the flow can send Beta + TRho tokens of data. If network tries to police the flows by measuring traffic over intervals of length T, flow can cheat by sending this amount of data in each interval. Over 2T, flow consumes 2 (Beta + TRho), which is greater than the Beta +2T*Rho it’s supposed to consume.
Composite Traffic Shaper
Combines Token Bucket with Leaky Bucket to police Token Buckets
confirms flow’s data rate does not exceed average data rate requried
Requires two counters and two times for each buffer, so more complex to implement
Video traffic
continuous bursty (due to compression), periodic
Classes of Traffic
Constant Bit Rate (CBR) Source
- traffic arrives at regular intervals and packets typically same size as they arrive, resulting in constant bit rate of arrival. Ex.: Audio
- –Shaped according to peak rate
Variable Bit Rate (VBR): Ex. video and data
—Shaped according to peak rate and average rate
Leaky Bucket Regulator
The “regulator” is the part of the traffic shaper that allows packets to be sent (or not) based on the traffic shaper parameters (rho, beta).
(r,T) vs leaky bucket
Relaxed from leaky bucket because rather than sending one packet every time unit, flow can sent certain number of bits every time unit.
Policing
If flow exceeds its rate, the router can give excess packets in the flow lower priority or maybe drop if congestion.
Types of Traffic Shapers
Leaky Bucket
(r,T)
Token Bucket
Composite
Difference in Token Bucket and Leaky Bucket
Token Bucket --permits burstiness, but bounds it. in any interval T, rate < Beta (max tokens that can be accumulated in bucket) + T*Rho rate tokens accumulate long term rate always less than rho --No discard or priority
Leaky Bucket
- -smooths bursty traffic
- -priority policies
both easy to implement, but token bucket is more flexible since additional parameters to configure burst size
Policing Token Buckets
Use Composite Shaper that combines token bucket with leaky bucket
Types of Traffic Shapers
Leaky Bucket
(r,T)
Token Bucket
Composite
Power Boost