====== Traffic Shaper ====== [[https://www.freebsd.org/cgi/man.cgi?query=dummynet&apropos=0&sektion=0&manpath=FreeBSD+11.2-RELEASE&arch=default&format=html|dummynet]] -- flexible bandwidth manager and delay emulator [[http://caia.swin.edu.au/reports/160708A/CAIA-TR-160708A.pdf]] Some terms: * **AQM** - **A**ctive **Q**ueue **M**anagement * **droptail** - drop packetss if full * **CoDel** * **PIE** * **pipe** (link, limiter)- virtual path that emulates a connection with a specified bandwidth, propagation delay, and packet loss pattern. * **scheduler** - arbitrate access of multiple flows to the same link (pipe) * FIFO * DRR * PRIO * WF2Q+ * QFQ * KPS * Simple pipe internally has attached * queue (droptail) * scheduler (FIFO) * pipe (a link emulator with given badwidth and delay) {{:sw:opnsense:fig5_a_simple_dummynet_pipe.jpg?400|}} ===== FQ-CoDel ===== The **FlowQueue-CoDel** (**FQ-CoDel**) algorithm is a combined packet scheduler and Active Queue Management (AQM) algorithm. * Pipe with fq-CoDel AQM set * queue is a dummy queue without any management policy (no droptail). It is not used to buffer incoming packets * fq-CoDel scheduler manages internal queues to buffer packets {{:sw:opnsense:fig7_fq_codel.jpg?400|}} REMARKS: * **fq-CoDel** on queues is ignored when **fq-codel** is enabled on pipe. * queue is needed (even if not really used). There is no other way to send packets to **fq-codel** scheduler. So creating a pipe with **fq-codel** will always create a queue. * number of internal queues in **fq-codel** is condifured by **flows** parameter ===== shell ===== ipfw pipe show ipfw sched show ipfw queue show