]> git.proxmox.com Git - mirror_iproute2.git/blame - man/man8/ip-link.8.in
ip: allow ip address show to list addresses with certain flags not being set
[mirror_iproute2.git] / man / man8 / ip-link.8.in
CommitLineData
77987911 1.TH IP\-LINK 8 "13 Dec 2012" "iproute2" "Linux"
761a1e60
CT
2.SH "NAME"
3ip-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] |
b68d9837 19\fB\-h\fR[\fIuman-readable\fR] |
761a1e60
CT
20\fB\-s\fR[\fItatistics\fR] |
21\fB\-r\fR[\fIesolve\fR] |
22\fB\-f\fR[\fIamily\fR] {
23.BR inet " | " inet6 " | " ipx " | " dnet " | " link " } | "
24\fB\-o\fR[\fIneline\fR] }
25
26.ti -8
9fc56974
AH
27.BI "ip link add"
28.RB "[ " link
29.IR DEVICE " ]"
761a1e60
CT
30.RB "[ " name " ]"
31.I NAME
32.br
33.RB "[ " txqueuelen
34.IR PACKETS " ]"
35.br
36.RB "[ " address
37.IR LLADDR " ]"
38.RB "[ " broadcast
39.IR LLADDR " ]"
40.br
41.RB "[ " mtu
42.IR MTU " ]"
4de8d885
PE
43.RB "[ " index
44.IR IDX " ]"
761a1e60 45.br
d992f3e6
JP
46.RB "[ " numtxqueues
47.IR QUEUE_COUNT " ]"
48.RB "[ " numrxqueues
49.IR QUEUE_COUNT " ]"
50.br
761a1e60
CT
51.BR type " TYPE"
52.RI "[ " ARGS " ]"
53
54.ti -8
55.IR TYPE " := [ "
f1a6f4e9 56.BR bridge " | "
e37a9c73 57.BR bond " | "
f1a6f4e9
SH
58.BR can " | "
59.BR dummy " | "
5c0aec93 60.BR hsr " | "
f1a6f4e9
SH
61.BR ifb " | "
62.BR ipoib " |"
63.BR macvlan " | "
e4c35682 64.BR macvtap " | "
f1a6f4e9
SH
65.BR vcan " | "
66.BR veth " | "
67.BR vlan " | "
77987911
ND
68.BR vxlan " |"
69.BR ip6tnl " |"
70.BR ipip " |"
9abde37c 71.BR sit " |"
72.BR gre " |"
73.BR gretap " |"
74.BR ip6gre " |"
75.BR ip6gretap " ]"
761a1e60
CT
76
77.ti -8
78.BI "ip link delete " DEVICE
79.BI type " TYPE"
80.RI "[ " ARGS " ]"
81
82.ti -8
83.BR "ip link set " {
84.IR DEVICE " | "
85.BI "group " GROUP
86.RB "} { " up " | " down " | " arp " { " on " | " off " } |"
87.br
88.BR promisc " { " on " | " off " } |"
89.br
90.BR allmulticast " { " on " | " off " } |"
91.br
92.BR dynamic " { " on " | " off " } |"
93.br
94.BR multicast " { " on " | " off " } |"
95.br
96.B txqueuelen
97.IR PACKETS " |"
98.br
99.B name
100.IR NEWNAME " |"
101.br
102.B address
103.IR LLADDR " |"
104.B broadcast
105.IR LLADDR " |"
106.br
107.B mtu
108.IR MTU " |"
109.br
110.B netns
111.IR PID " |"
112.br
113.B netns
114.IR NETNSNAME " |"
115.br
116.B alias
117.IR NAME " |"
118.br
119.B vf
120.IR NUM " ["
121.B mac
122.IR LLADDR " ] ["
123.B vlan
124.IR VLANID " [ "
125.B qos
126.IR VLAN-QOS " ] ] ["
127.B rate
128.IR TXRATE " ] ["
f89a2a05
SC
129.B max_tx_rate
130.IR TXRATE " ] ["
131.B min_tx_rate
132.IR TXRATE " ] ["
63f60e3a
OG
133.B spoofchk { on | off } ] [
134.B state { auto | enable | disable}
761a1e60
CT
135] |
136.br
137.B master
138.IR DEVICE
139.br
140.B nomaster
141.BR " }"
142
143
144.ti -8
145.B ip link show
146.RI "[ " DEVICE " | "
147.B group
1b944148
VK
148.IR GROUP " | "
149.BR up " | "
150.B master
151.IR DEVICE " ]"
761a1e60 152
1f299e92 153.ti -8
154.B ip link help
155.RI "[ " TYPE " ]"
156
761a1e60
CT
157.SH "DESCRIPTION"
158.SS ip link add - add virtual link
159
160.TP
161.BI link " DEVICE "
162specifies the physical device to act operate on.
163
164.I NAME
165specifies the name of the new virtual device.
166
167.I TYPE
168specifies the type of the new device.
169.sp
170Link types:
171
172.in +8
f1a6f4e9
SH
173.B bridge
174- Ethernet Bridge device
761a1e60 175.sp
cc26a890
JP
176.B bond
177- Bonding device
178.sp
761a1e60
CT
179.B dummy
180- Dummy network interface
181.sp
2f937359 182.B hsr
183- High-availability Seamless Redundancy device
184.sp
761a1e60
CT
185.B ifb
186- Intermediate Functional Block device
187.sp
f1a6f4e9
SH
188.B ipoib
189- IP over Infiniband device
190.sp
761a1e60 191.B macvlan
f1a6f4e9 192- Virtual interface base on link layer address (MAC)
761a1e60 193.sp
e4c35682
RR
194.B macvtap
195- Virtual interface based on link layer address (MAC) and TAP.
196.sp
f1a6f4e9 197.B vcan
2b70fe15 198- Virtual Controller Area Network interface
761a1e60 199.sp
f1a6f4e9
SH
200.B veth
201- Virtual ethernet interface
de038993 202.sp
f1a6f4e9
SH
203.BR vlan
204- 802.1q tagged virtual LAN interface
205.sp
206.BR vxlan
207- Virtual eXtended LAN
77987911
ND
208.sp
209.BR ip6tnl
210- Virtual tunnel interface IPv4|IPv6 over IPv6
211.sp
212.BR ipip
213- Virtual tunnel interface IPv4 over IPv4
214.sp
215.BR sit
216- Virtual tunnel interface IPv6 over IPv4
9abde37c 217.sp
218.BR gre
219- Virtual tunnel interface GRE over IPv4
220.sp
221.BR gretap
222- Virtual L2 tuunel interface GRE over IPv4
223.sp
224.BR ip6gre
225- Virtual tuunel interface GRE over IPv6
226.sp
227.BR ip6gretap
228- Virtual L2 tuunel interface GRE over IPv6
761a1e60
CT
229.in -8
230
d992f3e6
JP
231.TP
232.BI numtxqueues " QUEUE_COUNT "
233specifies the number of transmit queues for new device.
234
235.TP
236.BI numrxqueues " QUEUE_COUNT "
237specifies the number of receive queues for new device.
238
4de8d885
PE
239.TP
240.BI index " IDX "
241specifies the desired index of the new virtual device. The link creation fails, if the index is busy.
242
2816a568
TR
243.TP
244VXLAN Type Support
63f60e3a 245For a link of type
2816a568
TR
246.I VXLAN
247the following additional arguments are supported:
248
249.BI "ip link add " DEVICE
f66611d8 250.BI type " vxlan " id " ID"
2816a568
TR
251.R " [ "
252.BI dev " PHYS_DEV "
7cfa3802
AW
253.RB " ] [ { " group " | " remote " } "
254.I IPADDR
2816a568
TR
255.R " ] [ "
256.BI local " IPADDR "
257.R " ] [ "
258.BI ttl " TTL "
259.R " ] [ "
260.BI tos " TOS "
261.R " ] [ "
262.BI port " MIN MAX "
263.R " ] [ "
264.I "[no]learning "
265.R " ] [ "
266.I "[no]proxy "
267.R " ] [ "
268.I "[no]rsc "
269.R " ] [ "
270.I "[no]l2miss "
271.R " ] [ "
272.I "[no]l3miss "
c2fbc57e
ND
273.R " ] [ "
274.BI ageing " SECONDS "
275.R " ] [ "
276.BI maxaddress " NUMBER "
2816a568
TR
277.R " ]"
278
279.in +8
280.sp
281.BI id " VNI "
282- specifies the VXLAN Network Identifer (or VXLAN Segment
283Identifier) to use.
284
285.BI dev " PHYS_DEV"
286- specifies the physical device to use for tunnel endpoint communication.
287
288.sp
289.BI group " IPADDR"
290- specifies the multicast IP address to join.
7cfa3802
AW
291This parameter cannot be specified with the
292.B remote
293parameter.
294
295.sp
296.BI remote " IPADDR"
297- specifies the unicast destination IP address to use in outgoing packets
298when the destination link layer address is not known in the VXLAN device
299forwarding database. This parameter cannot be specified with the
300.B group
301parameter.
2816a568
TR
302
303.sp
304.BI local " IPADDR"
305- specifies the source IP address to use in outgoing packets.
306
307.sp
308.BI ttl " TTL"
309- specifies the TTL value to use in outgoing packets.
310
311.sp
312.BI tos " TOS"
313- specifies the TOS value to use in outgoing packets.
314
315.sp
316.BI port " MIN MAX"
317- specifies the range of port numbers to use as UDP
318source ports to communicate to the remote VXLAN tunnel endpoint.
319
320.sp
321.I [no]learning
322- specifies if unknown source link layer addresses and IP addresses
323are entered into the VXLAN device forwarding database.
324
325.sp
326.I [no]rsc
327- specifies if route short circuit is turned on.
328
329.sp
330.I [no]proxy
331- specifies ARP proxy is turned on.
332
333.sp
334.I [no]l2miss
335- specifies if netlink LLADDR miss notifications are generated.
336
337.sp
338.I [no]l3miss
339- specifies if netlink IP ADDR miss notifications are generated.
340
c2fbc57e
ND
341.sp
342.BI ageing " SECONDS"
343- specifies the lifetime in seconds of FDB entries learnt by the kernel.
344
345.sp
346.BI maxaddress " NUMBER"
347- specifies the maximum number of FDB entries.
348
2816a568
TR
349.in -8
350
9abde37c 351.TP
352IP6GRE/IP6GRETAP Type Support
63f60e3a 353For a link of type
9abde37c 354.I IP6GRE/IP6GRETAP
355the following additional arguments are supported:
356
357.BI "ip link add " DEVICE
358.BI type " { ip6gre | ip6gretap } " remote " ADDR " local " ADDR
359.R " [ "
360.I "[i|o]seq]"
361.R " ] [ "
362.I "[i|o]key" KEY
363.R " ] [ "
364.I " [i|o]csum "
365.R " ] [ "
366.BI hoplimit " TTL "
367.R " ] [ "
368.BI encaplimit " ELIM "
369.R " ] [ "
370.BI tclass " TCLASS "
371.R " ] [ "
372.BI flowlabel " FLOWLABEL "
373.R " ] [ "
374.BI "dscp inherit"
375.R " ] [ "
376.BI dev " PHYS_DEV "
377.R " ]"
378
379.in +8
380.sp
381.BI remote " ADDR "
382- specifies the remote IPv6 address of the tunnel.
383
384.sp
385.BI local " ADDR "
386- specifies the fixed local IPv6 address for tunneled packets.
387It must be and address on another interface on this host.
388
389.sp
390.BI [i|o]seq
391- serialize packets.
392The
393.B oseq
394flag enables sequencing of outgoing packets.
395The
396.B iseq
397flag requires that all input packets are serialized.
398
399.sp
400.BI [i|o]key " KEY"
401- use keyed GRE with key
402.IR KEY ". "KEY
403is either a number or an IPv4 address-like dotted quad.
404The
405.B key
406parameter specifies the same key to use in both directions.
407The
408.BR ikey " and " okey
409parameters specify different keys for input and output.
410
411.sp
412.BI [i|o]csum
413- generate/require checksums for tunneled packets.
414The
415.B ocsum
416flag calculates checksums for outgoing packets.
417The
418.B icsum
419flag requires that all input packets have the correct
420checksum. The
421.B csum
422flag is equivalent to the combination
423.BR "icsum ocsum" .
424
425.sp
426.BI hoplimit " TTL"
427- specifies Hop Limit value to use in outgoing packets.
428
429.sp
430.BI encaplimit " ELIM"
431- specifies a fixed encapsulation limit. Default is 4.
432
433.sp
434.BI flowlabel " FLOWLABEL"
63f60e3a 435- specifies a fixed flowlabel.
9abde37c 436
437.sp
438.BI tclass " TCLASS"
439- specifies the traffic class field on
440tunneled packets, which can be specified as either a two-digit
441hex value (e.g. c0) or a predefined string (e.g. internet).
442The value
443.B inherit
444causes the field to be copied from the original IP header. The
445values
446.BI "inherit/" STRING
447or
448.BI "inherit/" 00 ".." ff
449will set the field to
450.I STRING
451or
452.IR 00 ".." ff
453when tunneling non-IP packets. The default value is 00.
454
455.in -8
456
8ca8fac7
OG
457.TP
458IPoIB Type Support
459For a link of type
460.I IPoIB
461the following additional arguments are supported:
462
463.BI "ip link add " DEVICE " name " NAME
464.BI type " ipoib [ " pkey " PKEY ] [" mode " MODE " ]
465
466.in +8
467.sp
468.BI pkey " PKEY "
469- specifies the IB P-Key to use.
470
471.BI mode " MODE "
472- specifies the mode (datagram or connected) to use.
473
761a1e60
CT
474.SS ip link delete - delete virtual link
475.I DEVICE
476specifies the virtual device to act operate on.
477.I TYPE
478specifies the type of the device.
479
480
481.TP
482.BI dev " DEVICE "
483specifies the physical device to act operate on.
484
485.SS ip link set - change device attributes
486
487.TP
488.BI dev " DEVICE "
489.I DEVICE
6274b0b7 490specifies network device to operate on. When configuring SR-IOV Virtual Function
761a1e60
CT
491(VF) devices, this keyword should specify the associated Physical Function (PF)
492device.
493
494.TP
495.BI group " GROUP "
496.I GROUP
497has a dual role: If both group and dev are present, then move the device to the
498specified group. If only a group is specified, then the command operates on
499all devices in that group.
500
501.TP
502.BR up " and " down
503change the state of the device to
504.B UP
505or
506.BR "DOWN" .
507
508.TP
509.BR "arp on " or " arp off"
510change the
511.B NOARP
512flag on the device.
513
514.TP
515.BR "multicast on " or " multicast off"
516change the
517.B MULTICAST
518flag on the device.
519
520.TP
521.BR "dynamic on " or " dynamic off"
522change the
523.B DYNAMIC
524flag on the device.
525
526.TP
527.BI name " NAME"
528change the name of the device. This operation is not
529recommended if the device is running or has some addresses
530already configured.
531
532.TP
533.BI txqueuelen " NUMBER"
534.TP
535.BI txqlen " NUMBER"
536change the transmit queue length of the device.
537
538.TP
539.BI mtu " NUMBER"
540change the
541.I MTU
542of the device.
543
544.TP
545.BI address " LLADDRESS"
546change the station address of the interface.
547
548.TP
549.BI broadcast " LLADDRESS"
550.TP
551.BI brd " LLADDRESS"
552.TP
553.BI peer " LLADDRESS"
554change the link layer broadcast address or the peer address when
555the interface is
556.IR "POINTOPOINT" .
557
558.TP
559.BI netns " PID"
560move the device to the network namespace associated with the process
561.IR "PID".
562
563.TP
564.BI netns " NETNSNAME"
565move the device to the network namespace associated with name
566.IR "NETNSNAME".
567
568.TP
569.BI alias " NAME"
570give the device a symbolic name for easy reference.
571
572.TP
573.BI group " GROUP"
574specify the group the device belongs to.
575The available groups are listed in file
576.BR "@SYSCONFDIR@/group" .
577
578.TP
579.BI vf " NUM"
580specify a Virtual Function device to be configured. The associated PF device
581must be specified using the
582.B dev
583parameter.
584
585.in +8
586.BI mac " LLADDRESS"
587- change the station address for the specified VF. The
588.B vf
589parameter must be specified.
590
591.sp
592.BI vlan " VLANID"
593- change the assigned VLAN for the specified VF. When specified, all traffic
594sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
595will be filtered for the specified VLAN ID, and will have all VLAN tags
596stripped before being passed to the VF. Setting this parameter to 0 disables
597VLAN tagging and filtering. The
598.B vf
599parameter must be specified.
600
601.sp
602.BI qos " VLAN-QOS"
603- assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
604tags transmitted by the VF will include the specified priority bits in the
605VLAN tag. If not specified, the value is assumed to be 0. Both the
606.B vf
607and
608.B vlan
609parameters must be specified. Setting both
610.B vlan
611and
612.B qos
613as 0 disables VLAN tagging and filtering for the VF.
614
615.sp
616.BI rate " TXRATE"
f89a2a05
SC
617-- change the allowed transmit bandwidth, in Mbps, for the specified VF.
618Setting this parameter to 0 disables rate limiting.
619.B vf
620parameter must be specified.
621Please use new API
622.B "max_tx_rate"
623option instead.
624
625.sp
626.BI max_tx_rate " TXRATE"
627- change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
628.B vf
629parameter must be specified.
630
631.sp
632.BI min_tx_rate " TXRATE"
633- change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
634Minimum TXRATE should be always <= Maximum TXRATE.
761a1e60
CT
635.B vf
636parameter must be specified.
637
638.sp
639.BI spoofchk " on|off"
640- turn packet spoof checking on or off for the specified VF.
63f60e3a
OG
641.sp
642.BI state " auto|enable|disable"
643- set the virtual link state as seen by the specified VF. Setting to auto means a
644reflection of the PF link state, enable lets the VF to communicate with other VFs on
645this host even if the PF link state is down, disable causes the HW to drop any packets
646sent by the VF.
761a1e60
CT
647.in -8
648
649.TP
650.BI master " DEVICE"
651set master device of the device (enslave device).
652
653.TP
654.BI nomaster
655unset master device of the device (release device).
656
657.PP
658.B Warning:
659If multiple parameter changes are requested,
660.B ip
661aborts immediately after any of the changes have failed.
662This is the only case when
663.B ip
664can move the system to an unpredictable state. The solution
665is to avoid changing several parameters with one
666.B ip link set
667call.
668
669.SS ip link show - display device attributes
670
671.TP
672.BI dev " NAME " (default)
673.I NAME
674specifies the network device to show.
675If this argument is omitted all devices in the default group are listed.
676
677.TP
678.BI group " GROUP "
679.I GROUP
680specifies what group of devices to show.
681
682.TP
683.B up
684only display running interfaces.
685
1b944148
VK
686.TP
687.BI master " DEVICE "
688.I DEVICE
689specifies the master device which enslaves devices to show.
690
8322d28d 691.TP
1e264abc
SH
692The show command has additional formatting options:
693
8322d28d 694.RS
1e264abc
SH
695.TP
696.BR "\-s" , " \-stats", " \-statistics"
697output more statistics about packet usage.
698
699.TP
700.BR "\-d", " \-details"
701output more detailed information.
702
703.TP
704.BR "\-h", " \-human", " \-human-readble"
705output statistics with human readable values number followed by suffix
706
707.TP
708.BR "\-iec"
709print human readable rates in IEC units (ie. 1K = 1024).
8322d28d 710.RE
b68d9837 711
1f299e92 712.SS ip link help - display help
713
714.PP
715.I "TYPE"
716specifies which help of link type to dislpay.
717
761a1e60
CT
718.SH "EXAMPLES"
719.PP
720ip link show
721.RS 4
722Shows the state of all network interfaces on the system.
723.RE
724.PP
725ip link set dev ppp0 mtu 1400
726.RS 4
727Change the MTU the ppp0 device.
728.RE
729.PP
730ip link add link eth0 name eth0.10 type vlan id 10
731.RS 4
732Creates a new vlan device eth0.10 on device eth0.
733.RE
734.PP
735ip link delete dev eth0.10
736.RS 4
737Removes vlan device.
738.RE
739
1f299e92 740ip link help gre
741.RS 4
742Display help for the gre link type.
743.RE
744
761a1e60
CT
745.SH SEE ALSO
746.br
747.BR ip (8)
748
749.SH AUTHOR
750Original Manpage by Michail Litvak <mci@owl.openwall.com>