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"
628 flag on the device. Indicates that address can change when interface goes down (currently
634 change the name of the device. This operation is not
635 recommended if the device is running or has some addresses
639 .BI txqueuelen " NUMBER"
642 change the transmit queue length of the device.
651 .BI address " LLADDRESS"
652 change the station address of the interface.
655 .BI broadcast " LLADDRESS"
659 .BI peer " LLADDRESS"
660 change the link layer broadcast address or the peer address when
665 .BI netns " NETNSNAME " \fR| " PID"
666 move the device to the network namespace associated with name
670 Some devices are not allowed to change network namespace: loopback, bridge,
671 ppp, wireless. These are network namespace local devices. In such case
673 tool will return "Invalid argument" error. It is possible to find out if device is local
674 to a single network namespace by checking
676 flag in the output of the
684 To change network namespace for wireless devices the
686 tool can be used. But it allows to change network namespace only for physical devices and by process
691 give the device a symbolic name for easy reference.
695 specify the group the device belongs to.
696 The available groups are listed in file
697 .BR "@SYSCONFDIR@/group" .
701 specify a Virtual Function device to be configured. The associated PF device
702 must be specified using the
708 - change the station address for the specified VF. The
710 parameter must be specified.
714 - change the assigned VLAN for the specified VF. When specified, all traffic
715 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
716 will be filtered for the specified VLAN ID, and will have all VLAN tags
717 stripped before being passed to the VF. Setting this parameter to 0 disables
718 VLAN tagging and filtering. The
720 parameter must be specified.
724 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
725 tags transmitted by the VF will include the specified priority bits in the
726 VLAN tag. If not specified, the value is assumed to be 0. Both the
730 parameters must be specified. Setting both
734 as 0 disables VLAN tagging and filtering for the VF.
738 -- change the allowed transmit bandwidth, in Mbps, for the specified VF.
739 Setting this parameter to 0 disables rate limiting.
741 parameter must be specified.
747 .BI max_tx_rate " TXRATE"
748 - change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
750 parameter must be specified.
753 .BI min_tx_rate " TXRATE"
754 - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
755 Minimum TXRATE should be always <= Maximum TXRATE.
757 parameter must be specified.
760 .BI spoofchk " on|off"
761 - turn packet spoof checking on or off for the specified VF.
763 .BI state " auto|enable|disable"
764 - set the virtual link state as seen by the specified VF. Setting to auto means a
765 reflection of the PF link state, enable lets the VF to communicate with other VFs on
766 this host even if the PF link state is down, disable causes the HW to drop any packets
772 set master device of the device (enslave device).
776 unset master device of the device (release device).
780 If multiple parameter changes are requested,
782 aborts immediately after any of the changes have failed.
783 This is the only case when
785 can move the system to an unpredictable state. The solution
786 is to avoid changing several parameters with one
790 .SS ip link show - display device attributes
793 .BI dev " NAME " (default)
795 specifies the network device to show.
796 If this argument is omitted all devices in the default group are listed.
801 specifies what group of devices to show.
805 only display running interfaces.
808 .BI master " DEVICE "
810 specifies the master device which enslaves devices to show.
815 specifies the type of devices to show.
818 The show command has additional formatting options:
822 .BR "\-s" , " \-stats", " \-statistics"
823 output more statistics about packet usage.
826 .BR "\-d", " \-details"
827 output more detailed information.
830 .BR "\-h", " \-human", " \-human-readble"
831 output statistics with human readable values number followed by suffix
835 print human readable rates in IEC units (ie. 1K = 1024).
838 .SS ip link help - display help
842 specifies which help of link type to dislpay.
846 may be a number or a string from the file
847 .B /etc/iproute2/group
848 which can be manually filled.
854 Shows the state of all network interfaces on the system.
857 ip link show type bridge
859 Shows the bridge devices.
862 ip link show type vlan
864 Shows the vlan devices.
867 ip link show master br0
869 Shows devices enslaved by br0
872 ip link set dev ppp0 mtu 1400
874 Change the MTU the ppp0 device.
877 ip link add link eth0 name eth0.10 type vlan id 10
879 Creates a new vlan device eth0.10 on device eth0.
882 ip link delete dev eth0.10
889 Display help for the gre link type.
892 ip link add name tun1 type ipip remote 192.168.1.1
893 local 192.168.1.2 ttl 225 encap gue encap-sport auto
894 encap-dport 5555 encap-csum encap-remcsum
896 Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
897 and the outer UDP checksum and remote checksum offload are enabled.
907 Original Manpage by Michail Litvak <mci@owl.openwall.com>