1 .TH IP\-LINK 8 "13 Dec 2012" "iproute2" "Linux"
3 ip-link \- network device configuration
12 .RI " { " COMMAND " | "
18 \fB\-V\fR[\fIersion\fR] |
19 \fB\-h\fR[\fIuman-readable\fR] |
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] }
83 .BR "ip link delete " {
94 .RB "} { " up " | " down " | " arp " { " on " | " off " } |"
96 .BR promisc " { " on " | " off " } |"
98 .BR allmulticast " { " on " | " off " } |"
100 .BR dynamic " { " on " | " off " } |"
102 .BR multicast " { " on " | " off " } |"
134 .IR VLAN-QOS " ] ] ["
141 .B spoofchk { on | off } ] [
142 .B state { auto | enable | disable}
154 .RI "[ " DEVICE " | "
168 .SS ip link add - add virtual link
172 specifies the physical device to act operate on.
175 specifies the name of the new virtual device.
178 specifies the type of the new device.
184 - Ethernet Bridge device
190 - Dummy network interface
193 - High-availability Seamless Redundancy device
196 - Intermediate Functional Block device
199 - IP over Infiniband device
202 - Virtual interface base on link layer address (MAC)
205 - Virtual interface based on link layer address (MAC) and TAP.
208 - Virtual Controller Area Network interface
211 - Virtual ethernet interface
214 - 802.1q tagged virtual LAN interface
217 - Virtual eXtended LAN
220 - Virtual tunnel interface IPv4|IPv6 over IPv6
223 - Virtual tunnel interface IPv4 over IPv4
226 - Virtual tunnel interface IPv6 over IPv4
229 - Virtual tunnel interface GRE over IPv4
232 - Virtual L2 tunnel interface GRE over IPv4
235 - Virtual tunnel interface GRE over IPv6
238 - Virtual L2 tunnel interface GRE over IPv6
241 - Virtual tunnel interface
244 - Netlink monitoring device
247 - Interface for L3 (IPv6/IPv4) based VLANs
250 - Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 / Bluetooth
253 - GEneric NEtwork Virtualization Encapsulation
257 .BI numtxqueues " QUEUE_COUNT "
258 specifies the number of transmit queues for new device.
261 .BI numrxqueues " QUEUE_COUNT "
262 specifies the number of receive queues for new device.
266 specifies the desired index of the new virtual device. The link creation fails, if the index is busy.
272 the following additional arguments are supported:
274 .BI "ip link add " DEVICE
275 .BI type " vxlan " id " ID"
278 .RB " ] [ { " group " | " remote " } "
299 .BI ageing " SECONDS "
301 .BI maxaddress " NUMBER "
309 - specifies the VXLAN Network Identifer (or VXLAN Segment
313 - specifies the physical device to use for tunnel endpoint communication.
317 - specifies the multicast IP address to join.
318 This parameter cannot be specified with the
324 - specifies the unicast destination IP address to use in outgoing packets
325 when the destination link layer address is not known in the VXLAN device
326 forwarding database. This parameter cannot be specified with the
332 - specifies the source IP address to use in outgoing packets.
336 - specifies the TTL value to use in outgoing packets.
340 - specifies the TOS value to use in outgoing packets.
344 - specifies the range of port numbers to use as UDP
345 source ports to communicate to the remote VXLAN tunnel endpoint.
349 - specifies if unknown source link layer addresses and IP addresses
350 are entered into the VXLAN device forwarding database.
354 - specifies if route short circuit is turned on.
358 - specifies ARP proxy is turned on.
362 - specifies if netlink LLADDR miss notifications are generated.
366 - specifies if netlink IP ADDR miss notifications are generated.
369 .BI ageing " SECONDS"
370 - specifies the lifetime in seconds of FDB entries learnt by the kernel.
373 .BI maxaddress " NUMBER"
374 - specifies the maximum number of FDB entries.
378 - enables the Group Policy extension (VXLAN-GBP).
381 Allows to transport group policy context across VXLAN network peers.
382 If enabled, includes the mark of a packet in the VXLAN header for outgoing
383 packets and fills the packet mark based on the information found in the
384 VXLAN header for incomming packets.
386 Format of upper 16 bits of packet mark (flags);
389 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
391 |-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|
393 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
396 Don't Learn bit. When set, this bit indicates that the egress
397 VTEP MUST NOT learn the source address of the encapsulated frame.
400 Indicates that the group policy has already been applied to
401 this packet. Policies MUST NOT be applied by devices when the A bit is set.
404 Format of lower 16 bits of packet mark (policy ID):
407 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
411 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
415 iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF
422 GRE, IPIP, SIT Type Support
425 the following additional arguments are supported:
427 .BI "ip link add " DEVICE
428 .BR type " { gre | ipip | sit } "
429 .BI " remote " ADDR " local " ADDR
431 .BR encap " { fou | gue | none } "
433 .BI "encap-sport { " PORT " | auto } "
435 .BI "encap-dport " PORT
437 .I " [no]encap-csum "
439 .I " [no]encap-remcsum "
445 - specifies the remote address of the tunnel.
449 - specifies the fixed local address for tunneled packets.
450 It must be an address on another interface on this host.
453 .BR encap " { fou | gue | none } "
454 - specifies type of secondary UDP encapsulation. "fou" indicates
455 Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
458 .BI "encap-sport { " PORT " | auto } "
459 - specifies the source port in UDP encapsulation.
461 indicates the port by number, "auto"
462 indicates that the port number should be chosen automatically
463 (the kernel picks a flow based on the flow hash of the
464 encapsulated packet).
468 - specifies if UDP checksums are enabled in the secondary
473 - specifies if Remote Checksum Offload is enabled. This is only
474 applicable for Generic UDP Encapsulation.
479 IP6GRE/IP6GRETAP Type Support
482 the following additional arguments are supported:
484 .BI "ip link add " DEVICE
485 .BI type " { ip6gre | ip6gretap } " remote " ADDR " local " ADDR
495 .BI encaplimit " ELIM "
497 .BI tclass " TCLASS "
499 .BI flowlabel " FLOWLABEL "
509 - specifies the remote IPv6 address of the tunnel.
513 - specifies the fixed local IPv6 address for tunneled packets.
514 It must be an address on another interface on this host.
521 flag enables sequencing of outgoing packets.
524 flag requires that all input packets are serialized.
528 - use keyed GRE with key
530 is either a number or an IPv4 address-like dotted quad.
533 parameter specifies the same key to use in both directions.
535 .BR ikey " and " okey
536 parameters specify different keys for input and output.
540 - generate/require checksums for tunneled packets.
543 flag calculates checksums for outgoing packets.
546 flag requires that all input packets have the correct
549 flag is equivalent to the combination
554 - specifies Hop Limit value to use in outgoing packets.
557 .BI encaplimit " ELIM"
558 - specifies a fixed encapsulation limit. Default is 4.
561 .BI flowlabel " FLOWLABEL"
562 - specifies a fixed flowlabel.
566 - specifies the traffic class field on
567 tunneled packets, which can be specified as either a two-digit
568 hex value (e.g. c0) or a predefined string (e.g. internet).
571 causes the field to be copied from the original IP header. The
573 .BI "inherit/" STRING
575 .BI "inherit/" 00 ".." ff
576 will set the field to
580 when tunneling non-IP packets. The default value is 00.
588 the following additional arguments are supported:
590 .BI "ip link add " DEVICE " name " NAME
591 .BI type " ipoib [ " pkey " PKEY ] [" mode " MODE " ]
596 - specifies the IB P-Key to use.
599 - specifies the mode (datagram or connected) to use.
605 the following additional arguments are supported:
607 .BI "ip link add " DEVICE
608 .BI type " geneve " id " ID " remote " IPADDR"
618 - specifies the Virtual Network Identifer to use.
622 - specifies the unicast destination IP address to use in outgoing packets.
626 - specifies the TTL value to use in outgoing packets.
630 - specifies the TOS value to use in outgoing packets.
634 .SS ip link delete - delete virtual link
638 specifies the virtual device to act operate on.
642 specifies the group of virtual links to delete. Group 0 is not allowed to be
643 deleted since it is the default group.
647 specifies the type of the device.
649 .SS ip link set - change device attributes
654 specifies network device to operate on. When configuring SR-IOV Virtual Function
655 (VF) devices, this keyword should specify the associated Physical Function (PF)
661 has a dual role: If both group and dev are present, then move the device to the
662 specified group. If only a group is specified, then the command operates on
663 all devices in that group.
667 change the state of the device to
673 .BR "arp on " or " arp off"
679 .BR "multicast on " or " multicast off"
685 .BR "dynamic on " or " dynamic off"
688 flag on the device. Indicates that address can change when interface goes down (currently
694 change the name of the device. This operation is not
695 recommended if the device is running or has some addresses
699 .BI txqueuelen " NUMBER"
702 change the transmit queue length of the device.
711 .BI address " LLADDRESS"
712 change the station address of the interface.
715 .BI broadcast " LLADDRESS"
719 .BI peer " LLADDRESS"
720 change the link layer broadcast address or the peer address when
725 .BI netns " NETNSNAME " \fR| " PID"
726 move the device to the network namespace associated with name
730 Some devices are not allowed to change network namespace: loopback, bridge,
731 ppp, wireless. These are network namespace local devices. In such case
733 tool will return "Invalid argument" error. It is possible to find out if device is local
734 to a single network namespace by checking
736 flag in the output of the
744 To change network namespace for wireless devices the
746 tool can be used. But it allows to change network namespace only for physical devices and by process
751 give the device a symbolic name for easy reference.
755 specify a Virtual Function device to be configured. The associated PF device
756 must be specified using the
762 - change the station address for the specified VF. The
764 parameter must be specified.
768 - change the assigned VLAN for the specified VF. When specified, all traffic
769 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
770 will be filtered for the specified VLAN ID, and will have all VLAN tags
771 stripped before being passed to the VF. Setting this parameter to 0 disables
772 VLAN tagging and filtering. The
774 parameter must be specified.
778 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
779 tags transmitted by the VF will include the specified priority bits in the
780 VLAN tag. If not specified, the value is assumed to be 0. Both the
784 parameters must be specified. Setting both
788 as 0 disables VLAN tagging and filtering for the VF.
792 -- change the allowed transmit bandwidth, in Mbps, for the specified VF.
793 Setting this parameter to 0 disables rate limiting.
795 parameter must be specified.
801 .BI max_tx_rate " TXRATE"
802 - change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
804 parameter must be specified.
807 .BI min_tx_rate " TXRATE"
808 - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
809 Minimum TXRATE should be always <= Maximum TXRATE.
811 parameter must be specified.
814 .BI spoofchk " on|off"
815 - turn packet spoof checking on or off for the specified VF.
817 .BI state " auto|enable|disable"
818 - set the virtual link state as seen by the specified VF. Setting to auto means a
819 reflection of the PF link state, enable lets the VF to communicate with other VFs on
820 this host even if the PF link state is down, disable causes the HW to drop any packets
826 set master device of the device (enslave device).
830 unset master device of the device (release device).
834 If multiple parameter changes are requested,
836 aborts immediately after any of the changes have failed.
837 This is the only case when
839 can move the system to an unpredictable state. The solution
840 is to avoid changing several parameters with one
844 .SS ip link show - display device attributes
847 .BI dev " NAME " (default)
849 specifies the network device to show.
850 If this argument is omitted all devices in the default group are listed.
855 specifies what group of devices to show.
859 only display running interfaces.
862 .BI master " DEVICE "
864 specifies the master device which enslaves devices to show.
869 specifies the type of devices to show.
872 The show command has additional formatting options:
876 .BR "\-s" , " \-stats", " \-statistics"
877 output more statistics about packet usage.
880 .BR "\-d", " \-details"
881 output more detailed information.
884 .BR "\-h", " \-human", " \-human-readble"
885 output statistics with human readable values number followed by suffix
889 print human readable rates in IEC units (ie. 1K = 1024).
892 .SS ip link help - display help
896 specifies which help of link type to dislpay.
900 may be a number or a string from the file
901 .B @SYSCONFDIR@/group
902 which can be manually filled.
908 Shows the state of all network interfaces on the system.
911 ip link show type bridge
913 Shows the bridge devices.
916 ip link show type vlan
918 Shows the vlan devices.
921 ip link show master br0
923 Shows devices enslaved by br0
926 ip link set dev ppp0 mtu 1400
928 Change the MTU the ppp0 device.
931 ip link add link eth0 name eth0.10 type vlan id 10
933 Creates a new vlan device eth0.10 on device eth0.
936 ip link delete dev eth0.10
943 Display help for the gre link type.
946 ip link add name tun1 type ipip remote 192.168.1.1
947 local 192.168.1.2 ttl 225 encap gue encap-sport auto
948 encap-dport 5555 encap-csum encap-remcsum
950 Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
951 and the outer UDP checksum and remote checksum offload are enabled.
955 ip link add link wpan0 lowpan0 type lowpan
957 Creates a 6LoWPAN interface named lowpan0 on the underlying
958 IEEE 802.15.4 device wpan0.
967 Original Manpage by Michail Litvak <mci@owl.openwall.com>