]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/blob - man/man8/ip-link.8
acc6d2876b24c167c7b3deaf2b8d930c0b4508b8
[lisovros/iproute2_canprio.git] / man / man8 / ip-link.8
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
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 mode
104 .IR LINKMODE " |"
105 .br
106 .B master
107 .IR DEVICE
108 .br
109 .B nomaster
110 .BR " }"
111
112
113 .ti -8
114 .B ip link show
115 .RI "[ " DEVICE " | "
116 .B group
117 .IR GROUP " ]"
118
119 .SH "DESCRIPTION"
120 .SS ip link add - add virtual link
121
122 .TP
123 .BI link " DEVICE "
124 specifies the physical device to act operate on.
125
126 .I NAME
127 specifies the name of the new virtual device.
128
129 .I TYPE
130 specifies the type of the new device.
131 .sp
132 Link types:
133
134 .in +8
135 .B vlan
136 - 802.1q tagged virtual LAN interface
137 .sp
138 .B veth
139 - Virtual ethernet interface
140 .sp
141 .B vcan
142 - Virtual Local CAN interface
143 .sp
144 .B dummy
145 - Dummy network interface
146 .sp
147 .B ifb
148 - Intermediate Functional Block device
149 .sp
150 .B macvlan
151 - virtual interface base on link layer address (MAC)
152 .sp
153 .B can
154 - Controller Area Network interface
155 .sp
156 .B bridge
157 - Ethernet Bridge device
158 .in -8
159
160 .SS ip link delete - delete virtual link
161 .I DEVICE
162 specifies the virtual  device to act operate on.
163 .I TYPE
164 specifies the type of the device.
165
166
167 .TP
168 .BI dev " DEVICE "
169 specifies the physical device to act operate on.
170
171 .SS ip link set - change device attributes
172
173 .TP
174 .BI dev " DEVICE "
175 .I DEVICE
176 specifies network device to operate on. When configuring SR-IOV Virtual Fuction
177 (VF) devices, this keyword should specify the associated Physical Function (PF)
178 device.
179
180 .TP
181 .BI group " GROUP "
182 .I GROUP
183 has a dual role: If both group and dev are present, then move the device to the
184 specified group.  If only a group is specified, then the command operates on
185 all devices in that group.
186
187 .TP
188 .BR up " and " down
189 change the state of the device to
190 .B UP
191 or
192 .BR "DOWN" .
193
194 .TP
195 .BR "arp on " or " arp off"
196 change the
197 .B NOARP
198 flag on the device.
199
200 .TP
201 .BR "multicast on " or " multicast off"
202 change the
203 .B MULTICAST
204 flag on the device.
205
206 .TP
207 .BR "dynamic on " or " dynamic off"
208 change the
209 .B DYNAMIC
210 flag on the device.
211
212 .TP
213 .BI name " NAME"
214 change the name of the device.  This operation is not
215 recommended if the device is running or has some addresses
216 already configured.
217
218 .TP
219 .BI txqueuelen " NUMBER"
220 .TP
221 .BI txqlen " NUMBER"
222 change the transmit queue length of the device.
223
224 .TP
225 .BI mtu " NUMBER"
226 change the
227 .I MTU
228 of the device.
229
230 .TP
231 .BI address " LLADDRESS"
232 change the station address of the interface.
233
234 .TP
235 .BI broadcast " LLADDRESS"
236 .TP
237 .BI brd " LLADDRESS"
238 .TP
239 .BI peer " LLADDRESS"
240 change the link layer broadcast address or the peer address when
241 the interface is
242 .IR "POINTOPOINT" .
243
244 .TP
245 .BI netns " PID"
246 move the device to the network namespace associated with the process
247 .IR "PID".
248
249 .TP
250 .BI netns " NETNSNAME"
251 move the device to the network namespace associated with name
252 .IR "NETNSNAME".
253
254 .TP
255 .BI mode " LINKMODE"
256 allows setting link mode which determines which RFC2863 operational state
257 the device will transistion to when it is brought up. Setting
258 .I dormant
259 mode changes the behaviour so that device goes into DORMANT state instead
260 of UP when driver is ready.
261
262 .TP
263 .BI alias " NAME"
264 give the device a symbolic name for easy reference.
265
266 .TP
267 .BI group " GROUP"
268 specify the group the device belongs to.
269 The available groups are listed in file
270 .BR "/etc/iproute2/group" .
271
272 .TP
273 .BI vf " NUM"
274 specify a Virtual Function device to be configured. The associated PF device
275 must be specified using the
276 .B dev
277 parameter.
278
279 .in +8
280 .BI mac " LLADDRESS"
281 - change the station address for the specified VF. The
282 .B vf
283 parameter must be specified.
284
285 .sp
286 .BI vlan " VLANID"
287 - change the assigned VLAN for the specified VF. When specified, all traffic
288 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
289 will be filtered for the specified VLAN ID, and will have all VLAN tags
290 stripped before being passed to the VF. Setting this parameter to 0 disables
291 VLAN tagging and filtering. The
292 .B vf
293 parameter must be specified.
294
295 .sp
296 .BI qos " VLAN-QOS"
297 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
298 tags transmitted by the VF will include the specified priority bits in the
299 VLAN tag. If not specified, the value is assumed to be 0. Both the
300 .B vf
301 and
302 .B vlan
303 parameters must be specified. Setting both
304 .B vlan
305 and
306 .B qos
307 as 0 disables VLAN tagging and filtering for the VF.
308
309 .sp
310 .BI rate " TXRATE"
311 - change the allowed transmit bandwidth, in Mbps, for the specified VF.
312 Setting this parameter to 0 disables rate limiting. The
313 .B vf
314 parameter must be specified.
315
316 .sp
317 .BI spoofchk " on|off"
318 - turn packet spoof checking on or off for the specified VF.
319 .in -8
320
321 .TP
322 .BI master " DEVICE"
323 set master device of the device (enslave device).
324
325 .TP
326 .BI nomaster
327 unset master device of the device (release device).
328
329 .PP
330 .B Warning:
331 If multiple parameter changes are requested,
332 .B ip
333 aborts immediately after any of the changes have failed.
334 This is the only case when
335 .B ip
336 can move the system to an unpredictable state.  The solution
337 is to avoid changing several parameters with one
338 .B ip link set
339 call.
340
341 .SS  ip link show - display device attributes
342
343 .TP
344 .BI dev " NAME " (default)
345 .I NAME
346 specifies the network device to show.
347 If this argument is omitted all devices in the default group are listed.
348
349 .TP
350 .BI group " GROUP "
351 .I GROUP
352 specifies what group of devices to show.
353
354 .TP
355 .B up
356 only display running interfaces.
357
358 .SH "EXAMPLES"
359 .PP
360 ip link show
361 .RS 4
362 Shows the state of all network interfaces on the system.
363 .RE
364 .PP
365 ip link set dev ppp0 mtu 1400
366 .RS 4
367 Change the MTU the ppp0 device.
368 .RE
369 .PP
370 ip link add link eth0 name eth0.10 type vlan id 10
371 .RS 4
372 Creates a new vlan device eth0.10 on device eth0.
373 .RE
374 .PP
375 ip link delete dev eth0.10
376 .RS 4
377 Removes vlan device.
378 .RE
379
380 .SH SEE ALSO
381 .br
382 .BR ip (8)
383
384 .SH AUTHOR
385 Original Manpage by Michail Litvak <mci@owl.openwall.com>