1f6b2c4ecSMax Laier.\" 2a1c21316SRuslan Ermilov.\" Copyright (c) 2004 Max Laier <mlaier@FreeBSD.org> 3f6b2c4ecSMax Laier.\" All rights reserved. 4f6b2c4ecSMax Laier.\" 5f6b2c4ecSMax Laier.\" Redistribution and use in source and binary forms, with or without 6f6b2c4ecSMax Laier.\" modification, are permitted provided that the following conditions 7f6b2c4ecSMax Laier.\" are met: 8f6b2c4ecSMax Laier.\" 1. Redistributions of source code must retain the above copyright 9f6b2c4ecSMax Laier.\" notice, this list of conditions and the following disclaimer. 10f6b2c4ecSMax Laier.\" 2. Redistributions in binary form must reproduce the above copyright 11f6b2c4ecSMax Laier.\" notice, this list of conditions and the following disclaimer in the 12f6b2c4ecSMax Laier.\" documentation and/or other materials provided with the distribution. 13f6b2c4ecSMax Laier.\" 14f6b2c4ecSMax Laier.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15f6b2c4ecSMax Laier.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16f6b2c4ecSMax Laier.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17f6b2c4ecSMax Laier.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18f6b2c4ecSMax Laier.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19f6b2c4ecSMax Laier.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20f6b2c4ecSMax Laier.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21f6b2c4ecSMax Laier.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22f6b2c4ecSMax Laier.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23f6b2c4ecSMax Laier.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24f6b2c4ecSMax Laier.\" SUCH DAMAGE. 25f6b2c4ecSMax Laier.\" 26bf531bccSWarner Losh.Dd January 21, 2024 27f6b2c4ecSMax Laier.Dt ALTQ 4 28f6b2c4ecSMax Laier.Os 29f6b2c4ecSMax Laier.Sh NAME 30f6b2c4ecSMax Laier.Nm ALTQ 31a1c21316SRuslan Ermilov.Nd "alternate queuing of network packets" 328624b327SMax Laier.Sh SYNOPSIS 338624b327SMax Laier.Cd options ALTQ 348624b327SMax Laier.Pp 358624b327SMax Laier.Cd options ALTQ_CBQ 360a70aaf8SLuiz Otavio O Souza.Cd options ALTQ_CODEL 378624b327SMax Laier.Cd options ALTQ_RED 388624b327SMax Laier.Cd options ALTQ_RIO 398624b327SMax Laier.Cd options ALTQ_HFSC 408624b327SMax Laier.Cd options ALTQ_CDNR 418624b327SMax Laier.Cd options ALTQ_PRIQ 42a5b789f6SErmal Luçi.Cd options ALTQ_FAIRQ 43f6b2c4ecSMax Laier.Sh DESCRIPTION 44f6b2c4ecSMax LaierThe 45f6b2c4ecSMax Laier.Nm 46b7440a86SSevan Janiyansystem is a framework which provides several disciplines for queuing outgoing 47b7440a86SSevan Janiyannetwork packets. 48f6b2c4ecSMax LaierThis is done by modifications to the interface packet queues. 49f6b2c4ecSMax LaierSee 50f6b2c4ecSMax Laier.Xr altq 9 51f6b2c4ecSMax Laierfor details. 52f6b2c4ecSMax Laier.Pp 53f6b2c4ecSMax LaierThe user interface for 54f6b2c4ecSMax Laier.Nm 55f6b2c4ecSMax Laieris implemented by the 56f6b2c4ecSMax Laier.Xr pfctl 8 57f6b2c4ecSMax Laierutility, so please refer to the 58f6b2c4ecSMax Laier.Xr pfctl 8 59f6b2c4ecSMax Laierand the 60f6b2c4ecSMax Laier.Xr pf.conf 5 61f6b2c4ecSMax Laierman pages for a complete description of the 62f6b2c4ecSMax Laier.Nm 63f6b2c4ecSMax Laiercapabilities and how to use it. 64f6b2c4ecSMax Laier.Ss Kernel Options 65f6b2c4ecSMax LaierThe following options in the kernel configuration file are related to 66f6b2c4ecSMax Laier.Nm 67f6b2c4ecSMax Laieroperation: 68f6b2c4ecSMax Laier.Pp 69f6b2c4ecSMax Laier.Bl -tag -width ".Dv ALTQ_DEBUG" -compact 70f6b2c4ecSMax Laier.It Dv ALTQ 71a1c21316SRuslan ErmilovEnable 72a1c21316SRuslan Ermilov.Nm . 73f6b2c4ecSMax Laier.It Dv ALTQ_CBQ 74a1c21316SRuslan ErmilovBuild the 75f6b2c4ecSMax Laier.Dq "Class Based Queuing" 76f6b2c4ecSMax Laierdiscipline. 770a70aaf8SLuiz Otavio O Souza.It Dv ALTQ_CODEL 780a70aaf8SLuiz Otavio O SouzaBuild the 790a70aaf8SLuiz Otavio O Souza.Dq "Controlled Delay" 800a70aaf8SLuiz Otavio O Souzadiscipline. 81f6b2c4ecSMax Laier.It Dv ALTQ_RED 82a1c21316SRuslan ErmilovBuild the 83c7219167SMax Laier.Dq "Random Early Detection" 84f6b2c4ecSMax Laierextension. 85f6b2c4ecSMax Laier.It Dv ALTQ_RIO 86a1c21316SRuslan ErmilovBuild 87f6b2c4ecSMax Laier.Dq "Random Early Drop" 88f6b2c4ecSMax Laierfor input and output. 89f6b2c4ecSMax Laier.It Dv ALTQ_HFSC 90a1c21316SRuslan ErmilovBuild the 91f6b2c4ecSMax Laier.Dq "Hierarchical Packet Scheduler" 92f6b2c4ecSMax Laierdiscipline. 93f6b2c4ecSMax Laier.It Dv ALTQ_CDNR 94a1c21316SRuslan ErmilovBuild the traffic conditioner. 95f6b2c4ecSMax LaierThis option is meaningless at the moment as the conditioner is not used by 967ac5da6cSChristian Bruefferany of the available disciplines or consumers. 97f6b2c4ecSMax Laier.It Dv ALTQ_PRIQ 98a1c21316SRuslan ErmilovBuild the 99f6b2c4ecSMax Laier.Dq "Priority Queuing" 100f6b2c4ecSMax Laierdiscipline. 101a5b789f6SErmal Luçi.It Dv ALTQ_FAIRQ 102a5b789f6SErmal LuçiBuild the 103a5b789f6SErmal Luçi.Dq "Fair Queuing" 104a5b789f6SErmal Luçidiscipline. 105f6b2c4ecSMax Laier.It Dv ALTQ_NOPCC 106cceffdeeSAndrew ThompsonRequired if the TSC is unusable. 107f6b2c4ecSMax Laier.It Dv ALTQ_DEBUG 108a1c21316SRuslan ErmilovEnable additional debugging facilities. 109f6b2c4ecSMax Laier.El 110f6b2c4ecSMax Laier.Pp 111f6b2c4ecSMax LaierNote that 112f6b2c4ecSMax Laier.Nm Ns -disciplines 113f6b2c4ecSMax Laiercannot be loaded as kernel modules. 114f6b2c4ecSMax LaierIn order to use a certain discipline you have to build it into a custom 115f6b2c4ecSMax Laierkernel. 116f6b2c4ecSMax LaierThe 117f6b2c4ecSMax Laier.Xr pf 4 118f6b2c4ecSMax Laierinterface, that is required for the configuration process of 119f6b2c4ecSMax Laier.Nm 120f6b2c4ecSMax Laiercan be loaded as a module. 121f6b2c4ecSMax Laier.Sh SUPPORTED DEVICES 122f6b2c4ecSMax LaierThe driver modifications described in 123f6b2c4ecSMax Laier.Xr altq 9 1247ac5da6cSChristian Bruefferare required to use a certain network card with 1257ac5da6cSChristian Brueffer.Nm . 1267ac5da6cSChristian BruefferThey have been applied to the following hardware drivers: 12778b815acSPyun YongHyeon.Xr ae 4 , 128dbae6a11SPyun YongHyeon.Xr age 4 , 129ff24f054SPyun YongHyeon.Xr alc 4 , 130cad7d367SPyun YongHyeon.Xr ale 4 , 131fe46dc70SMax Laier.Xr aue 4 , 13263d46d1dSUlrich Spörlein.Xr axe 4 , 133d21fac50SMax Laier.Xr bce 4 , 134f6b2c4ecSMax Laier.Xr bfe 4 , 135c58d0255SMax Laier.Xr bge 4 , 1364e400768SDavid Christensen.Xr bxe 4 , 1377cd038bcSMarius Strobl.Xr cas 4 , 138d9a47113SBrian Feldman.Xr dc 4 , 139f6b2c4ecSMax Laier.Xr em 4 , 140d0ea4743SBjoern A. Zeeb.Xr epair 4 , 141b767a0e1SPyun YongHyeon.Xr et 4 , 142f6b2c4ecSMax Laier.Xr fxp 4 , 143185d3fe9SPyun YongHyeon.Xr gem 4 , 14478b815acSPyun YongHyeon.Xr igb 4 , 145*cadb71e4SAlexander Ziaee.Xr ix 4 , 146889eb7f5SPyun YongHyeon.Xr jme 4 , 1474a46d2a6SChristian Brueffer.Xr le 4 , 148f173c2b7SSean Bruno.Xr liquidio 4 , 149d5a1a939SPyun YongHyeon.Xr msk 4 , 1508e91869cSChristian Brueffer.Xr mxge 4 , 15136406656SChristian Brueffer.Xr my 4 , 1524d0046ccSPyun YongHyeon.Xr nfe 4 , 153d4cb58f6SPyun YongHyeon.Xr nge 4 , 154212b1d6dSChristian Brueffer.Xr qlxgb 4 , 15552732175SMax Laier.Xr re 4 , 156f6b2c4ecSMax Laier.Xr rl 4 , 1579b00b6e1SPyun YongHyeon.Xr sge 4 , 158f6b2c4ecSMax Laier.Xr sis 4 , 159b9c5f412SMax Laier.Xr sk 4 , 160ade6e491SMax Laier.Xr ste 4 , 1615d44cffcSPyun YongHyeon.Xr stge 4 , 16231c70037SPyun YongHyeon.Xr ti 4 , 163d21fac50SMax Laier.Xr udav 4 , 16491dba98dSChristian Brueffer.Xr vge 4 , 165b9c5f412SMax Laier.Xr vr 4 , 166bb0667afSPyun YongHyeon.Xr vte 4 , 167f6b2c4ecSMax Laierand 168f6b2c4ecSMax Laier.Xr xl 4 . 169f6b2c4ecSMax Laier.Pp 170f6b2c4ecSMax LaierThe 1713d98e253SKristof Provost.Xr tun 4 , 1723d98e253SKristof Provost.Xr if_bridge 4 , 1733d98e253SKristof Provost.Xr if_vlan 4 , 174b5db9fa7SGleb Smirnoffand 175b5db9fa7SGleb Smirnoff.Xr ng_iface 4 176b5db9fa7SGleb Smirnoffpseudo drivers also do support 177b5db9fa7SGleb Smirnoff.Nm . 178dbc25ee8SJohn-Mark Gurney.Pp 179dbc25ee8SJohn-Mark GurneyAn example: 180dbc25ee8SJohn-Mark Gurney.Bd -literal -offset indent 181dbc25ee8SJohn-Mark Gurneyaltq on igb0 cbq queue { def aq } 182dbc25ee8SJohn-Mark Gurneyqueue def bandwidth 90% cbq (default borrow) 183dbc25ee8SJohn-Mark Gurneyqueue aq bandwidth 10Mb cbq 184dbc25ee8SJohn-Mark Gurney 185dbc25ee8SJohn-Mark Gurneypass in on igb0.10 proto udp all queue aq keep state 186dbc25ee8SJohn-Mark Gurney.Ed 187f6b2c4ecSMax Laier.Sh SEE ALSO 188f6b2c4ecSMax Laier.Xr pf 4 , 189f6b2c4ecSMax Laier.Xr pf.conf 5 , 190d9a47113SBrian Feldman.Xr ipfw 8 , 191f6b2c4ecSMax Laier.Xr pfctl 8 , 192a1c21316SRuslan Ermilov.Xr altq 9 193b7440a86SSevan Janiyan.Sh HISTORY 194b7440a86SSevan JaniyanThe 195b7440a86SSevan Janiyan.Nm 196b7440a86SSevan Janiyansystem first appeared in March 1997 and found home in the KAME project 1971f9aaf18SWolfram Schneider(https://www.kame.net). 198b7440a86SSevan JaniyanIt was imported to 199b7440a86SSevan Janiyan.Fx 200b7440a86SSevan Janiyanin 5.3 . 201