1 .TH IP\-LINK 8 "13 Dec 2012" "iproute2" "Linux"
3 ip-link \- network device configuration
10 .RI " { " COMMAND " | "
43 .BR "ip link delete " {
56 .RB "[ { " up " | " down " } ]"
59 .IR "ETYPE TYPE_ARGS" " ]"
61 .RB "[ " arp " { " on " | " off " } ]"
63 .RB "[ " dynamic " { " on " | " off " } ]"
65 .RB "[ " multicast " { " on " | " off " } ]"
67 .RB "[ " allmulticast " { " on " | " off " } ]"
69 .RB "[ " promisc " { " on " | " off " } ]"
71 .RB "[ " protodown " { " on " | " off " } ]"
73 .RB "[ " trailers " { " on " | " off " } ]"
91 .IR PID " | " NETNSNAME " } ]"
105 .RI "[ " VFVLAN-LIST " ]"
116 .RB "[ " spoofchk " { " on " | " off " } ]"
118 .RB "[ " query_rss " { " on " | " off " } ]"
120 .RB "[ " state " { " auto " | " enable " | " disable " } ]"
122 .RB "[ " trust " { " on " | " off " } ]"
124 .RB "[ " node_guid " eui64 ]"
126 .RB "[ " port_guid " eui64 ] ]"
129 .RB "[ { " xdp " | " xdpgeneric " | " xdpdrv " | " xdpoffload " } { " off " | "
136 .RB "[ " verbose " ] |"
145 .RB "[ " nomaster " ]"
150 .RB "[ " addrgenmode " { " eui64 " | " none " | " stable_secret " | " random " } ]"
152 .RB "[ " macaddr " { " flush " | { " add " | " del " } "
153 .IR MACADDR " | set [ "
155 .IR MACADDR " [ ... ] ] ] } ]"
160 .RI "[ " DEVICE " | "
219 .IR ETYPE " := [ " TYPE " |"
220 .BR bridge_slave " | " bond_slave " ]"
223 .IR VFVLAN-LIST " := [ " VFVLAN-LIST " ] " VFVLAN
232 .IR VLAN-PROTO " ] ]"
235 .SS ip link add - add virtual link
239 specifies the physical device to act operate on.
242 specifies the name of the new virtual device.
245 specifies the type of the new device.
251 - Ethernet Bridge device
257 - Dummy network interface
260 - High-availability Seamless Redundancy device
263 - Intermediate Functional Block device
266 - IP over Infiniband device
269 - Virtual interface base on link layer address (MAC)
272 - Virtual interface based on link layer address (MAC) and TAP.
275 - Virtual Controller Area Network interface
278 - Virtual Controller Area Network tunnel interface
281 - Virtual ethernet interface
284 - 802.1q tagged virtual LAN interface
287 - Virtual eXtended LAN
290 - Virtual tunnel interface IPv4|IPv6 over IPv6
293 - Virtual tunnel interface IPv4 over IPv4
296 - Virtual tunnel interface IPv6 over IPv4
299 - Virtual tunnel interface GRE over IPv4
302 - Virtual L2 tunnel interface GRE over IPv4
305 - Encapsulated Remote SPAN over GRE and IPv4
308 - Virtual tunnel interface GRE over IPv6
311 - Virtual L2 tunnel interface GRE over IPv6
314 - Encapsulated Remote SPAN over GRE and IPv6
317 - Virtual tunnel interface
320 - Netlink monitoring device
323 - Interface for L3 (IPv6/IPv4) based VLANs
326 - Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 / Bluetooth
329 - GEneric NEtwork Virtualization Encapsulation
332 - Interface for IEEE 802.1AE MAC Security (MACsec)
335 - Interface for L3 VRF domains
339 .BI numtxqueues " QUEUE_COUNT "
340 specifies the number of transmit queues for new device.
343 .BI numrxqueues " QUEUE_COUNT "
344 specifies the number of receive queues for new device.
348 specifies the desired index of the new virtual device. The link creation fails, if the index is busy.
354 the following additional arguments are supported:
361 .BI protocol " VLAN_PROTO "
365 .BR reorder_hdr " { " on " | " off " } "
368 .BR gvrp " { " on " | " off " } "
371 .BR mvrp " { " on " | " off " } "
374 .BR loose_binding " { " on " | " off " } "
377 .BI ingress-qos-map " QOS-MAP "
380 .BI egress-qos-map " QOS-MAP "
385 .BI protocol " VLAN_PROTO "
386 - either 802.1Q or 802.1ad.
389 - specifies the VLAN Identifer to use. Note that numbers with a leading " 0 " or " 0x " are interpreted as octal or hexadeimal, respectively.
391 .BR reorder_hdr " { " on " | " off " } "
392 - specifies whether ethernet headers are reordered or not (default is
397 .BR reorder_hdr " is " on
398 then VLAN header will be not inserted immediately but only before passing to the
399 physical device (if this device does not support VLAN offloading), the similar
400 on the RX direction - by default the packet will be untagged before being
401 received by VLAN device. Reordering allows to accelerate tagging on egress and
402 to hide VLAN header on ingress so the packet looks like regular Ethernet packet,
403 at the same time it might be confusing for packet capture as the VLAN header
404 does not exist within the packet.
406 VLAN offloading can be checked by
412 .RB grep " tx-vlan-offload"
415 where <phy_dev> is the physical device to which VLAN device is bound.
418 .BR gvrp " { " on " | " off " } "
419 - specifies whether this VLAN should be registered using GARP VLAN Registration Protocol.
421 .BR mvrp " { " on " | " off " } "
422 - specifies whether this VLAN should be registered using Multiple VLAN Registration Protocol.
424 .BR loose_binding " { " on " | " off " } "
425 - specifies whether the VLAN device state is bound to the physical device state.
427 .BI ingress-qos-map " QOS-MAP "
428 - defines a mapping of VLAN header prio field to the Linux internal packet
429 priority on incoming frames. The format is FROM:TO with multiple mappings
432 .BI egress-qos-map " QOS-MAP "
433 - defines a mapping of Linux internal packet priority to VLAN header prio field
434 but for outgoing frames. The format is the same as for ingress-qos-map.
437 Linux packet priority can be set by
442 -t mangle -A POSTROUTING [...] -j CLASSIFY --set-class 0:4
445 and this "4" priority can be used in the egress qos mapping to set VLAN prio "5":
449 link set veth0.10 type vlan egress 4:5
458 the following additional arguments are supported:
460 .BI "ip link add " DEVICE
461 .BI type " vxlan " id " VNI"
464 .RB " ] [ { " group " | " remote " } "
468 .RI "{ "IPADDR " | "any " } "
474 .BI flowlabel " FLOWLABEL "
478 .BI srcport " MIN MAX "
492 .RB [ no ] udp6zerocsumtx
494 .RB [ no ] udp6zerocsumrx
496 .BI ageing " SECONDS "
498 .BI maxaddress " NUMBER "
510 - specifies the VXLAN Network Identifer (or VXLAN Segment
514 - specifies the physical device to use for tunnel endpoint communication.
518 - specifies the multicast IP address to join.
519 This parameter cannot be specified with the
525 - specifies the unicast destination IP address to use in outgoing packets
526 when the destination link layer address is not known in the VXLAN device
527 forwarding database. This parameter cannot be specified with the
533 - specifies the source IP address to use in outgoing packets.
537 - specifies the TTL value to use in outgoing packets.
541 - specifies the TOS value to use in outgoing packets.
544 .BI flowlabel " FLOWLABEL"
545 - specifies the flow label to use in outgoing packets.
549 - specifies the UDP destination port to communicate to the remote VXLAN tunnel endpoint.
552 .BI srcport " MIN MAX"
553 - specifies the range of port numbers to use as UDP
554 source ports to communicate to the remote VXLAN tunnel endpoint.
558 - specifies if unknown source link layer addresses and IP addresses
559 are entered into the VXLAN device forwarding database.
563 - specifies if route short circuit is turned on.
567 - specifies ARP proxy is turned on.
571 - specifies if netlink LLADDR miss notifications are generated.
575 - specifies if netlink IP ADDR miss notifications are generated.
579 - specifies if UDP checksum is calculated for transmitted packets over IPv4.
582 .RB [ no ] udp6zerocsumtx
583 - skip UDP checksum calculation for transmitted packets over IPv6.
586 .RB [ no ] udp6zerocsumrx
587 - allow incoming UDP packets over IPv6 with zero checksum field.
590 .BI ageing " SECONDS"
591 - specifies the lifetime in seconds of FDB entries learnt by the kernel.
594 .BI maxaddress " NUMBER"
595 - specifies the maximum number of FDB entries.
599 - specifies whether an external control plane
600 .RB "(e.g. " "ip route encap" )
601 or the internal FDB should be used.
605 - enables the Group Policy extension (VXLAN-GBP).
608 Allows to transport group policy context across VXLAN network peers.
609 If enabled, includes the mark of a packet in the VXLAN header for outgoing
610 packets and fills the packet mark based on the information found in the
611 VXLAN header for incomming packets.
613 Format of upper 16 bits of packet mark (flags);
616 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
618 |-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|
620 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
623 Don't Learn bit. When set, this bit indicates that the egress
624 VTEP MUST NOT learn the source address of the encapsulated frame.
627 Indicates that the group policy has already been applied to
628 this packet. Policies MUST NOT be applied by devices when the A bit is set.
631 Format of lower 16 bits of packet mark (policy ID):
634 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
638 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
642 iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF
648 - enables the Generic Protocol extension (VXLAN-GPE). Currently, this is
649 only supported together with the
656 VETH, VXCAN Type Support
659 the following additional arguments are supported:
661 .BI "ip link add " DEVICE
662 .BR type " { " veth " | " vxcan " }"
672 - specifies the virtual pair device name of the
679 GRE, IPIP, SIT, ERSPAN Type Support
681 .I GRE/IPIP/SIT/ERSPAN
682 the following additional arguments are supported:
684 .BI "ip link add " DEVICE
685 .BR type " { " gre " | " ipip " | " sit " | " erspan " }"
686 .BI " remote " ADDR " local " ADDR
688 .BR encap " { " fou " | " gue " | " none " }"
690 .BR encap-sport " { " \fIPORT " | " auto " }"
692 .BI "encap-dport " PORT
694 .RB [ no ] encap-csum
696 .I " [no]encap-remcsum "
698 .I " mode " { ip6ip | ipip | mplsip | any } "
700 .BR erspan " \fIIDX "
708 - specifies the remote address of the tunnel.
712 - specifies the fixed local address for tunneled packets.
713 It must be an address on another interface on this host.
716 .BR encap " { " fou " | " gue " | " none " }"
717 - specifies type of secondary UDP encapsulation. "fou" indicates
718 Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
721 .BR encap-sport " { " \fIPORT " | " auto " }"
722 - specifies the source port in UDP encapsulation.
724 indicates the port by number, "auto"
725 indicates that the port number should be chosen automatically
726 (the kernel picks a flow based on the flow hash of the
727 encapsulated packet).
730 .RB [ no ] encap-csum
731 - specifies if UDP checksums are enabled in the secondary
735 .RB [ no ] encap-remcsum
736 - specifies if Remote Checksum Offload is enabled. This is only
737 applicable for Generic UDP Encapsulation.
740 .BI mode " { ip6ip | ipip | mplsip | any } "
741 - specifies mode in which device should run. "ip6ip" indicates
742 IPv6-Over-IPv4, "ipip" indicates "IPv4-Over-IPv4", "mplsip" indicates
743 MPLS-Over-IPv4, "any" indicates IPv6, IPv4 or MPLS Over IPv4. Supported for
744 SIT where the default is "ip6ip" and IPIP where the default is "ipip".
745 IPv6-Over-IPv4 is not supported for IPIP.
748 .BR erspan " \fIIDX "
749 - specifies the ERSPAN index field.
751 indicates a 20 bit index/port number associated with the ERSPAN
752 traffic's source port and direction.
756 - make this tunnel externally controlled
757 .RB "(e.g. " "ip route encap" ).
762 IP6GRE/IP6GRETAP Type Support
765 the following additional arguments are supported:
767 .BI "ip link add " DEVICE
768 .BR type " { " ip6gre " | " ip6gretap " }"
769 .BI remote " ADDR " local " ADDR"
780 .BI encaplimit " ELIM "
782 .BI tclass " TCLASS "
784 .BI flowlabel " FLOWLABEL "
794 - specifies the remote IPv6 address of the tunnel.
798 - specifies the fixed local IPv6 address for tunneled packets.
799 It must be an address on another interface on this host.
806 flag enables sequencing of outgoing packets.
809 flag requires that all input packets are serialized.
812 .RB [ i | o ] key " \fIKEY"
813 - use keyed GRE with key
815 is either a number or an IPv4 address-like dotted quad.
818 parameter specifies the same key to use in both directions.
820 .BR ikey " and " okey
821 parameters specify different keys for input and output.
825 - generate/require checksums for tunneled packets.
828 flag calculates checksums for outgoing packets.
831 flag requires that all input packets have the correct
834 flag is equivalent to the combination
839 - specifies Hop Limit value to use in outgoing packets.
842 .BI encaplimit " ELIM"
843 - specifies a fixed encapsulation limit. Default is 4.
846 .BI flowlabel " FLOWLABEL"
847 - specifies a fixed flowlabel.
851 - specifies the traffic class field on
852 tunneled packets, which can be specified as either a two-digit
853 hex value (e.g. c0) or a predefined string (e.g. internet).
856 causes the field to be copied from the original IP header. The
858 .BI "inherit/" STRING
860 .BI "inherit/" 00 ".." ff
861 will set the field to
865 when tunneling non-IP packets. The default value is 00.
873 the following additional arguments are supported:
875 .BI "ip link add " DEVICE " name " NAME
876 .BR "type ipoib " [ " pkey \fIPKEY" " ] [ " mode " \fIMODE \fR]"
881 - specifies the IB P-Key to use.
884 - specifies the mode (datagram or connected) to use.
890 the following additional arguments are supported:
892 .BI "ip link add " DEVICE
893 .BI type " geneve " id " VNI " remote " IPADDR"
899 .BI flowlabel " FLOWLABEL "
907 .RB [ no ] udp6zerocsumtx
909 .RB [ no ] udp6zerocsumrx
915 - specifies the Virtual Network Identifer to use.
919 - specifies the unicast destination IP address to use in outgoing packets.
923 - specifies the TTL value to use in outgoing packets.
927 - specifies the TOS value to use in outgoing packets.
930 .BI flowlabel " FLOWLABEL"
931 - specifies the flow label to use in outgoing packets.
935 - select a destination port other than the default of 6081.
939 - make this tunnel externally controlled (or not, which is the default). This
940 flag is mutually exclusive with the
944 .BR tos " and " flowlabel
949 - specifies if UDP checksum is calculated for transmitted packets over IPv4.
952 .RB [ no ] udp6zerocsumtx
953 - skip UDP checksum calculation for transmitted packets over IPv6.
956 .RB [ no ] udp6zerocsumrx
957 - allow incoming UDP packets over IPv6 with zero checksum field.
962 MACVLAN and MACVTAP Type Support
967 the following additional arguments are supported:
969 .BI "ip link add link " DEVICE " name " NAME
970 .BR type " { " macvlan " | " macvtap " } "
971 .BR mode " { " private " | " vepa " | " bridge " | " passthru
972 .RB " [ " nopromisc " ] | " source " } "
976 .BR type " { " macvlan " | " macvtap " } "
977 - specifies the link type to use.
978 .BR macvlan " creates just a virtual interface, while "
979 .BR macvtap " in addition creates a character device "
980 .BR /dev/tapX " to be used just like a " tuntap " device."
983 - Do not allow communication between
985 instances on the same physical interface, even if the external switch supports
989 - Virtual Ethernet Port Aggregator mode. Data from one
991 instance to the other on the same physical interface is transmitted over the
992 physical interface. Either the attached switch needs to support hairpin mode,
993 or there must be a TCP/IP router forwarding the packets in order to allow
994 communication. This is the default mode.
997 - In bridge mode, all endpoints are directly connected to each other,
998 communication is not redirected through the physical interface's peer.
1000 .BR mode " " passthru " [ " nopromisc " ] "
1001 - This mode gives more power to a single endpoint, usually in
1002 .BR macvtap " mode. It is not allowed for more than one endpoint on the same "
1003 physical interface. All traffic will be forwarded to this endpoint, allowing
1004 virtio guests to change MAC address or set promiscuous mode in order to bridge
1005 the interface or create vlan interfaces on top of it. By default, this mode
1006 forces the underlying interface into promiscuous mode. Passing the
1007 .BR nopromisc " flag prevents this, so the promisc flag may be controlled "
1008 using standard tools.
1011 - allows one to set a list of allowed mac address, which is used to match
1012 against source mac address from received frames on underlying interface. This
1013 allows creating mac based VLAN associations, instead of standard port or tag
1014 based. The feature is useful to deploy 802.1x mac based behavior,
1015 where drivers of underlying interfaces doesn't allows that.
1019 High-availability Seamless Redundancy (HSR) Support
1022 the following additional arguments are supported:
1024 .BI "ip link add link " DEVICE " name " NAME " type hsr"
1025 .BI slave1 " SLAVE1-IF " slave2 " SLAVE2-IF "
1026 .RB [ " supervision"
1027 .IR ADDR-BYTE " ] ["
1028 .BR version " { " 0 " | " 1 " } ]"
1033 - specifies the link type to use, here HSR.
1035 .BI slave1 " SLAVE1-IF "
1036 - Specifies the physical device used for the first of the two ring ports.
1038 .BI slave2 " SLAVE2-IF "
1039 - Specifies the physical device used for the second of the two ring ports.
1041 .BI supervision " ADDR-BYTE"
1042 - The last byte of the multicast address used for HSR supervision frames.
1043 Default option is "0", possible values 0-255.
1045 .BR version " { " 0 " | " 1 " }"
1046 - Selects the protocol version of the interface. Default option is "0", which
1047 corresponds to the 2010 version of the HSR standard. Option "1" activates the
1055 the following additional arguments are supported:
1057 .BI "ip link add " DEVICE " type bridge "
1059 .BI ageing_time " AGEING_TIME "
1061 .BI group_fwd_mask " MASK "
1063 .BI group_address " ADDRESS "
1065 .BI forward_delay " FORWARD_DELAY "
1067 .BI hello_time " HELLO_TIME "
1069 .BI max_age " MAX_AGE "
1071 .BI stp_state " STP_STATE "
1073 .BI priority " PRIORITY "
1075 .BI vlan_filtering " VLAN_FILTERING "
1077 .BI vlan_protocol " VLAN_PROTOCOL "
1079 .BI vlan_default_pvid " VLAN_DEFAULT_PVID "
1081 .BI vlan_stats_enabled " VLAN_STATS_ENABLED "
1083 .BI mcast_snooping " MULTICAST_SNOOPING "
1085 .BI mcast_router " MULTICAST_ROUTER "
1087 .BI mcast_query_use_ifaddr " MCAST_QUERY_USE_IFADDR "
1089 .BI mcast_querier " MULTICAST_QUERIER "
1091 .BI mcast_hash_elasticity " HASH_ELASTICITY "
1093 .BI mcast_hash_max " HASH_MAX "
1095 .BI mcast_last_member_count " LAST_MEMBER_COUNT "
1097 .BI mcast_startup_query_count " STARTUP_QUERY_COUNT "
1099 .BI mcast_last_member_interval " LAST_MEMBER_INTERVAL "
1101 .BI mcast_membership_interval " MEMBERSHIP_INTERVAL "
1103 .BI mcast_querier_interval " QUERIER_INTERVAL "
1105 .BI mcast_query_interval " QUERY_INTERVAL "
1107 .BI mcast_query_response_interval " QUERY_RESPONSE_INTERVAL "
1109 .BI mcast_startup_query_interval " STARTUP_QUERY_INTERVAL "
1111 .BI mcast_stats_enabled " MCAST_STATS_ENABLED "
1113 .BI mcast_igmp_version " IGMP_VERSION "
1115 .BI mcast_mld_version " MLD_VERSION "
1117 .BI nf_call_iptables " NF_CALL_IPTABLES "
1119 .BI nf_call_ip6tables " NF_CALL_IP6TABLES "
1121 .BI nf_call_arptables " NF_CALL_ARPTABLES "
1126 .BI ageing_time " AGEING_TIME "
1127 - configure the bridge's FDB entries ageing time, ie the number of seconds a MAC address will be kept in the FDB after a packet has been received from that address. after this time has passed, entries are cleaned up.
1129 .BI group_fwd_mask " MASK "
1130 - set the group forward mask. This is the bitmask that is applied to decide whether to forward incoming frames destined to link-local addresses, ie addresses of the form 01:80:C2:00:00:0X (defaults to 0, ie the bridge does not forward any link-local frames).
1132 .BI group_address " ADDRESS "
1133 - set the MAC address of the multicast group this bridge uses for STP. The address must be a link-local address in standard Ethernet MAC address format, ie an address of the form 01:80:C2:00:00:0X, with X in [0, 4..f].
1135 .BI forward_delay " FORWARD_DELAY "
1136 - set the forwarding delay in seconds, ie the time spent in LISTENING state (before moving to LEARNING) and in LEARNING state (before moving to FORWARDING). Only relevant if STP is enabled. Valid values are between 2 and 30.
1138 .BI hello_time " HELLO_TIME "
1139 - set the time in seconds between hello packets sent by the bridge, when it is a root bridge or a designated bridges. Only relevant if STP is enabled. Valid values are between 1 and 10.
1141 .BI max_age " MAX_AGE "
1142 - set the hello packet timeout, ie the time in seconds until another bridge in the spanning tree is assumed to be dead, after reception of its last hello message. Only relevant if STP is enabled. Valid values are between 6 and 40.
1144 .BI stp_state " STP_STATE "
1145 - turn spanning tree protocol on
1146 .RI ( STP_STATE " > 0) "
1148 .RI ( STP_STATE " == 0). "
1151 .BI priority " PRIORITY "
1152 - set this bridge's spanning tree priority, used during STP root bridge election.
1154 is a 16bit unsigned integer.
1156 .BI vlan_filtering " VLAN_FILTERING "
1157 - turn VLAN filtering on
1158 .RI ( VLAN_FILTERING " > 0) "
1160 .RI ( VLAN_FILTERING " == 0). "
1161 When disabled, the bridge will not consider the VLAN tag when handling packets.
1163 .BR vlan_protocol " { " 802.1Q " | " 802.1ad " } "
1164 - set the protocol used for VLAN filtering.
1166 .BI vlan_default_pvid " VLAN_DEFAULT_PVID "
1167 - set the default PVID (native/untagged VLAN ID) for this bridge.
1169 .BI vlan_stats_enabled " VLAN_STATS_ENABLED "
1171 .RI ( VLAN_STATS_ENABLED " == 1) "
1173 .RI ( VLAN_STATS_ENABLED " == 0) "
1174 per-VLAN stats accounting.
1176 .BI mcast_snooping " MULTICAST_SNOOPING "
1177 - turn multicast snooping on
1178 .RI ( MULTICAST_SNOOPING " > 0) "
1180 .RI ( MULTICAST_SNOOPING " == 0). "
1182 .BI mcast_router " MULTICAST_ROUTER "
1183 - set bridge's multicast router if IGMP snooping is enabled.
1185 is an integer value having the following meaning:
1192 - automatic (queried).
1195 - permanently enabled.
1198 .BI mcast_query_use_ifaddr " MCAST_QUERY_USE_IFADDR "
1199 - whether to use the bridge's own IP address as source address for IGMP queries
1200 .RI ( MCAST_QUERY_USE_IFADDR " > 0) "
1201 or the default of 0.0.0.0
1202 .RI ( MCAST_QUERY_USE_IFADDR " == 0). "
1204 .BI mcast_querier " MULTICAST_QUERIER "
1206 .RI ( MULTICAST_QUERIER " > 0) "
1208 .RI ( MULTICAST_QUERIER " == 0) "
1209 IGMP querier, ie sending of multicast queries by the bridge (default: disabled).
1211 .BI mcast_querier_interval " QUERIER_INTERVAL "
1212 - interval between queries sent by other routers. if no queries are seen after this delay has passed, the bridge will start to send its own queries (as if
1216 .BI mcast_hash_elasticity " HASH_ELASTICITY "
1217 - set multicast database hash elasticity, ie the maximum chain length in the multicast hash table (defaults to 4).
1219 .BI mcast_hash_max " HASH_MAX "
1220 - set maximum size of multicast hash table (defaults to 512, value must be a power of 2).
1222 .BI mcast_last_member_count " LAST_MEMBER_COUNT "
1223 - set multicast last member count, ie the number of queries the bridge will send before stopping forwarding a multicast group after a "leave" message has been received (defaults to 2).
1225 .BI mcast_last_member_interval " LAST_MEMBER_INTERVAL "
1226 - interval between queries to find remaining members of a group, after a "leave" message is received.
1228 .BI mcast_startup_query_count " STARTUP_QUERY_COUNT "
1229 - set the number of IGMP queries to send during startup phase (defaults to 2).
1231 .BI mcast_startup_query_interval " STARTUP_QUERY_INTERVAL "
1232 - interval between queries in the startup phase.
1234 .BI mcast_query_interval " QUERY_INTERVAL "
1235 - interval between queries sent by the bridge after the end of the startup phase.
1237 .BI mcast_query_response_interval " QUERY_RESPONSE_INTERVAL "
1238 - set the Max Response Time/Maximum Response Delay for IGMP/MLD queries sent by the bridge.
1240 .BI mcast_membership_interval " MEMBERSHIP_INTERVAL "
1241 - delay after which the bridge will leave a group, if no membership reports for this group are received.
1243 .BI mcast_stats_enabled " MCAST_STATS_ENABLED "
1245 .RI ( MCAST_STATS_ENABLED " > 0) "
1247 .RI ( MCAST_STATS_ENABLED " == 0) "
1248 multicast (IGMP/MLD) stats accounting.
1250 .BI mcast_igmp_version " IGMP_VERSION "
1251 - set the IGMP version.
1253 .BI mcast_mld_version " MLD_VERSION "
1254 - set the MLD version.
1256 .BI nf_call_iptables " NF_CALL_IPTABLES "
1258 .RI ( NF_CALL_IPTABLES " > 0) "
1260 .RI ( NF_CALL_IPTABLES " == 0) "
1261 iptables hooks on the bridge.
1263 .BI nf_call_ip6tables " NF_CALL_IP6TABLES "
1265 .RI ( NF_CALL_IP6TABLES " > 0) "
1267 .RI ( NF_CALL_IP6TABLES " == 0) "
1268 ip6tables hooks on the bridge.
1270 .BI nf_call_arptables " NF_CALL_ARPTABLES "
1272 .RI ( NF_CALL_ARPTABLES " > 0) "
1274 .RI ( NF_CALL_ARPTABLES " == 0) "
1275 arptables hooks on the bridge.
1284 the following additional arguments are supported:
1286 .BI "ip link add link " DEVICE " name " NAME " type macsec"
1288 .BI address " <lladdr>"
1294 .BI cipher " CIPHER_SUITE"
1299 .BR on " | " off " } ] [ "
1300 .BR send_sci " { " on " | " off " } ] ["
1301 .BR end_station " { " on " | " off " } ] ["
1302 .BR scb " { " on " | " off " } ] ["
1303 .BR protect " { " on " | " off " } ] ["
1304 .BR replay " { " on " | " off " }"
1306 .IR 0..2^32-1 " } ] ["
1307 .BR validate " { " strict " | " check " | " disabled " } ] ["
1308 .BR encodingsa " { "
1313 .BI address " <lladdr> "
1314 - sets the system identifier component of secure channel for this MACsec device.
1318 - sets the port number component of secure channel for this MACsec device, in a
1319 range from 1 to 65535 inclusive. Numbers with a leading " 0 " or " 0x " are
1320 interpreted as octal and hexadecimal, respectively.
1324 - sets the secure channel identifier for this MACsec device.
1326 is a 64bit wide number in hexadecimal format.
1329 .BI cipher " CIPHER_SUITE "
1330 - defines the cipher suite to use.
1333 .BI icvlen " LENGTH "
1334 - sets the length of the Integrity Check Value (ICV).
1337 .BR "encrypt on " or " encrypt off"
1338 - switches between authenticated encryption, or authenticity mode only.
1341 .BR "send_sci on " or " send_sci off"
1342 - specifies whether the SCI is included in every packet, or only when it is necessary.
1345 .BR "end_station on " or " end_station off"
1346 - sets the End Station bit.
1349 .BR "scb on " or " scb off"
1350 - sets the Single Copy Broadcast bit.
1353 .BR "protect on " or " protect off"
1354 - enables MACsec protection on the device.
1357 .BR "replay on " or " replay off"
1358 - enables replay protection on the device.
1364 - sets the size of the replay window.
1369 .BR "validate strict " or " validate check " or " validate disabled"
1370 - sets the validation mode on the device.
1373 .BI encodingsa " AN "
1374 - sets the active secure association for transmission.
1382 the following additional arguments are supported:
1384 .BI "ip link add " DEVICE " type vrf table " TABLE
1388 .BR table " table id associated with VRF device"
1392 .SS ip link delete - delete virtual link
1396 specifies the virtual device to act operate on.
1400 specifies the group of virtual links to delete. Group 0 is not allowed to be
1401 deleted since it is the default group.
1405 specifies the type of the device.
1407 .SS ip link set - change device attributes
1411 If multiple parameter changes are requested,
1413 aborts immediately after any of the changes have failed.
1414 This is the only case when
1416 can move the system to an unpredictable state. The solution
1417 is to avoid changing several parameters with one
1424 specifies network device to operate on. When configuring SR-IOV Virtual Function
1425 (VF) devices, this keyword should specify the associated Physical Function (PF)
1431 has a dual role: If both group and dev are present, then move the device to the
1432 specified group. If only a group is specified, then the command operates on
1433 all devices in that group.
1437 change the state of the device to
1443 .BR "arp on " or " arp off"
1449 .BR "multicast on " or " multicast off"
1455 .BR "protodown on " or " protodown off"
1458 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.
1461 .BR "dynamic on " or " dynamic off"
1464 flag on the device. Indicates that address can change when interface goes down (currently
1470 change the name of the device. This operation is not
1471 recommended if the device is running or has some addresses
1475 .BI txqueuelen " NUMBER"
1477 .BI txqlen " NUMBER"
1478 change the transmit queue length of the device.
1487 .BI address " LLADDRESS"
1488 change the station address of the interface.
1491 .BI broadcast " LLADDRESS"
1493 .BI brd " LLADDRESS"
1495 .BI peer " LLADDRESS"
1496 change the link layer broadcast address or the peer address when
1501 .BI netns " NETNSNAME " \fR| " PID"
1502 move the device to the network namespace associated with name
1506 Some devices are not allowed to change network namespace: loopback, bridge,
1507 ppp, wireless. These are network namespace local devices. In such case
1509 tool will return "Invalid argument" error. It is possible to find out if device is local
1510 to a single network namespace by checking
1512 flag in the output of the
1520 To change network namespace for wireless devices the
1522 tool can be used. But it allows to change network namespace only for physical devices and by process
1527 give the device a symbolic name for easy reference.
1531 specify the group the device belongs to.
1532 The available groups are listed in file
1533 .BR "@SYSCONFDIR@/group" .
1537 specify a Virtual Function device to be configured. The associated PF device
1538 must be specified using the
1543 .BI mac " LLADDRESS"
1544 - change the station address for the specified VF. The
1546 parameter must be specified.
1550 - change the assigned VLAN for the specified VF. When specified, all traffic
1551 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
1552 will be filtered for the specified VLAN ID, and will have all VLAN tags
1553 stripped before being passed to the VF. Setting this parameter to 0 disables
1554 VLAN tagging and filtering. The
1556 parameter must be specified.
1560 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
1561 tags transmitted by the VF will include the specified priority bits in the
1562 VLAN tag. If not specified, the value is assumed to be 0. Both the
1566 parameters must be specified. Setting both
1570 as 0 disables VLAN tagging and filtering for the VF.
1573 .BI proto " VLAN-PROTO"
1574 - assign VLAN PROTOCOL for the VLAN tag, either 802.1Q or 802.1ad.
1575 Setting to 802.1ad, all traffic sent from the VF will be tagged with VLAN S-Tag.
1576 Incoming traffic will have VLAN S-Tags stripped before being passed to the VF.
1577 Setting to 802.1ad also enables an option to concatenate another VLAN tag, so both
1578 S-TAG and C-TAG will be inserted/stripped for outgoing/incoming traffic, respectively.
1579 If not specified, the value is assumed to be 802.1Q. Both the
1583 parameters must be specified.
1587 -- change the allowed transmit bandwidth, in Mbps, for the specified VF.
1588 Setting this parameter to 0 disables rate limiting.
1590 parameter must be specified.
1596 .BI max_tx_rate " TXRATE"
1597 - change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
1599 parameter must be specified.
1602 .BI min_tx_rate " TXRATE"
1603 - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
1604 Minimum TXRATE should be always <= Maximum TXRATE.
1606 parameter must be specified.
1609 .BI spoofchk " on|off"
1610 - turn packet spoof checking on or off for the specified VF.
1612 .BI query_rss " on|off"
1613 - toggle the ability of querying the RSS configuration of a specific VF. VF RSS information like RSS hash key may be considered sensitive on some devices where this information is shared between VF and PF and thus its querying may be prohibited by default.
1615 .BI state " auto|enable|disable"
1616 - set the virtual link state as seen by the specified VF. Setting to auto means a
1617 reflection of the PF link state, enable lets the VF to communicate with other VFs on
1618 this host even if the PF link state is down, disable causes the HW to drop any packets
1622 - trust the specified VF user. This enables that VF user can set a specific feature
1623 which may impact security and/or performance. (e.g. VF multicast promiscuous mode)
1625 .BI node_guid " eui64"
1626 - configure node GUID for Infiniband VFs.
1628 .BI port_guid " eui64"
1629 - configure port GUID for Infiniband VFs.
1633 .B xdp object "|" pinned "|" off
1634 set (or unset) a XDP ("eXpress Data Path") BPF program to run on every
1635 packet at driver level.
1637 output will indicate a
1639 flag for the networking device. If the driver does not have native XDP
1640 support, the kernel will fall back to a slower, driver-independent "generic"
1643 output will in that case indicate
1647 only. If the driver does have native XDP support, but the program is
1649 .B xdpgeneric object "|" pinned
1650 then the kernel will use the generic XDP variant instead of the native one.
1652 has the opposite effect of requestsing that the automatic fallback to the
1653 generic XDP variant be disabled and in case driver is not XDP-capable error
1656 also disables hardware offloads.
1658 in ip link output indicates that the program has been offloaded to hardware
1659 and can also be used to request the "offload" mode, much like
1661 it forces program to be installed specifically in HW/FW of the apater.
1667 - Detaches any currently attached XDP/BPF program from the given device.
1670 - Attaches a XDP/BPF program to the given device. The
1672 points to a BPF ELF file (f.e. generated by LLVM) that contains the BPF
1673 program code, map specifications, etc. If a XDP/BPF program is already
1674 attached to the given device, an error will be thrown. If no XDP/BPF
1675 program is currently attached, the device supports XDP and the program
1676 from the BPF ELF file passes the kernel verifier, then it will be attached
1677 to the device. If the option
1681 then any prior attached XDP/BPF program will be atomically overridden and
1682 no error will be thrown in this case. If no
1684 option is passed, then the default section name ("prog") will be assumed,
1685 otherwise the provided section name will be used. If no
1687 option is passed, then a verifier log will only be dumped on load error.
1690 section for usage examples.
1692 .BI section " NAME "
1693 - Specifies a section name that contains the BPF program code. If no section
1694 name is specified, the default one ("prog") will be used. This option is
1695 to be passed with the
1700 - Act in verbose mode. For example, even in case of success, this will
1701 print the verifier log in case a program was loaded from a BPF ELF file.
1704 - Attaches a XDP/BPF program to the given device. The
1706 points to an already pinned BPF program in the BPF file system. The option
1708 doesn't apply here, but otherwise semantics are the same as with the option
1713 .BI master " DEVICE"
1714 set master device of the device (enslave device).
1718 unset master device of the device (release device).
1721 .BI addrgenmode " eui64|none|stable_secret|random"
1722 set the IPv6 address generation mode
1725 - use a Modified EUI-64 format interface identifier
1728 - disable automatic address generation
1731 - generate the interface identifier based on a preset /proc/sys/net/ipv6/conf/{default,DEVICE}/stable_secret
1734 - like stable_secret, but auto-generate a new random secret if none is set
1738 set peer netnsid for a cross-netns interface
1741 .BI type " ETYPE TYPE_ARGS"
1742 Change type-specific settings. For a list of supported types and arguments refer
1743 to the description of
1745 above. In addition to that, it is possible to manipulate settings to slave
1749 Bridge Slave Support
1750 For a link with master
1752 the following additional arguments are supported:
1754 .B "ip link set type bridge_slave"
1760 .BI priority " PRIO"
1764 .BR guard " { " on " | " off " }"
1766 .BR hairpin " { " on " | " off " }"
1768 .BR fastleave " { " on " | " off " }"
1770 .BR root_block " { " on " | " off " }"
1772 .BR learning " { " on " | " off " }"
1774 .BR flood " { " on " | " off " }"
1776 .BR proxy_arp " { " on " | " off " }"
1778 .BR proxy_arp_wifi " { " on " | " off " }"
1780 .BI mcast_router " MULTICAST_ROUTER"
1782 .BR mcast_fast_leave " { " on " | " off "}"
1784 .BR mcast_flood " { " on " | " off " }"
1786 .BR group_fwd_mask " MASK"
1788 .BR neigh_suppress " { " on " | " off " } ]"
1790 .BR vlan_tunnel " { " on " | " off " } ]"
1795 - flush bridge slave's fdb dynamic entries.
1800 is a number representing the following states:
1801 .BR 0 " (disabled),"
1802 .BR 1 " (listening),"
1803 .BR 2 " (learning),"
1804 .BR 3 " (forwarding),"
1805 .BR 4 " (blocking)."
1807 .BI priority " PRIO"
1808 - set port priority (allowed values are between 0 and 63, inclusively).
1811 - set port cost (allowed values are between 1 and 65535, inclusively).
1813 .BR guard " { " on " | " off " }"
1814 - block incoming BPDU packets on this port.
1816 .BR hairpin " { " on " | " off " }"
1817 - enable hairpin mode on this port. This will allow incoming packets on this
1818 port to be reflected back.
1820 .BR fastleave " { " on " | " off " }"
1821 - enable multicast fast leave on this port.
1823 .BR root_block " { " on " | " off " }"
1824 - block this port from becoming the bridge's root port.
1826 .BR learning " { " on " | " off " }"
1827 - allow MAC address learning on this port.
1829 .BR flood " { " on " | " off " }"
1830 - open the flood gates on this port, i.e. forward all unicast frames to this
1832 .BR proxy_arp " and " proxy_arp_wifi
1835 .BR proxy_arp " { " on " | " off " }"
1836 - enable proxy ARP on this port.
1838 .BR proxy_arp_wifi " { " on " | " off " }"
1839 - enable proxy ARP on this port which meets extended requirements by IEEE
1840 802.11 and Hotspot 2.0 specifications.
1842 .BI mcast_router " MULTICAST_ROUTER"
1843 - configure this port for having multicast routers attached. A port with a
1844 multicast router will receive all multicast traffic.
1848 to disable multicast routers on this port,
1850 to let the system detect the presence of of routers (this is the default),
1852 to permanently enable multicast traffic forwarding on this port or
1854 to enable multicast routers temporarily on this port, not depending on incoming
1857 .BR mcast_fast_leave " { " on " | " off " }"
1858 - this is a synonym to the
1862 .BR mcast_flood " { " on " | " off " }"
1863 - controls whether a given port will be flooded with multicast traffic for which there is no MDB entry.
1865 .BI group_fwd_mask " MASK "
1866 - set the group forward mask. This is the bitmask that is applied to decide whether to forward incoming frames destined to link-local addresses, ie addresses of the form 01:80:C2:00:00:0X (defaults to 0, ie the bridge does not forward any link-local frames coming on this port).
1868 .BR neigh_suppress " { " on " | " off " }"
1869 - controls whether neigh discovery (arp and nd) proxy and suppression is enabled on the port. By default this flag is off.
1871 .BR vlan_tunnel " { " on " | " off " }"
1872 - Controls whether vlan to tunnel mapping is enabled on the port. By default this flag is off.
1877 Bonding Slave Support
1878 For a link with master
1880 the following additional arguments are supported:
1882 .B "ip link set type bond_slave"
1890 - set the slave's queue ID (a 16bit unsigned value).
1895 MACVLAN and MACVTAP Support
1896 Modify list of allowed macaddr for link in source mode.
1898 .B "ip link set type { macvlan | macvap } "
1900 .BI macaddr " " "" COMMAND " " MACADDR " ..."
1906 - add MACADDR to allowed list
1909 - replace allowed list
1912 - remove MACADDR from allowed list
1915 - flush whole allowed list
1920 .SS ip link show - display device attributes
1923 .BI dev " NAME " (default)
1925 specifies the network device to show.
1926 If this argument is omitted all devices in the default group are listed.
1931 specifies what group of devices to show.
1935 only display running interfaces.
1938 .BI master " DEVICE "
1940 specifies the master device which enslaves devices to show.
1945 speficies the VRF which enslaves devices to show.
1950 specifies the type of devices to show.
1952 Note that the type name is not checked against the list of supported types -
1953 instead it is sent as-is to the kernel. Later it is used to filter the returned
1954 interface list by comparing it with the relevant attribute in case the kernel
1955 didn't filter already. Therefore any string is accepted, but may lead to empty
1958 .SS ip link xstats - display extended statistics
1963 specifies the type of devices to display extended statistics for.
1965 .SS ip link afstats - display address-family specific statistics
1970 specifies the device to display address-family statistics for.
1972 .SS ip link help - display help
1976 specifies which help of link type to dislpay.
1980 may be a number or a string from the file
1981 .B @SYSCONFDIR@/group
1982 which can be manually filled.
1988 Shows the state of all network interfaces on the system.
1991 ip link show type bridge
1993 Shows the bridge devices.
1996 ip link show type vlan
1998 Shows the vlan devices.
2001 ip link show master br0
2003 Shows devices enslaved by br0
2006 ip link set dev ppp0 mtu 1400
2008 Change the MTU the ppp0 device.
2011 ip link add link eth0 name eth0.10 type vlan id 10
2013 Creates a new vlan device eth0.10 on device eth0.
2016 ip link delete dev eth0.10
2018 Removes vlan device.
2023 Display help for the gre link type.
2026 ip link add name tun1 type ipip remote 192.168.1.1
2027 local 192.168.1.2 ttl 225 encap gue encap-sport auto
2028 encap-dport 5555 encap-csum encap-remcsum
2030 Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
2031 and the outer UDP checksum and remote checksum offload are enabled.
2034 ip link set dev eth0 xdp obj prog.o
2036 Attaches a XDP/BPF program to device eth0, where the program is
2037 located in prog.o, section "prog" (default section). In case a
2038 XDP/BPF program is already attached, throw an error.
2041 ip -force link set dev eth0 xdp obj prog.o sec foo
2043 Attaches a XDP/BPF program to device eth0, where the program is
2044 located in prog.o, section "foo". In case a XDP/BPF program is
2045 already attached, it will be overridden by the new one.
2048 ip -force link set dev eth0 xdp pinned /sys/fs/bpf/foo
2050 Attaches a XDP/BPF program to device eth0, where the program was
2051 previously pinned as an object node into BPF file system under
2055 ip link set dev eth0 xdp off
2057 If a XDP/BPF program is attached on device eth0, detach it and
2058 effectively turn off XDP for device eth0.
2061 ip link add link wpan0 lowpan0 type lowpan
2063 Creates a 6LoWPAN interface named lowpan0 on the underlying
2064 IEEE 802.15.4 device wpan0.
2075 Original Manpage by Michail Litvak <mci@owl.openwall.com>