Scroll to navigation

NETSHAPER(8) Linux NETSHAPER(8)

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-max BW_MAX

netshaper { show | delete } dev DEV handle scope HANDLE_SCOPE [ id HANDLE_ID ]

DESCRIPTION

netshaper allows configuration and management of hardware rate limiting (shaping) capabilities available on network devices. The API provides control over shapers at different levels including network devices, queues, and scheduling nodes, enabling manipulation of the device's scheduling tree.

Each shaper is uniquely identified within a device by a handle, which consists of a scope and an optional id. Depending on the scope value, shapers are attached to specific hardware objects:

Shapers attached to the entire network device. The id parameter is optional for this scope (defaults to 0 if not specified).

Shapers attached to specific device queues. The id parameter is required and specifies the queue number.

Shapers representing scheduling groups that can be placed at arbitrary locations in the scheduling tree. The id parameter is required.

COMMANDS

netshaper set

- Create or update a shaper configuration

Creates or updates a shaper with the specified parameters. All parameters except id (for netdev scope) are required.

netshaper show

- Display shaper information

Shows the current configuration of the specified shaper, including bandwidth limits and device information.

netshaper delete

- Remove a shaper configuration

Removes the specified shaper configuration from the device.

PARAMETERS

Specifies the network device name on which to operate.

Defines the shaper handle consisting of:

The shaper scope, which can be: netdev (device-level shaper), queue (queue-level shaper), or node (scheduling node shaper).

Numeric identifier for the shaper. Optional for netdev scope (defaults to 0), required for queue and node scopes.

Maximum bandwidth limit for the shaper. Accepts values with suffixes: kbit, mbit, gbit for kilobits, megabits, and gigabits per second respectively.

OPTIONS

Print the version of the netshaper utility and exit.

Configure color output. If parameter is omitted or always, color output is enabled regardless of stdout state. If parameter is auto, stdout is checked to be a terminal before enabling color output. If parameter is never, color output is disabled. If specified multiple times, the last one takes precedence.

Display usage information and exit.

EXAMPLES

# netshaper set dev foo handle scope netdev bw-max 10gbit
Creates a netdev-scoped shaper with default id 0 and sets the maximum bandwidth to 10 gigabits per second.

# netshaper show dev foo handle scope netdev
Display the current shaper configuration for the specified device and handle.

# netshaper delete dev eth0 handle scope netdev
Remove the specified shaper configuration.

NOTES

  • For netdev scope, the id parameter is optional and defaults to 0 if not specified.
  • For queue and node scopes, the id parameter is required.
  • Bandwidth values support standard suffixes: kbit (kilobits per second), mbit (megabits per second), gbit (gigabits per second).
  • This command currently supports basic shaper operations. Additional functionality will be added as requirements are identified.

SEE ALSO

ip(8), ip-link(8), tc(8)

AUTHOR

Erni Sri Satya Vennela <ernis@linux.microsoft.com>

7 Oct 2025 iproute2