Metering Traffic And Token Buckets; Metering Traffic Using Token Buckets (Single-Rate Policer) - Cisco 10000 Series Configuration Manual

Quality of service configuration guide
Hide thumbs Also See for 10000 Series:
Table of Contents

Advertisement

Metering Traffic and Token Buckets

The router supports the police command on inbound and outbound interfaces.
Note
Interfaces Not Supporting the police Command
Metering Traffic and Token Buckets
The following sections describe how single-rate and two-rate policers meter traffic using token buckets:

Metering Traffic Using Token Buckets (Single-Rate Policer)

The router uses two token buckets to meter the traffic that passes through the system: conforming and
exceeding. The router uses the first bucket to hold tokens that determine whether the committed
information rate (CIR) is conforming (green) or exceeding (yellow). A traffic stream is conforming when
the average number of bytes over time does not cause the bucket to overflow. The first bucket can hold
bytes up to the size of the committed burst (bc) before overflowing.
A traffic stream exceeds the police rate when it causes the first token bucket to overflow into the second
token bucket. When this occurs, the router marks the traffic stream yellow. The second token bucket is
filled as long as the traffic exceeds the police rate.
The second token bucket can hold bytes up to the size of the excess burst (be) before overflowing. A
traffic stream violates the police rate if the second token bucket overflows. When this occurs, the router
marks the traffic stream red.
The router updates the tokens for both the conforming and exceeding token buckets based on the token
arrival rate or the committed information rate (CIR). When a packet of a given size (for example, "B"
bytes) arrives at specific time (time "T"), the following actions occur:
Cisco 10000 Series Router Quality of Service Configuration Guide
6-18
Fast Ethernet channel
Frame Relay data link connection identifier (DLCI)
Metering Traffic Using Token Buckets (Single-Rate Policer), page 6-18
Metering Traffic Using Token Buckets (Two-Rate Policer), page 6-19
The router updates the tokens in the conforming bucket. If the previous arrival of the packet was at
the rate of T1 (1.544 Mbps) and the current arrival of the packet is at T, the router updates the bucket
with T minus T1 worth of bits based on the token arrival rate. The router places refill tokens in the
conforming bucket. If the tokens overflow the conforming bucket, the router places the overflow
tokens in the exceeding bucket.
The router calculates the token arrival rate in the following way:
(time between packets * policer rate) / 8 bytes
where time between packets equals T – T1
If the number of bytes in the conforming bucket is greater than or equal to 0, the packet conforms.
The router removes the number of bytes of the packet from the conforming bucket and takes the
conform action on the packet. In this scenario, the exceeding bucket is unaffected.
If the number of bytes in the conforming bucket is less than 0, the router checks the exceeding bucket
for bytes. If the number of bytes in the exceeding bucket is greater than or equal to 0, the router
removes the number of bytes of the packet from the exceeding token bucket and takes the exceed
action. The router does not remove bytes from the conforming bucket.
Chapter 6
Policing Traffic
OL-7433-09

Advertisement

Table of Contents
loading

Table of Contents