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] }
78 .BI "ip link delete " DEVICE
86 .RB "} { " up " | " down " | " arp " { " on " | " off " } |"
88 .BR promisc " { " on " | " off " } |"
90 .BR allmulticast " { " on " | " off " } |"
92 .BR dynamic " { " on " | " off " } |"
94 .BR multicast " { " on " | " off " } |"
126 .IR VLAN-QOS " ] ] ["
133 .B spoofchk { on | off } ] [
134 .B state { auto | enable | disable}
146 .RI "[ " DEVICE " | "
160 .SS ip link add - add virtual link
164 specifies the physical device to act operate on.
167 specifies the name of the new virtual device.
170 specifies the type of the new device.
176 - Ethernet Bridge device
182 - Dummy network interface
185 - High-availability Seamless Redundancy device
188 - Intermediate Functional Block device
191 - IP over Infiniband device
194 - Virtual interface base on link layer address (MAC)
197 - Virtual interface based on link layer address (MAC) and TAP.
200 - Virtual Controller Area Network interface
203 - Virtual ethernet interface
206 - 802.1q tagged virtual LAN interface
209 - Virtual eXtended LAN
212 - Virtual tunnel interface IPv4|IPv6 over IPv6
215 - Virtual tunnel interface IPv4 over IPv4
218 - Virtual tunnel interface IPv6 over IPv4
221 - Virtual tunnel interface GRE over IPv4
224 - Virtual L2 tunnel interface GRE over IPv4
227 - Virtual tunnel interface GRE over IPv6
230 - Virtual L2 tunnel interface GRE over IPv6
234 .BI numtxqueues " QUEUE_COUNT "
235 specifies the number of transmit queues for new device.
238 .BI numrxqueues " QUEUE_COUNT "
239 specifies the number of receive queues for new device.
243 specifies the desired index of the new virtual device. The link creation fails, if the index is busy.
249 the following additional arguments are supported:
251 .BI "ip link add " DEVICE
252 .BI type " vxlan " id " ID"
255 .RB " ] [ { " group " | " remote " } "
276 .BI ageing " SECONDS "
278 .BI maxaddress " NUMBER "
286 - specifies the VXLAN Network Identifer (or VXLAN Segment
290 - specifies the physical device to use for tunnel endpoint communication.
294 - specifies the multicast IP address to join.
295 This parameter cannot be specified with the
301 - specifies the unicast destination IP address to use in outgoing packets
302 when the destination link layer address is not known in the VXLAN device
303 forwarding database. This parameter cannot be specified with the
309 - specifies the source IP address to use in outgoing packets.
313 - specifies the TTL value to use in outgoing packets.
317 - specifies the TOS value to use in outgoing packets.
321 - specifies the range of port numbers to use as UDP
322 source ports to communicate to the remote VXLAN tunnel endpoint.
326 - specifies if unknown source link layer addresses and IP addresses
327 are entered into the VXLAN device forwarding database.
331 - specifies if route short circuit is turned on.
335 - specifies ARP proxy is turned on.
339 - specifies if netlink LLADDR miss notifications are generated.
343 - specifies if netlink IP ADDR miss notifications are generated.
346 .BI ageing " SECONDS"
347 - specifies the lifetime in seconds of FDB entries learnt by the kernel.
350 .BI maxaddress " NUMBER"
351 - specifies the maximum number of FDB entries.
355 - enables the Group Policy extension (VXLAN-GBP).
358 Allows to transport group policy context across VXLAN network peers.
359 If enabled, includes the mark of a packet in the VXLAN header for outgoing
360 packets and fills the packet mark based on the information found in the
361 VXLAN header for incomming packets.
363 Format of upper 16 bits of packet mark (flags);
366 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
368 |-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|
370 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
373 Don't Learn bit. When set, this bit indicates that the egress
374 VTEP MUST NOT learn the source address of the encapsulated frame.
377 Indicates that the group policy has already been applied to
378 this packet. Policies MUST NOT be applied by devices when the A bit is set.
381 Format of lower 16 bits of packet mark (policy ID):
384 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
388 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
392 iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF
399 GRE, IPIP, SIT Type Support
402 the following additional arguments are supported:
404 .BI "ip link add " DEVICE
405 .BR type " { gre | ipip | sit } "
406 .BI " remote " ADDR " local " ADDR
408 .BR encap " { fou | gue | none } "
410 .BI "encap-sport { " PORT " | auto } "
412 .BI "encap-dport " PORT
414 .I " [no]encap-csum "
416 .I " [no]encap-remcsum "
422 - specifies the remote address of the tunnel.
426 - specifies the fixed local address for tunneled packets.
427 It must be an address on another interface on this host.
430 .BR encap " { fou | gue | none } "
431 - specifies type of secondary UDP encapsulation. "fou" indicates
432 Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
435 .BI "encap-sport { " PORT " | auto } "
436 - specifies the source port in UDP encapsulation.
438 indicates the port by number, "auto"
439 indicates that the port number should be chosen automatically
440 (the kernel picks a flow based on the flow hash of the
441 encapsulated packet).
445 - specifies if UDP checksums are enabled in the secondary
450 - specifies if Remote Checksum Offload is enabled. This is only
451 applicable for Generic UDP Encapsulation.
456 IP6GRE/IP6GRETAP Type Support
459 the following additional arguments are supported:
461 .BI "ip link add " DEVICE
462 .BI type " { ip6gre | ip6gretap } " remote " ADDR " local " ADDR
472 .BI encaplimit " ELIM "
474 .BI tclass " TCLASS "
476 .BI flowlabel " FLOWLABEL "
486 - specifies the remote IPv6 address of the tunnel.
490 - specifies the fixed local IPv6 address for tunneled packets.
491 It must be an address on another interface on this host.
498 flag enables sequencing of outgoing packets.
501 flag requires that all input packets are serialized.
505 - use keyed GRE with key
507 is either a number or an IPv4 address-like dotted quad.
510 parameter specifies the same key to use in both directions.
512 .BR ikey " and " okey
513 parameters specify different keys for input and output.
517 - generate/require checksums for tunneled packets.
520 flag calculates checksums for outgoing packets.
523 flag requires that all input packets have the correct
526 flag is equivalent to the combination
531 - specifies Hop Limit value to use in outgoing packets.
534 .BI encaplimit " ELIM"
535 - specifies a fixed encapsulation limit. Default is 4.
538 .BI flowlabel " FLOWLABEL"
539 - specifies a fixed flowlabel.
543 - specifies the traffic class field on
544 tunneled packets, which can be specified as either a two-digit
545 hex value (e.g. c0) or a predefined string (e.g. internet).
548 causes the field to be copied from the original IP header. The
550 .BI "inherit/" STRING
552 .BI "inherit/" 00 ".." ff
553 will set the field to
557 when tunneling non-IP packets. The default value is 00.
565 the following additional arguments are supported:
567 .BI "ip link add " DEVICE " name " NAME
568 .BI type " ipoib [ " pkey " PKEY ] [" mode " MODE " ]
573 - specifies the IB P-Key to use.
576 - specifies the mode (datagram or connected) to use.
578 .SS ip link delete - delete virtual link
580 specifies the virtual device to act operate on.
582 specifies the type of the device.
587 specifies the physical device to act operate on.
589 .SS ip link set - change device attributes
594 specifies network device to operate on. When configuring SR-IOV Virtual Function
595 (VF) devices, this keyword should specify the associated Physical Function (PF)
601 has a dual role: If both group and dev are present, then move the device to the
602 specified group. If only a group is specified, then the command operates on
603 all devices in that group.
607 change the state of the device to
613 .BR "arp on " or " arp off"
619 .BR "multicast on " or " multicast off"
625 .BR "dynamic on " or " dynamic off"
632 change the name of the device. This operation is not
633 recommended if the device is running or has some addresses
637 .BI txqueuelen " NUMBER"
640 change the transmit queue length of the device.
649 .BI address " LLADDRESS"
650 change the station address of the interface.
653 .BI broadcast " LLADDRESS"
657 .BI peer " LLADDRESS"
658 change the link layer broadcast address or the peer address when
664 move the device to the network namespace associated with the process
668 .BI netns " NETNSNAME"
669 move the device to the network namespace associated with name
674 give the device a symbolic name for easy reference.
678 specify the group the device belongs to.
679 The available groups are listed in file
680 .BR "@SYSCONFDIR@/group" .
684 specify a Virtual Function device to be configured. The associated PF device
685 must be specified using the
691 - change the station address for the specified VF. The
693 parameter must be specified.
697 - change the assigned VLAN for the specified VF. When specified, all traffic
698 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
699 will be filtered for the specified VLAN ID, and will have all VLAN tags
700 stripped before being passed to the VF. Setting this parameter to 0 disables
701 VLAN tagging and filtering. The
703 parameter must be specified.
707 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
708 tags transmitted by the VF will include the specified priority bits in the
709 VLAN tag. If not specified, the value is assumed to be 0. Both the
713 parameters must be specified. Setting both
717 as 0 disables VLAN tagging and filtering for the VF.
721 -- change the allowed transmit bandwidth, in Mbps, for the specified VF.
722 Setting this parameter to 0 disables rate limiting.
724 parameter must be specified.
730 .BI max_tx_rate " TXRATE"
731 - change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
733 parameter must be specified.
736 .BI min_tx_rate " TXRATE"
737 - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
738 Minimum TXRATE should be always <= Maximum TXRATE.
740 parameter must be specified.
743 .BI spoofchk " on|off"
744 - turn packet spoof checking on or off for the specified VF.
746 .BI state " auto|enable|disable"
747 - set the virtual link state as seen by the specified VF. Setting to auto means a
748 reflection of the PF link state, enable lets the VF to communicate with other VFs on
749 this host even if the PF link state is down, disable causes the HW to drop any packets
755 set master device of the device (enslave device).
759 unset master device of the device (release device).
763 If multiple parameter changes are requested,
765 aborts immediately after any of the changes have failed.
766 This is the only case when
768 can move the system to an unpredictable state. The solution
769 is to avoid changing several parameters with one
773 .SS ip link show - display device attributes
776 .BI dev " NAME " (default)
778 specifies the network device to show.
779 If this argument is omitted all devices in the default group are listed.
784 specifies what group of devices to show.
788 only display running interfaces.
791 .BI master " DEVICE "
793 specifies the master device which enslaves devices to show.
798 specifies the type of devices to show.
801 The show command has additional formatting options:
805 .BR "\-s" , " \-stats", " \-statistics"
806 output more statistics about packet usage.
809 .BR "\-d", " \-details"
810 output more detailed information.
813 .BR "\-h", " \-human", " \-human-readble"
814 output statistics with human readable values number followed by suffix
818 print human readable rates in IEC units (ie. 1K = 1024).
821 .SS ip link help - display help
825 specifies which help of link type to dislpay.
831 Shows the state of all network interfaces on the system.
834 ip link show type bridge
836 Shows the bridge devices.
839 ip link show type vlan
841 Shows the vlan devices.
844 ip link show master br0
846 Shows devices enslaved by br0
849 ip link set dev ppp0 mtu 1400
851 Change the MTU the ppp0 device.
854 ip link add link eth0 name eth0.10 type vlan id 10
856 Creates a new vlan device eth0.10 on device eth0.
859 ip link delete dev eth0.10
866 Display help for the gre link type.
869 ip link add name tun1 type ipip remote 192.168.1.1
870 local 192.168.1.2 ttl 225 encap gue encap-sport auto
871 encap-dport 5555 encap-csum encap-remcsum
873 Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
874 and the outer UDP checksum and remote checksum offload are enabled.
883 Original Manpage by Michail Litvak <mci@owl.openwall.com>