TBC

Token Bucket Counter

QoS
Introduced in R99
A traffic policing algorithm used to enforce Quality of Service (QoS) parameters by measuring and controlling the data rate and burst size of a flow. It conceptually uses tokens, added at a steady rate to a bucket, which must be spent to transmit data, ensuring traffic conforms to a defined profile.

Description

The Token Bucket Counter (TBC) is a fundamental algorithm implemented within network nodes, such as the Policy and Charging Enforcement Function (PCEF) or user equipment, to police traffic flows against a subscribed QoS profile. It operates on a conceptual model involving a 'bucket' that holds 'tokens.' Tokens are generated and added to the bucket at a constant rate, known as the Committed Information Rate (CIR). The bucket itself has a maximum capacity, defining the Committed Burst Size (CBS). When a packet arrives, the TBC checks if sufficient tokens are present in the bucket corresponding to the packet's size. If tokens are available, they are consumed (removed from the bucket), and the packet is considered conformant and is forwarded. If insufficient tokens exist, the packet is deemed non-conformant, triggering a policy action such as marking, shaping, or dropping.

The algorithm's state is defined by the current token count and the last update time. To avoid continuous token generation calculations, the count is typically updated lazily—only when a packet needs to be evaluated. The formula recalculates the token count based on the elapsed time since the last packet and the token generation rate, capped at the bucket's maximum size. This design efficiently enforces both a long-term average rate (via the token generation rate) and a limit on short-term bursts (via the bucket size). The TBC is a core component of the Guaranteed Bit Rate (GBR) and Maximum Bit Rate (MBR) enforcement mechanisms specified in 3GPP for EPS and 5GS bearers.

Within the 3GPP architecture, TBC parameters are derived from QoS rules provided by the Policy and Charging Rules Function (PCRF) or Policy Control Function (PCF). These parameters are applied per QoS flow (5GS) or EPS bearer. The enforcement point uses the TBC to monitor uplink and/or downlink traffic, ensuring user plane traffic does not exceed the agreed-upon contractual limits. This is crucial for network resource protection, fair usage among subscribers, and enabling tiered service plans. The specifications detail how these token bucket parameters are mapped from QoS descriptors like the 5G QoS Identifier (5QI) and Allocation and Retention Priority (ARP).

Purpose & Motivation

The Token Bucket Counter was standardized to provide a standardized, predictable, and efficient method for traffic policing in packet-switched mobile networks. As networks evolved from circuit-switched voice to IP-based multimedia services, controlling data traffic became essential to prevent network congestion, guarantee performance for premium services, and implement charging models based on data volume and rate. Simple static rate limiters could not handle the bursty nature of IP traffic effectively.

The TBC algorithm addresses this by decoupling the average rate control from the tolerance for burstiness. This was a significant improvement over simpler leaky bucket or pure rate-limiting schemes. It allows applications with variable bit rates (like video streaming) to transmit bursts of packets as long as they have 'saved up' tokens, thereby smoothing traffic and improving link utilization while still enforcing long-term contractual limits. Its introduction in R99/UMTS era provided the technical foundation for the sophisticated QoS and policy control frameworks that are central to 4G and 5G networks, enabling service differentiation between voice, video, and best-effort data.

Key Features

  • Enforces Committed Information Rate (CIR) and Committed Burst Size (CBS)
  • Allows controlled burstiness within the limits of the token bucket size
  • Used for policing Guaranteed Bit Rate (GBR) and Maximum Bit Rate (MBR) traffic
  • Integral part of Policy and Charging Control (PCC) enforcement
  • Operates per QoS flow or EPS bearer
  • Employed in both uplink and downlink directions

Evolution Across Releases

R99 Initial

Initially introduced within the UMTS QoS architecture defined in 23.107. The TBC was specified as the algorithm for policing traffic against the Traffic Handling Priority (THP) and other UMTS bearer attributes. It established the core token bucket model for enforcing sustained and peak bit rates on packet flows.

Defining Specifications

SpecificationTitle
TS 23.107 3GPP TS 23.107
TS 23.207 3GPP TS 23.207