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"
616 - specifies the Virtual Network Identifer to use.
620 - specifies the unicast destination IP address to use in outgoing packets.
624 - specifies the TTL value to use in outgoing packets.
628 .SS ip link delete - delete virtual link
632 specifies the virtual device to act operate on.
636 specifies the group of virtual links to delete. Group 0 is not allowed to be
637 deleted since it is the default group.
641 specifies the type of the device.
643 .SS ip link set - change device attributes
648 specifies network device to operate on. When configuring SR-IOV Virtual Function
649 (VF) devices, this keyword should specify the associated Physical Function (PF)
655 has a dual role: If both group and dev are present, then move the device to the
656 specified group. If only a group is specified, then the command operates on
657 all devices in that group.
661 change the state of the device to
667 .BR "arp on " or " arp off"
673 .BR "multicast on " or " multicast off"
679 .BR "dynamic on " or " dynamic off"
682 flag on the device. Indicates that address can change when interface goes down (currently
688 change the name of the device. This operation is not
689 recommended if the device is running or has some addresses
693 .BI txqueuelen " NUMBER"
696 change the transmit queue length of the device.
705 .BI address " LLADDRESS"
706 change the station address of the interface.
709 .BI broadcast " LLADDRESS"
713 .BI peer " LLADDRESS"
714 change the link layer broadcast address or the peer address when
719 .BI netns " NETNSNAME " \fR| " PID"
720 move the device to the network namespace associated with name
724 Some devices are not allowed to change network namespace: loopback, bridge,
725 ppp, wireless. These are network namespace local devices. In such case
727 tool will return "Invalid argument" error. It is possible to find out if device is local
728 to a single network namespace by checking
730 flag in the output of the
738 To change network namespace for wireless devices the
740 tool can be used. But it allows to change network namespace only for physical devices and by process
745 give the device a symbolic name for easy reference.
749 specify a Virtual Function device to be configured. The associated PF device
750 must be specified using the
756 - change the station address for the specified VF. The
758 parameter must be specified.
762 - change the assigned VLAN for the specified VF. When specified, all traffic
763 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
764 will be filtered for the specified VLAN ID, and will have all VLAN tags
765 stripped before being passed to the VF. Setting this parameter to 0 disables
766 VLAN tagging and filtering. The
768 parameter must be specified.
772 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
773 tags transmitted by the VF will include the specified priority bits in the
774 VLAN tag. If not specified, the value is assumed to be 0. Both the
778 parameters must be specified. Setting both
782 as 0 disables VLAN tagging and filtering for the VF.
786 -- change the allowed transmit bandwidth, in Mbps, for the specified VF.
787 Setting this parameter to 0 disables rate limiting.
789 parameter must be specified.
795 .BI max_tx_rate " TXRATE"
796 - change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
798 parameter must be specified.
801 .BI min_tx_rate " TXRATE"
802 - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
803 Minimum TXRATE should be always <= Maximum TXRATE.
805 parameter must be specified.
808 .BI spoofchk " on|off"
809 - turn packet spoof checking on or off for the specified VF.
811 .BI state " auto|enable|disable"
812 - set the virtual link state as seen by the specified VF. Setting to auto means a
813 reflection of the PF link state, enable lets the VF to communicate with other VFs on
814 this host even if the PF link state is down, disable causes the HW to drop any packets
820 set master device of the device (enslave device).
824 unset master device of the device (release device).
828 If multiple parameter changes are requested,
830 aborts immediately after any of the changes have failed.
831 This is the only case when
833 can move the system to an unpredictable state. The solution
834 is to avoid changing several parameters with one
838 .SS ip link show - display device attributes
841 .BI dev " NAME " (default)
843 specifies the network device to show.
844 If this argument is omitted all devices in the default group are listed.
849 specifies what group of devices to show.
853 only display running interfaces.
856 .BI master " DEVICE "
858 specifies the master device which enslaves devices to show.
863 specifies the type of devices to show.
866 The show command has additional formatting options:
870 .BR "\-s" , " \-stats", " \-statistics"
871 output more statistics about packet usage.
874 .BR "\-d", " \-details"
875 output more detailed information.
878 .BR "\-h", " \-human", " \-human-readble"
879 output statistics with human readable values number followed by suffix
883 print human readable rates in IEC units (ie. 1K = 1024).
886 .SS ip link help - display help
890 specifies which help of link type to dislpay.
894 may be a number or a string from the file
895 .B @SYSCONFDIR@/group
896 which can be manually filled.
902 Shows the state of all network interfaces on the system.
905 ip link show type bridge
907 Shows the bridge devices.
910 ip link show type vlan
912 Shows the vlan devices.
915 ip link show master br0
917 Shows devices enslaved by br0
920 ip link set dev ppp0 mtu 1400
922 Change the MTU the ppp0 device.
925 ip link add link eth0 name eth0.10 type vlan id 10
927 Creates a new vlan device eth0.10 on device eth0.
930 ip link delete dev eth0.10
937 Display help for the gre link type.
940 ip link add name tun1 type ipip remote 192.168.1.1
941 local 192.168.1.2 ttl 225 encap gue encap-sport auto
942 encap-dport 5555 encap-csum encap-remcsum
944 Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
945 and the outer UDP checksum and remote checksum offload are enabled.
949 ip link add link wpan0 lowpan0 type lowpan
951 Creates a 6LoWPAN interface named lowpan0 on the underlying
952 IEEE 802.15.4 device wpan0.
961 Original Manpage by Michail Litvak <mci@owl.openwall.com>