1 .\" $NetBSD: altq.conf.5,v 1.12 2008/09/11 17:58:59 joerg Exp $
2 .\" $KAME: altq.conf.5,v 1.15 2002/11/17 02:51:49 kjc Exp $
5 .\" Sony Computer Science Laboratories Inc. All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" THIS SOFTWARE IS PROVIDED BY SONY CSL AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL SONY CSL OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .Dd September 10, 2008
34 .Nd ALTQ configuration file
39 file contains a number of lines specifying the behavior of queueing
41 Comments start with a # and extend to the end of the line.
47 at startup and sets up queueing disciplines.
48 BLUE, CBQ (Class-Based Queueing), FIFOQ (First-In First-Out Queue),
49 HFSC (Hierarchical Fair Service Curve), PRIQ (Priority Queueing),
50 RED (Random Early Detection), RIO (RED with IN/OUT),
51 WFQ (Weighted Fair Queueing), JoBS (Joint Buffer Management and
53 and CDNR (Diffserv Traffic Conditioner) can be configured in this file.
54 .Ss Interface Commands
55 .Bl -tag -width interface -offset indent
58 .Op Cm bandwidth Ar bps
59 .Op Cm tbrsize Ar bytes
61 .Op Ar discipline-specific-options
66 command specifies a network interface to be under control of ALTQ.
67 One interface specification is provided for each network interface
68 under control of ALTQ.
69 A system configured as a router may have multiple interface
71 .Bl -tag -width 8n -offset indent
73 specifies the name of a network interface (e.g., fxp0).
75 specifies the interface bandwidth in bits per second.
76 This is the maximum rate that the queueing discipline will allow on this
79 specifies the bucket size of a token bucket regulator in bytes.
82 is omitted, the system automatically sets the bucket size
84 The token rate is set to the interface bandwidth specified by the
88 Type of a queueing discipline.
100 If the interface has only traffic conditioners and no queueing
106 .Bl -tag -width class -offset indent
115 .Op Ar discipline-specific-options
120 command specifies a packet scheduling class for CBQ, HFSC, JoBS or PRIQ.
121 A class specifier must be provided for each packet scheduling class.
122 .Bl -tag -width 8n -offset indent
124 Type of queueing discipline.
125 Must correspond to the discipline name in interface specification.
128 Must correspond to name in interface specification.
130 Arbitrary name for this class.
131 Must be unique for this interface.
133 The name of the parent class for this class (for CBQ or HFSC).
134 Parent class must have been previously defined.
135 PRIQ and JoBS do not have class hierarchy and parent_name must be
137 for PRIQ and JoBS classes.
139 Use RED (Random Early Detection) on this class queue.
140 RED drops packets with the probability proportional to the average
143 Use RIO (RED with In/Out bit) on this class queue.
144 RIO runs triple RED algorithms at the same time.
146 Use RED/ECN (Explicit Congestion Notification) on this
147 class queue (experimental implementation).
150 Clear diffserv codepoint in the IP header.
153 .Bl -tag -width filter -offset indent
157 .Op Cm name Ar fltr_name
164 command specifies a filter to classify packets into
166 A filter specifier determines any statically-defined packet
167 classification rules.
168 .Bl -tag -width 10n -offset indent
170 Name of a network interface (e.g., fxp0).
172 Name of a class or a conditioner to which matching packets are directed.
174 Add an arbitrary name to the filter for a future reference.
176 Specifies explicit order of filter matching.
177 Filter matching is performed from a filter with a larger ruleno.
182 should be in the following format:
183 .Bl -tag -width filter -offset indent
185 .Ad dst_addr Op Cm netmask Ar mask
187 .Ad src_addr Op Cm netmask Ar mask
193 .Op Cm tosmask Ar value
202 are dotted-decimal addresses of
203 the destination and the source respectively.
204 An address may be followed by
210 are port numbers of the destination and the source respectively.
212 is a protocol number defined for IP packets (e.g. 6 for TCP).
214 keyword can be used to specify the type of service field value.
216 keyword can be used to specify the Security Parameter Index value for
219 When filter value 0 is used, it is taken as a wildcard.
220 .Bl -tag -width filter6 -offset indent
224 .Op Cm name Ar fltr_name
233 should be in the following format:
234 .Bl -tag -width filter6 -offset indent
236 .Ad dst_addr Ns Op /prefix_len
238 .Ad src_addr Ns Op /prefix_len
241 .Op Cm flowlabel Ar value
245 .Op Cm tclassmask Ar value
254 are IPv6 addresses of the destination and the source respectively.
255 An address may be followed by an optional address prefix length.
259 are port numbers of the destination and the source respectively.
261 is a protocol number defined for IPv6 packets (e.g. 6 for TCP).
263 keyword can be used to specify the flowlabel field value.
265 keyword can be used to specify the traffic class field value.
267 keyword can be used to specify the Security Parameter Index value for
270 When filter value 0 is used, it is taken as a wildcard.
272 CBQ (Class Based Queueing) achieves both partitioning and sharing of
273 link bandwidth by hierarchically structured classes.
274 Each class has its own queue and is assigned its share of bandwidth.
275 A child class can borrow bandwidth from its parent class as long as
276 excess bandwidth is available.
277 .Bl -tag -width interface -offset indent
280 .Op Cm bandwidth Ar bps
281 .Op Cm tbrsize Ar bytes
286 .Bl -tag -width 8n -offset indent
288 specifies the name of a network interface (e.g., fxp0).
290 specifies the interface bandwidth in bits per second.
292 specifies the bucket size of a token bucket regulator in bytes.
297 (weighted-round robin) or
299 (packet-by-packet round robin).
304 Enables CBQ's link efficiency mode.
305 This means that the scheduler will send a packet from the first
306 overlimit class it encounters of all classes of the link-sharing
307 structure when all classes are overlimit.
308 This will also cause the scheduler to use greater than its assigned
309 bandwidth, if the link is capable of more than the assigned bandwidth.
310 By default, this mode is turned off.
311 By adding the keyword
313 to the interface specification line, enables this mode.
316 .Bl -tag -width class -offset indent
322 .Op Cm admission cntlload|none
323 .Op Cm priority Ar pri
324 .Op Cm pbandwidth Ar percent
325 .Op Cm exactbandwidth Ar bps
329 .Op Cm maxburst Ar count
330 .Op Cm minburst Ar count
332 .Op Cm maxdelay Ar msec
334 .Op Cm packetsize Ar bytes
335 .Op Cm maxpacketsize Ar bytes
344 command specifies a CBQ class.
345 The classes are organized as a hierarchy, and every class, except
346 for the root class, has a parent.
347 .Bl -tag -width 8n -offset indent
354 Must correspond to name in interface specification.
356 Arbitrary name for this class.
357 Must be unique within the class
358 hierarchy for this interface.
361 is a reserved class name.
363 The name of the parent class for this class or
365 if this is the root class.
366 Parent class must have been previously defined.
368 The type of admission control and QoS type.
370 is controlled load service for RSVP, otherwise, it should be
375 High numbers are higher priority.
376 Max value is 7 and Min value is 0.
379 The percentage of the interface bandwidth allocated to this class.
380 Generally should add up to 100 percent at each level of the class
381 hierarchy, although other amounts can be specified for purposes of
383 .It Cm exactbandwidth
384 Specify the bandwidth in bits-per-second instead of
386 Note that the bandwidth allocation of CBQ is not so precise but this
387 is just a way to pass a parameter to CBQ; the user is supposed to know
388 the detailed internals of CBQ.
390 is a preferred way to specify the bandwidth of a class.
392 The class can borrow bandwidth from its parent class when this class
394 If this keyword is not present, then no borrowing is done, and the
395 packet is delayed or dropped when the class is overlimit.
397 Specify the default class.
398 When this keyword is present, all packets that do not match some
399 classification criteria are assigned to this class.
400 Must be exactly one class on each interface defined as the default
403 Specify the control class.
404 When this keyword is present, the predefined control class packets
405 (RSVP, IGMP, and ICMP) are assigned to this class.
406 Note that when the control class is not specified by the time the
407 default class is created, one is automatically created with default
409 Thus, if the control class is specified, it must be listed before the
411 Must be exactly one class on each interface defined as the control
414 The maximum burst of back-to-back packets allowed in this class.
415 Default is 16 but the default value is automatically reduced to 4 when
416 the class bandwidth is small (about less than 1Mbps).
418 The minimum burst is used to obtain the steady state burst size.
419 It's the parameter to help compute offtime for the class.
420 Offtime is the amount of time a class is to wait between packets.
423 The maxdelay is specified in milliseconds and used to obtain the max
424 queue size of the class.
425 If not specified, the default max queue size (30 packets) is used.
427 The average packet size in bytes to be used in CBQ over-/under-limit
429 Default value is MTU of the interface.
431 The maximum packet size in bytes for the class.
432 Default value is MTU of the interface.
434 enables RED on this class queue.
436 enables RIO on this class queue.
438 enables RED/ECN on this class queue.
440 enables RED/flow-valve (a.k.a. red-penalty-box) on this class queue.
442 clears diffserv codepoint in the IP header.
445 HFSC (Hierarchical Fair Service Curve) supports both link-sharing and
446 guaranteed real-time services.
447 H-FSC employs a service curve based QoS model, and its unique feature
448 is an ability to decouple delay and bandwidth allocation.
449 HFSC has 2 independent scheduling mechanisms.
450 Real-time scheduling is used to guarantee the delay and the
451 bandwidth allocation at the same time.
452 Hierarchical link-sharing is used to distribute the excess
454 When dequeueing a packet, HFSC always tries real-time scheduling
456 If no packet is eligible for real-time scheduling, link-sharing
457 scheduling is performed.
458 HFSC does not use class hierarchy for real-time scheduling.
459 Additionally, an upper-limit service curve can be specified for
460 link-sharing to set the upper limit allowed for the class.
461 .Bl -tag -width interface -offset indent
464 .Op Cm bandwidth Ar bps
465 .Op Cm tbrsize Ar bytes
469 .Bl -tag -width 8n -offset indent
471 specifies the name of a network interface (e.g., fxp0).
473 specifies the interface bandwidth in bits per second.
475 specifies the bucket size of a token bucket regulator in bytes.
482 .Bl -tag -width class -offset indent
488 .Op Cm admission cntlload|none
489 .Op Bq Cm sc Ar m1 d m2
490 .Op Bq Cm rt Ar m1 d m2
491 .Op Bq Cm ls Ar m1 d m2
492 .Op Bq Cm ul Ar m1 d m2
493 .Op Cm pshare Ar percent
495 .Op Cm bandwidth Ar bps
498 .Op Cm qlimit Ar count
506 command specifies a HFSC class.
507 The classes are organized as a hierarchy, and every class, except
508 for the root class, has a parent.
510 Each HFSC class has 2 service curves, the real-time service curve and
511 the link-sharing service curve.
512 Service curves are specified by
513 .Bq Ar type Ar m1 d m2 .
520 (service curve) is used to set the same values to both real-time and
521 link-sharing service curves.
523 (real-time) is used to specify the real-time service curve.
525 (link-sharing) is used to specify the link-sharing service curve.
527 (upper-limit) is used to specify the upper-limit service curve for
530 is the slope of the first segment specified in bits-per-second.
532 is the x-projection of the intersection point of the 2 segments
533 specified in milliseconds.
535 is the slope of the second segment specified in bits-per-second.
536 .Bl -tag -width 8n -offset indent
543 Must correspond to name in interface specification.
545 Arbitrary name for this class.
546 Must be unique within the class hierarchy for this interface.
549 is a reserved class name for the root class.
550 The root class for the interface is automatically created by the
554 The name of the parent class for this class.
557 is used when the parent is the root class.
558 Parent class must have been previously defined.
560 The type of admission control and QoS type.
562 is controlled load service for RSVP, otherwise, it should be
567 Percent of the link share.
568 This specifies a linear link-sharing service curve as a fraction of
570 It is a short hand of
571 .Li [ls 0 0 (link-bandwidth * percent / 100)] .
574 This specifies a linear real-time service curve.
575 It is a short hand of
578 This is a short hand of
582 This specifies a upper-limit service curve.
583 It is a short hand of
586 Specify the default class.
587 When this keyword is present, all packets that do not match some
588 classification criteria are assigned to this class.
589 Must be exactly one class on each interface defined as the default
592 The maximum queue size in number of packets.
595 enables RED on this class queue.
597 enables RIO on this class queue.
599 enables RED/ECN on this class queue.
601 clears diffserv codepoint in the IP header.
604 PRIQ (Priority Queueing) implements a simple priority-based queueing.
605 A higher priority class is always served first.
606 Up to 16 priorities can be used with PRIQ.
607 .Bl -tag -width interface -offset indent
610 .Op Cm bandwidth Ar bps
611 .Op Cm tbrsize Ar bytes
615 .Bl -tag -width 8n -offset indent
617 specifies the name of a network interface (e.g., fxp0).
619 specifies the interface bandwidth in bits per second.
621 specifies the bucket size of a token bucket regulator in bytes.
628 .Bl -tag -width class -offset indent
634 .Op Cm priority Ar pri
636 .Op Cm qlimit Ar count
642 .Bl -tag -width 8n -offset indent
649 Must correspond to name in interface specification.
651 Arbitrary name for this class.
652 Must be unique for this interface.
658 High numbers are higher priority.
659 Max value is 15 and Min value is 0.
661 A higher priority class is always served first in PRIQ.
662 Priority must be unique for the interface.
664 Specify the default class.
665 When this keyword is present, all packets that do not match some
666 classification criteria are assigned to this class.
667 Must be exactly one class on each interface defined as the default
670 The maximum queue size in number of packets.
673 enables RED on this class queue.
675 enables RIO on this class queue.
677 enables RED/ECN on this class queue.
679 clears diffserv codepoint in the IP header.
682 WFQ (Weighted Fair Queueing) implements a weighted-round robin
683 scheduler for a set of queue.
684 A weight can be assigned to each queue to give a
685 different proportion of the link capacity.
686 A hash function is used to map a flow to one of a set of queues, and
687 thus, it is possible for two different flows to be mapped into the same
689 .Bl -tag -width interface -offset indent
692 .Op Cm bandwidth Ar bps
693 .Op Cm tbrsize Ar bytes
695 .Op Cm nqueues Ar count
696 .Op Cm qsize Ar bytes
697 .Op Cm hash Ar policy
700 .Bl -tag -width 8n -offset indent
702 specifies the name of a network interface (e.g., fxp0).
704 specifies the interface bandwidth in bits per second.
706 specifies the bucket size of a token bucket regulator in bytes.
712 The number of queues in WFQ.
713 Default value is 256.
715 The size of each queue in number of bytes.
716 Default value is 64K bytes.
718 Type of hash policy to select a queue.
720 specifies a hashing policy by IP destination address.
722 specifies a hashing policy by IP addresses and ports.
724 specifies a hashing policy by IP source port number.
726 specifies a hashing policy by IP source address.
731 FIFOQ (First-In First-Out Queueing) is a simple tail-drop FIFO queue.
732 FIFOQ is the simplest possible implementation of a queueing discipline
733 in ALTQ, and can be used to compare with other queueing disciplines.
734 FIFOQ can be also used as a template for those who want to write their
735 own queueing disciplines.
736 .Bl -tag -width interface -offset indent
739 .Op Cm bandwidth Ar bps
740 .Op Cm tbrsize Ar bytes
742 .Op Cm qlimit Ar count
745 .Bl -tag -width 8n -offset indent
747 specifies the name of a network interface (e.g., fxp0).
749 specifies the interface bandwidth in bits per second.
751 specifies the bucket size of a token bucket regulator in bytes.
757 The maximum queue size in number of packets.
761 RED (Random Early Detection) is an implicit congestion notification
762 mechanism that exercises packet dropping or packet marking
763 stochastically according to the average queue length.
764 RED can be viewed as a buffer management mechanism
765 and can be integrated into other packet scheduling schemes.
766 .Bl -tag -width red -offset indent
775 command sets the default RED parameters.
779 are the minimum and the maximum threshold values.
781 is the inverse (reciprocal) of the maximum drop probability.
782 For example, 10 means the maximum drop probability of 1/10.
783 .Bl -tag -width interface -offset indent
786 .Op Cm bandwidth Ar bps
787 .Op Cm tbrsize Ar bytes
789 .Op Cm qlimit Ar count
790 .Op Cm packetsize Ar bytes
799 .Bl -tag -width 8n -offset indent
801 specifies the name of a network interface (e.g., fxp0).
803 specifies the interface bandwidth in bits per second.
805 specifies the bucket size of a token bucket regulator in bytes.
811 The maximum queue size in number of packets.
814 The average packet size in number of bytes.
815 This parameter is used to calibrate the idle period.
816 Default value is 1000.
818 The inverse of the weight of EWMA (exponentially weighted moving average).
820 The minimum threshold.
822 The maximum threshold.
824 The inverse of the maximum drop probability.
831 ALTQ/RIO has 3 drop precedence levels defined for the Assured
832 Forwarding of DiffServ (RFC2597).
833 Since adaptive flows are likely to stay under the medium drop
834 precedence level under congestion, the medium drop precedence would
835 protect adaptive flows from unadaptive flows.
837 The original RIO has 2 sets of RED parameters; one for in-profile
838 packets and the other for out-of-profile packets.
839 At the ingress of the network, profile meters tag packets as IN
840 or OUT based on contracted profiles for customers.
841 Inside the network, IN packets receive preferential treatment by
843 It is possible to provision the network not to drop IN packets
844 at all by providing enough capacity for the total volume of IN
846 Thus, RIO can be used to provide a service that statistically assures
847 capacity allocated for users.
848 This mechanism can be extended to support an arbitrary number of drop
850 ALTQ supports 3 drop precedence levels.
851 .Bl -tag -width rio -offset indent
866 command sets the default RIO parameters.
867 The parameters are RED parameters for 3 (low, medium, high) drop
869 .Bl -tag -width interface -offset indent
872 .Op Cm bandwidth Ar bps
873 .Op Cm tbrsize Ar bytes
875 .Op Cm qlimit Ar count
876 .Op Cm packetsize Ar bytes
880 .Op Cm lo_invpmax Ar n
881 .Op Cm med_thmin Ar n
882 .Op Cm med_thmax Ar n
883 .Op Cm med_invpmax Ar n
886 .Op Cm hi_invpmax Ar n
890 .Bl -tag -width 8n -offset indent
892 specifies the name of a network interface (e.g., fxp0).
894 specifies the interface bandwidth in bits per second.
896 specifies the bucket size of a token bucket regulator in bytes.
902 The maximum queue size in number of packets.
905 The average packet size in number of bytes.
906 This parameter is used to calibrate the idle period.
907 Default value is 1000.
909 The inverse of the weight of EWMA (exponentially weighted moving average).
911 The minimum threshold for low drop precedence.
913 The maximum threshold for low drop precedence.
915 The inverse of the maximum drop probability for low drop precedence.
917 The minimum threshold for medium drop precedence.
919 The maximum threshold for medium drop precedence.
921 The inverse of the maximum drop probability for medium drop precedence.
923 The minimum threshold for high drop precedence.
925 The maximum threshold for high drop precedence.
927 The inverse of the maximum drop probability for high drop precedence.
932 .Bl -tag -width interface -offset indent
935 .Op Cm bandwidth Ar bps
936 .Op Cm tbrsize Ar bytes
938 .Op Cm qlimit Ar count
939 .Op Cm packetsize Ar bytes
941 .Op Cm holdtime Ar usec
945 .Bl -tag -width 8n -offset indent
947 specifies the name of a network interface (e.g., fxp0).
949 specifies the interface bandwidth in bits per second.
951 specifies the bucket size of a token bucket regulator in bytes.
957 The maximum queue size in number of packets.
960 The average packet size in number of bytes.
961 Default value is 1000.
963 specifies the precision of marking probability.
965 specifies the hold time in usec.
972 command specifies a diffserv traffic conditioner.
973 A traffic conditioner is not a queueing discipline but a component to
974 meter, mark or drop incoming packets according to some rules.
976 As opposed to a queueing discipline, a traffic conditioner handles
977 incoming packets at an input interface.
978 If no queueing discipline (e.g., CBQ) is used for the interface,
979 a null interface command should be used to specify an input network
981 .Bl -tag -width interface -offset indent
984 .Op Cm bandwidth Ar bps
985 .Op Cm tbrsize Ar bytes
990 command has the following syntax.
991 .Bl -tag -width conditioner -offset indent
998 .Bl -tag -width 10n -offset indent
1001 Must correspond to name in interface specification.
1003 Arbitrary name for this conditioner.
1004 Must be unique for this interface.
1006 Action of the conditioner.
1009 An action can be a recursively defined action.
1010 The following actions are defined.
1011 .Bl -tag -width pass -offset indent
1013 .Bl -inset -offset indent
1015 allows the packet to go through without any modification to the packet.
1019 .Bl -tag -width drop -offset indent
1021 .Bl -inset -offset indent
1024 The packet is immediately discarded.
1028 .Bl -tag -width mark -offset indent
1031 .Bl -inset -offset indent
1033 sets the specified value to the ds field in the IP header.
1034 Then, the packet is allowed to go through.
1038 .Bl -tag -width tbmeter -offset indent
1044 .Bl -inset -offset indent
1046 is a token bucket meter configured with rate and depth parameters.
1047 Rate is token rate in bits-per-second.
1048 Depth is bucket depth in KB.
1049 When an incoming packet is in profile (available token is more than
1050 the packet size), tbmeter takes in_action.
1051 Otherwise, tbmeter takes out_action.
1055 .Bl -tag -width trtcm -offset indent
1057 .Ar cmtd_rate cmtd_depth peak_rate peak_depth
1061 .Op Cm coloraware|colorblind
1062 .Bl -inset -offset indent
1064 is a 2-rate 3 color marker for Assured Forwarding.
1065 A trtcm consists of 2 token buckets, one for a committed rate and the
1066 other for a peak rate.
1067 When an incoming packet is in the committed profile, trtcm takes
1069 When the packet is out of the committed profile but in the peak
1070 profile, trtcm takes yellow_action.
1071 Otherwise, tbtcm takes red_action.
1072 A trtcm is either color-aware or color-blind.
1073 A color-aware trtcm do not raise the color (ds field value), that is,
1074 a yellow packet can be yellow or red but can not be blue.
1075 Default is color-blind.
1079 .Bl -tag -width tswtcm -offset indent
1081 .Ar cmtd_rate peak_rate avg_interval
1085 .Bl -inset -offset indent
1087 is a time sliding window 3 color marker for Assured Forwarding.
1088 A tswtcm differs from trtcm in that a tswtcm probabilistically marks
1090 A tswtcm consists of 2 rates, one for a committed rate and the
1091 other for a peak rate.
1092 When an incoming packet is in the committed profile, tswtcm takes
1094 When the packet is out of the committed profile but in the peak
1095 profile, tswtcm takes yellow_action.
1096 Otherwise, tswtcm takes red_action.
1097 cmtd_rate and peak_rate are specified in bits per second.
1098 avg_interval provides the size of time window for averaging incoming
1099 rate, and is specified in milliseconds.
1100 500 msec is ok for normal settings.
1104 JoBS (Joint Buffer Management and Scheduling) is a queuing discipline
1105 that can enforce any feasible mix of absolute and proportional guarantees
1106 on packet losses, packet delays, and throughput, for classes of traffic,
1108 No admission control is performed, thus if the set of service
1109 guarantees becomes infeasible, some service guarantees may be
1111 .Bl -tag -width interface -offset indent
1114 .Op Cm bandwidth Ar bps
1115 .Op Cm qlimit Ar count
1117 .Op Cm tbrsize Ar bytes
1121 .Bl -tag -width 8n -offset indent
1123 specifies the name of a network interface (e.g., fxp0).
1125 specifies the interface bandwidth in bits per second.
1127 specifies the maximum queue size in number of packets.
1129 specifies that classes have independent buffers.
1130 The default is to have a shared buffer for all classes.
1131 If this option is specified, qlimit applies to each independent
1134 specifies the bucket size of a token bucket regulator in bytes.
1141 .Bl -tag -width class -offset indent
1147 .Op Cm priority Ar pri
1149 .Op Cm adc Ar microsecs
1150 .Op Cm alc Ar fraction
1156 .Bl -tag -width 8n -offset indent
1163 Must correspond to name in interface specification.
1165 Arbitrary name for this class.
1166 Must be unique for this interface.
1168 Parent class must be
1172 Priority index used for proportional differentiation.
1173 Max value is 15 and Min value is 0.
1175 Priority must be unique for the interface.
1177 Specify the default class.
1178 When this keyword is present, all packets that do not match some
1179 classification criteria are assigned to this class.
1180 Must be exactly one class on each interface defined as the
1183 Specifies an upper bound on delays for that class (in microseconds).
1184 A value of \-1 will indicate the absence of delay bound.
1185 By default, no delay bound is offered.
1187 Specifies a upper bound on loss rate for that class (in fraction of 1,
1188 for instance a 1% loss rate bound will be expressed as 0.01).
1189 A value of \-1 will indicate the absence of loss rate bound.
1190 By default, no loss rate bound is offered.
1192 Specifies a lower bound
1193 on the throughput received by that class (in bits per second).
1195 \-1 will indicate the absence of throughput bound.
1196 By default, no throughput bound is offered.
1198 Specifies a proportional delay differentiation factor between that class
1199 and the class with the successive priority index.
1200 For instance, for priority 1, an rdc of 2 specifies that the delays of
1201 packets marked as class 2 will roughly be twice the delays of packets
1204 \-1 indicates the absence of proportional differentiation on that class.
1205 Note that class N if N is the maximum priority should have a dummy
1206 coefficient different from \-1 if proportional delay differentiation is desired
1208 By default, no proportional delay differentiation is offered.
1210 Specifies a proportional loss differentiation factor between that class
1211 and the class with the successive priority index.
1212 For instance, for priority 1, an rlc of 2 specifies that the loss rate of
1213 packets marked as class 2 will roughly be twice the loss rate of packets
1216 \-1 indicates the absence of proportional differentiation on that class.
1217 Note that class N if N is the maximum priority should have a dummy
1218 coefficient different from \-1 if proportional loss differentiation is desired
1220 By default, no proportional loss differentiation is offered.
1226 # cbq configuration for vx0 (10Mbps ether)
1227 # give at least 40% to TCP
1228 # limit HTTP from network 133.138.1.0 up to 10%, use RED.
1229 # other traffic goes into default class
1231 interface vx0 bandwidth 10M cbq
1233 class cbq vx0 root_class NULL priority 0 pbandwidth 100
1234 class cbq vx0 def_class root_class borrow pbandwidth 95 default
1235 class cbq vx0 tcp_class def_class borrow pbandwidth 40
1236 filter vx0 tcp_class 0 0 0 0 6
1237 class cbq vx0 csl_class tcp_class pbandwidth 10 red
1238 filter vx0 csl_class 0 0 133.138.1.0 netmask 0xffffff00 80 6
1239 filter vx0 csl_class 133.138.1.0 netmask 0xffffff00 0 0 80 6
1241 # sample filter6 command
1243 filter6 vx0 csl_class ::0 0 d000:a:0:123::/64 80 6
1248 # hfsc configuration for hierarchical sharing
1250 interface pvc0 bandwidth 45M hfsc
1252 # (10% of the bandwidth share goes to the default class)
1253 class hfsc pvc0 def_class root pshare 10 default
1255 # bandwidth share guaranteed rate
1259 class hfsc pvc0 cmu root pshare 45 grate 15M
1260 class hfsc pvc0 pitt root pshare 45 grate 15M
1262 # CMU bandwidth share guaranteed rate
1266 class hfsc pvc0 cmu_other cmu pshare 20 grate 10M
1267 filter pvc0 cmu_other 0 0 128.2.0.0 netmask 0xffff0000 0 0
1268 class hfsc pvc0 cmu_cs cmu pshare 20 grate 5M
1269 filter pvc0 cmu_cs 0 0 128.2.242.0 netmask 0xffffff00 0 0
1271 # PITT bandwidth share guaranteed rate
1275 class hfsc pvc0 pitt_other pitt pshare 20 grate 10M
1276 filter pvc0 pitt_other 0 0 136.142.0.0 netmask 0xffff0000 0 0
1277 class hfsc pvc0 pitt_cs pitt pshare 20 grate 5M
1278 filter pvc0 pitt_cs 0 0 136.142.79.0 netmask 0xffffff00 0 0
1280 .Ss HFSC Example (simpler one with ulimit)
1283 interface fxp0 bandwidth 90M hfsc
1284 # reserve 20% for default class
1285 class hfsc fxp0 def_class root pshare 20 default
1286 # shared class for TCP and UDP
1287 class hfsc fxp0 shared_class root bandwidth 72M
1288 # shared class for all TCP
1289 class hfsc fxp0 tcp_shared shared_class bandwidth 40M ulimit 60M
1291 class hfsc fxp0 tcp_class tcp_shared bandwidth 15M ulimit 50M
1292 filter fxp0 tcp_class 0 0 0 0 6
1294 class hfsc fxp0 http_class tcp_shared bandwidth 25M ulimit 40M
1295 filter fxp0 http_class 0 80 0 0 6
1296 filter fxp0 http_class 0 0 0 80 6
1298 class hfsc fxp0 udp_class shared_class bandwidth 15M ulimit 20M
1299 filter fxp0 udp_class 0 0 0 0 17
1304 # priq configuration for fxp0 (100Mbps ether)
1305 # icmp: high priority
1306 # tcp: medium priority
1307 # others: low priority
1309 interface fxp0 bandwidth 100M priq
1311 class priq fxp0 high_class NULL priority 2
1312 filter fxp0 high_class 0 0 0 0 1
1313 class priq fxp0 med_class NULL priority 1
1314 filter fxp0 med_class 0 0 0 0 6
1315 class priq fxp0 low_class NULL priority 0 default
1319 interface pvc0 bandwidth 134000000 wfq
1323 interface rl0 bandwidth 10M fifoq
1325 .Ss Conditioner Example
1331 # discard all packets from 192.168.0.83
1333 conditioner fxp0 dropper \*[Lt]drop\*[Gt]
1334 filter fxp0 dropper 0 0 192.168.0.83 0 0
1338 # mark EF to all packets from 192.168.0.117
1340 conditioner pvc1 ef_cdnr \*[Lt]tbmeter 6M 64K \*[Lt]mark 0xb8\*[Gt]\*[Lt]drop\*[Gt]\*[Gt]
1341 filter fxp0 ef_cdnr 0 0 192.168.0.117 0 0
1345 # mark AF1x to packets from 192.168.0.178
1346 # AF11 (low drop precedence): less than 3Mbps
1347 # AF12 (medium drop precedence): more than 3Mbps and less than 10Mbps
1348 # AF13 (high drop precedence): more than 10Mbps
1350 conditioner fxp0 af1x_cdnr \*[Lt]trtcm 3M 32K 10M 64K \*[Lt]mark 0x28\*[Gt]\*[Lt]mark 0x30\*[Gt]\*[Lt]mark 0x38\*[Gt]\*[Gt]
1351 filter fxp0 af1x_cdnr 0 0 192.168.0.178 0 0
1356 This man page is incomplete.
1357 For more information read the source.