NETSHAPER(8)
๐
NETSHAPER โ the netshaper page, but make it cute โจ
okay bestie, pull up a chair ๐ซถ you're reading the manual page for netshaper, section 8 of the Linux manuals. yes, that section 8, the one for the big-girl system admin tools. we're doing hardware shaping today and honestly? it's giving main character energy ๐
โจ NAME โจ
netshaper โ show / manipulate network device hardware shaping configuration ๐ธ
๐ SYNOPSIS ๐
netshaper [ OPTIONS ] { COMMAND | help }
OPTIONS := { -V[ersion] | -c[olor] | -help }
netshaper set dev DEV handle scope HANDLE_SCOPE [ id HANDLE_ID ] [ bw-min BW_MIN ] [ bw-max BW_MAX ] [ weight WEIGHT ]
netshaper { show | delete } dev DEV handle scope HANDLE_SCOPE [ id HANDLE_ID ]
netshaper group dev DEV handle scope { node | netdev } [ id HANDLE_ID ] [ parent scope { netdev [ id PARENT_ID ] | node id PARENT_ID } ] [ bw-min BW_MIN ] [ bw-max BW_MAX ] [ weight WEIGHT ] leaves LEAF_SPEC [ LEAF_SPEC ... ]
LEAF_SPEC := scope queue id ID [ weight WEIGHT ] [ priority PRIO ]
like, look at all those brackets. it's giving "optional but make it fashion" ๐
๐ฆ DESCRIPTION ๐ฆ
so. netshaper lets you configure and manage the hardware rate limiting (shaping) capabilities that live on network devices. not software shaping, bestie โ hardware. the API gives you control over shapers at a bunch of different levels, including network devices, queues, and scheduling nodes, which means you can literally manipulate the device's scheduling tree. iconic behavior, no cap ๐ฅ
Every single shaper is uniquely identified within a device by a handle, which is made of a scope plus an optional id. and depending on what that scope value is, shapers get attached to specific hardware objects:
netdevโ shapers attached to the entire network device. theidparameter is optional for this scope (it defaults to0if you don't specify it).queueโ shapers attached to specific device queues. theidparameter is required here and it specifies the queue number.nodeโ intermediate scheduling nodes that can be placed at arbitrary locations in the scheduling tree. theidparameter is required for theset,show, anddeletecommands. for thegroupcommand it's optional; if you omit it, the kernel auto-assigns one. so generous of it ๐ง
๐ COMMANDS ๐
๐ netshaper set
- Create or update a shaper configuration
Creates or updates a shaper with the parameters you gave it. At least one of bw-min, bw-max, or weight must be provided โ you can't just roll up with nothing, bestie ๐ญ The id parameter is required for queue and node scopes and optional for netdev scope.
๐ netshaper show
- Display shaper information
Shows you the current configuration of the specified shaper, including bandwidth limits, weight, and parent information. it's the vibe check of shapers ๐
๐ netshaper delete
- Remove a shaper configuration
Removes the specified shaper configuration from the device. bye bye ๐
๐ netshaper group
- Create a scheduling hierarchy
Creates a scheduling group by binding one or more queue leaf shapers to a netdev or node handle โ all in a single operation, because we don't do multiple round trips around here โจ The command specifies the target handle, its parent, optional bandwidth and weight parameters, and the set of queue leaves to attach.
๐ธ PARAMETERS ๐ธ
dev DEVโ Specifies the network device name on which to operate.handleโ Defines the shaper handle, which consists of:scope HANDLE_SCOPEโ The shaper scope, which can be:netdev(device-level shaper),queue(queue-level shaper), ornode(scheduling node shaper).id HANDLE_IDโ Numeric identifier for the shaper. Required forqueueandnodescopes. Optional fornetdevscope (defaults to0). For thegroupcommand,node idmay be omitted to let the kernel auto-assign one.
bw-min BW_MINโ Minimum guaranteed bandwidth for the shaper. Accepts values with suffixes:kbit,mbit,gbitfor kilobits, megabits, and gigabits per second respectively.bw-max BW_MAXโ Maximum bandwidth limit for the shaper. Accepts the same suffixes asbw-min.weight WEIGHTโ Scheduling weight for the shaper, used for weighted fair sharing among siblings under the same parent node. Value is an unsigned integer.parentโ Defines the parent for thegroupcommand. The parent scope must benodeornetdev;queueis not valid as a parent scope. For parent scopenode,idis required. For parent scopenetdev,idis optional. When omitted, the parent is inherited from the leaves' current parent, which requires all leaves to share the same parent.leavesโ Specifies one or more leaf shapers to attach to the group. Each leaf must use scopequeue; no other scope is accepted for leaves. Each leaf is given asscope queue id ID, with optionalweightandpriorityparameters for per-queue scheduling within the group. Multiple leaves can be specified in sequence.
๐ OPTIONS ๐
-V,-Versionโ Print the version of thenetshaperutility and exit.-c[color] = {always | auto | never}โ Configure color output. If the parameter is omitted oralways, color output is enabled regardless of stdout state. If the parameter isauto, stdout is checked to be a terminal before enabling color output. If the parameter isnever, color output is disabled. If specified multiple times, the last one takes precedence. (last one wins, always ๐ )-helpโ Display usage information and exit.
๐ฅ EXAMPLES ๐ฅ
Example 1: Create a device-level shaper
# netshaper set dev foo handle scope netdev bw-max 10gbit
Creates a netdev-scoped shaper with maximum bandwidth of 10 Gbit/s. slay.
Example 2: Set bandwidth and weight on a queue shaper
# netshaper set dev foo handle scope queue id 0 \
bw-min 1gbit bw-max 5gbit weight 10
Creates a queue-scoped shaper on queue 0 with minimum/maximum bandwidth limits and a scheduling weight.
Example 3: Show shaper configuration
# netshaper show dev foo handle scope netdev
Displays the current shaper configuration for the specified device and handle.
Example 4: Create a scheduling hierarchy with group
# netshaper group dev foo handle scope node \
parent scope netdev bw-max 10gbit \
leaves scope queue id 0 weight 3 \
scope queue id 1 weight 2
Creates a node shaper under the netdev parent, grouping queues 0 and 1 as leaves. The 10 Gbit/s cap applies to the node itself. the way that structure just works ๐ญ๐
Example 5: Delete shaper configuration
# netshaper delete dev foo handle scope netdev
Removes the specified shaper configuration.
๐ NOTES ๐
- For
netdevscope, theidparameter is optional and defaults to0if not specified. - For
queueandnodescopes, theidparameter is required. For thegroupcommand,node idmay be omitted to let the kernel auto-assign one. - Bandwidth values support standard suffixes:
kbit(kilobits per second),mbit(megabits per second),gbit(gigabits per second). - The
groupcommand attaches queue leaves to anetdevornodehandle in a single atomic operation. atomic. periodt. โญ
๐ซถ SEE ALSO ๐ซถ
๐ AUTHOR ๐
Erni Sri Satya Vennela <ernis@linux.microsoft.com> Mohsin Bashir <hmohsin@meta.com>
and that's the whole thing bestie, go forth and shape some bandwidth ๐โจ this little gem lives in iproute2, dated 19 May 2026, and yeah โ it's still NETSHAPER(8) at the bottom, iykyk ๐
๐ฆ where this page comes from
- arch rolling: iproute2 7.2.0-1
- arch rolling: iproute2 7.3.0-1 ยท GPL-2.0-or-later
- nixpkgs unstable: iproute2 7.2.0
- ubuntu stonking: iproute2 7.2.0-1ubuntu1 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms