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 " } |"
104 .BR protodown " { " on " | " off " } |"
136 .IR VLAN-QOS " ] ] ["
143 .B spoofchk { on | off } ] [
144 .B state { auto | enable | disable}
156 .RI "[ " DEVICE " | "
170 .SS ip link add - add virtual link
174 specifies the physical device to act operate on.
177 specifies the name of the new virtual device.
180 specifies the type of the new device.
186 - Ethernet Bridge device
192 - Dummy network interface
195 - High-availability Seamless Redundancy device
198 - Intermediate Functional Block device
201 - IP over Infiniband device
204 - Virtual interface base on link layer address (MAC)
207 - Virtual interface based on link layer address (MAC) and TAP.
210 - Virtual Controller Area Network interface
213 - Virtual ethernet interface
216 - 802.1q tagged virtual LAN interface
219 - Virtual eXtended LAN
222 - Virtual tunnel interface IPv4|IPv6 over IPv6
225 - Virtual tunnel interface IPv4 over IPv4
228 - Virtual tunnel interface IPv6 over IPv4
231 - Virtual tunnel interface GRE over IPv4
234 - Virtual L2 tunnel interface GRE over IPv4
237 - Virtual tunnel interface GRE over IPv6
240 - Virtual L2 tunnel interface GRE over IPv6
243 - Virtual tunnel interface
246 - Netlink monitoring device
249 - Interface for L3 (IPv6/IPv4) based VLANs
252 - Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 / Bluetooth
255 - GEneric NEtwork Virtualization Encapsulation
259 .BI numtxqueues " QUEUE_COUNT "
260 specifies the number of transmit queues for new device.
263 .BI numrxqueues " QUEUE_COUNT "
264 specifies the number of receive queues for new device.
268 specifies the desired index of the new virtual device. The link creation fails, if the index is busy.
274 the following additional arguments are supported:
276 .BI "ip link add " DEVICE
277 .BI type " vxlan " id " ID"
280 .RB " ] [ { " group " | " remote " } "
301 .BI ageing " SECONDS "
303 .BI maxaddress " NUMBER "
311 - specifies the VXLAN Network Identifer (or VXLAN Segment
315 - specifies the physical device to use for tunnel endpoint communication.
319 - specifies the multicast IP address to join.
320 This parameter cannot be specified with the
326 - specifies the unicast destination IP address to use in outgoing packets
327 when the destination link layer address is not known in the VXLAN device
328 forwarding database. This parameter cannot be specified with the
334 - specifies the source IP address to use in outgoing packets.
338 - specifies the TTL value to use in outgoing packets.
342 - specifies the TOS value to use in outgoing packets.
346 - specifies the range of port numbers to use as UDP
347 source ports to communicate to the remote VXLAN tunnel endpoint.
351 - specifies if unknown source link layer addresses and IP addresses
352 are entered into the VXLAN device forwarding database.
356 - specifies if route short circuit is turned on.
360 - specifies ARP proxy is turned on.
364 - specifies if netlink LLADDR miss notifications are generated.
368 - specifies if netlink IP ADDR miss notifications are generated.
371 .BI ageing " SECONDS"
372 - specifies the lifetime in seconds of FDB entries learnt by the kernel.
375 .BI maxaddress " NUMBER"
376 - specifies the maximum number of FDB entries.
380 - enables the Group Policy extension (VXLAN-GBP).
383 Allows to transport group policy context across VXLAN network peers.
384 If enabled, includes the mark of a packet in the VXLAN header for outgoing
385 packets and fills the packet mark based on the information found in the
386 VXLAN header for incomming packets.
388 Format of upper 16 bits of packet mark (flags);
391 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
393 |-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|
395 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
398 Don't Learn bit. When set, this bit indicates that the egress
399 VTEP MUST NOT learn the source address of the encapsulated frame.
402 Indicates that the group policy has already been applied to
403 this packet. Policies MUST NOT be applied by devices when the A bit is set.
406 Format of lower 16 bits of packet mark (policy ID):
409 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
413 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
417 iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF
424 GRE, IPIP, SIT Type Support
427 the following additional arguments are supported:
429 .BI "ip link add " DEVICE
430 .BR type " { gre | ipip | sit } "
431 .BI " remote " ADDR " local " ADDR
433 .BR encap " { fou | gue | none } "
435 .BI "encap-sport { " PORT " | auto } "
437 .BI "encap-dport " PORT
439 .I " [no]encap-csum "
441 .I " [no]encap-remcsum "
447 - specifies the remote address of the tunnel.
451 - specifies the fixed local address for tunneled packets.
452 It must be an address on another interface on this host.
455 .BR encap " { fou | gue | none } "
456 - specifies type of secondary UDP encapsulation. "fou" indicates
457 Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
460 .BI "encap-sport { " PORT " | auto } "
461 - specifies the source port in UDP encapsulation.
463 indicates the port by number, "auto"
464 indicates that the port number should be chosen automatically
465 (the kernel picks a flow based on the flow hash of the
466 encapsulated packet).
470 - specifies if UDP checksums are enabled in the secondary
475 - specifies if Remote Checksum Offload is enabled. This is only
476 applicable for Generic UDP Encapsulation.
481 IP6GRE/IP6GRETAP Type Support
484 the following additional arguments are supported:
486 .BI "ip link add " DEVICE
487 .BI type " { ip6gre | ip6gretap } " remote " ADDR " local " ADDR
497 .BI encaplimit " ELIM "
499 .BI tclass " TCLASS "
501 .BI flowlabel " FLOWLABEL "
511 - specifies the remote IPv6 address of the tunnel.
515 - specifies the fixed local IPv6 address for tunneled packets.
516 It must be an address on another interface on this host.
523 flag enables sequencing of outgoing packets.
526 flag requires that all input packets are serialized.
530 - use keyed GRE with key
532 is either a number or an IPv4 address-like dotted quad.
535 parameter specifies the same key to use in both directions.
537 .BR ikey " and " okey
538 parameters specify different keys for input and output.
542 - generate/require checksums for tunneled packets.
545 flag calculates checksums for outgoing packets.
548 flag requires that all input packets have the correct
551 flag is equivalent to the combination
556 - specifies Hop Limit value to use in outgoing packets.
559 .BI encaplimit " ELIM"
560 - specifies a fixed encapsulation limit. Default is 4.
563 .BI flowlabel " FLOWLABEL"
564 - specifies a fixed flowlabel.
568 - specifies the traffic class field on
569 tunneled packets, which can be specified as either a two-digit
570 hex value (e.g. c0) or a predefined string (e.g. internet).
573 causes the field to be copied from the original IP header. The
575 .BI "inherit/" STRING
577 .BI "inherit/" 00 ".." ff
578 will set the field to
582 when tunneling non-IP packets. The default value is 00.
590 the following additional arguments are supported:
592 .BI "ip link add " DEVICE " name " NAME
593 .BI type " ipoib [ " pkey " PKEY ] [" mode " MODE " ]
598 - specifies the IB P-Key to use.
601 - specifies the mode (datagram or connected) to use.
607 the following additional arguments are supported:
609 .BI "ip link add " DEVICE
610 .BI type " geneve " id " ID " remote " IPADDR"
620 - specifies the Virtual Network Identifer to use.
624 - specifies the unicast destination IP address to use in outgoing packets.
628 - specifies the TTL value to use in outgoing packets.
632 - specifies the TOS value to use in outgoing packets.
636 .SS ip link delete - delete virtual link
640 specifies the virtual device to act operate on.
644 specifies the group of virtual links to delete. Group 0 is not allowed to be
645 deleted since it is the default group.
649 specifies the type of the device.
651 .SS ip link set - change device attributes
656 specifies network device to operate on. When configuring SR-IOV Virtual Function
657 (VF) devices, this keyword should specify the associated Physical Function (PF)
663 has a dual role: If both group and dev are present, then move the device to the
664 specified group. If only a group is specified, then the command operates on
665 all devices in that group.
669 change the state of the device to
675 .BR "arp on " or " arp off"
681 .BR "multicast on " or " multicast off"
687 .BR "protodown on " or " protodown off"
690 state on the device. Indicates that a protocol error has been detected on the port. Switch drivers can react to this error by doing a phys down on the switch port.
693 .BR "dynamic on " or " dynamic off"
696 flag on the device. Indicates that address can change when interface goes down (currently
702 change the name of the device. This operation is not
703 recommended if the device is running or has some addresses
707 .BI txqueuelen " NUMBER"
710 change the transmit queue length of the device.
719 .BI address " LLADDRESS"
720 change the station address of the interface.
723 .BI broadcast " LLADDRESS"
727 .BI peer " LLADDRESS"
728 change the link layer broadcast address or the peer address when
733 .BI netns " NETNSNAME " \fR| " PID"
734 move the device to the network namespace associated with name
738 Some devices are not allowed to change network namespace: loopback, bridge,
739 ppp, wireless. These are network namespace local devices. In such case
741 tool will return "Invalid argument" error. It is possible to find out if device is local
742 to a single network namespace by checking
744 flag in the output of the
752 To change network namespace for wireless devices the
754 tool can be used. But it allows to change network namespace only for physical devices and by process
759 give the device a symbolic name for easy reference.
763 specify a Virtual Function device to be configured. The associated PF device
764 must be specified using the
770 - change the station address for the specified VF. The
772 parameter must be specified.
776 - change the assigned VLAN for the specified VF. When specified, all traffic
777 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
778 will be filtered for the specified VLAN ID, and will have all VLAN tags
779 stripped before being passed to the VF. Setting this parameter to 0 disables
780 VLAN tagging and filtering. The
782 parameter must be specified.
786 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
787 tags transmitted by the VF will include the specified priority bits in the
788 VLAN tag. If not specified, the value is assumed to be 0. Both the
792 parameters must be specified. Setting both
796 as 0 disables VLAN tagging and filtering for the VF.
800 -- change the allowed transmit bandwidth, in Mbps, for the specified VF.
801 Setting this parameter to 0 disables rate limiting.
803 parameter must be specified.
809 .BI max_tx_rate " TXRATE"
810 - change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
812 parameter must be specified.
815 .BI min_tx_rate " TXRATE"
816 - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
817 Minimum TXRATE should be always <= Maximum TXRATE.
819 parameter must be specified.
822 .BI spoofchk " on|off"
823 - turn packet spoof checking on or off for the specified VF.
825 .BI state " auto|enable|disable"
826 - set the virtual link state as seen by the specified VF. Setting to auto means a
827 reflection of the PF link state, enable lets the VF to communicate with other VFs on
828 this host even if the PF link state is down, disable causes the HW to drop any packets
834 set master device of the device (enslave device).
838 unset master device of the device (release device).
842 If multiple parameter changes are requested,
844 aborts immediately after any of the changes have failed.
845 This is the only case when
847 can move the system to an unpredictable state. The solution
848 is to avoid changing several parameters with one
852 .SS ip link show - display device attributes
855 .BI dev " NAME " (default)
857 specifies the network device to show.
858 If this argument is omitted all devices in the default group are listed.
863 specifies what group of devices to show.
867 only display running interfaces.
870 .BI master " DEVICE "
872 specifies the master device which enslaves devices to show.
877 specifies the type of devices to show.
880 The show command has additional formatting options:
884 .BR "\-s" , " \-stats", " \-statistics"
885 output more statistics about packet usage.
888 .BR "\-d", " \-details"
889 output more detailed information.
892 .BR "\-h", " \-human", " \-human-readble"
893 output statistics with human readable values number followed by suffix
897 print human readable rates in IEC units (ie. 1K = 1024).
900 .SS ip link help - display help
904 specifies which help of link type to dislpay.
908 may be a number or a string from the file
909 .B @SYSCONFDIR@/group
910 which can be manually filled.
916 Shows the state of all network interfaces on the system.
919 ip link show type bridge
921 Shows the bridge devices.
924 ip link show type vlan
926 Shows the vlan devices.
929 ip link show master br0
931 Shows devices enslaved by br0
934 ip link set dev ppp0 mtu 1400
936 Change the MTU the ppp0 device.
939 ip link add link eth0 name eth0.10 type vlan id 10
941 Creates a new vlan device eth0.10 on device eth0.
944 ip link delete dev eth0.10
951 Display help for the gre link type.
954 ip link add name tun1 type ipip remote 192.168.1.1
955 local 192.168.1.2 ttl 225 encap gue encap-sport auto
956 encap-dport 5555 encap-csum encap-remcsum
958 Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
959 and the outer UDP checksum and remote checksum offload are enabled.
963 ip link add link wpan0 lowpan0 type lowpan
965 Creates a 6LoWPAN interface named lowpan0 on the underlying
966 IEEE 802.15.4 device wpan0.
975 Original Manpage by Michail Litvak <mci@owl.openwall.com>