head 1.19; access; symbols netbsd-8-3-RELEASE:1.15 netbsd-9-4-RELEASE:1.18 netbsd-10-0-RELEASE:1.19 netbsd-10-0-RC6:1.19 netbsd-10-0-RC5:1.19 netbsd-10-0-RC4:1.19 netbsd-10-0-RC3:1.19 netbsd-10-0-RC2:1.19 netbsd-10-0-RC1:1.19 netbsd-10:1.19.0.2 netbsd-10-base:1.19 netbsd-9-3-RELEASE:1.18 cjep_sun2x-base1:1.18 cjep_sun2x:1.18.0.8 cjep_sun2x-base:1.18 cjep_staticlib_x-base1:1.18 netbsd-9-2-RELEASE:1.18 cjep_staticlib_x:1.18.0.6 cjep_staticlib_x-base:1.18 netbsd-9-1-RELEASE:1.18 phil-wifi-20200421:1.18 phil-wifi-20200411:1.18 is-mlppp:1.18.0.4 is-mlppp-base:1.18 phil-wifi-20200406:1.18 netbsd-8-2-RELEASE:1.15 netbsd-9-0-RELEASE:1.18 netbsd-9-0-RC2:1.18 netbsd-9-0-RC1:1.18 phil-wifi-20191119:1.18 netbsd-9:1.18.0.2 netbsd-9-base:1.18 phil-wifi-20190609:1.18 netbsd-8-1-RELEASE:1.15 netbsd-8-1-RC1:1.15 pgoyette-compat-merge-20190127:1.16 pgoyette-compat-20190127:1.16 pgoyette-compat-20190118:1.16 pgoyette-compat-1226:1.16 pgoyette-compat-1126:1.16 pgoyette-compat-1020:1.16 pgoyette-compat-0930:1.16 pgoyette-compat-0906:1.16 netbsd-7-2-RELEASE:1.15 pgoyette-compat-0728:1.16 netbsd-8-0-RELEASE:1.15 phil-wifi:1.16.0.6 phil-wifi-base:1.16 pgoyette-compat-0625:1.16 netbsd-8-0-RC2:1.15 pgoyette-compat-0521:1.16 pgoyette-compat-0502:1.16 pgoyette-compat-0422:1.16 netbsd-8-0-RC1:1.15 pgoyette-compat-0415:1.16 pgoyette-compat-0407:1.16 pgoyette-compat-0330:1.16 pgoyette-compat-0322:1.16 pgoyette-compat-0315:1.16 netbsd-7-1-2-RELEASE:1.15 pgoyette-compat:1.16.0.4 pgoyette-compat-base:1.16 netbsd-7-1-1-RELEASE:1.15 matt-nb8-mediatek:1.15.0.20 matt-nb8-mediatek-base:1.15 perseant-stdc-iso10646:1.16.0.2 perseant-stdc-iso10646-base:1.16 netbsd-8:1.15.0.18 netbsd-8-base:1.15 prg-localcount2-base3:1.15 prg-localcount2-base2:1.15 prg-localcount2-base1:1.15 prg-localcount2:1.15.0.16 prg-localcount2-base:1.15 pgoyette-localcount-20170426:1.15 bouyer-socketcan-base1:1.15 pgoyette-localcount-20170320:1.15 netbsd-7-1:1.15.0.14 netbsd-7-1-RELEASE:1.15 netbsd-7-1-RC2:1.15 netbsd-7-nhusb-base-20170116:1.15 bouyer-socketcan:1.15.0.12 bouyer-socketcan-base:1.15 pgoyette-localcount-20170107:1.15 netbsd-7-1-RC1:1.15 pgoyette-localcount-20161104:1.15 netbsd-7-0-2-RELEASE:1.15 localcount-20160914:1.15 netbsd-7-nhusb:1.15.0.10 netbsd-7-nhusb-base:1.15 pgoyette-localcount-20160806:1.15 pgoyette-localcount-20160726:1.15 pgoyette-localcount:1.15.0.8 pgoyette-localcount-base:1.15 netbsd-7-0-1-RELEASE:1.15 netbsd-7-0:1.15.0.6 netbsd-7-0-RELEASE:1.15 netbsd-7-0-RC3:1.15 netbsd-7-0-RC2:1.15 netbsd-7-0-RC1:1.15 netbsd-5-2-3-RELEASE:1.12 netbsd-5-1-5-RELEASE:1.12 netbsd-6-0-6-RELEASE:1.14 netbsd-6-1-5-RELEASE:1.14 netbsd-7:1.15.0.4 netbsd-7-base:1.15 yamt-pagecache-base9:1.15 yamt-pagecache-tag8:1.14 netbsd-6-1-4-RELEASE:1.14 netbsd-6-0-5-RELEASE:1.14 tls-earlyentropy:1.15.0.2 tls-earlyentropy-base:1.15 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.15 riastradh-drm2-base3:1.15 netbsd-6-1-3-RELEASE:1.14 netbsd-6-0-4-RELEASE:1.14 netbsd-5-2-2-RELEASE:1.12 netbsd-5-1-4-RELEASE:1.12 netbsd-6-1-2-RELEASE:1.14 netbsd-6-0-3-RELEASE:1.14 netbsd-5-2-1-RELEASE:1.12 netbsd-5-1-3-RELEASE:1.12 netbsd-6-1-1-RELEASE:1.14 riastradh-drm2-base2:1.14 riastradh-drm2-base1:1.14 riastradh-drm2:1.14.0.14 riastradh-drm2-base:1.14 netbsd-6-1:1.14.0.18 netbsd-6-0-2-RELEASE:1.14 netbsd-6-1-RELEASE:1.14 netbsd-6-1-RC4:1.14 netbsd-6-1-RC3:1.14 agc-symver:1.14.0.16 agc-symver-base:1.14 netbsd-6-1-RC2:1.14 netbsd-6-1-RC1:1.14 yamt-pagecache-base8:1.14 netbsd-5-2:1.12.0.2 netbsd-6-0-1-RELEASE:1.14 yamt-pagecache-base7:1.14 netbsd-5-2-RELEASE:1.12 netbsd-5-2-RC1:1.12 matt-nb6-plus-nbase:1.14 yamt-pagecache-base6:1.14 netbsd-6-0:1.14.0.12 netbsd-6-0-RELEASE:1.14 netbsd-6-0-RC2:1.14 tls-maxphys:1.14.0.10 tls-maxphys-base:1.15 matt-nb6-plus:1.14.0.8 matt-nb6-plus-base:1.14 netbsd-6-0-RC1:1.14 yamt-pagecache-base5:1.14 yamt-pagecache-base4:1.14 netbsd-6:1.14.0.6 netbsd-6-base:1.14 netbsd-5-1-2-RELEASE:1.12 netbsd-5-1-1-RELEASE:1.12 yamt-pagecache-base3:1.14 yamt-pagecache-base2:1.14 yamt-pagecache:1.14.0.4 yamt-pagecache-base:1.14 cherry-xenmp:1.14.0.2 cherry-xenmp-base:1.14 bouyer-quota2-nbase:1.13 bouyer-quota2:1.13.0.2 bouyer-quota2-base:1.13 matt-mips64-premerge-20101231:1.13 matt-nb5-mips64-premerge-20101231:1.12 matt-nb5-pq3:1.12.0.14 matt-nb5-pq3-base:1.12 netbsd-5-1:1.12.0.12 netbsd-5-1-RELEASE:1.12 netbsd-5-1-RC4:1.12 matt-nb5-mips64-k15:1.12 netbsd-5-1-RC3:1.12 netbsd-5-1-RC2:1.12 netbsd-5-1-RC1:1.12 netbsd-5-0-2-RELEASE:1.12 matt-nb5-mips64-premerge-20091211:1.12 matt-premerge-20091211:1.13 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.12 matt-nb4-mips64-k7-u2a-k9b:1.12 matt-nb5-mips64-u1-k1-k5:1.12 matt-nb5-mips64:1.12.0.10 netbsd-5-0-1-RELEASE:1.12 jym-xensuspend-nbase:1.13 netbsd-5-0:1.12.0.8 netbsd-5-0-RELEASE:1.12 netbsd-5-0-RC4:1.12 netbsd-5-0-RC3:1.12 netbsd-5-0-RC2:1.12 jym-xensuspend:1.12.0.6 jym-xensuspend-base:1.13 netbsd-5-0-RC1:1.12 netbsd-5:1.12.0.4 netbsd-5-base:1.12 matt-mips64-base2:1.12 matt-mips64:1.11.0.14 netbsd-4-0-1-RELEASE:1.10 wrstuden-revivesa-base-3:1.12 wrstuden-revivesa-base-2:1.11 wrstuden-fixsa-newbase:1.10.2.1 wrstuden-revivesa-base-1:1.11 yamt-pf42-base4:1.11 yamt-pf42-base3:1.11 hpcarm-cleanup-nbase:1.11 yamt-pf42-baseX:1.11 yamt-pf42-base2:1.11 wrstuden-revivesa:1.11.0.12 wrstuden-revivesa-base:1.11 yamt-pf42:1.11.0.10 yamt-pf42-base:1.11 keiichi-mipv6-nbase:1.11 keiichi-mipv6:1.11.0.8 keiichi-mipv6-base:1.11 matt-armv6-nbase:1.11 matt-armv6-prevmlocking:1.11 wrstuden-fixsa-base-1:1.10 netbsd-4-0:1.10.0.6 netbsd-4-0-RELEASE:1.10 cube-autoconf:1.11.0.6 cube-autoconf-base:1.11 netbsd-4-0-RC5:1.10 netbsd-4-0-RC4:1.10 netbsd-4-0-RC3:1.10 netbsd-4-0-RC2:1.10 netbsd-4-0-RC1:1.10 matt-armv6:1.11.0.4 matt-armv6-base:1.11 matt-mips64-base:1.11 hpcarm-cleanup:1.11.0.2 hpcarm-cleanup-base:1.11 netbsd-3-1-1-RELEASE:1.8 netbsd-3-0-3-RELEASE:1.8 wrstuden-fixsa:1.10.0.4 wrstuden-fixsa-base:1.10.2.1 abandoned-netbsd-4-base:1.8 abandoned-netbsd-4:1.8.0.14 netbsd-3-1:1.8.0.16 netbsd-3-1-RELEASE:1.8 netbsd-3-0-2-RELEASE:1.8 netbsd-3-1-RC4:1.8 netbsd-3-1-RC3:1.8 netbsd-3-1-RC2:1.8 netbsd-3-1-RC1:1.8 netbsd-4:1.10.0.2 netbsd-4-base:1.10 netbsd-3-0-1-RELEASE:1.8 peter-altq-base:1.8 peter-altq:1.8.0.12 netbsd-3-0:1.8.0.10 netbsd-3-0-RELEASE:1.8 netbsd-3-0-RC6:1.8 netbsd-3-0-RC5:1.8 netbsd-3-0-RC4:1.8 netbsd-3-0-RC3:1.8 netbsd-3-0-RC2:1.8 netbsd-3-0-RC1:1.8 netbsd-2-0-3-RELEASE:1.8 netbsd-2-1:1.8.0.8 netbsd-2-1-RELEASE:1.8 netbsd-2-1-RC6:1.8 netbsd-2-1-RC5:1.8 netbsd-2-1-RC4:1.8 netbsd-2-1-RC3:1.8 netbsd-2-1-RC2:1.8 netbsd-2-1-RC1:1.8 netbsd-2-0-2-RELEASE:1.8 netbsd-3:1.8.0.6 netbsd-3-base:1.8 netbsd-2-0-1-RELEASE:1.8 netbsd-2:1.8.0.4 netbsd-2-base:1.8 netbsd-2-0-RELEASE:1.8 netbsd-2-0-RC5:1.8 netbsd-2-0-RC4:1.8 netbsd-2-0-RC3:1.8 netbsd-2-0-RC2:1.8 netbsd-2-0-RC1:1.8 netbsd-2-0:1.8.0.2 netbsd-2-0-base:1.8 netbsd-1-6-PATCH002-RELEASE:1.6 netbsd-1-6-PATCH002:1.6 netbsd-1-6-PATCH002-RC4:1.6 netbsd-1-6-PATCH002-RC3:1.6 netbsd-1-6-PATCH002-RC2:1.6 netbsd-1-6-PATCH002-RC1:1.6 netbsd-1-6-PATCH001:1.6 netbsd-1-6-PATCH001-RELEASE:1.6 netbsd-1-6-PATCH001-RC3:1.6 netbsd-1-6-PATCH001-RC2:1.6 netbsd-1-6-PATCH001-RC1:1.6 fvdl_fs64_base:1.6 netbsd-1-6-RELEASE:1.6 netbsd-1-6-RC3:1.6 netbsd-1-6-RC2:1.6 netbsd-1-6-RC1:1.6 netbsd-1-6:1.6.0.2 netbsd-1-6-base:1.6 kame_15_20001214:1.1.1.1 kame:1.1.1; locks; strict; comment @.\" @; 1.19 date 2021.07.14.08.32.13; author ozaki-r; state Exp; branches; next 1.18; commitid Tn9xCgYfrxCmPV0D; 1.18 date 2019.04.09.19.10.21; author sevan; state Exp; branches; next 1.17; commitid S7tN3CzIr93pWHiB; 1.17 date 2019.04.09.18.22.33; author sevan; state Exp; branches; next 1.16; commitid y4HRoncEJ1E0GHiB; 1.16 date 2017.07.03.21.35.29; author wiz; state Exp; branches 1.16.6.1; next 1.15; commitid GDcvPnLuEcjBtPXz; 1.15 date 2013.09.08.19.12.18; author jakllsch; state Exp; branches; next 1.14; commitid 0beYeoFE5RVcuF4x; 1.14 date 2011.04.25.22.45.31; author wiz; state Exp; branches 1.14.4.1 1.14.10.1; next 1.13; 1.13 date 2009.03.15.12.30.09; author joerg; state Exp; branches; next 1.12; 1.12 date 2008.09.11.17.58.59; author joerg; state Exp; branches 1.12.6.1; next 1.11; 1.11 date 2007.04.13.18.17.38; author plunky; state Exp; branches 1.11.12.1; next 1.10; 1.10 date 2006.10.14.07.39.40; author wiz; state Exp; branches 1.10.2.1 1.10.4.1; next 1.9; 1.9 date 2006.10.12.19.59.13; author peter; state Exp; branches; next 1.8; 1.8 date 2003.03.31.17.21.41; author perry; state Exp; branches 1.8.12.1; next 1.7; 1.7 date 2003.03.15.23.48.30; author wiz; state Exp; branches; next 1.6; 1.6 date 2002.03.05.04.11.51; author itojun; state Exp; branches; next 1.5; 1.5 date 2002.02.08.01.38.46; author ross; state Exp; branches; next 1.4; 1.4 date 2001.08.16.07.45.35; author itojun; state Exp; branches; next 1.3; 1.3 date 2001.06.05.10.27.02; author wiz; state Exp; branches; next 1.2; 1.2 date 2001.05.08.17.04.56; author wiz; state Exp; branches; next 1.1; 1.1 date 2000.12.16.17.39.42; author thorpej; state Exp; branches 1.1.1.1; next ; 1.16.6.1 date 2019.06.10.22.10.28; author christos; state Exp; branches; next ; commitid jtc8rnCzWiEEHGqB; 1.14.4.1 date 2014.05.22.11.43.01; author yamt; state Exp; branches; next ; commitid wmvImESqVQCgMwBx; 1.14.10.1 date 2014.08.20.00.05.06; author tls; state Exp; branches; next ; commitid jTnpym9Qu0o4R1Nx; 1.12.6.1 date 2009.05.13.19.20.15; author jym; state Exp; branches; next ; 1.11.12.1 date 2008.09.24.16.38.59; author wrstuden; state Exp; branches; next ; 1.10.2.1 date 2008.09.14.20.55.26; author bouyer; state Exp; branches; next ; 1.10.4.1 date 2008.09.15.08.09.58; author skrll; state Exp; branches; next ; 1.8.12.1 date 2006.03.18.18.33.43; author peter; state Exp; branches; next ; 1.1.1.1 date 2000.12.16.17.39.42; author thorpej; state Exp; branches; next ; desc @@ 1.19 log @libaltq, cbq: add two options to interface - no-control: don't create a control class automatically - no-tbr: don't install TBR @ text @.\" $NetBSD: altq.conf.5,v 1.18 2019/04/09 19:10:21 sevan Exp $ .\" $KAME: altq.conf.5,v 1.15 2002/11/17 02:51:49 kjc Exp $ .\" .\" Copyright (C) 2000 .\" Sony Computer Science Laboratories Inc. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY SONY CSL AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL SONY CSL OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .Dd July 14, 2021 .Dt ALTQ.CONF 5 .Os .\" .Sh NAME .Nm altq.conf .Nd ALTQ configuration file .\" .Sh DESCRIPTION The .Nm file contains a number of lines specifying the behavior of queueing disciplines. Comments start with a # and extend to the end of the line. .Pp The .Xr altqd 8 program reads .Pa /etc/altq.conf at startup and sets up queueing disciplines. BLUE, CBQ (Class-Based Queueing), FIFOQ (First-In First-Out Queue), HFSC (Hierarchical Fair Service Curve), PRIQ (Priority Queueing), RED (Random Early Detection), RIO (RED with IN/OUT), WFQ (Weighted Fair Queueing), JoBS (Joint Buffer Management and Scheduling) and CDNR (Diffserv Traffic Conditioner) can be configured in this file. .Ss Interface Commands .Bl -tag -width interface -offset indent .It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes .Op Ar sched_type .Op Ar discipline-specific-options .El .Pp The .Cm interface command specifies a network interface to be under control of ALTQ. One interface specification is provided for each network interface under control of ALTQ. A system configured as a router may have multiple interface specifications. .Bl -tag -width 8n -offset indent .It Ar if_name specifies the name of a network interface (e.g., fxp0). .It Cm bandwidth specifies the interface bandwidth in bits per second. This is the maximum rate that the queueing discipline will allow on this interface. .It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. When .Cm tbrsize is omitted, the system automatically sets the bucket size using heuristics. The token rate is set to the interface bandwidth specified by the .Cm interface command. .It Ar sched_type Type of a queueing discipline. It must be either .Cm blue , .Cm cbq , .Cm fifoq , .Cm hfsc , .Cm jobs , .Cm priq , .Cm red , .Cm rio , or .Cm wfq . If the interface has only traffic conditioners and no queueing discipline, .Ar sched_type can be omitted. .El .Ss Class Command .Bl -tag -width class -offset indent .It Cm class .Ar sched_type .Ar if_name .Ar class_name .Ar parent_name .Op Cm red|rio .Op Cm ecn .Op Cm cleardscp .Op Ar discipline-specific-options .El .Pp The .Cm class command specifies a packet scheduling class for CBQ, HFSC, JoBS or PRIQ. A class specifier must be provided for each packet scheduling class. .Bl -tag -width 8n -offset indent .It Ar sched_type Type of queueing discipline. Must correspond to the discipline name in interface specification. .It Ar if_name Interface name. Must correspond to name in interface specification. .It Ar class_name Arbitrary name for this class. Must be unique for this interface. .It Ar parent_name The name of the parent class for this class (for CBQ or HFSC). Parent class must have been previously defined. PRIQ and JoBS do not have class hierarchy and parent_name must be .Dv NULL for PRIQ and JoBS classes. .It Cm red Use RED (Random Early Detection) on this class queue. RED drops packets with the probability proportional to the average queue length. .It Cm rio Use RIO (RED with In/Out bit) on this class queue. RIO runs triple RED algorithms at the same time. .It Cm ecn Use RED/ECN (Explicit Congestion Notification) on this class queue (experimental implementation). ECN implies RED. .It Cm cleardscp Clear diffserv codepoint in the IP header. .El .Ss Filter Commands .Bl -tag -width filter -offset indent .It Cm filter .Ar if_name .Ar class_name .Op Cm name Ar fltr_name .Op Cm ruleno Ar num .Ar filter_values .El .Pp The .Cm filter command specifies a filter to classify packets into a scheduling class. A filter specifier determines any statically-defined packet classification rules. .Bl -tag -width 10n -offset indent .It Ar if_name Name of a network interface (e.g., fxp0). .It Ar class_name Name of a class or a conditioner to which matching packets are directed. .It Cm name Add an arbitrary name to the filter for a future reference. .It Cm ruleno Specifies explicit order of filter matching. Filter matching is performed from a filter with a larger ruleno. Default is 0. .El .Pp .Ar filter_values should be in the following format: .Bl -tag -width filter -offset indent .It Ar filter_values : .Ad dst_addr Op Cm netmask Ar mask .Ar dport .Ad src_addr Op Cm netmask Ar mask .Ar sport .Ar proto .Oo .Cm tos .Ar value .Op Cm tosmask Ar value .Oc .Op Cm gpi Ar value .El .Pp Here .Ad dst_addr and .Ad src_addr are dotted-decimal addresses of the destination and the source respectively. An address may be followed by .Cm netmask keyword. .Ar dport and .Ar sport are port numbers of the destination and the source respectively. .Ar proto is a protocol number defined for IP packets (e.g. 6 for TCP). .Cm tos keyword can be used to specify the type of service field value. .Cm gpi keyword can be used to specify the Security Parameter Index value for IPsec. .Pp When filter value 0 is used, it is taken as a wildcard. .Bl -tag -width filter6 -offset indent .It Cm filter6 .Ar if_name .Ar class_name .Op Cm name Ar fltr_name .Op Cm ruleno Ar num .Ar filter6_values .El .Pp The .Cm filter6 command is for IPv6. .Ar filter6_value should be in the following format: .Bl -tag -width filter6 -offset indent .It filter6_values : .Ad dst_addr Ns Op /prefix_len .Ar dport .Ad src_addr Ns Op /prefix_len .Ar sport .Ar proto .Op Cm flowlabel Ar value .Oo .Cm tclass .Ar value .Op Cm tclassmask Ar value .Oc .Op Cm gpi Ar value .El .Pp Here .Ad dst_addr and .Ad src_addr are IPv6 addresses of the destination and the source respectively. An address may be followed by an optional address prefix length. .Ar dport and .Ar sport are port numbers of the destination and the source respectively. .Ar proto is a protocol number defined for IPv6 packets (e.g. 6 for TCP). .Cm flowlabel keyword can be used to specify the flowlabel field value. .Cm tclass keyword can be used to specify the traffic class field value. .Cm gpi keyword can be used to specify the Security Parameter Index value for IPsec. .Pp When filter value 0 is used, it is taken as a wildcard. .Ss CBQ Commands CBQ (Class Based Queueing) achieves both partitioning and sharing of link bandwidth by hierarchically structured classes. Each class has its own queue and is assigned its share of bandwidth. A child class can borrow bandwidth from its parent class as long as excess bandwidth is available. .Bl -tag -width interface -offset indent .It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes .Op Ar sched_type .Op Cm efficient .Op Cm no-control .Op Cm no-tbr .El .Bl -tag -width 8n -offset indent .It Ar if_name specifies the name of a network interface (e.g., fxp0). .It Cm bandwidth specifies the interface bandwidth in bits per second. .It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Ar sched_type must be either .Cm cbq , .Cm cbq-wrr (weighted-round robin) or .Cm cbq-prr (packet-by-packet round robin). .Cm cbq is equivalent to .Cm cbq-wrr . .It Cm efficient Enables CBQ's link efficiency mode. This means that the scheduler will send a packet from the first overlimit class it encounters of all classes of the link-sharing structure when all classes are overlimit. This will also cause the scheduler to use greater than its assigned bandwidth, if the link is capable of more than the assigned bandwidth. By default, this mode is turned off. By adding the keyword .Cm efficient to the interface specification line, enables this mode. .It Cm no-control By default, the control class is automatically created when default class is created and one doesn't exist yet. This option suppresses the behavior on the interface. .It Cm no-tbr By default, a token bucket regulator is automatically created on each interface. This option suppresses the behavior on the interface. .El .Bl -tag -width class -offset indent .It Cm class .Ar sched_type .Ar if_name .Ar class_name .Ar parent_name .Op Cm admission cntlload|none .Op Cm priority Ar pri .Op Cm pbandwidth Ar percent .Op Cm exactbandwidth Ar bps .Op Cm borrow .Op Cm default .Op Cm control .Op Cm maxburst Ar count .Op Cm minburst Ar count .Bk -words .Op Cm maxdelay Ar msec .Ek .Op Cm packetsize Ar bytes .Op Cm maxpacketsize Ar bytes .Op Cm red|rio .Op Cm ecn .Op Cm flowvalve .Op Cm cleardscp .El .Pp The .Cm class command specifies a CBQ class. The classes are organized as a hierarchy, and every class, except for the root class, has a parent. .Bl -tag -width 8n -offset indent .It Ar sched_type must be .Cm cbq for a CBQ class. .It Ar if_name Interface name. Must correspond to name in interface specification. .It Ar class_name Arbitrary name for this class. Must be unique within the class hierarchy for this interface. The name .Cm ctl_class is a reserved class name. .It Cm parent_name The name of the parent class for this class or .Dv NULL if this is the root class. Parent class must have been previously defined. .It Cm admission The type of admission control and QoS type. .Cm cntlload is controlled load service for RSVP, otherwise, it should be .Cm none . The default is .Cm none . .It Cm priority High numbers are higher priority. Max value is 7 and Min value is 0. Default is 1. .It Cm pbandwidth The percentage of the interface bandwidth allocated to this class. Generally should add up to 100 percent at each level of the class hierarchy, although other amounts can be specified for purposes of experimentation. .It Cm exactbandwidth Specify the bandwidth in bits-per-second instead of .Cm pbandwidth . Note that the bandwidth allocation of CBQ is not so precise but this is just a way to pass a parameter to CBQ; the user is supposed to know the detailed internals of CBQ. .Cm pbandwidth is a preferred way to specify the bandwidth of a class. .It Cm borrow The class can borrow bandwidth from its parent class when this class is overlimit. If this keyword is not present, then no borrowing is done, and the packet is delayed or dropped when the class is overlimit. .It Cm 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. .It Cm control Specify the control class. When this keyword is present, the predefined control class packets (RSVP, IGMP, and ICMP) are assigned to this class. Note that when the control class is not specified by the time the default class is created, one is automatically created with default parameters. Thus, if the control class is specified, it must be listed before the default class. Must be exactly one class on each interface defined as the control class. .It Cm maxburst The maximum burst of back-to-back packets allowed in this class. Default is 16 but the default value is automatically reduced to 4 when the class bandwidth is small (about less than 1Mbps). .It Cm minburst The minimum burst is used to obtain the steady state burst size. It's the parameter to help compute offtime for the class. Offtime is the amount of time a class is to wait between packets. Default is 2. .It Cm maxdelay The maxdelay is specified in milliseconds and used to obtain the max queue size of the class. If not specified, the default max queue size (30 packets) is used. .It Cm packetsize The average packet size in bytes to be used in CBQ over-/under-limit computations. Default value is MTU of the interface. .It Cm maxpacketsize The maximum packet size in bytes for the class. Default value is MTU of the interface. .It Cm red enables RED on this class queue. .It Cm rio enables RIO on this class queue. .It Cm ecn enables RED/ECN on this class queue. .It Cm flowvalve enables RED/flow-valve (a.k.a. red-penalty-box) on this class queue. .It Cm cleardscp clears diffserv codepoint in the IP header. .El .Ss HFSC Commands 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. .Bl -tag -width interface -offset indent .It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes .Op Ar sched_type .El .Bl -tag -width 8n -offset indent .It Ar if_name specifies the name of a network interface (e.g., fxp0). .It Cm bandwidth specifies the interface bandwidth in bits per second. .It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Ar sched_type must be .Cm hfsc for HFSC. .El .Bl -tag -width class -offset indent .It Cm class .Ar sched_type .Ar if_name .Ar class_name .Ar parent_name .Op Cm admission cntlload|none .Op Bq Cm sc Ar m1 d m2 .Op Bq Cm rt Ar m1 d m2 .Op Bq Cm ls Ar m1 d m2 .Op Bq Cm ul Ar m1 d m2 .Op Cm pshare Ar percent .Op Cm grate Ar bps .Op Cm bandwidth Ar bps .Op Cm ulimit Ar bps .Op Cm default .Op Cm qlimit Ar count .Op Cm red|rio .Op Cm ecn .Op Cm cleardscp .El .Pp The .Cm class command specifies a HFSC class. The classes are organized as a hierarchy, and every class, except for the root class, has a parent. .Pp Each HFSC class has 2 service curves, the real-time service curve and the link-sharing service curve. Service curves are specified by .Bq Ar type Ar m1 d m2 . .Ar type should be either .Cm sc , rt , ls , or .Cm ul . .Cm sc (service curve) is used to set the same values to both real-time and link-sharing service curves. .Cm rt (real-time) is used to specify the real-time service curve. .Cm ls (link-sharing) is used to specify the link-sharing service curve. .Cm ul (upper-limit) is used to specify the upper-limit service curve for link-sharing. .Ar m1 is the slope of the first segment specified in bits-per-second. .Ar d is the x-projection of the intersection point of the 2 segments specified in milliseconds. .Ar m2 is the slope of the second segment specified in bits-per-second. .Bl -tag -width 8n -offset indent .It Ar sched_type must be .Cm hfsc for a HFSC class. .It Ar if_name Interface name. Must correspond to name in interface specification. .It Ar class_name Arbitrary name for this class. Must be unique within the class hierarchy for this interface. The name .Cm root is a reserved class name for the root class. The root class for the interface is automatically created by the .Cm interface command. .It Ar parent_name The name of the parent class for this class. Keyword .Cm root is used when the parent is the root class. Parent class must have been previously defined. .It Cm admission The type of admission control and QoS type. .Cm cntlload is controlled load service for RSVP, otherwise, it should be .Cm none . The default is .Cm none . .It Cm 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 .Li [ls 0 0 (link-bandwidth * percent / 100)] . .It Cm grate Guaranteed rate. This specifies a linear real-time service curve. It is a short hand of .Li [rt 0 0 bps] . .It Cm bandwidth This is a short hand of .Li [sc 0 0 bps] . .It Cm ulimit Upper limit rate. This specifies a upper-limit service curve. It is a short hand of .Li [ul 0 0 bps] . .It Cm 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. .It Cm qlimit The maximum queue size in number of packets. Default value is 50. .It Cm red enables RED on this class queue. .It Cm rio enables RIO on this class queue. .It Cm ecn enables RED/ECN on this class queue. .It Cm cleardscp clears diffserv codepoint in the IP header. .El .Ss PRIQ Commands PRIQ (Priority Queueing) implements a simple priority-based queueing. A higher priority class is always served first. Up to 16 priorities can be used with PRIQ. .Bl -tag -width interface -offset indent .It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes .Op Ar sched_type .El .Bl -tag -width 8n -offset indent .It Ar if_name specifies the name of a network interface (e.g., fxp0). .It Cm bandwidth specifies the interface bandwidth in bits per second. .It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Ar sched_type must be .Cm priq for PRIQ. .El .Bl -tag -width class -offset indent .It Cm class .Ar sched_type .Ar if_name .Ar class_name .Ar parent_name .Op Cm priority Ar pri .Op Cm default .Op Cm qlimit Ar count .Op Cm red|rio .Op Cm ecn .Op Cm cleardscp .El .Bl -tag -width 8n -offset indent .It Ar sched_type must be .Cm priq for a PRIQ class. .It Ar if_name Interface name. Must correspond to name in interface specification. .It Ar class_name Arbitrary name for this class. Must be unique for this interface. .It Ar parent_name Parent class must be .Dv NULL for PRIQ. .It Cm priority High numbers are higher priority. Max value is 15 and Min value is 0. Default is 0. A higher priority class is always served first in PRIQ. Priority must be unique for the interface. .It Cm 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. .It Cm qlimit The maximum queue size in number of packets. Default value is 50. .It Cm red enables RED on this class queue. .It Cm rio enables RIO on this class queue. .It Cm ecn enables RED/ECN on this class queue. .It Cm cleardscp clears diffserv codepoint in the IP header. .El .Ss WFQ Commands WFQ (Weighted Fair Queueing) implements a weighted-round robin scheduler for a set of queue. A weight can be assigned to each queue to give a different proportion of the link capacity. A hash function is used to map a flow to one of a set of queues, and thus, it is possible for two different flows to be mapped into the same queue. .Bl -tag -width interface -offset indent .It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes .Op Ar sched_type .Op Cm nqueues Ar count .Op Cm qsize Ar bytes .Op Cm hash Ar policy .El .Bl -tag -width 8n -offset indent .It Cm if_name specifies the name of a network interface (e.g., fxp0). .It Cm bandwidth specifies the interface bandwidth in bits per second. .It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Ar sched_type must be .Cm wfq for WFQ. .It Cm nqueues The number of queues in WFQ. Default value is 256. .It Cm qsize The size of each queue in number of bytes. Default value is 64K bytes. .It Cm hash Type of hash policy to select a queue. .Cm dstaddr specifies a hashing policy by IP destination address. .Cm full specifies a hashing policy by IP addresses and ports. .Cm srcport specifies a hashing policy by IP source port number. .Cm srcaddr specifies a hashing policy by IP source address. Default is .Cm dstaddr .El .Ss FIFOQ Commands FIFOQ (First-In First-Out Queueing) is a simple tail-drop FIFO queue. FIFOQ is the simplest possible implementation of a queueing discipline in ALTQ, and can be used to compare with other queueing disciplines. FIFOQ can be also used as a template for those who want to write their own queueing disciplines. .Bl -tag -width interface -offset indent .It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes .Op Ar sched_type .Op Cm qlimit Ar count .El .Bl -tag -width 8n -offset indent .It Ar if_name specifies the name of a network interface (e.g., fxp0). .It Cm bandwidth specifies the interface bandwidth in bits per second. .It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Ar sched_type must be .Cm fifoq for FIFOQ. .It Cm qlimit The maximum queue size in number of packets. Default value is 50. .El .Ss RED Commands RED (Random Early Detection) is an implicit congestion notification mechanism that exercises packet dropping or packet marking stochastically according to the average queue length. RED can be viewed as a buffer management mechanism and can be integrated into other packet scheduling schemes. .Bl -tag -width red -offset indent .It Cm red .Ar min_th .Ar max_th .Ar inv_pmax .El .Pp The .Cm red command sets the default RED parameters. .Ar min_th and .Ar max_th are the minimum and the maximum threshold values. .Ar inv_pmax is the inverse (reciprocal) of the maximum drop probability. For example, 10 means the maximum drop probability of 1/10. .Bl -tag -width interface -offset indent .It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes .Op Ar sched_type .Op Cm qlimit Ar count .Op Cm packetsize Ar bytes .Op Cm weight Ar n .Op Cm thmin Ar n .Op Cm thmax Ar n .Op Cm invpmax Ar n .Op Cm ecn .Op Cm flowvalve .El .Bl -tag -width 8n -offset indent .It Ar if_name specifies the name of a network interface (e.g., fxp0). .It Cm bandwidth specifies the interface bandwidth in bits per second. .It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Ar sched_type must be .Cm red for RED. .It Cm qlimit The maximum queue size in number of packets. Default value is 60. .It Cm packetsize The average packet size in number of bytes. This parameter is used to calibrate the idle period. Default value is 1000. .It Cm weight The inverse of the weight of EWMA (exponentially weighted moving average). .It Cm thmin The minimum threshold. .It Cm thmax The maximum threshold. .It Cm invpmax The inverse of the maximum drop probability. .It Cm ecn enables ECN. .It Cm flowvalve enables flowvalve. .El .Ss RIO Commands ALTQ/RIO has 3 drop precedence levels defined for the Assured Forwarding of DiffServ (RFC2597). Since adaptive flows are likely to stay under the medium drop precedence level under congestion, the medium drop precedence would protect adaptive flows from unadaptive flows. .Pp The original RIO has 2 sets of RED parameters; one for in-profile packets and the other for out-of-profile packets. At the ingress of the network, profile meters tag packets as IN or OUT based on contracted profiles for customers. Inside the network, IN packets receive preferential treatment by the RIO dropper. It is possible to provision the network not to drop IN packets at all by providing enough capacity for the total volume of IN packets. Thus, RIO can be used to provide a service that statistically assures capacity allocated for users. This mechanism can be extended to support an arbitrary number of drop precedence levels. ALTQ supports 3 drop precedence levels. .Bl -tag -width rio -offset indent .It Cm rio .Ar low_min_th .Ar low_max_th .Ar low_inv_pmax .Ar medium_min_th .Ar medium_max_th .Ar medium_inv_pmax .Ar high_min_th .Ar high_max_th .Ar high_inv_pmax .El .Pp The .Cm rio command sets the default RIO parameters. The parameters are RED parameters for 3 (low, medium, high) drop precedence. .Bl -tag -width interface -offset indent .It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes .Op Ar sched_type .Op Cm qlimit Ar count .Op Cm packetsize Ar bytes .Op Cm weight Ar n .Op Cm lo_thmin Ar n .Op Cm lo_thmax Ar n .Op Cm lo_invpmax Ar n .Op Cm med_thmin Ar n .Op Cm med_thmax Ar n .Op Cm med_invpmax Ar n .Op Cm hi_thmin Ar n .Op Cm hi_thmax Ar n .Op Cm hi_invpmax Ar n .Op Cm ecn .El .Bl -tag -width 8n -offset indent .It Ar if_name specifies the name of a network interface (e.g., fxp0). .It Cm bandwidth specifies the interface bandwidth in bits per second. .It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Ar sched_type must be .Cm rio for RIO. .It Cm qlimit The maximum queue size in number of packets. Default value is 60. .It Cm packetsize The average packet size in number of bytes. This parameter is used to calibrate the idle period. Default value is 1000. .It Cm weight The inverse of the weight of EWMA (exponentially weighted moving average). .It Cm lo_thmin The minimum threshold for low drop precedence. .It Cm lo_thmax The maximum threshold for low drop precedence. .It Cm lo_invpmax The inverse of the maximum drop probability for low drop precedence. .It Cm med_thmin The minimum threshold for medium drop precedence. .It Cm med_thmax The maximum threshold for medium drop precedence. .It Cm med_invpmax The inverse of the maximum drop probability for medium drop precedence. .It Cm hi_thmin The minimum threshold for high drop precedence. .It Cm hi_thmax The maximum threshold for high drop precedence. .It Cm hi_invpmax The inverse of the maximum drop probability for high drop precedence. .It Cm ecn enables ECN. .El .Ss BLUE Commands .Bl -tag -width interface -offset indent .It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes .Op Ar sched_type .Op Cm qlimit Ar count .Op Cm packetsize Ar bytes .Op Cm maxpmark Ar n .Op Cm holdtime Ar usec .Op Cm ecn .El .Bl -tag -width 8n -offset indent .It Ar if_name specifies the name of a network interface (e.g., fxp0). .It Cm bandwidth specifies the interface bandwidth in bits per second. .It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Ar sched_type must be .Cm blue for BLUE. .It Cm qlimit The maximum queue size in number of packets. Default value is 60. .It Cm packetsize The average packet size in number of bytes. Default value is 1000. .It Cm maxpmark specifies the precision of marking probability. .It Cm holdtime specifies the hold time in usec. .It Cm ecn enables ECN. .El .Ss CDNR Commands The .Cm conditioner command specifies a diffserv traffic conditioner. A traffic conditioner is not a queueing discipline but a component to meter, mark or drop incoming packets according to some rules. .Pp As opposed to a queueing discipline, a traffic conditioner handles incoming packets at an input interface. If no queueing discipline (e.g., CBQ) is used for the interface, a null interface command should be used to specify an input network interface. .Bl -tag -width interface -offset indent .It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes .El .Pp The .Cm conditioner command has the following syntax. .Bl -tag -width conditioner -offset indent .It Cm conditioner .Ar if_name .Ar cdnr_name .Aq action .El .Bl -tag -width 10n -offset indent .It Ar if_name Interface name. Must correspond to name in interface specification. .It Ar cdnr_name Arbitrary name for this conditioner. Must be unique for this interface. .It Ar action Action of the conditioner. .El .Pp An action can be a recursively defined action. The following actions are defined. .Bl -tag -width pass -offset indent .It Cm pass .Bl -inset -offset indent .It Cm pass allows the packet to go through without any modification to the packet. .El .El .Bl -tag -width drop -offset indent .It Cm drop .Bl -inset -offset indent .It Cm drop rejects the packet. The packet is immediately discarded. .El .El .Bl -tag -width mark -offset indent .It Cm mark .Ar value .Bl -inset -offset indent .It Cm mark sets the specified value to the ds field in the IP header. Then, the packet is allowed to go through. .El .El .Bl -tag -width tbmeter -offset indent .It Cm tbmeter .Ar rate depth .Aq in_action .Aq out_action .Bl -inset -offset indent .It Cm tbmeter is a token bucket meter configured with rate and depth parameters. Rate is token rate in bits-per-second. Depth is bucket depth in KB. When an incoming packet is in profile (available token is more than the packet size), tbmeter takes in_action. Otherwise, tbmeter takes out_action. .El .El .Bl -tag -width trtcm -offset indent .It Cm trtcm .Ar cmtd_rate cmtd_depth peak_rate peak_depth .Aq green_action .Aq yellow_action .Aq red_action .Op Cm coloraware|colorblind .Bl -inset -offset indent .It Cm trtcm is a 2-rate 3 color marker for Assured Forwarding. A trtcm consists of 2 token buckets, one for a committed rate and the other for a peak rate. When an incoming packet is in the committed profile, trtcm takes green_action. When the packet is out of the committed profile but in the peak profile, trtcm takes yellow_action. Otherwise, tbtcm takes red_action. A trtcm is either color-aware or color-blind. A color-aware trtcm do not raise the color (ds field value), that is, a yellow packet can be yellow or red but can not be blue. Default is color-blind. .El .El .Bl -tag -width tswtcm -offset indent .It Cm tswtcm .Ar cmtd_rate peak_rate avg_interval .Aq green_action .Aq yellow_action .Aq red_action .Bl -inset -offset indent .It Cm tswtcm is a time sliding window 3 color marker for Assured Forwarding. A tswtcm differs from trtcm in that a tswtcm probabilistically marks packets. A tswtcm consists of 2 rates, one for a committed rate and the other for a peak rate. When an incoming packet is in the committed profile, tswtcm takes green_action. When the packet is out of the committed profile but in the peak profile, tswtcm takes yellow_action. Otherwise, tswtcm takes red_action. cmtd_rate and peak_rate are specified in bits per second. avg_interval provides the size of time window for averaging incoming rate, and is specified in milliseconds. 500 msec is ok for normal settings. .El .El .Ss JoBS Commands JoBS (Joint Buffer Management and Scheduling) is a queuing discipline that can enforce any feasible mix of absolute and proportional guarantees on packet losses, packet delays, and throughput, for classes of traffic, on a per-hop basis. No admission control is performed, thus if the set of service guarantees becomes infeasible, some service guarantees may be relaxed. .Bl -tag -width interface -offset indent .It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm qlimit Ar count .Op Cm separate .Op Cm tbrsize Ar bytes .Op Ar sched_type .El .Bl -tag -width 8n -offset indent .It Ar if_name specifies the name of a network interface (e.g., fxp0). .It Cm bandwidth specifies the interface bandwidth in bits per second. .It Cm qlimit specifies the maximum queue size in number of packets. .It Cm separate specifies that classes have independent buffers. The default is to have a shared buffer for all classes. If this option is specified, qlimit applies to each independent buffer. .It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Ar sched_type must be .Cm jobs for JoBS. .El .Bl -tag -width class -offset indent .It Cm class .Ar sched_type .Ar if_name .Ar class_name .Ar parent_name .Op Cm priority Ar pri .Op Cm default .Op Cm adc Ar microsecs .Op Cm alc Ar fraction .Op Cm arc Ar bps .Op Cm rdc Ar prop .Op Cm rlc Ar prop .El .Bl -tag -width 8n -offset indent .It Ar sched_type must be .Cm jobs for a JoBS class. .It Ar if_name Interface name. Must correspond to name in interface specification. .It Ar class_name Arbitrary name for this class. Must be unique for this interface. .It Ar parent_name Parent class must be .Dv NULL for JoBS. .It Cm priority Priority index used for proportional differentiation. Max value is 15 and Min value is 0. Default is 0. Priority must be unique for the interface. .It Cm 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. .It Cm adc Specifies an upper bound on delays for that class (in microseconds). A value of \-1 will indicate the absence of delay bound. By default, no delay bound is offered. .It Cm alc Specifies a upper bound on loss rate for that class (in fraction of 1, for instance a 1% loss rate bound will be expressed as 0.01). A value of \-1 will indicate the absence of loss rate bound. By default, no loss rate bound is offered. .It Cm arc Specifies a lower bound on the throughput received by that class (in bits per second). A value of \-1 will indicate the absence of throughput bound. By default, no throughput bound is offered. .It Cm rdc Specifies a proportional delay differentiation factor between that class and the class with the successive priority index. For instance, for priority 1, an rdc of 2 specifies that the delays of packets marked as class 2 will roughly be twice the delays of packets marked as class 1. A value of \-1 indicates the absence of proportional differentiation on that class. Note that class N if N is the maximum priority should have a dummy coefficient different from \-1 if proportional delay differentiation is desired on Class N. By default, no proportional delay differentiation is offered. .It Cm rlc Specifies a proportional loss differentiation factor between that class and the class with the successive priority index. For instance, for priority 1, an rlc of 2 specifies that the loss rate of packets marked as class 2 will roughly be twice the loss rate of packets marked as class 1. A value of \-1 indicates the absence of proportional differentiation on that class. Note that class N if N is the maximum priority should have a dummy coefficient different from \-1 if proportional loss differentiation is desired on Class N. By default, no proportional loss differentiation is offered. .El .Sh EXAMPLES .Ss CBQ Example .Bd -literal # # cbq configuration for vx0 (10Mbps ether) # give at least 40% to TCP # limit HTTP from network 133.138.1.0 up to 10%, use RED. # other traffic goes into default class # interface vx0 bandwidth 10M cbq # class cbq vx0 root_class NULL priority 0 pbandwidth 100 class cbq vx0 def_class root_class borrow pbandwidth 95 default class cbq vx0 tcp_class def_class borrow pbandwidth 40 filter vx0 tcp_class 0 0 0 0 6 class cbq vx0 csl_class tcp_class pbandwidth 10 red filter vx0 csl_class 0 0 133.138.1.0 netmask 0xffffff00 80 6 filter vx0 csl_class 133.138.1.0 netmask 0xffffff00 0 0 80 6 # # sample filter6 command # filter6 vx0 csl_class ::0 0 2001:db8:0:123::/64 80 6 .Ed .Ss HFSC Example .Bd -literal # # hfsc configuration for hierarchical sharing # interface pvc0 bandwidth 45M hfsc # # (10% of the bandwidth share goes to the default class) class hfsc pvc0 def_class root pshare 10 default # # bandwidth share guaranteed rate # CMU: 45% 15Mbps # PITT: 45% 15Mbps # class hfsc pvc0 cmu root pshare 45 grate 15M class hfsc pvc0 pitt root pshare 45 grate 15M # # CMU bandwidth share guaranteed rate # CS: 20% 10Mbps # other: 20% 5Mbps # class hfsc pvc0 cmu_other cmu pshare 20 grate 10M filter pvc0 cmu_other 0 0 128.2.0.0 netmask 0xffff0000 0 0 class hfsc pvc0 cmu_cs cmu pshare 20 grate 5M filter pvc0 cmu_cs 0 0 128.2.242.0 netmask 0xffffff00 0 0 # # PITT bandwidth share guaranteed rate # CS: 20% 10Mbps # other: 20% 5Mbps # class hfsc pvc0 pitt_other pitt pshare 20 grate 10M filter pvc0 pitt_other 0 0 136.142.0.0 netmask 0xffff0000 0 0 class hfsc pvc0 pitt_cs pitt pshare 20 grate 5M filter pvc0 pitt_cs 0 0 136.142.79.0 netmask 0xffffff00 0 0 .Ed .Ss HFSC Example (simpler one with ulimit) .Bd -literal # interface fxp0 bandwidth 90M hfsc # reserve 20% for default class class hfsc fxp0 def_class root pshare 20 default # shared class for TCP and UDP class hfsc fxp0 shared_class root bandwidth 72M # shared class for all TCP class hfsc fxp0 tcp_shared shared_class bandwidth 40M ulimit 60M # generic tcp class hfsc fxp0 tcp_class tcp_shared bandwidth 15M ulimit 50M filter fxp0 tcp_class 0 0 0 0 6 # http class hfsc fxp0 http_class tcp_shared bandwidth 25M ulimit 40M filter fxp0 http_class 0 80 0 0 6 filter fxp0 http_class 0 0 0 80 6 # udp class hfsc fxp0 udp_class shared_class bandwidth 15M ulimit 20M filter fxp0 udp_class 0 0 0 0 17 .Ed .Ss PRIQ Example .Bd -literal # # priq configuration for fxp0 (100Mbps ether) # icmp: high priority # tcp: medium priority # others: low priority # interface fxp0 bandwidth 100M priq # class priq fxp0 high_class NULL priority 2 filter fxp0 high_class 0 0 0 0 1 class priq fxp0 med_class NULL priority 1 filter fxp0 med_class 0 0 0 0 6 class priq fxp0 low_class NULL priority 0 default .Ed .Ss WFQ Example .Bd -literal interface pvc0 bandwidth 134000000 wfq .Ed .Ss FIFOQ Example .Bd -literal interface rl0 bandwidth 10M fifoq .Ed .Ss Conditioner Example .Bd -literal # interface fxp0 # # a simple dropper # discard all packets from 192.168.0.83 # conditioner fxp0 dropper filter fxp0 dropper 0 0 192.168.0.83 0 0 # # EF conditioner # mark EF to all packets from 192.168.0.117 # conditioner pvc1 ef_cdnr > filter fxp0 ef_cdnr 0 0 192.168.0.117 0 0 # # AF1x conditioner # mark AF1x to packets from 192.168.0.178 # AF11 (low drop precedence): less than 3Mbps # AF12 (medium drop precedence): more than 3Mbps and less than 10Mbps # AF13 (high drop precedence): more than 10Mbps # conditioner fxp0 af1x_cdnr > filter fxp0 af1x_cdnr 0 0 192.168.0.178 0 0 .Ed .Sh SEE ALSO .Xr altqd 8 .Sh BUGS This man page is incomplete. For more information read the source. @ 1.18 log @bump date @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.17 2019/04/09 18:22:33 sevan Exp $ d28 1 a28 1 .Dd April 9, 2019 d284 2 d315 7 @ 1.17 log @Drop Pp before Bl @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.16 2017/07/03 21:35:29 wiz Exp $ d28 1 a28 1 .Dd September 10, 2008 @ 1.16 log @Remove workaround for ancient HTML generation code. @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.15 2013/09/08 19:12:18 jakllsch Exp $ a284 1 .Pp a313 1 .Pp a465 1 .Pp a477 1 .Pp a609 1 .Pp a621 1 .Pp a634 1 .Pp a691 1 .Pp a735 1 .Pp a788 1 .Pp a878 1 .Pp a932 1 .Pp a984 1 .Pp a1004 1 .Pp a1012 1 .Pp a1021 1 .Pp a1026 1 .Pp a1036 1 .Pp a1059 1 .Pp a1100 1 .Pp a1119 1 .Pp a1133 1 .Pp @ 1.16.6.1 log @Sync with HEAD @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.18 2019/04/09 19:10:21 sevan Exp $ d28 1 a28 1 .Dd April 9, 2019 d285 1 d315 1 d468 1 d481 1 d614 1 d627 1 d641 1 d699 1 d744 1 d798 1 d889 1 d944 1 d997 1 d1018 1 d1027 1 d1037 1 d1043 1 d1054 1 d1078 1 d1120 1 d1140 1 d1155 1 @ 1.15 log @use IPv6 Documentation Prefix (2001:db8::/32) instead of unallocated d000:a::/32 prefix @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.14 2011/04/25 22:45:31 wiz Exp $ d1333 1 a1333 1 conditioner fxp0 dropper \*[Lt]drop\*[Gt] d1340 1 a1340 1 conditioner pvc1 ef_cdnr \*[Lt]tbmeter 6M 64K \*[Lt]mark 0xb8\*[Gt]\*[Lt]drop\*[Gt]\*[Gt] d1350 1 a1350 1 conditioner fxp0 af1x_cdnr \*[Lt]trtcm 3M 32K 10M 64K \*[Lt]mark 0x28\*[Gt]\*[Lt]mark 0x30\*[Gt]\*[Lt]mark 0x38\*[Gt]\*[Gt] @ 1.14 log @Typo, and markup consistency. From YOMURA Masanori. @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.13 2009/03/15 12:30:09 joerg Exp $ d1243 1 a1243 1 filter6 vx0 csl_class ::0 0 d000:a:0:123::/64 80 6 @ 1.14.10.1 log @Rebase to HEAD as of a few days ago. @ text @d1 1 a1 1 .\" $NetBSD$ d1243 1 a1243 1 filter6 vx0 csl_class ::0 0 2001:db8:0:123::/64 80 6 @ 1.14.4.1 log @sync with head. for a reference, the tree before this commit was tagged as yamt-pagecache-tag8. this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments") @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.14 2011/04/25 22:45:31 wiz Exp $ d1243 1 a1243 1 filter6 vx0 csl_class ::0 0 2001:db8:0:123::/64 80 6 @ 1.13 log @Fix markup, making it symmetrical between filter6_values and filter_values. @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.12 2008/09/11 17:58:59 joerg Exp $ d181 1 a181 1 .Ar filter_value d184 1 a184 1 .It filter_values : @ 1.12 log @Add support for source address hashhing in ALTQs WFQ. This allows to easily distribute bandwidth for huge number of clients for incoming traffic. @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.11 2007/04/13 18:17:38 plunky Exp $ d184 1 a184 1 .Ar filter_values : @ 1.12.6.1 log @Sync with HEAD. Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.13 2009/03/15 12:30:09 joerg Exp $ d184 1 a184 1 .It filter_values : @ 1.11 log @fix mdoc warning: remove extraneous .El @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.10 2006/10/14 07:39:40 wiz Exp $ d28 1 a28 1 .Dd October 12, 2006 d725 2 @ 1.11.12.1 log @Merge in changes between wrstuden-revivesa-base-2 and wrstuden-revivesa-base-3. @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.11 2007/04/13 18:17:38 plunky Exp $ d28 1 a28 1 .Dd September 10, 2008 a724 2 .Cm srcaddr specifies a hashing policy by IP source address. @ 1.10 log @"Millisecond" doesn't have a hyphen. New sentence, new line. PostScript output improvements. Bump date for previous. @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.9 2006/10/12 19:59:13 peter Exp $ a1219 1 .El @ 1.10.4.1 log @Sync with netbsd-4. @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.10.2.1 2008/09/14 20:55:26 bouyer Exp $ d28 1 a28 1 .Dd September 10, 2008 a724 2 .Cm srcaddr specifies a hashing policy by IP source address. @ 1.10.2.1 log @Pull up following revision(s) (requested by joerg in ticket #1197): sys/altq/altq_wfq.c: revision 1.19 sys/altq/altq_wfq.h: revision 1.6 usr.sbin/altq/altqd/altq.conf.5: revision 1.12 usr.sbin/altq/libaltq/qop_wfq.c: revision 1.6 Add support for source address hashhing in ALTQs WFQ. This allows to easily distribute bandwidth for huge number of clients for incoming traffic. @ text @d1 1 a1 1 .\" $NetBSD$ d28 1 a28 1 .Dd September 10, 2008 a724 2 .Cm srcaddr specifies a hashing policy by IP source address. @ 1.9 log @Merge the peter-altq branch. (sync with KAME & add support for using ALTQ with pf(4)). @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.8.12.1 2006/03/18 18:33:43 peter Exp $ d28 1 a28 1 .Dd September 28, 1999 d423 1 a423 1 The maxdelay is specified in milli-seconds and used to obtain the max d516 1 a516 1 .Cm sc, rt, ls d533 1 a533 1 specified in milli-seconds. d712 2 a713 1 The number of queues in WFQ. Default value is 256. d847 2 a848 1 precedence levels. ALTQ supports 3 drop precedence levels. d958 2 a959 1 The average packet size in number of bytes. Default value is 1000. d998 2 a999 1 Interface name. Must correspond to name in interface specification. d1097 1 a1097 1 rate, and is specified in milli-seconds. d1105 3 a1107 2 on a per-hop basis. No admission control is performed, thus if the set of service guarantees becomes infeasible, some service guarantees may be d1127 3 a1129 3 specifies that classes have independent buffers. The default is to have a shared buffer for all classes. If this option is specified, qlimit applies to each independent d1160 2 a1161 1 Interface name. Must correspond to name in interface specification. d1163 2 a1164 1 Arbitrary name for this class. Must be unique for this interface. d1166 3 a1168 1 Parent class must be ``NULL'' for JoBS. d1171 2 a1172 1 Max value is 15 and Min value is 0. Default is 0. d1175 4 a1178 3 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 d1182 2 a1183 2 A value of -1 will indicate the absence of delay bound. By default, no delay bound is offered. d1187 2 a1188 2 A value of -1 will indicate the absence of loss rate bound. By default, no loss rate bound is offered. d1193 1 a1193 1 -1 will indicate the absence of throughput bound. d1200 3 a1202 2 marked as class 1. A value of -1 indicates the absence of proportional differentiation on that class. d1204 3 a1206 2 coefficient different from -1 if proportional delay differentiation is desired on Class N. By default, no proportional delay differentiation is offered. d1212 3 a1214 2 marked as class 1. A value of -1 indicates the absence of proportional differentiation on that class. d1216 3 a1218 2 coefficient different from -1 if proportional loss differentiation is desired on Class N. By default, no proportional loss differentiation is offered. d1355 2 a1356 1 This man page is incomplete. For more information read the source. @ 1.8 log @Spelling errors (some from Igor Sobrado, PR misc/19909) XXX this needs to be fed back to the altq maintainers, but I don't know who they are. XXX This man page needs a lot of cleanup. @ text @d1 2 a2 2 .\" $NetBSD: altq.conf.5,v 1.7 2003/03/15 23:48:30 wiz Exp $ .\" $KAME: altq.conf.5,v 1.12 2002/02/20 01:58:57 kjc Exp $ d51 2 a52 1 WFQ (Weighted Fair Queueing), d94 1 d120 1 a120 1 command specifies a packet scheduling class for CBQ, HFSC, or PRIQ. d135 1 a135 1 PRIQ does not have class hierarchy and parent_name must be d137 1 a137 1 for PRIQ classes. d423 1 a423 1 The maxdelay is specified in millisecond and used to obtain the max d459 2 d492 1 d495 2 d516 1 a516 1 .Cm sc, rt d518 1 a518 1 .Cm ls . d520 2 a521 1 (service curve) is used to set the same values to both service curves. d526 3 d533 1 a533 1 specified in milliseconds. d577 8 d1093 1 a1093 1 rate, and is specified in milliseconds. d1097 109 d1264 21 d1298 1 a1298 1 filter fxp0 high_class 0 0 0 0 6 @ 1.8.12.1 log @Sync with KAME. @ text @d1 2 a2 2 .\" $NetBSD: altq.conf.5,v 1.8 2003/03/31 17:21:41 perry Exp $ .\" $KAME: altq.conf.5,v 1.15 2002/11/17 02:51:49 kjc Exp $ d51 1 a51 2 WFQ (Weighted Fair Queueing), JoBS (Joint Buffer Management and Scheduling) a92 1 .Cm jobs , d118 1 a118 1 command specifies a packet scheduling class for CBQ, HFSC, JoBS or PRIQ. d133 1 a133 1 PRIQ and JoBS do not have class hierarchy and parent_name must be d135 1 a135 1 for PRIQ and JoBS classes. d421 1 a421 1 The maxdelay is specified in milli-seconds and used to obtain the max a456 2 Additionally, an upper-limit service curve can be specified for link-sharing to set the upper limit allowed for the class. a487 1 .Op Bq Cm ul Ar m1 d m2 a489 2 .Op Cm bandwidth Ar bps .Op Cm ulimit Ar bps d509 1 a509 1 .Cm sc, rt, ls d511 1 a511 1 .Cm ul . d513 1 a513 2 (service curve) is used to set the same values to both real-time and link-sharing service curves. a517 3 .Cm ul (upper-limit) is used to specify the upper-limit service curve for link-sharing. d522 1 a522 1 specified in milli-seconds. a565 8 .It Cm bandwidth This is a short hand of .Li [sc 0 0 bps] . .It Cm ulimit Upper limit rate. This specifies a upper-limit service curve. It is a short hand of .Li [ul 0 0 bps] . d1074 1 a1074 1 rate, and is specified in milli-seconds. a1077 109 .Ss JoBS Commands JoBS (Joint Buffer Management and Scheduling) is a queuing discipline that can enforce any feasible mix of absolute and proportional guarantees on packet losses, packet delays, and throughput, for classes of traffic, on a per-hop basis. No admission control is performed, thus if the set of service guarantees becomes infeasible, some service guarantees may be relaxed. .Bl -tag -width interface -offset indent .It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm qlimit Ar count .Op Cm separate .Op Cm tbrsize Ar bytes .Op Ar sched_type .El .Pp .Bl -tag -width 8n -offset indent .It Ar if_name specifies the name of a network interface (e.g., fxp0). .It Cm bandwidth specifies the interface bandwidth in bits per second. .It Cm qlimit specifies the maximum queue size in number of packets. .It Cm separate specifies that classes have independent buffers. The default is to have a shared buffer for all classes. If this option is specified, qlimit applies to each independent buffer. .It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Ar sched_type must be .Cm jobs for JoBS. .El .Pp .Bl -tag -width class -offset indent .It Cm class .Ar sched_type .Ar if_name .Ar class_name .Ar parent_name .Op Cm priority Ar pri .Op Cm default .Op Cm adc Ar microsecs .Op Cm alc Ar fraction .Op Cm arc Ar bps .Op Cm rdc Ar prop .Op Cm rlc Ar prop .El .Pp .Bl -tag -width 8n -offset indent .It Ar sched_type must be .Cm jobs for a JoBS class. .It Ar if_name Interface name. Must correspond to name in interface specification. .It Ar class_name Arbitrary name for this class. Must be unique for this interface. .It Ar parent_name Parent class must be ``NULL'' for JoBS. .It Cm priority Priority index used for proportional differentiation. Max value is 15 and Min value is 0. Default is 0. Priority must be unique for the interface. .It Cm 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. .It Cm adc Specifies an upper bound on delays for that class (in microseconds). A value of -1 will indicate the absence of delay bound. By default, no delay bound is offered. .It Cm alc Specifies a upper bound on loss rate for that class (in fraction of 1, for instance a 1% loss rate bound will be expressed as 0.01). A value of -1 will indicate the absence of loss rate bound. By default, no loss rate bound is offered. .It Cm arc Specifies a lower bound on the throughput received by that class (in bits per second). A value of -1 will indicate the absence of throughput bound. By default, no throughput bound is offered. .It Cm rdc Specifies a proportional delay differentiation factor between that class and the class with the successive priority index. For instance, for priority 1, an rdc of 2 specifies that the delays of packets marked as class 2 will roughly be twice the delays of packets marked as class 1. A value of -1 indicates the absence of proportional differentiation on that class. Note that class N if N is the maximum priority should have a dummy coefficient different from -1 if proportional delay differentiation is desired on Class N. By default, no proportional delay differentiation is offered. .It Cm rlc Specifies a proportional loss differentiation factor between that class and the class with the successive priority index. For instance, for priority 1, an rlc of 2 specifies that the loss rate of packets marked as class 2 will roughly be twice the loss rate of packets marked as class 1. A value of -1 indicates the absence of proportional differentiation on that class. Note that class N if N is the maximum priority should have a dummy coefficient different from -1 if proportional loss differentiation is desired on Class N. By default, no proportional loss differentiation is offered. .El .El a1135 21 .Ss HFSC Example (simpler one with ulimit) .Bd -literal # interface fxp0 bandwidth 90M hfsc # reserve 20% for default class class hfsc fxp0 def_class root pshare 20 default # shared class for TCP and UDP class hfsc fxp0 shared_class root bandwidth 72M # shared class for all TCP class hfsc fxp0 tcp_shared shared_class bandwidth 40M ulimit 60M # generic tcp class hfsc fxp0 tcp_class tcp_shared bandwidth 15M ulimit 50M filter fxp0 tcp_class 0 0 0 0 6 # http class hfsc fxp0 http_class tcp_shared bandwidth 25M ulimit 40M filter fxp0 http_class 0 80 0 0 6 filter fxp0 http_class 0 0 0 80 6 # udp class hfsc fxp0 udp_class shared_class bandwidth 15M ulimit 20M filter fxp0 udp_class 0 0 0 0 17 .Ed d1149 1 a1149 1 filter fxp0 med_class 0 0 0 0 6 @ 1.7 log @Use "its" instead of "it's" where appropriate. From Soren Jacobsen in PR 20730. @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.6 2002/03/05 04:11:51 itojun Exp $ d172 1 a172 1 Add an arbitrary name to the filter for a future refenece. d522 1 a522 1 specified in milli-second. d753 1 a753 1 command sets the default RED paramters. d843 1 a843 1 command sets the default RIO paramters. d1074 1 a1074 1 rate, and is specified in milli-second. d1104 1 a1104 1 # hfsc configuration for hierachical sharing @ 1.6 log @bring in latest ALTQ from kjc. @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.5 2002/02/08 01:38:46 ross Exp $ d306 1 a306 1 This will also cause the scheduler to use greater than it's assigned @ 1.5 log @Generate <>& symbolically. I'm avoiding .../dist/... directories for now. @ text @d1 2 a2 2 .\" $NetBSD: altq.conf.5,v 1.4 2001/08/16 07:45:35 itojun Exp $ .\" $KAME: altq.conf.5,v 1.11 2001/07/25 10:40:15 kjc Exp $ d215 1 a215 1 IPSec. d266 1 a266 1 IPSec. @ 1.4 log @string length audit (use strlcpy). sync with latest kame ALTQ. @ text @d1 1 a1 1 .\" $NetBSD: altq.conf.5,v 1.3 2001/06/05 10:27:02 wiz Exp $ d1168 1 a1168 1 conditioner fxp0 dropper d1175 1 a1175 1 conditioner pvc1 ef_cdnr > d1185 1 a1185 1 conditioner fxp0 af1x_cdnr > @ 1.3 log @No argument for .Os. @ text @d1 2 a2 2 .\" $NetBSD: altq.conf.5,v 1.2 2001/05/08 17:04:56 wiz Exp $ .\" $KAME: altq.conf.5,v 1.7 2000/11/09 02:50:45 itojun Exp $ d15 1 a15 1 .\" d29 1 a30 1 .Dt ALTQ.CONF 5 d38 1 a38 1 .Nm altq.conf d40 2 a41 1 disciplines. Comments start with a # and extend to the end of the line. d45 1 a45 1 program reads d51 1 a51 1 WFQ (Weighted Fair Queueing), d53 1 a53 2 .Pp .Sh Interface Commands d55 1 a55 1 .It Nm interface d63 2 a64 2 The .Sy interface d67 3 a69 3 under control of ALTQ. A system configured as a router may have multiple interface specifications. .\" d71 1 a71 1 .It Em if_name d73 2 a74 2 .It Sy bandwidth specifies the interface bandwidth in bits per second. d77 2 a78 2 .It Sy tbrsize specifies the bucket size of a token bucket regulator in bytes. d80 1 a80 1 .Sy tbrsize d84 1 a84 1 .Sy interface d86 10 a95 9 .It Em sched_type Type of a queueing discipline. It must be either .Sy blue , .Sy cbq , .Sy fifoq , .Sy hfsc , .Sy priq , .Sy red , .Sy rio , d97 1 a97 1 .Sy wfq. d99 3 a101 1 discipline, sched_type can be omitted. d103 1 a103 2 .Pp .Sh Class Command d105 1 a105 1 .It Nm class d116 2 a117 2 The .Sy class d121 10 a130 8 .It Em sched_type Type of queueing discipline. Must correspond to the discipline name in interface specification. .It Em if_name Interface name. Must correspond to name in interface specification. .It Em class_name Arbitrary name for this class. Must be unique for this interface. .It Em parent_name d133 2 a134 1 PRIQ does not have class hierarchy and parent_name must be ``NULL'' d136 1 a136 1 .It Sy red d138 1 a138 1 RED drops packets with the probability propotional to the average d140 1 a140 1 .It Sy rio d143 1 a143 1 .It Sy ecn d145 3 a147 2 class queue (experimental implementation). ECN implies RED. .It Sy cleardscp d150 1 a150 2 .Pp .Sh Filter Commands d152 1 a152 1 .It Nm filter d160 2 a161 2 The .Sy filter d165 1 a165 1 classification rules. d167 1 a167 1 .It Em if_name d169 1 a169 1 .It Em class_name d171 1 a171 1 .It Sy name d173 4 a176 3 .It Sy ruleno Specifies explicit order of filter matching. Filter matching is performed from a filter with a larger ruleno. Default is 0. d179 1 a179 1 .Em filter_value d182 1 a182 1 .It filter_values: d189 2 a190 2 .Sy tos .Ar value d196 1 a196 1 Here d201 3 a203 3 the destination and the source respectively. An address may be followed by .Sy netmask d205 1 a205 1 .Em dport d207 1 a207 1 .Em sport d209 1 a209 1 .Em proto d211 1 a211 1 .Sy tos d213 2 a214 2 .Sy gpi keyword can be used to specify the Security Parameter Index value for d219 1 a219 1 .It Nm filter6 d227 4 a230 4 The .Sy filter6 command is for IPv6. .Em filter6_value d233 2 a234 2 .It filter6_values: .Ad dst_addr[/prefix_len] d236 1 a236 1 .Ad src_addr[/prefix_len] d241 2 a242 2 .Sy tclass .Ar value d248 1 a248 1 Here d253 2 a254 3 An address may be followed by an optional .Sy address prefix length. .Em dport d256 1 a256 1 .Em sport d258 1 a258 1 .Em proto d260 1 a260 1 .Sy flowlabel d262 1 a262 1 .Sy tclass d264 1 a264 1 .Sy gpi d269 1 a269 2 .Pp .Sh CBQ Commands d271 1 a271 1 link bandwidth by hierarchically structured classes. d274 1 a274 1 excess bandwidth is available. d276 1 a276 1 .It Nm interface d285 1 a285 1 .It Em if_name d287 5 a291 5 .It Sy bandwidth specifies the interface bandwidth in bits per second. .It Sy tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Em sched_type d293 4 a296 4 .Sy cbq , .Sy cbq-wrr (weighted-round robin) or .Sy cbq-prr d298 8 a305 8 .Sy cbq is equivalent to .Sy cbq-wrr. .It Sy efficient Enables CBQ's link efficiency mode. This means that the scheduler will send a packet from the first overlimit class it encounters of all classes of the link-sharing structure when all classes are overlimit. d308 3 a310 2 By default, this mode is turned off. By adding the keyword .Sy efficient d315 1 a315 1 .It Nm class d340 2 a341 2 The .Sy class d346 1 a346 1 .It Em sched_type d348 1 a348 1 .Sy cbq d350 9 a358 6 .It Em if_name Interface name. Must correspond to name in interface specification. .It Em class_name Arbitrary name for this class. Must be unique within the class hierarchy for this interface. The name .Sy ctl_class d360 6 a365 5 .It Em parent_name The name of the parent class for this class or .Sy NULL if this is the root class. Parent class must have been previously defined. .It Sy admission d367 8 a374 9 .Sy cntlload is controlled load service for .Em RSVP , otherwise, it should be .Sy none. The default is .Sy none. .It Sy priority High numbers are higher priority. Max value is 7 and Min value is 0. d376 1 a376 1 .It Sy pbandwidth d381 3 a383 3 .It Sy exactbandwidth Specify the bandwidth in bits-per-second instead of .Sy pbandwidth. d387 1 a387 1 .Sy pbandwidth d389 1 a389 1 .It Sy borrow d393 11 a403 10 packet is delayed or dropped when the class is overlimit. .It Sy 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. .It Sy control Specify the control class. When this keyword is present, the predefined control class packets (RSVP, IGMP, and ICMP) are assigned to this class. d406 6 a411 5 parameters. Thus, if the control class is specified, it must be listed before the default class. Must be exactly one class on each interface defined as the control class. .It Sy maxburst d413 1 a413 1 Default is 16 but the default value is automatically reduced to 4 when d415 6 a420 5 .It Sy minburst The minimum burst is used to obtain the steady state burst size. It's the parameter to help compute offtime for the class. Offtime is the amount of time a class is to wait between packets. Default is 2. .It Sy maxdelay d424 1 a424 1 .It Sy packetsize d426 4 a429 3 computations. Default value is MTU of the interface. .It Sy maxpacketsize The maxium packet size in bytes for the class. d431 1 a431 1 .It Sy red d433 1 a433 1 .It Sy rio d435 1 a435 1 .It Sy ecn d437 1 a437 1 .It Sy flowvalve d439 1 a439 1 .It Sy cleardscp d442 1 a442 2 .Pp .Sh HFSC Commands d444 3 a446 3 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. d451 1 a451 1 bandwidth. d453 3 a455 2 first. If no packet is eligible for real-time scheduling, link-sharing scheduling is performed. d458 1 a458 1 .It Nm interface d466 1 a466 1 .It Em if_name d468 5 a472 5 .It Sy bandwidth specifies the interface bandwidth in bits per second. .It Sy tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Em sched_type d474 1 a474 1 .Sy hfsc d479 1 a479 1 .It Nm class d485 3 a487 3 .Op Bq Cm sc Em m1 d m2 .Op Bq Cm rt Em m1 d m2 .Op Bq Cm ls Em m1 d m2 d497 2 a498 2 The .Sy class d504 4 a507 4 the link-sharing service curve. Service curves are specified by .Bq Em type m1 d m2 \&. .Em type d509 1 a509 1 .Sy sc, rt d511 2 a512 2 .Sy ls. .Sy sc d514 1 a514 1 .Sy rt d516 1 a516 1 .Sy ls d518 1 a518 1 .Em m1 d520 1 a520 1 .Em d d523 1 a523 1 .Em m2 d526 1 a526 1 .It Em sched_type d528 1 a528 1 .Sy hfsc d530 11 a540 9 .It Em if_name Interface name. Must correspond to name in interface specification. .It Em class_name Arbitrary name for this class. Must be unique within the class hierarchy for this interface. The name .Sy root is a reserved class name for the root class. The root class for the interface is automatically created by the .Sy interface d542 7 a548 6 .It Em parent_name The name of the parent class for this class. Keyword .Sy root is used when the parent is the root class. Parent class must have been previously defined. .It Sy admission d550 24 a573 21 .Sy cntlload is controlled load service for .Em RSVP , otherwise, it should be .Sy none. The default is .Sy none. .It Sy 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)]. .It Sy grate Guaranteed rate. This specifies a linear real-time service curve. It is a short hand of [rt 0 0 bps]. .It Sy 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. .It Sy qlimit The maxium queue size in number of packets. d575 1 a575 1 .It Sy red d577 1 a577 1 .It Sy rio d579 1 a579 1 .It Sy ecn d581 1 a581 1 .It Sy cleardscp d584 1 a584 2 .Pp .Sh PRIQ Commands d589 1 a589 1 .It Nm interface d597 1 a597 1 .It Em if_name d599 5 a603 5 .It Sy bandwidth specifies the interface bandwidth in bits per second. .It Sy tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Em sched_type d605 1 a605 1 .Sy priq d610 1 a610 1 .It Nm class d624 3 a626 3 .It Em sched_type must be .Sy priq d628 14 a641 9 .It Em if_name Interface name. Must correspond to name in interface specification. .It Em class_name Arbitrary name for this class. Must be unique for this interface. .It Em parent_name Parent class must be ``NULL'' for PRIQ. .It Sy priority High numbers are higher priority. Max value is 15 and Min value is 0. Default is 0. d643 9 a651 8 Priority must be unique for the interface. .It Sy 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. .It Sy qlimit The maxium queue size in number of packets. d653 1 a653 1 .It Sy red d655 1 a655 1 .It Sy rio d657 1 a657 1 .It Sy ecn d659 1 a659 1 .It Sy cleardscp d662 1 a662 2 .Pp .Sh WFQ Commands d666 1 a666 1 different proportion of the link capacity. d671 1 a671 1 .It Nm interface d682 1 a682 1 .It Em if_name d684 1 a684 1 .It Sy bandwidth d686 3 a688 3 .It Sy tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Em sched_type d690 1 a690 1 .Sy wfq d692 1 a692 1 .It Sy nqueues d694 6 a699 5 .It Sy qsize The size of each queue in number of bytes. Default value is 64K bytes. .It Sy hash Type of hash policy to select a queue. .Sy dstaddr d701 1 a701 1 .Sy full d703 4 a706 3 .Sy srcport specifies a hashing policy by IP source port number. Default is .Sy dstaddr d708 1 a708 2 .Pp .Sh FIFOQ Commands d715 1 a715 1 .It Nm interface d724 1 a724 1 .It Em if_name d726 1 a726 1 .It Sy bandwidth d728 5 a732 5 .It Sy tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Em sched_type must be .Sy fifoq d734 2 a735 2 .It Sy qlimit The maxium queue size in number of packets. d738 1 a738 2 .Pp .Sh RED Commands d741 1 a741 1 stochastically according to the average queue length. d745 1 a745 1 .It Nm red d752 1 a752 1 .Sy red d754 1 a754 1 .Em min_th d756 1 a756 1 .Em max_th d758 2 a759 2 .Em inv_pmax is the inverse (reciprocal) of the maximum drop probability. d762 1 a762 1 .It Nm interface d778 1 a778 1 .It Em if_name d780 1 a780 1 .It Sy bandwidth d782 3 a784 3 .It Sy tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Em sched_type d786 1 a786 1 .Sy red d788 2 a789 2 .It Sy qlimit The maxium queue size in number of packets. d791 5 a795 4 .It Sy packetsize The average packet size in number of bytes. This parameter is used to calibrate the idle period. Default value is 1000. .It Sy weight d797 1 a797 1 .It Sy thmin d799 1 a799 1 .It Sy thmax d801 1 a801 1 .It Sy invpmax d803 1 a803 1 .It Sy ecn d805 1 a805 1 .It Sy flowvalve d808 1 a808 2 .Pp .Sh RIO Commands d810 4 a813 4 Forwarding of DiffServ (RFC2597). Since adaptive flows are likely to stay under the medium drop precedence level under congestion, the medium drop precedence would protect adaptive flows from unadaptive flows. d819 1 a819 1 Inside the network, IN packets receive preferential treatment by d829 1 a829 1 .It Nm rio d842 4 a845 3 .Sy rio command sets the default RIO paramters. The parameters are RED parameters for 3 (low, medium, high) drop precedence. d847 1 a847 1 .It Nm interface d868 1 a868 1 .It Em if_name d870 1 a870 1 .It Sy bandwidth d872 5 a876 5 .It Sy tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Em sched_type must be .Sy rio d878 2 a879 2 .It Sy qlimit The maxium queue size in number of packets. d881 5 a885 4 .It Sy packetsize The average packet size in number of bytes. This parameter is used to calibrate the idle period. Default value is 1000. .It Sy weight d887 1 a887 1 .It Sy lo_thmin d889 1 a889 1 .It Sy lo_thmax d891 1 a891 1 .It Sy lo_invpmax d893 1 a893 1 .It Sy med_thmin d895 1 a895 1 .It Sy med_thmax d897 1 a897 1 .It Sy med_invpmax d899 1 a899 1 .It Sy hi_thmin d901 1 a901 1 .It Sy hi_thmax d903 1 a903 1 .It Sy hi_invpmax d905 1 a905 1 .It Sy ecn d908 1 a908 2 .Pp .Sh BLUE Commands d910 1 a910 1 .It Nm interface d923 1 a923 1 .It Em if_name d925 1 a925 1 .It Sy bandwidth d927 5 a931 5 .It Sy tbrsize specifies the bucket size of a token bucket regulator in bytes. .It Em sched_type must be .Sy blue d933 2 a934 2 .It Sy qlimit The maxium queue size in number of packets. d936 1 a936 1 .It Sy packetsize d938 1 a938 1 .It Sy maxpmark d940 1 a940 1 .It Sy holdtime d942 1 a942 1 .It Sy ecn d945 1 a945 2 .Pp .Sh CDNR Commands d947 4 a950 4 .Sy conditioner command specifies a diffserv traffic conditioner. A traffic conditioner is not a queueing discipline but a component to meter, mark or drop incoming packets according to some rules. d958 1 a958 1 .It Nm interface d965 1 a965 1 .Sy conditioner d968 1 a968 1 .It Nm conditioner d975 1 a975 1 .It Em if_name d977 5 a981 5 .It Em cdnr_name Arbitrary name for this conditioner. Must be unique for this interface. .It Em action Action of the conditioner. d984 2 a985 2 An action can be a recursively defined action. The following actions are defined. d987 1 a987 1 .It Nm pass d989 1 a989 1 .It Sy pass d995 1 a995 1 .It Nm drop d997 3 a999 2 .It Sy drop rejects the packet. The packet is immediately discarded. d1004 1 a1004 1 .It Nm mark d1007 3 a1009 3 .It Sy mark sets the specified value to the ds field in the IP header. Then, the packet is allowed to go through. d1014 2 a1015 2 .It Nm tbmeter .Ar rate depth d1020 1 a1020 1 .It Sy tbmeter d1022 2 a1023 1 Rate is token rate in bits-per-second. Depth is bucket depth in KB. d1031 2 a1032 2 .It Nm trtcm .Ar cmtd_rate cmtd_depth peak_rate peak_depth d1038 1 a1038 1 .It Sy trtcm d1043 8 a1050 6 green_action. When the packet is out of the committed profile but in the peak profile, trtcm takes yellow_action. Otherwise, tbtcm takes red_action. A trtcm is either color-aware or color-blind. A color-aware trtcm do not raise the color (ds field value), that is, a yellow packet can be yellow or red but can not be blue. Default is color-blind. d1055 2 a1056 2 .It Nm tswtcm .Ar cmtd_rate peak_rate avg_interval d1061 1 a1061 1 .It Sy tswtcm d1068 5 a1072 4 green_action. When the packet is out of the committed profile but in the peak profile, tswtcm takes yellow_action. Otherwise, tswtcm takes red_action. cmtd_rate and peak_rate are specified in bits per seccond. d1074 2 a1075 2 rate, and is specified in milli-second. 500 msec is ok for normal settings. a1077 1 .Pp d1079 2 a1080 4 .nf CBQ Example: d1090 1 a1090 1 class cbq vx0 def_class root_class borrow pbandwidth 95 default d1100 3 a1102 3 HFSC Example: d1115 2 a1116 2 class hfsc pvc0 cmu root pshare 45 grate 15M class hfsc pvc0 pitt root pshare 45 grate 15M d1122 1 a1122 1 class hfsc pvc0 cmu_other cmu pshare 20 grate 10M d1124 1 a1124 1 class hfsc pvc0 cmu_cs cmu pshare 20 grate 5M d1131 1 a1131 1 class hfsc pvc0 pitt_other pitt pshare 20 grate 10M d1133 1 a1133 1 class hfsc pvc0 pitt_cs pitt pshare 20 grate 5M d1135 3 a1137 4 PRIQ Example: d1151 3 a1153 4 WFQ Example: d1155 3 a1157 4 FIFOQ Example: d1159 3 a1161 4 Conditioner Example: d1187 1 a1187 3 .fi .Pp @ 1.2 log @Add RCS Ids. @ text @d1 1 a1 1 .\" $NetBSD$ d29 1 a30 1 .Os KAME @ 1.1 log @Initial revision @ text @d1 1 @ 1.1.1.1 log @Import the altq configuration daemon. @ text @@