Buffering
Flows can be buffered on the receiving side before being delivered.
Traffic Shaping
Another method of congestion control is to “shape” the traffic before it enters the network.
Traffic shaping controls the rate at which packets are sent (not just how many). Used in ATM and Integrated Services networks.
At connection set-up time, the sender and carrier negotiate a traffic pattern (shape).
Two traffic shaping algorithms are:
Leaky Bucket
Token Bucket
The Leaky Bucket Algorithm
The Leaky Bucket Algorithm used to control rate in a network. It is implemented as a single-server queue with constant service time. If the bucket (buffer) overflows then packets are discarded.
The leaky bucket enforces a constant output rate (average rate) regardless of the burstiness of the input. Does nothing when input is idle.
The host injects one packet per clock tick onto the network. This results in a uniform flow of packets, smoothing out bursts and reducing congestion.
When packets are the same size (as in ATM cells), the one packet per tick is okay. For variable length packets though, it is better to allow a fixed number of bytes per tick. E.g. 1024 bytes per tick will allow one 1024-byte packet or two 512-byte packets or four 256-byte packets on 1 tick.
Token Bucket Algorithm
In contrast to the LB, the Token Bucket Algorithm, allows the output rate to vary, depending on the size of the burst.
In the TB algorithm, the bucket holds tokens. To transmit a packet, the host must capture and destroy one token.
Tokens are generated by a clock at the rate of one token every t sec.
Idle hosts can capture and save up tokens (up to the max. size of the bucket) in order to send larger bursts later.
Leaky Bucket vs Token Bucket
LB discards packets; TB does not. TB discards tokens.
With TB, a packet can only be transmitted if there are enough tokens to cover its length in bytes.
LB sends packets at an average rate. TB allows for large bursts to be sent faster by speeding up the output.
TB allows saving up tokens (permissions) to send large bursts. LB does not allow saving.
Computer Networks : CONGESTION CONTROL(Part 3)
- Title : Computer Networks : CONGESTION CONTROL(Part 3)
- Posted by :
- Date : 17:00:00
- Labels : Computer Networking
0 comments:
Post a Comment