|
楼主 |
发表于 2006-12-9 00:14:23
|
显示全部楼层
• limit-at - data rate that is guaranteed to a class (CIR)
• max-limit - maximal data rate that is allowed for a class to reach (MIR)
• priority - order in which classes are served at the same level (8 is the lowest priority, 1 is the
highest)
Each HTB class can be in one of 3 states, depending on data rate that it consumes:
• green - a class the actual rate of which is equal or less than limit-at. At this state, the class is
attached to self slot at the corresponding priority at its level, and is allowed to satisfy its limit-at
limitation regardless of what limitations its parents have. For example, if we have a leaf class
with limit-at=512000 and its parent has max-limit=limit-at=128000, the class will get its
512kbps!
• yellow - a class the actual rate of which is greater than limit-at and equal or less than max-limit.
At this state, the class is attached to the inner slot of the corresponding priority of its parent's
inner feed, which, in turn, may be attached to either its parent's inner slot of the same priority
(in case the parent is also yellow), or to its own level self slot of the same priority (in case the
parent is green). Upon the transition to this state, the class 'disconnects' from self feed of its
level, and 'connects' to its parent's inner feed
• red - a class the actual rate of which exceeds max-limit. This class cannot borrow rate from its
parent class
Priorities
When a leaf class wants to send some traffic (as they are the only classes that hold packets), HTB
checks its priority. It will begin with the highest priority and the lowest level and proceed until the
lowest priority at highest level is reached:
As you can see from the picture, leaf-classes which are at the green state, will always have a higher
priority than those which are borrowing because their priority is at a lower level (level0). In this
picture, Leaf1 will be served only after Leaf2, although it has a higher priority (7) than Leaf1 (8).
In case of equal priorities and equal states, HTB serves these classes, using round robin algorithm.
HTB Examples
Page 419 of 695
Copyright 1999-2005, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.
Other trademarks and registred trademarks mentioned herein are properties of their respective owners.
[ 本帖最后由 vipe 于 2006-12-9 00:16 编辑 ] |
-
|