12296e7a8SLuigi Rizzo.\" 27f3dea24SPeter Wemm.\" $FreeBSD$ 32296e7a8SLuigi Rizzo.\" 4cc1ce085SKristof Provost.Dd September 10, 2021 52296e7a8SLuigi Rizzo.Dt DUMMYNET 4 62296e7a8SLuigi Rizzo.Os 72296e7a8SLuigi Rizzo.Sh NAME 82296e7a8SLuigi Rizzo.Nm dummynet 99a96729cSLuigi Rizzo.Nd traffic shaper, bandwidth manager and delay emulator 102296e7a8SLuigi Rizzo.Sh DESCRIPTION 11d962d52aSRuslan ErmilovThe 12d962d52aSRuslan Ermilov.Nm 13d962d52aSRuslan Ermilovsystem facility permits the control of traffic 142296e7a8SLuigi Rizzogoing through the various network interfaces, by applying bandwidth 159a96729cSLuigi Rizzoand queue size limitations, implementing different scheduling and queue 169a96729cSLuigi Rizzomanagement policies, and emulating delays and losses. 172296e7a8SLuigi Rizzo.Pp 189a96729cSLuigi RizzoThe user interface for 194b66483fSRuslan Ermilov.Nm 20d962d52aSRuslan Ermilovis implemented by the 21cc1ce085SKristof Provost.Xr dnctl 8 22d962d52aSRuslan Ermilovutility, so please refer to the 23cc1ce085SKristof Provost.Xr dnctl 8 24d962d52aSRuslan Ermilovmanpage for a complete description of the 25d962d52aSRuslan Ermilov.Nm 26d962d52aSRuslan Ermilovcapabilities and how to use it. 27d962d52aSRuslan Ermilov.Ss Kernel Options 289a96729cSLuigi RizzoThe following options in the kernel configuration file are related to 294b66483fSRuslan Ermilov.Nm 302296e7a8SLuigi Rizzooperation: 31d962d52aSRuslan Ermilov.Pp 32d962d52aSRuslan Ermilov.Bl -tag -width ".Dv IPFIREWALL_VERBOSE_LIMIT" -offset indent -compact 33d962d52aSRuslan Ermilov.It Dv IPFIREWALL 34*c8607bf4SKristof Provostenable ipfirewall (if 35*c8607bf4SKristof Provost.Nm 36*c8607bf4SKristof Provostis to be used with ipfw) 37d962d52aSRuslan Ermilov.It Dv IPFIREWALL_VERBOSE 38d962d52aSRuslan Ermilovenable firewall output 39d962d52aSRuslan Ermilov.It Dv IPFIREWALL_VERBOSE_LIMIT 40d962d52aSRuslan Ermilovlimit firewall output 41d962d52aSRuslan Ermilov.It Dv DUMMYNET 42d962d52aSRuslan Ermilovenable 43d962d52aSRuslan Ermilov.Nm 44d962d52aSRuslan Ermilovoperation 45d962d52aSRuslan Ermilov.It Dv HZ 46d962d52aSRuslan Ermilovset the timer granularity 47d962d52aSRuslan Ermilov.El 482296e7a8SLuigi Rizzo.Pp 492296e7a8SLuigi RizzoGenerally, the following options are required: 50d962d52aSRuslan Ermilov.Bd -literal -offset indent 512296e7a8SLuigi Rizzooptions IPFIREWALL 522296e7a8SLuigi Rizzooptions DUMMYNET 539a96729cSLuigi Rizzooptions HZ=1000 # strongly recommended 542296e7a8SLuigi Rizzo.Ed 553136363fSRuslan Ermilov.Pp 56d962d52aSRuslan ErmilovAdditionally, one may want to increase the number 572296e7a8SLuigi Rizzoof mbuf clusters (used to store network packets) according to the 582296e7a8SLuigi Rizzosum of the bandwidth-delay products and queue sizes of all configured 592296e7a8SLuigi Rizzopipes. 602296e7a8SLuigi Rizzo.Sh SEE ALSO 612296e7a8SLuigi Rizzo.Xr setsockopt 2 , 62c8b01292SAndrew Thompson.Xr if_bridge 4 , 632296e7a8SLuigi Rizzo.Xr ip 4 , 642296e7a8SLuigi Rizzo.Xr ipfw 8 , 65cc1ce085SKristof Provost.Xr dnctl 8 , 66*c8607bf4SKristof Provost.Xr pf.conf 5 , 676fe89339SBen Smithurst.Xr sysctl 8 682296e7a8SLuigi Rizzo.Sh HISTORY 69d962d52aSRuslan ErmilovThe 702296e7a8SLuigi Rizzo.Nm 71d962d52aSRuslan Ermilovfacility 72d962d52aSRuslan Ermilovwas initially implemented as a testing tool for 73d962d52aSRuslan Ermilov.Tn TCP 74d962d52aSRuslan Ermilovcongestion control by 756c899950SBaptiste Daroussin.An Luigi Rizzo Aq Mt luigi@iet.unipi.it , 769a96729cSLuigi Rizzoas described on ACM Computer Communication Review, Jan.97 issue. 77d962d52aSRuslan ErmilovLater it has been modified to work at the 78d962d52aSRuslan Ermilov.Tn IP 79d962d52aSRuslan Ermilovand bridging levels, integrated with the 80d962d52aSRuslan Ermilov.Xr ipfw 4 81d962d52aSRuslan Ermilovpacket filter, and extended to 829a96729cSLuigi Rizzosupport multiple queueing and scheduling policies. 83