Rate Limiting and Traffic Shaping Flashcards

1
Q

Would you use a leaky bucket or a token bucket to traffic shape a constant bit rate (CBR) audio stream?

A

Since a constant bit rate stream isn’t bursty, the traffic shaping mechanism doesn’t need to handle bursts. Since the original stream is “smooth”, it would be better to use the leaky bucket to keep the stream “smooth” and even out any bursts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Properties of Constant Bit Rate (CBR) traffic.

A

Traffic Arrives at Regular Intervals

Packets are typically the same size when they arrive.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Properties of Variable Bit Rate (VBR) traffic.

A

Shaped according to average rate and peak rate

Average rate may be small fraction of peak rate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Properties of a Leaky Bucket

A

Each flow has its own bucket of size Beta

Data arrives in a bucket and drains from the bucket at a rate rho, that controls the average rate

Data can arrive at a rate faster or slower into the bucket but it cannot drain at a rate faster than rho.

Size of bucket controls maximum burst size that a sender can send for a particular flow. Even if average rate cannot exceed rho, sender might be able to send at a faster rate as long as bucket does not overflow.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Properties of (r,T) Traffic Shaping

A

Traffic is divided into T-bit frames

A flow can inject <= r bits in any T-bit frame

A flow that obeys this rule has an (r,T) smooth traffic shape

In the case of (r,T) smooth traffic shaping, One cannot send a packet that is greater than r bits long. Maximum packet size is relatively small, so range of behaviors is typically limited to fixed rate flows.

If a flow exceeds its rate, the excess packets in the flow are given a lower priority

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Properties of a Token Bucket

A

Tokens arrive in a bucket, of size Beta, at a rate rho

Traffic may arrive 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.

If the bucket is empty, a packet must wait until a number of tokens equal to the packets size are added to the bucket before it can be sent.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How many bits in a Byte?

A

8 bits = 1 Byte

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Traffic Shaping Equation:

A

Beta = (Burst Rate - rho(average rate)) * T

Rate < B + T * P

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Composite Shaper

A

Combines token bucket shaper with leaky bucket shaper.

Combination of token bucket shaper with leaky bucket shaper allows for good policing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Policing

A

If a flow exceeds its rate, excess packets are given lower priority. If network is heavily loaded or congested.

Routers marking packets with lower priority on flows that exceed its rate.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Power Boost

A

Traffic shaping mechanism that allows a subscriber to send at a higher rate for a brief time

Targets Spare Capacity for users who do not put a sustained load on the network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Buffer Bloat

A

Buffer will start filling up with more packets if sender sends at faster rate because Buffer will only be able to drain at the previous constant rate.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Passive Measurement

A

Packets, Flow Statistics, etc are collected on traffic that is already being sent on the network.

Ex. Packet Traces, Flow Stats, or Application Level Logs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Active Measurement

A

Additional traffic is injected into the network to measure various characteristics of the network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Simple Network Management Protocol

A

Internet-standard protocol for collecting and organizing information about managed devices on IP networks and for modifying that information to change device behavior

Packet and Byte Counters provided by protocol can be used to perform passive network traffic management.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Two Types of Passive Measurement

A

Packet Monitoring: Monitors can see full packet contents or headers

Flow Monitoring: Monitor may see specific stats about individual flows in the network.

17
Q

Packet Monitoring:

A

A monitor might see full packet contents, or at least packet headers, that traverse a particular link

Common methods include TCPDump, Ethereal, Wireshark.

Packet Monitoring provides lots of detail, but has fairly high overhead.

18
Q

Flow Monitoring

A

A monitor records stats per flow.

A flow consists of packets that share a common: 
src &amp; dst IP
src &amp; dst Port
Protocol Type
TOS (Type of Service) Byte
Interface on which packets arrived

Flow monitor can then record stats for a flow that is defined by the group of packets that share these features.

Much less overhead than packet monitoring. Much more coarse than packet monitoring.

19
Q

Sampling

A

Builds flow stats based only on samples of packets. Used to reduce monitoring overhead.

20
Q

Read about the following two Active Queue Management (AQM) techniques: Random Early Detection (RED) and CoDel . Although they vary in specifics, these two algorithms share a common basic approach to solving the buffer bloat problem. Explain what that approach is and why it works.

A

Their approach is to drop packets even when their buffers are not full

RED determines whether to drop a packet statistically based off how close to full the buffer is, whereas CoDel calculates the queuing delay of packets that it forwards and drops packets if the queuing delay is too long.

21
Q

If you want to find out if a remote host (i.e., not your server) is currently under a DoS attack, would you use active or passive measurement? Explain why.

A

Active measurements, such as ping, are required here. Only the server’s owner or ISP would be able to use passive measurements, since they control the machines over which the server’s traffic is handled. Excessive ping delays to the server are a sign of congestion on the server’s link. (It’s hard to be sure that it’s due to a DoS attack without additional context, but it’s a sign that something is wrong…)

22
Q

If you want to compute the traffic intensity, I=La/R, on a router interface (i.e., the ratio between arrival rate and forwarding rate), would you use Counters, Flow Monitoring, or Packet Monitoring? Explain why.

A

The sending rate is a known quantity (it’s just the maximum rate of that device’s interface). The average length of packets and the average arrival rate of the packets can be determined from simple counters. (We do not need to inspect the packet contents, so packet monitoring is unnecessary. Since we are only concerned with all packets on a particular interface and do not care about which flow each packet belongs to, flow monitoring is also unnecessary.