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] }
82 .BR "ip link delete " {
93 .RB "} { " up " | " down " | " arp " { " on " | " off " } |"
95 .BR promisc " { " on " | " off " } |"
97 .BR allmulticast " { " on " | " off " } |"
99 .BR dynamic " { " on " | " off " } |"
101 .BR multicast " { " on " | " off " } |"
133 .IR VLAN-QOS " ] ] ["
140 .B spoofchk { on | off } ] [
141 .B state { auto | enable | disable}
153 .RI "[ " DEVICE " | "
167 .SS ip link add - add virtual link
171 specifies the physical device to act operate on.
174 specifies the name of the new virtual device.
177 specifies the type of the new device.
183 - Ethernet Bridge device
189 - Dummy network interface
192 - High-availability Seamless Redundancy device
195 - Intermediate Functional Block device
198 - IP over Infiniband device
201 - Virtual interface base on link layer address (MAC)
204 - Virtual interface based on link layer address (MAC) and TAP.
207 - Virtual Controller Area Network interface
210 - Virtual ethernet interface
213 - 802.1q tagged virtual LAN interface
216 - Virtual eXtended LAN
219 - Virtual tunnel interface IPv4|IPv6 over IPv6
222 - Virtual tunnel interface IPv4 over IPv4
225 - Virtual tunnel interface IPv6 over IPv4
228 - Virtual tunnel interface GRE over IPv4
231 - Virtual L2 tunnel interface GRE over IPv4
234 - Virtual tunnel interface GRE over IPv6
237 - Virtual L2 tunnel interface GRE over IPv6
240 - Virtual tunnel interface
243 - Netlink monitoring device
246 - Interface for L3 (IPv6/IPv4) based VLANs
249 - Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 / Bluetooth
253 .BI numtxqueues " QUEUE_COUNT "
254 specifies the number of transmit queues for new device.
257 .BI numrxqueues " QUEUE_COUNT "
258 specifies the number of receive queues for new device.
262 specifies the desired index of the new virtual device. The link creation fails, if the index is busy.
268 the following additional arguments are supported:
270 .BI "ip link add " DEVICE
271 .BI type " vxlan " id " ID"
274 .RB " ] [ { " group " | " remote " } "
295 .BI ageing " SECONDS "
297 .BI maxaddress " NUMBER "
305 - specifies the VXLAN Network Identifer (or VXLAN Segment
309 - specifies the physical device to use for tunnel endpoint communication.
313 - specifies the multicast IP address to join.
314 This parameter cannot be specified with the
320 - specifies the unicast destination IP address to use in outgoing packets
321 when the destination link layer address is not known in the VXLAN device
322 forwarding database. This parameter cannot be specified with the
328 - specifies the source IP address to use in outgoing packets.
332 - specifies the TTL value to use in outgoing packets.
336 - specifies the TOS value to use in outgoing packets.
340 - specifies the range of port numbers to use as UDP
341 source ports to communicate to the remote VXLAN tunnel endpoint.
345 - specifies if unknown source link layer addresses and IP addresses
346 are entered into the VXLAN device forwarding database.
350 - specifies if route short circuit is turned on.
354 - specifies ARP proxy is turned on.
358 - specifies if netlink LLADDR miss notifications are generated.
362 - specifies if netlink IP ADDR miss notifications are generated.
365 .BI ageing " SECONDS"
366 - specifies the lifetime in seconds of FDB entries learnt by the kernel.
369 .BI maxaddress " NUMBER"
370 - specifies the maximum number of FDB entries.
374 - enables the Group Policy extension (VXLAN-GBP).
377 Allows to transport group policy context across VXLAN network peers.
378 If enabled, includes the mark of a packet in the VXLAN header for outgoing
379 packets and fills the packet mark based on the information found in the
380 VXLAN header for incomming packets.
382 Format of upper 16 bits of packet mark (flags);
385 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
387 |-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|
389 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
392 Don't Learn bit. When set, this bit indicates that the egress
393 VTEP MUST NOT learn the source address of the encapsulated frame.
396 Indicates that the group policy has already been applied to
397 this packet. Policies MUST NOT be applied by devices when the A bit is set.
400 Format of lower 16 bits of packet mark (policy ID):
403 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
407 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
411 iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF
418 GRE, IPIP, SIT Type Support
421 the following additional arguments are supported:
423 .BI "ip link add " DEVICE
424 .BR type " { gre | ipip | sit } "
425 .BI " remote " ADDR " local " ADDR
427 .BR encap " { fou | gue | none } "
429 .BI "encap-sport { " PORT " | auto } "
431 .BI "encap-dport " PORT
433 .I " [no]encap-csum "
435 .I " [no]encap-remcsum "
441 - specifies the remote address of the tunnel.
445 - specifies the fixed local address for tunneled packets.
446 It must be an address on another interface on this host.
449 .BR encap " { fou | gue | none } "
450 - specifies type of secondary UDP encapsulation. "fou" indicates
451 Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
454 .BI "encap-sport { " PORT " | auto } "
455 - specifies the source port in UDP encapsulation.
457 indicates the port by number, "auto"
458 indicates that the port number should be chosen automatically
459 (the kernel picks a flow based on the flow hash of the
460 encapsulated packet).
464 - specifies if UDP checksums are enabled in the secondary
469 - specifies if Remote Checksum Offload is enabled. This is only
470 applicable for Generic UDP Encapsulation.
475 IP6GRE/IP6GRETAP Type Support
478 the following additional arguments are supported:
480 .BI "ip link add " DEVICE
481 .BI type " { ip6gre | ip6gretap } " remote " ADDR " local " ADDR
491 .BI encaplimit " ELIM "
493 .BI tclass " TCLASS "
495 .BI flowlabel " FLOWLABEL "
505 - specifies the remote IPv6 address of the tunnel.
509 - specifies the fixed local IPv6 address for tunneled packets.
510 It must be an address on another interface on this host.
517 flag enables sequencing of outgoing packets.
520 flag requires that all input packets are serialized.
524 - use keyed GRE with key
526 is either a number or an IPv4 address-like dotted quad.
529 parameter specifies the same key to use in both directions.
531 .BR ikey " and " okey
532 parameters specify different keys for input and output.
536 - generate/require checksums for tunneled packets.
539 flag calculates checksums for outgoing packets.
542 flag requires that all input packets have the correct
545 flag is equivalent to the combination
550 - specifies Hop Limit value to use in outgoing packets.
553 .BI encaplimit " ELIM"
554 - specifies a fixed encapsulation limit. Default is 4.
557 .BI flowlabel " FLOWLABEL"
558 - specifies a fixed flowlabel.
562 - specifies the traffic class field on
563 tunneled packets, which can be specified as either a two-digit
564 hex value (e.g. c0) or a predefined string (e.g. internet).
567 causes the field to be copied from the original IP header. The
569 .BI "inherit/" STRING
571 .BI "inherit/" 00 ".." ff
572 will set the field to
576 when tunneling non-IP packets. The default value is 00.
584 the following additional arguments are supported:
586 .BI "ip link add " DEVICE " name " NAME
587 .BI type " ipoib [ " pkey " PKEY ] [" mode " MODE " ]
592 - specifies the IB P-Key to use.
595 - specifies the mode (datagram or connected) to use.
597 .SS ip link delete - delete virtual link
601 specifies the virtual device to act operate on.
605 specifies the group of virtual links to delete. Group 0 is not allowed to be
606 deleted since it is the default group.
610 specifies the type of the device.
612 .SS ip link set - change device attributes
617 specifies network device to operate on. When configuring SR-IOV Virtual Function
618 (VF) devices, this keyword should specify the associated Physical Function (PF)
624 has a dual role: If both group and dev are present, then move the device to the
625 specified group. If only a group is specified, then the command operates on
626 all devices in that group.
630 change the state of the device to
636 .BR "arp on " or " arp off"
642 .BR "multicast on " or " multicast off"
648 .BR "dynamic on " or " dynamic off"
651 flag on the device. Indicates that address can change when interface goes down (currently
657 change the name of the device. This operation is not
658 recommended if the device is running or has some addresses
662 .BI txqueuelen " NUMBER"
665 change the transmit queue length of the device.
674 .BI address " LLADDRESS"
675 change the station address of the interface.
678 .BI broadcast " LLADDRESS"
682 .BI peer " LLADDRESS"
683 change the link layer broadcast address or the peer address when
688 .BI netns " NETNSNAME " \fR| " PID"
689 move the device to the network namespace associated with name
693 Some devices are not allowed to change network namespace: loopback, bridge,
694 ppp, wireless. These are network namespace local devices. In such case
696 tool will return "Invalid argument" error. It is possible to find out if device is local
697 to a single network namespace by checking
699 flag in the output of the
707 To change network namespace for wireless devices the
709 tool can be used. But it allows to change network namespace only for physical devices and by process
714 give the device a symbolic name for easy reference.
718 specify the group the device belongs to.
719 The available groups are listed in file
720 .BR "@SYSCONFDIR@/group" .
724 specify a Virtual Function device to be configured. The associated PF device
725 must be specified using the
731 - change the station address for the specified VF. The
733 parameter must be specified.
737 - change the assigned VLAN for the specified VF. When specified, all traffic
738 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
739 will be filtered for the specified VLAN ID, and will have all VLAN tags
740 stripped before being passed to the VF. Setting this parameter to 0 disables
741 VLAN tagging and filtering. The
743 parameter must be specified.
747 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
748 tags transmitted by the VF will include the specified priority bits in the
749 VLAN tag. If not specified, the value is assumed to be 0. Both the
753 parameters must be specified. Setting both
757 as 0 disables VLAN tagging and filtering for the VF.
761 -- change the allowed transmit bandwidth, in Mbps, for the specified VF.
762 Setting this parameter to 0 disables rate limiting.
764 parameter must be specified.
770 .BI max_tx_rate " TXRATE"
771 - change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
773 parameter must be specified.
776 .BI min_tx_rate " TXRATE"
777 - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
778 Minimum TXRATE should be always <= Maximum TXRATE.
780 parameter must be specified.
783 .BI spoofchk " on|off"
784 - turn packet spoof checking on or off for the specified VF.
786 .BI state " auto|enable|disable"
787 - set the virtual link state as seen by the specified VF. Setting to auto means a
788 reflection of the PF link state, enable lets the VF to communicate with other VFs on
789 this host even if the PF link state is down, disable causes the HW to drop any packets
795 set master device of the device (enslave device).
799 unset master device of the device (release device).
803 If multiple parameter changes are requested,
805 aborts immediately after any of the changes have failed.
806 This is the only case when
808 can move the system to an unpredictable state. The solution
809 is to avoid changing several parameters with one
813 .SS ip link show - display device attributes
816 .BI dev " NAME " (default)
818 specifies the network device to show.
819 If this argument is omitted all devices in the default group are listed.
824 specifies what group of devices to show.
828 only display running interfaces.
831 .BI master " DEVICE "
833 specifies the master device which enslaves devices to show.
838 specifies the type of devices to show.
841 The show command has additional formatting options:
845 .BR "\-s" , " \-stats", " \-statistics"
846 output more statistics about packet usage.
849 .BR "\-d", " \-details"
850 output more detailed information.
853 .BR "\-h", " \-human", " \-human-readble"
854 output statistics with human readable values number followed by suffix
858 print human readable rates in IEC units (ie. 1K = 1024).
861 .SS ip link help - display help
865 specifies which help of link type to dislpay.
869 may be a number or a string from the file
870 .B /etc/iproute2/group
871 which can be manually filled.
877 Shows the state of all network interfaces on the system.
880 ip link show type bridge
882 Shows the bridge devices.
885 ip link show type vlan
887 Shows the vlan devices.
890 ip link show master br0
892 Shows devices enslaved by br0
895 ip link set dev ppp0 mtu 1400
897 Change the MTU the ppp0 device.
900 ip link add link eth0 name eth0.10 type vlan id 10
902 Creates a new vlan device eth0.10 on device eth0.
905 ip link delete dev eth0.10
912 Display help for the gre link type.
915 ip link add name tun1 type ipip remote 192.168.1.1
916 local 192.168.1.2 ttl 225 encap gue encap-sport auto
917 encap-dport 5555 encap-csum encap-remcsum
919 Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
920 and the outer UDP checksum and remote checksum offload are enabled.
924 ip link add link wpan0 lowpan0 type lowpan
926 Creates a 6LoWPAN interface named lowpan0 on the underlying
927 IEEE 802.15.4 device wpan0.
936 Original Manpage by Michail Litvak <mci@owl.openwall.com>