Rate limiting and traffic shaping Flashcards
data classification (traffic)
Bursty, Periodic, regular
audio classification (traffic
continuous, periodic
video classification (traffic)
continuous, periodic, bursty
Two rate classes
CBR and VBR
CBR
Constant Bit Rate source (audio)
VBR
Variable Bit Rate source (video, audio)
How is CBR shaped
Peak Rate
How is VBR shaped
Average and peak rate
leaky bucket shaper
you have a buffer Beta that can be thought of as having a leaky whole. Rho is the drain rate that acts as a regulator.
(R, T) packet shaping
Traffic is divided into T-bit frames
Flow can inject <= r bits in any T-bit frame
What to do when a flow exceeds rate? (leaky bucket)
Packets are given a lower priority or in the worse case dropped
What is used to shape bursty traffic?
Token Bucket
What is a token bucket
we have a rate rho at which tokens are placed in the bucket. Lambda(peak) = peak rate. Lambda(avg) = average rate.
What happens when the token bucket is full?
If we are sending a packet of size b: if bucket is full, packet is sent, b tokens removed.
What happens when the token bucket is empty
Empty pack must wait until b tokens arrive.
What happens when the token bucket is partially full?
If number of tokens exceeds b send otherwise wait
Token Bucket main points
Permits burst but bounds it. If any T, rate < Beta + T * rho, longterm < rho, no discard or priority, difficult to policy
Leaky Bucket main points
Forces to be smooth, Priority policy
How does Policing with token buckets work?
Link a token bucket with a leaky bucket. When the traffic leaves the token bucket it is added to a leaky bucket.
Power Boost
Allows for subscribers to send at a higher rate for some period of time. Spare capacity for users who do not put sustained load on the network.
Calculating Powerboast Rates
Sending rage r > Rsustained. d is how long the sender can exceed the sustained rate. We can then computer the area Beta by taking the product of d and the difference of r and Rsustained.
What did project Bismark discover
Powerboost may introduce long delays since the rapid increase in traffic might be a faster rate then the network can handle causing buffers to fill up.
How could the issue with Powerboost be corrected?
They could run a packet shaper to avoid latency issues
Buffer Bloat
Buffers can only drain at Rsustained. Delay = (Data in buffer / Rsustained)
How can a traffic shaper help correct Buffer Bloat
Make sure that the traffic entering the cable modem doesn’t exceed the buffer drain rate (uplink to isp)
Two types of network measurement
Passive and Active
Passive Measurement
Collection of packets flow stats that are already on the network
Active Measurement
inject additional traffic to measure various charateristics
Why measure network traffic
Billing, Security
CIR
Committed Information Rate
What are somethings security monitoring checks for
Compromised Host, Botnets, Denial of Service (dos)
SNMP
Simple Network Management Protocol
MIB
Management Information Base
What is MIB used for
Periodically poll the interface to determine the number of bytes or packets being sent to determine the rate
What is the advantage of SNMP?
Ubiquitous supported on majority of devices Number of tools available to analysis the data
Down side to SNMP
Hard to query. Coarse since just getting the count
List 3 passive monitoring types
Packet, flow, snmp
Packet Monitoring
Can see full packet content (for packet header)
What are some Packet Monitoring tools
tcpdump, ethereal, wireshark, hardware cards
Flow monitoring
monitors record statistics per flow
What is a flow in flow monitoring
source and destination IP, Source and Destination Part, Protocol type, tos byte, interface, next hop id, source destination AS and prefix, Close together in time
Pro Cons Flow vs Packet monitoring
Pro: Less Overhead, Con: more coarse, no packet/payloads
Technique to reduce flow level monitoring overhead?
Sampling: builds flow stats y only taking samples of the packets
Timing information: Packet, Flow or Both
Packet
Packet Headers: Packet, Flow or Both
Packet
Number of bytes in each flow: Packet, Flow or Both
Both