]>
Commit | Line | Data |
---|---|---|
2a9721f1 SH |
1 | .TH IP\-LINK 8 "20 Dec 2011" "iproute2" "Linux" |
2 | .SH "NAME" | |
aab2702d | 3 | ip-link \- network device configuration |
2a9721f1 SH |
4 | .SH "SYNOPSIS" |
5 | .sp | |
6 | .ad l | |
7 | .in +8 | |
8 | .ti -8 | |
9 | .B ip | |
10 | .RI "[ " OPTIONS " ]" | |
11 | .B link | |
12 | .RI " { " COMMAND " | " | |
13 | .BR help " }" | |
14 | .sp | |
15 | ||
16 | .ti -8 | |
17 | .IR OPTIONS " := { " | |
18 | \fB\-V\fR[\fIersion\fR] | | |
19 | \fB\-s\fR[\fItatistics\fR] | | |
20 | \fB\-r\fR[\fIesolve\fR] | | |
21 | \fB\-f\fR[\fIamily\fR] { | |
22 | .BR inet " | " inet6 " | " ipx " | " dnet " | " link " } | " | |
23 | \fB\-o\fR[\fIneline\fR] } | |
24 | ||
25 | .ti -8 | |
26 | .BI "ip link add link " DEVICE | |
27 | .RB "[ " name " ]" | |
28 | .I NAME | |
29 | .br | |
30 | .RB "[ " txqueuelen | |
31 | .IR PACKETS " ]" | |
32 | .br | |
33 | .RB "[ " address | |
34 | .IR LLADDR " ]" | |
35 | .RB "[ " broadcast | |
36 | .IR LLADDR " ]" | |
37 | .br | |
38 | .RB "[ " mtu | |
39 | .IR MTU " ]" | |
40 | .br | |
41 | .BR type " TYPE" | |
42 | .RI "[ " ARGS " ]" | |
43 | ||
44 | .ti -8 | |
45 | .IR TYPE " := [ " | |
46 | .BR vlan " | " veth " | " vcan " | " dummy " | " ifb " | " macvlan " | " can " | " bridge " ]" | |
47 | ||
48 | .ti -8 | |
49 | .BI "ip link delete " DEVICE | |
50 | .BI type " TYPE" | |
51 | .RI "[ " ARGS " ]" | |
52 | ||
53 | .ti -8 | |
54 | .BR "ip link set " { | |
55 | .IR DEVICE " | " | |
56 | .BI "group " GROUP | |
57 | .RB "} { " up " | " down " | " arp " { " on " | " off " } |" | |
58 | .br | |
59 | .BR promisc " { " on " | " off " } |" | |
60 | .br | |
61 | .BR allmulticast " { " on " | " off " } |" | |
62 | .br | |
63 | .BR dynamic " { " on " | " off " } |" | |
64 | .br | |
65 | .BR multicast " { " on " | " off " } |" | |
66 | .br | |
67 | .B txqueuelen | |
68 | .IR PACKETS " |" | |
69 | .br | |
70 | .B name | |
71 | .IR NEWNAME " |" | |
72 | .br | |
73 | .B address | |
74 | .IR LLADDR " |" | |
75 | .B broadcast | |
76 | .IR LLADDR " |" | |
77 | .br | |
78 | .B mtu | |
79 | .IR MTU " |" | |
80 | .br | |
81 | .B netns | |
82 | .IR PID " |" | |
83 | .br | |
84 | .B netns | |
85 | .IR NETNSNAME " |" | |
86 | .br | |
87 | .B alias | |
88 | .IR NAME " |" | |
89 | .br | |
90 | .B vf | |
91 | .IR NUM " [" | |
92 | .B mac | |
93 | .IR LLADDR " ] [" | |
94 | .B vlan | |
95 | .IR VLANID " [ " | |
96 | .B qos | |
97 | .IR VLAN-QOS " ] ] [" | |
98 | .B rate | |
99 | .IR TXRATE " ] [" | |
100 | .B spoofchk { on | off } | |
101 | ] | | |
102 | .br | |
103 | .B master | |
104 | .IR DEVICE | |
105 | .br | |
106 | .B nomaster | |
107 | .BR " }" | |
108 | ||
109 | ||
110 | .ti -8 | |
111 | .B ip link show | |
112 | .RI "[ " DEVICE " | " | |
113 | .B group | |
114 | .IR GROUP " ]" | |
115 | ||
116 | .SH "DESCRIPTION" | |
117 | .SS ip link add - add virtual link | |
118 | ||
119 | .TP | |
120 | .BI link " DEVICE " | |
121 | specifies the physical device to act operate on. | |
122 | ||
123 | .I NAME | |
124 | specifies the name of the new virtual device. | |
125 | ||
126 | .I TYPE | |
127 | specifies the type of the new device. | |
128 | .sp | |
129 | Link types: | |
130 | ||
131 | .in +8 | |
132 | .B vlan | |
133 | - 802.1q tagged virtual LAN interface | |
134 | .sp | |
135 | .B veth | |
136 | - Virtual ethernet interface | |
137 | .sp | |
138 | .B vcan | |
139 | - Virtual Local CAN interface | |
140 | .sp | |
141 | .B dummy | |
142 | - Dummy network interface | |
143 | .sp | |
144 | .B ifb | |
145 | - Intermediate Functional Block device | |
146 | .sp | |
147 | .B macvlan | |
148 | - virtual interface base on link layer address (MAC) | |
149 | .sp | |
150 | .B can | |
151 | - Controller Area Network interface | |
152 | .sp | |
153 | .B bridge | |
154 | - Ethernet Bridge device | |
155 | .in -8 | |
156 | ||
157 | .SS ip link delete - delete virtual link | |
158 | .I DEVICE | |
159 | specifies the virtual device to act operate on. | |
160 | .I TYPE | |
161 | specifies the type of the device. | |
162 | ||
163 | ||
164 | .TP | |
165 | .BI dev " DEVICE " | |
166 | specifies the physical device to act operate on. | |
167 | ||
168 | .SS ip link set - change device attributes | |
169 | ||
170 | .TP | |
171 | .BI dev " DEVICE " | |
172 | .I DEVICE | |
173 | specifies network device to operate on. When configuring SR-IOV Virtual Fuction | |
174 | (VF) devices, this keyword should specify the associated Physical Function (PF) | |
175 | device. | |
176 | ||
177 | .TP | |
178 | .BI group " GROUP " | |
179 | .I GROUP | |
180 | has a dual role: If both group and dev are present, then move the device to the | |
181 | specified group. If only a group is specified, then the command operates on | |
182 | all devices in that group. | |
183 | ||
184 | .TP | |
185 | .BR up " and " down | |
186 | change the state of the device to | |
187 | .B UP | |
188 | or | |
189 | .BR "DOWN" . | |
190 | ||
191 | .TP | |
192 | .BR "arp on " or " arp off" | |
193 | change the | |
194 | .B NOARP | |
195 | flag on the device. | |
196 | ||
197 | .TP | |
198 | .BR "multicast on " or " multicast off" | |
199 | change the | |
200 | .B MULTICAST | |
201 | flag on the device. | |
202 | ||
203 | .TP | |
204 | .BR "dynamic on " or " dynamic off" | |
205 | change the | |
206 | .B DYNAMIC | |
207 | flag on the device. | |
208 | ||
209 | .TP | |
210 | .BI name " NAME" | |
211 | change the name of the device. This operation is not | |
212 | recommended if the device is running or has some addresses | |
213 | already configured. | |
214 | ||
215 | .TP | |
216 | .BI txqueuelen " NUMBER" | |
217 | .TP | |
218 | .BI txqlen " NUMBER" | |
219 | change the transmit queue length of the device. | |
220 | ||
221 | .TP | |
222 | .BI mtu " NUMBER" | |
223 | change the | |
224 | .I MTU | |
225 | of the device. | |
226 | ||
227 | .TP | |
228 | .BI address " LLADDRESS" | |
229 | change the station address of the interface. | |
230 | ||
231 | .TP | |
232 | .BI broadcast " LLADDRESS" | |
233 | .TP | |
234 | .BI brd " LLADDRESS" | |
235 | .TP | |
236 | .BI peer " LLADDRESS" | |
237 | change the link layer broadcast address or the peer address when | |
238 | the interface is | |
239 | .IR "POINTOPOINT" . | |
240 | ||
241 | .TP | |
242 | .BI netns " PID" | |
243 | move the device to the network namespace associated with the process | |
244 | .IR "PID". | |
245 | ||
246 | .TP | |
247 | .BI netns " NETNSNAME" | |
248 | move the device to the network namespace associated with name | |
249 | .IR "NETNSNAME". | |
250 | ||
251 | .TP | |
252 | .BI alias " NAME" | |
253 | give the device a symbolic name for easy reference. | |
254 | ||
255 | .TP | |
256 | .BI group " GROUP" | |
257 | specify the group the device belongs to. | |
258 | The available groups are listed in file | |
259 | .BR "/etc/iproute2/group" . | |
260 | ||
261 | .TP | |
262 | .BI vf " NUM" | |
263 | specify a Virtual Function device to be configured. The associated PF device | |
264 | must be specified using the | |
265 | .B dev | |
266 | parameter. | |
267 | ||
268 | .in +8 | |
269 | .BI mac " LLADDRESS" | |
270 | - change the station address for the specified VF. The | |
271 | .B vf | |
272 | parameter must be specified. | |
273 | ||
274 | .sp | |
275 | .BI vlan " VLANID" | |
276 | - change the assigned VLAN for the specified VF. When specified, all traffic | |
277 | sent from the VF will be tagged with the specified VLAN ID. Incoming traffic | |
278 | will be filtered for the specified VLAN ID, and will have all VLAN tags | |
279 | stripped before being passed to the VF. Setting this parameter to 0 disables | |
280 | VLAN tagging and filtering. The | |
281 | .B vf | |
282 | parameter must be specified. | |
283 | ||
284 | .sp | |
285 | .BI qos " VLAN-QOS" | |
286 | - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN | |
287 | tags transmitted by the VF will include the specified priority bits in the | |
288 | VLAN tag. If not specified, the value is assumed to be 0. Both the | |
289 | .B vf | |
290 | and | |
291 | .B vlan | |
292 | parameters must be specified. Setting both | |
293 | .B vlan | |
294 | and | |
295 | .B qos | |
296 | as 0 disables VLAN tagging and filtering for the VF. | |
297 | ||
298 | .sp | |
299 | .BI rate " TXRATE" | |
300 | - change the allowed transmit bandwidth, in Mbps, for the specified VF. | |
301 | Setting this parameter to 0 disables rate limiting. The | |
302 | .B vf | |
303 | parameter must be specified. | |
0e56c6b6 GR |
304 | |
305 | .sp | |
306 | .BI spoofchk " on|off" | |
307 | - turn packet spoof checking on or off for the specified VF. | |
2a9721f1 SH |
308 | .in -8 |
309 | ||
310 | .TP | |
311 | .BI master " DEVICE" | |
312 | set master device of the device (enslave device). | |
313 | ||
314 | .TP | |
315 | .BI nomaster | |
316 | unset master device of the device (release device). | |
317 | ||
318 | .PP | |
319 | .B Warning: | |
320 | If multiple parameter changes are requested, | |
321 | .B ip | |
322 | aborts immediately after any of the changes have failed. | |
323 | This is the only case when | |
324 | .B ip | |
325 | can move the system to an unpredictable state. The solution | |
326 | is to avoid changing several parameters with one | |
327 | .B ip link set | |
328 | call. | |
329 | ||
330 | .SS ip link show - display device attributes | |
331 | ||
332 | .TP | |
333 | .BI dev " NAME " (default) | |
334 | .I NAME | |
335 | specifies the network device to show. | |
336 | If this argument is omitted all devices in the default group are listed. | |
337 | ||
338 | .TP | |
339 | .BI group " GROUP " | |
340 | .I GROUP | |
341 | specifies what group of devices to show. | |
342 | ||
343 | .TP | |
344 | .B up | |
345 | only display running interfaces. | |
346 | ||
347 | .SH "EXAMPLES" | |
348 | .PP | |
349 | ip link show | |
350 | .RS 4 | |
351 | Shows the state of all network interfaces on the system. | |
352 | .RE | |
353 | .PP | |
354 | ip link set dev ppp0 mtu 1400 | |
355 | .RS 4 | |
356 | Change the MTU the ppp0 device. | |
357 | .RE | |
358 | .PP | |
359 | ip link add link eth0 name eth0.10 type vlan id 10 | |
360 | .RS 4 | |
361 | Creates a new vlan device eth0.10 on device eth0. | |
362 | .RE | |
363 | .PP | |
364 | ip link delete dev eth0.10 | |
365 | .RS 4 | |
366 | Removes vlan device. | |
367 | .RE | |
368 | ||
369 | .SH SEE ALSO | |
370 | .br | |
371 | .BR ip (8) | |
372 | ||
373 | .SH AUTHOR | |
374 | Original Manpage by Michail Litvak <mci@owl.openwall.com> |