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