Rate Limiting
OpenBSD provides a robust mechanism for providing rate limiting and Quality of Service (QoS) when the host is acting as a gateway. When supplying bandwidth to a wireless and DMZ network through the same gateway, you generally want the DMZ to have higher priority access to the Internet. This will prevent wireless users from saturating your bandwidth and denying access to your DMZ resources from the outside.
The OpenBSD queuing interface, ALTQ, allows for many different types of traffic shaping. Class Based Queuing (CBQ) and Random Early Detection (RED) are enabled by default in a standard OpenBSD installation. To make sure they are enabled, check your platform independent kernel configuration file for the following line:
option ALTQ
ALTQ is controlled by a userland daemon called
altqd. altqd reads its
configuration from /etc/altq.conf by default. To
ensure altqd starts at boot time, verify the
following line is contained in your
/etc/rc.conf:
altqd_flags=""
More
advanced QoS mechanisms such as Hierarchical Fair Service Curve
(HFSC), Weighted Fair Queuing (WFQ) and Priority Queuing (PRIQ) can
be turned on using various configuration options. For a full list of
the queuing options, see the options(4) manual
page.
With CBQ, you can create classes of traffic based on source or destination protocols and addresses. These classes can be very generic and cover whole subnets or they can be very specific and apply only to a certain TCP port on a given server. These ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access