Debian Codegraph @

upstream/debian-unstable/man8/netshaper.8

raw
1 .TH NETSHAPER 8 "7 Oct 2025" "iproute2" "Linux"
2 .SH NAME
3 netshaper \- show / manipulate network device hardware shaping configuration
4 .SH SYNOPSIS
5
6 .ad l
7 .in +8
8 .ti -8
9 .B netshaper
10 .RI "[ " OPTIONS " ] { " COMMAND " | "
11 .BR help " }"
12 .sp
13
14 .ti -8
15 .IR OPTIONS " := { "
16 \fB\-V\fR[\fIersion\fR] |
17 \fB\-c\fR[\fIolor\fR] |
18 \fB\-help\fR }
19
20 .ti -8
21 .B "netshaper set"
22 .B dev
23 .IR DEV
24 .B handle scope
25 .IR HANDLE_SCOPE
26 .RI "[ " id
27 .IR HANDLE_ID " ]"
28 .B bw-max
29 .IR BW_MAX
30
31 .ti -8
32 .B "netshaper" " { " show " | " delete " }"
33 .B dev
34 .IR DEV
35 .B handle scope
36 .IR HANDLE_SCOPE
37 .RI "[ " id
38 .IR HANDLE_ID " ]"
39
40 .SH DESCRIPTION
41 .B netshaper
42 allows configuration and management of hardware rate limiting (shaping) capabilities
43 available on network devices. The API provides control over shapers at different levels
44 including network devices, queues, and scheduling nodes, enabling manipulation of the
45 device's scheduling tree.
46
47 Each shaper is uniquely identified within a device by a
48 .IR handle ,
49 which consists of a
50 .I scope
51 and an optional
52 .IR id .
53 Depending on the scope value, shapers are attached to specific hardware objects:
54
55 .TP
56 .B netdev
57 Shapers attached to the entire network device. The
58 .I id
59 parameter is optional for this scope (defaults to 0 if not specified).
60
61 .TP
62 .B queue
63 Shapers attached to specific device queues. The
64 .I id
65 parameter is required and specifies the queue number.
66
67 .TP
68 .B node
69 Shapers representing scheduling groups that can be placed at arbitrary
70 locations in the scheduling tree. The
71 .I id
72 parameter is required.
73
74 .SH COMMANDS
75
76 .SS
77 .B netshaper set
78 - Create or update a shaper configuration
79
80 Creates or updates a shaper with the specified parameters. The
81 .I id
82 parameter is optional for netdev scope but required for all other scopes.
83
84 .SS
85 .B netshaper show
86 - Display shaper information
87
88 Shows the current configuration of the specified shaper, including bandwidth
89 limits and device information.
90
91 .SS
92 .B netshaper delete
93 - Remove a shaper configuration
94
95 Removes the specified shaper configuration from the device.
96
97 .SH PARAMETERS
98
99 .TP
100 .BI dev " DEV"
101 Specifies the network device name on which to operate.
102
103 .TP
104 .B handle
105 Defines the shaper handle consisting of:
106
107 .RS
108 .TP
109 .BI scope " HANDLE_SCOPE"
110 The shaper scope, which can be:
111 .BR netdev " (device-level shaper), "
112 .BR queue " (queue-level shaper), "
113 or
114 .BR node " (scheduling node shaper)."
115
116 .TP
117 .BI id " HANDLE_ID"
118 Numeric identifier for the shaper. Optional for
119 .B netdev
120 scope (defaults to 0), required for
121 .B queue
122 and
123 .B node
124 scopes.
125 .RE
126
127 .TP
128 .BI bw-max " BW_MAX"
129 Maximum bandwidth limit for the shaper. Accepts values with suffixes:
130 .BR kbit ", " mbit ", " gbit
131 for kilobits, megabits, and gigabits per second respectively.
132
133 .SH OPTIONS
134
135 .TP
136 .BR \-V ", " \-Version
137 Print the version of the
138 .B netshaper
139 utility and exit.
140
141 .TP
142 .BR \-c [ color "] = {" always " | " auto " | " never }
143 Configure color output. If the parameter is omitted or
144 .BR always ,
145 color output is enabled regardless of stdout state. If the parameter is
146 .BR auto ,
147 stdout is checked to be a terminal before enabling color output. If the parameter is
148 .BR never ,
149 color output is disabled. If specified multiple times, the last one takes
150 precedence.
151
152 .TP
153 .B \-help
154 Display usage information and exit.
155
156 .SH EXAMPLES
157
158 .TP
159 .B Example 1: Create a device-level shaper (ID optional)
160 .nf
161 # netshaper set dev foo handle scope netdev bw-max 10gbit
162 .fi
163 .RS
164 Creates a netdev-scoped shaper with default id 0 and sets the maximum
165 bandwidth to 10 gigabits per second.
166 .RE
167
168 .TP
169 .B Example 2: Show shaper configuration
170 .nf
171 # netshaper show dev foo handle scope netdev
172 .fi
173 .RS
174 Displays the current shaper configuration for the specified device and handle.
175 .RE
176
177 .TP
178 .B Example 3: Delete shaper configuration
179 .nf
180 # netshaper delete dev eth0 handle scope netdev
181 .fi
182 .RS
183 Removes the specified shaper configuration.
184 .RE
185
186 .SH NOTES
187 .IP \(bu
188 For
189 .B netdev
190 scope, the
191 .I id
192 parameter is optional and defaults to 0 if not specified.
193 .IP \(bu
194 For
195 .B queue
196 and
197 .B node
198 scopes, the
199 .I id
200 parameter is required.
201 .IP \(bu
202 Bandwidth values support standard suffixes:
203 .BR kbit " (kilobits per second), "
204 .BR mbit " (megabits per second), "
205 .BR gbit " (gigabits per second)."
206 .IP \(bu
207 This command currently supports basic shaper operations. Additional
208 functionality will be added as requirements are identified.
209
210 .SH SEE ALSO
211 .BR ip (8),
212 .BR ip-link (8),
213 .BR tc (8)
214
215 .SH AUTHOR
216 Erni Sri Satya Vennela <[email protected]>