HFSC (Hierarchical Fair Service Curve) supports both link-sharing and guaranteed real-time services. H-FSC employs a service curve based QoS model, and its unique feature is an ability to decouple delay and bandwidth allocation. HFSC has 2 independent scheduling mechanisms. Real-time scheduling is used to guarantee the delay and the bandwidth allocation at the same time. Hierarchical link-sharing is used to distribute the excess bandwidth. When dequeueing a packet, HFSC always tries real-time scheduling first. If no packet is eligible for real-time scheduling, link-sharing scheduling is performed. HFSC does not use class hierarchy for real-time scheduling. Additionally, an upper-limit service curve can be specified for link-sharing to set the upper limit allowed for the class.
interface
if_name [bandwidth bps] [tbrsize bytes] [sched_type]
if_name
specifies the name of a network interface (e.g., fxp0).
bandwidth
specifies the interface bandwidth in bits per second.
tbrsize
specifies the bucket size of a token bucket regulator in bytes.
sched_type
must be hfsc for HFSC.
class
sched_type if_name class_name parent_name [admission cntlload|none] [[sc m1 d m2]] [[rt m1 d m2]] [[ls m1 d m2]] [[ul m1 d m2]] [pshare percent] [grate bps] [bandwidth bps] [ulimit bps] [default] [qlimit count] [red|rio] [ecn] [cleardscp]
The
class command specifies a HFSC class. The classes are organized as a hierarchy, and every class, except for the root class, has a parent.
Each HFSC class has 2 service curves, the real-time service curve and the link-sharing service curve. Service curves are specified by [
type m1 d m2].
type should be either
sc,
rt,
ls, or
ul.
sc (service curve) is used to set the same values to both real-time and link-sharing service curves.
rt (real-time) is used to specify the real-time service curve.
ls (link-sharing) is used to specify the link-sharing service curve.
ul (upper-limit) is used to specify the upper-limit service curve for link-sharing.
m1 is the slope of the first segment specified in bits-per-second.
d is the x-projection of the intersection point of the 2 segments specified in milliseconds.
m2 is the slope of the second segment specified in bits-per-second.
sched_type
must be hfsc for a HFSC class.
if_name
Interface name. Must correspond to name in interface specification.
class_name
Arbitrary name for this class. Must be unique within the class hierarchy for this interface. The name root is a reserved class name for the root class. The root class for the interface is automatically created by the interface command.
parent_name
The name of the parent class for this class. Keyword root is used when the parent is the root class. Parent class must have been previously defined.
admission
The type of admission control and QoS type. cntlload is controlled load service for RSVP, otherwise, it should be none. The default is none.
pshare
Percent of the link share. This specifies a linear link-sharing service curve as a fraction of the link bandwidth. It is a short hand of [ls 0 0 (link-bandwidth * percent / 100)].
grate
Guaranteed rate. This specifies a linear real-time service curve. It is a short hand of [rt 0 0 bps].
bandwidth
This is a short hand of [sc 0 0 bps].
ulimit
Upper limit rate. This specifies a upper-limit service curve. It is a short hand of [ul 0 0 bps].
default
Specify the default class. When this keyword is present, all packets that do not match some classification criteria are assigned to this class. Must be exactly one class on each interface defined as the default class.
qlimit
The maximum queue size in number of packets. Default value is 50.
red
enables RED on this class queue.
rio
enables RIO on this class queue.
ecn
enables RED/ECN on this class queue.
cleardscp
clears diffserv codepoint in the IP header.