This document discusses the token bucket (TB) algorithm and its implementation using hierarchical token bucket (HTB). It provides an overview of key HTB concepts like assured rate, ceil rate, actual rate, and priority. It then describes how link sharing is implemented, with borrowed bandwidth allocated based on priority and quantum. Finally, it walks through a case study example to illustrate how nodes change states and are scheduled at different levels of the HTB tree.