Debian Codegraph @

upstream/mageia-cauldron/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. All parameters except
81 .I id
82 (for netdev scope) are required.
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), or "
113 .BR node " (scheduling node shaper)."
114
115 .TP
116 .BI id " HANDLE_ID"
117 Numeric identifier for the shaper. Optional for
118 .B netdev
119 scope (defaults to 0), required for
120 .B queue
121 and
122 .B node
123 scopes.
124 .RE
125
126 .TP
127 .BI bw-max " BW_MAX"
128 Maximum bandwidth limit for the shaper. Accepts values with suffixes:
129 .BR kbit ", " mbit ", " gbit
130 for kilobits, megabits, and gigabits per second respectively.
131
132 .SH OPTIONS
133
134 .TP
135 .BR \-V ", " \-Version
136 Print the version of the
137 .B netshaper
138 utility and exit.
139
140 .TP
141 .BR \-c [ color "] = {" always " | " auto " | " never }
142 Configure color output. If parameter is omitted or
143 .BR always ,
144 color output is enabled regardless of stdout state. If parameter is
145 .BR auto ,
146 stdout is checked to be a terminal before enabling color output. If parameter is
147 .BR never ,
148 color output is disabled. If specified multiple times, the last one takes
149 precedence.
150
151 .TP
152 .B \-help
153 Display usage information and exit.
154
155 .SH EXAMPLES
156
157 .TP
158 .B Example 1: Create a device-level shaper (id optional)
159 .nf
160 # netshaper set dev foo handle scope netdev bw-max 10gbit
161 .fi
162 .RS
163 Creates a netdev-scoped shaper with default id 0 and sets the maximum
164 bandwidth to 10 gigabits per second.
165 .RE
166
167 .TP
168 .B Example 2: Show shaper configuration
169 .nf
170 # netshaper show dev foo handle scope netdev
171 .fi
172 .RS
173 Display the current shaper configuration for the specified device and handle.
174 .RE
175
176 .TP
177 .B Example 3: Delete shaper configuration
178 .nf
179 # netshaper delete dev eth0 handle scope netdev
180 .fi
181 .RS
182 Remove the specified shaper configuration.
183 .RE
184
185 .SH NOTES
186 .IP \(bu
187 For
188 .B netdev
189 scope, the
190 .I id
191 parameter is optional and defaults to 0 if not specified.
192 .IP \(bu
193 For
194 .B queue
195 and
196 .B node
197 scopes, the
198 .I id
199 parameter is required.
200 .IP \(bu
201 Bandwidth values support standard suffixes:
202 .BR kbit " (kilobits per second), "
203 .BR mbit " (megabits per second), "
204 .BR gbit " (gigabits per second)."
205 .IP \(bu
206 This command currently supports basic shaper operations. Additional
207 functionality will be added as requirements are identified.
208
209 .SH SEE ALSO
210 .BR ip (8),
211 .BR ip-link (8),
212 .BR tc (8)
213
214 .SH AUTHOR
215 Erni Sri Satya Vennela <[email protected]>