Top Banner
Hierarchical Token Bucket Mohammad Tayyebi Engineer Austin, LLC Tel : (512) 481-2710 1
34

Hierarchical Token Bucket - MikroTikMTCUME, MTCTCE, MTCIPV6, MTCINE Mikrotik Certified Trainer Certified consultant for MikroTik and other brands. Working with MikroTik solutions since

Feb 17, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • Hierarchical Token Bucket

    Mohammad TayyebiEngineer Austin, LLC

    Tel : (512) 481-2710 1

  • Mohammad Tayyebi

    MikroTik Certified in MTCNA, MTCRE, MTCTCE,

    MTCUME, MTCTCE, MTCIPV6,

    MTCINE

    Mikrotik Certified Trainer

    Certified consultant for MikroTik and other brands.

    Working with MikroTik solutions since 2008.

    2Tel : (512) 481-2710 www.EngineerAustin.Com

  • Engineer Austin

    Evaluate, Design, Implement, Consult and Maintain

    Network Engineer

    IT Training

    Data Center

    Virtualization

    Data Integrity

    3

    Tel : (512) 481-2710

  • AgendaQueue Concepts

    HTB Concepts

    HTB Schematic

    HTB Scenarios

    4Tel : (512) 481-2710 www.EngineerAustin.Com

  • ConceptsQueue

    Scheduling

    Shaping

    5Tel : (512) 481-2710 www.EngineerAustin.Com

  • FIFO

    RED

    Queue Type

    SFQ

    PCQ

    6Tel : (512) 481-2710 www.EngineerAustin.Com

    Linux Term

  • •PFIFO - Packets First-In First-Out

    •BFIFO - Bytes First-In First-Out

    •MQ PFIFO - PFIFO with multiple transmit queues

    Queue Type

    7Tel : (512) 481-2710 www.EngineerAustin.Com

  • •RED - Random Early Detect

    Queue Type

    8Tel : (512) 481-2710 www.EngineerAustin.Com

  • •SFQ - Stochastic Fairness Queuing

    Queue Type

    9Tel : (512) 481-2710 www.EngineerAustin.Com

  • •PCQ - Per Connection Queue

    Queue Type

    10Tel : (512) 481-2710 www.EngineerAustin.Com

  • Why we need to Mangle?Modify Header Field

    Mark The Packet

    Marked Packet Usage

    11Tel : (512) 481-2710 www.EngineerAustin.Com

  • HTB Schematic HTB Queue Type

    Inner Queue Leaf Queue

    Level of HTB

    Inner Queue Responsibility

    12Tel : (512) 481-2710 www.EngineerAustin.Com

  • Inner Queue

    What’s Inner Queue?

    Packet in Inner Queue

    Priority in Inner Queue

    13Tel : (512) 481-2710 www.EngineerAustin.Com

  • Leaf Queue

    Whats Leaf Queue?

    Where is located?

    14Tel : (512) 481-2710 www.EngineerAustin.Com

  • Level of HTB

    15Tel : (512) 481-2710 www.EngineerAustin.Com

  • HTB Parent Responsibility

    Traffic Distribution

    Set Parent

    16Tel : (512) 481-2710 www.EngineerAustin.Com

  • CIRCommitted Information Rate

    MIRMaximal Information Rate

    Burst

    Limitation RuleInner MIR >= Sum of Leaf CIRInner MIR >= Each Leaf MIR

    HTB Terms

    17Tel : (512) 481-2710 www.EngineerAustin.Com

  • Priority - HTB Terms

    When a Leaf Queue wants to send some traffic (as they are the only

    classes that hold packets), HTB checks its priority.

    18Tel : (512) 481-2710 www.EngineerAustin.Com

  • HTB or Queue State

    green

    Yellow

    red

    19Tel : (512) 481-2710 www.EngineerAustin.Com

  • Token

    The Token Bucket algorithm is based on an analogy to a bucket where tokens, represented in bytes, are added at a specific rate. The bucket itself has a specified capacity.

    If the bucket fills to capacity, newly arriving tokens are dropped

    20Tel : (512) 481-2710 www.EngineerAustin.Com

  • Bucket

    Bucket Size

    Bucket CapacityBucket Capacity = Bucket-Size*max-Limit(Burst-Limit If exist)

    21Tel : (512) 481-2710 www.EngineerAustin.Com

  • HTB Diagram

    22Tel : (512) 481-2710 www.EngineerAustin.Com

  • HTB Parent ResponsibilityLending-Barrowing

    The Inner Queues lend to their Leaf QueueThe Leaf Queues Borrow from their Inner Queue

    Shaping only occurs in Leaf QueueDelay just will see in Leaf Queue

    23Tel : (512) 481-2710 www.EngineerAustin.Com

  • Leaf Queues Scope

    Leaf QueueSituation

    Speed

  • Inner Queues Scope

    Inner QueueSituation

    Speed

  • Scenario

    26Tel : (512) 481-2710 www.EngineerAustin.Com

  • Scenario 1 (A Leaf with better Priority)

    27Tel : (512) 481-2710 www.EngineerAustin.Com

  • Scenario 1 (A Leaf with better Priority) C1 take the Max Limit Other Capacity Split to other Leaf

    28Tel : (512) 481-2710 www.EngineerAustin.Com

  • Scenario 2 (Inner with Limit At)

    29Tel : (512) 481-2710 www.EngineerAustin.Com

  • Scenario 2 (Inner with Limit At) Inners with Limit At can bring more capacity for their

    childeren

    30Tel : (512) 481-2710 www.EngineerAustin.Com

  • Scenario 3 (Inner with Priority)Common Mistake

    31Tel : (512) 481-2710 www.EngineerAustin.Com

  • Scenario 3 (Inner with Priority)Common Mistake

    Priority on Inner will not Work

    32Tel : (512) 481-2710 www.EngineerAustin.Com

  • Wiki.Mikrotik.Com

    Linux-IP.Net

    MUM.Mikrotik.Com

    33Tel : (512) 481-2710 www.EngineerAustin.Com

  • Thank You For Your Attention

    [email protected]

    +1 512 713 6825

    34Tel : (512) 481-2710 www.EngineerAustin.Com

    mailto:[email protected]