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