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 " | "
217 .IR ETYPE " := [ " TYPE " |"
218 .BR bridge_slave " | " bond_slave " ]"
221 .IR VFVLAN-LIST " := [ " VFVLAN-LIST " ] " VFVLAN
230 .IR VLAN-PROTO " ] ]"
233 .SS ip link add - add virtual link
237 specifies the physical device to act operate on.
240 specifies the name of the new virtual device.
243 specifies the type of the new device.
249 - Ethernet Bridge device
254 - Controller Area Network interface
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 ethernet interface
281 - 802.1q tagged virtual LAN interface
284 - Virtual eXtended LAN
287 - Virtual tunnel interface IPv4|IPv6 over IPv6
290 - Virtual tunnel interface IPv4 over IPv4
293 - Virtual tunnel interface IPv6 over IPv4
296 - Virtual tunnel interface GRE over IPv4
299 - Virtual L2 tunnel interface GRE over IPv4
302 - Encapsulated Remote SPAN over GRE and IPv4
305 - Virtual tunnel interface GRE over IPv6
308 - Virtual L2 tunnel interface GRE over IPv6
311 - Virtual tunnel interface
314 - Netlink monitoring device
317 - Interface for L3 (IPv6/IPv4) based VLANs
320 - Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 / Bluetooth
323 - GEneric NEtwork Virtualization Encapsulation
326 - Interface for IEEE 802.1AE MAC Security (MACsec)
329 - Interface for L3 VRF domains
333 .BI numtxqueues " QUEUE_COUNT "
334 specifies the number of transmit queues for new device.
337 .BI numrxqueues " QUEUE_COUNT "
338 specifies the number of receive queues for new device.
342 specifies the desired index of the new virtual device. The link creation fails, if the index is busy.
348 the following additional arguments are supported:
355 .BI protocol " VLAN_PROTO "
359 .BR reorder_hdr " { " on " | " off " } "
362 .BR gvrp " { " on " | " off " } "
365 .BR mvrp " { " on " | " off " } "
368 .BR loose_binding " { " on " | " off " } "
371 .BI ingress-qos-map " QOS-MAP "
374 .BI egress-qos-map " QOS-MAP "
379 .BI protocol " VLAN_PROTO "
380 - either 802.1Q or 802.1ad.
383 - specifies the VLAN Identifer to use. Note that numbers with a leading " 0 " or " 0x " are interpreted as octal or hexadeimal, respectively.
385 .BR reorder_hdr " { " on " | " off " } "
386 - specifies whether ethernet headers are reordered or not (default is
391 .BR reorder_hdr " is " on
392 then VLAN header will be not inserted immediately but only before passing to the
393 physical device (if this device does not support VLAN offloading), the similar
394 on the RX direction - by default the packet will be untagged before being
395 received by VLAN device. Reordering allows to accelerate tagging on egress and
396 to hide VLAN header on ingress so the packet looks like regular Ethernet packet,
397 at the same time it might be confusing for packet capture as the VLAN header
398 does not exist within the packet.
400 VLAN offloading can be checked by
406 .RB grep " tx-vlan-offload"
409 where <phy_dev> is the physical device to which VLAN device is bound.
412 .BR gvrp " { " on " | " off " } "
413 - specifies whether this VLAN should be registered using GARP VLAN Registration Protocol.
415 .BR mvrp " { " on " | " off " } "
416 - specifies whether this VLAN should be registered using Multiple VLAN Registration Protocol.
418 .BR loose_binding " { " on " | " off " } "
419 - specifies whether the VLAN device state is bound to the physical device state.
421 .BI ingress-qos-map " QOS-MAP "
422 - defines a mapping of VLAN header prio field to the Linux internal packet
423 priority on incoming frames. The format is FROM:TO with multiple mappings
426 .BI egress-qos-map " QOS-MAP "
427 - defines a mapping of Linux internal packet priority to VLAN header prio field
428 but for outgoing frames. The format is the same as for ingress-qos-map.
431 Linux packet priority can be set by
436 -t mangle -A POSTROUTING [...] -j CLASSIFY --set-class 0:4
439 and this "4" priority can be used in the egress qos mapping to set VLAN prio "5":
443 link set veth0.10 type vlan egress 4:5
452 the following additional arguments are supported:
454 .BI "ip link add " DEVICE
455 .BI type " vxlan " id " VNI"
458 .RB " ] [ { " group " | " remote " } "
462 .RI "{ "IPADDR " | "any " } "
468 .BI flowlabel " FLOWLABEL "
472 .BI srcport " MIN MAX "
486 .RB [ no ] udp6zerocsumtx
488 .RB [ no ] udp6zerocsumrx
490 .BI ageing " SECONDS "
492 .BI maxaddress " NUMBER "
504 - specifies the VXLAN Network Identifer (or VXLAN Segment
508 - specifies the physical device to use for tunnel endpoint communication.
512 - specifies the multicast IP address to join.
513 This parameter cannot be specified with the
519 - specifies the unicast destination IP address to use in outgoing packets
520 when the destination link layer address is not known in the VXLAN device
521 forwarding database. This parameter cannot be specified with the
527 - specifies the source IP address to use in outgoing packets.
531 - specifies the TTL value to use in outgoing packets.
535 - specifies the TOS value to use in outgoing packets.
538 .BI flowlabel " FLOWLABEL"
539 - specifies the flow label to use in outgoing packets.
543 - specifies the UDP destination port to communicate to the remote VXLAN tunnel endpoint.
546 .BI srcport " MIN MAX"
547 - specifies the range of port numbers to use as UDP
548 source ports to communicate to the remote VXLAN tunnel endpoint.
552 - specifies if unknown source link layer addresses and IP addresses
553 are entered into the VXLAN device forwarding database.
557 - specifies if route short circuit is turned on.
561 - specifies ARP proxy is turned on.
565 - specifies if netlink LLADDR miss notifications are generated.
569 - specifies if netlink IP ADDR miss notifications are generated.
573 - specifies if UDP checksum is calculated for transmitted packets over IPv4.
576 .RB [ no ] udp6zerocsumtx
577 - skip UDP checksum calculation for transmitted packets over IPv6.
580 .RB [ no ] udp6zerocsumrx
581 - allow incoming UDP packets over IPv6 with zero checksum field.
584 .BI ageing " SECONDS"
585 - specifies the lifetime in seconds of FDB entries learnt by the kernel.
588 .BI maxaddress " NUMBER"
589 - specifies the maximum number of FDB entries.
593 - specifies whether an external control plane
594 .RB "(e.g. " "ip route encap" )
595 or the internal FDB should be used.
599 - enables the Group Policy extension (VXLAN-GBP).
602 Allows to transport group policy context across VXLAN network peers.
603 If enabled, includes the mark of a packet in the VXLAN header for outgoing
604 packets and fills the packet mark based on the information found in the
605 VXLAN header for incomming packets.
607 Format of upper 16 bits of packet mark (flags);
610 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
612 |-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|
614 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
617 Don't Learn bit. When set, this bit indicates that the egress
618 VTEP MUST NOT learn the source address of the encapsulated frame.
621 Indicates that the group policy has already been applied to
622 this packet. Policies MUST NOT be applied by devices when the A bit is set.
625 Format of lower 16 bits of packet mark (policy ID):
628 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
632 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
636 iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF
642 - enables the Generic Protocol extension (VXLAN-GPE). Currently, this is
643 only supported together with the
650 GRE, IPIP, SIT, ERSPAN Type Support
652 .I GRE/IPIP/SIT/ERSPAN
653 the following additional arguments are supported:
655 .BI "ip link add " DEVICE
656 .BR type " { " gre " | " ipip " | " sit " | " erspan " }"
657 .BI " remote " ADDR " local " ADDR
659 .BR encap " { " fou " | " gue " | " none " }"
661 .BR encap-sport " { " \fIPORT " | " auto " }"
663 .BI "encap-dport " PORT
665 .RB [ no ] encap-csum
667 .I " [no]encap-remcsum "
669 .I " mode " { ip6ip | ipip | mplsip | any } "
671 .BR erspan " \fIIDX "
677 - specifies the remote address of the tunnel.
681 - specifies the fixed local address for tunneled packets.
682 It must be an address on another interface on this host.
685 .BR encap " { " fou " | " gue " | " none " }"
686 - specifies type of secondary UDP encapsulation. "fou" indicates
687 Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
690 .BR encap-sport " { " \fIPORT " | " auto " }"
691 - specifies the source port in UDP encapsulation.
693 indicates the port by number, "auto"
694 indicates that the port number should be chosen automatically
695 (the kernel picks a flow based on the flow hash of the
696 encapsulated packet).
699 .RB [ no ] encap-csum
700 - specifies if UDP checksums are enabled in the secondary
704 .RB [ no ] encap-remcsum
705 - specifies if Remote Checksum Offload is enabled. This is only
706 applicable for Generic UDP Encapsulation.
709 .BI mode " { ip6ip | ipip | mplsip | any } "
710 - specifies mode in which device should run. "ip6ip" indicates
711 IPv6-Over-IPv4, "ipip" indicates "IPv4-Over-IPv4", "mplsip" indicates
712 MPLS-Over-IPv4, "any" indicates IPv6, IPv4 or MPLS Over IPv4. Supported for
713 SIT where the default is "ip6ip" and IPIP where the default is "ipip".
714 IPv6-Over-IPv4 is not supported for IPIP.
717 .BR erspan " \fIIDX "
718 - specifies the ERSPAN index field.
720 indicates a 20 bit index/port number associated with the ERSPAN
721 traffic's source port and direction.
726 IP6GRE/IP6GRETAP Type Support
729 the following additional arguments are supported:
731 .BI "ip link add " DEVICE
732 .BR type " { " ip6gre " | " ip6gretap " }"
733 .BI remote " ADDR " local " ADDR"
744 .BI encaplimit " ELIM "
746 .BI tclass " TCLASS "
748 .BI flowlabel " FLOWLABEL "
758 - specifies the remote IPv6 address of the tunnel.
762 - specifies the fixed local IPv6 address for tunneled packets.
763 It must be an address on another interface on this host.
770 flag enables sequencing of outgoing packets.
773 flag requires that all input packets are serialized.
776 .RB [ i | o ] key " \fIKEY"
777 - use keyed GRE with key
779 is either a number or an IPv4 address-like dotted quad.
782 parameter specifies the same key to use in both directions.
784 .BR ikey " and " okey
785 parameters specify different keys for input and output.
789 - generate/require checksums for tunneled packets.
792 flag calculates checksums for outgoing packets.
795 flag requires that all input packets have the correct
798 flag is equivalent to the combination
803 - specifies Hop Limit value to use in outgoing packets.
806 .BI encaplimit " ELIM"
807 - specifies a fixed encapsulation limit. Default is 4.
810 .BI flowlabel " FLOWLABEL"
811 - specifies a fixed flowlabel.
815 - specifies the traffic class field on
816 tunneled packets, which can be specified as either a two-digit
817 hex value (e.g. c0) or a predefined string (e.g. internet).
820 causes the field to be copied from the original IP header. The
822 .BI "inherit/" STRING
824 .BI "inherit/" 00 ".." ff
825 will set the field to
829 when tunneling non-IP packets. The default value is 00.
837 the following additional arguments are supported:
839 .BI "ip link add " DEVICE " name " NAME
840 .BR "type ipoib " [ " pkey \fIPKEY" " ] [ " mode " \fIMODE \fR]"
845 - specifies the IB P-Key to use.
848 - specifies the mode (datagram or connected) to use.
854 the following additional arguments are supported:
856 .BI "ip link add " DEVICE
857 .BI type " geneve " id " VNI " remote " IPADDR"
863 .BI flowlabel " FLOWLABEL "
871 .RB [ no ] udp6zerocsumtx
873 .RB [ no ] udp6zerocsumrx
879 - specifies the Virtual Network Identifer to use.
883 - specifies the unicast destination IP address to use in outgoing packets.
887 - specifies the TTL value to use in outgoing packets.
891 - specifies the TOS value to use in outgoing packets.
894 .BI flowlabel " FLOWLABEL"
895 - specifies the flow label to use in outgoing packets.
899 - select a destination port other than the default of 6081.
903 - make this tunnel externally controlled (or not, which is the default). This
904 flag is mutually exclusive with the
908 .BR tos " and " flowlabel
913 - specifies if UDP checksum is calculated for transmitted packets over IPv4.
916 .RB [ no ] udp6zerocsumtx
917 - skip UDP checksum calculation for transmitted packets over IPv6.
920 .RB [ no ] udp6zerocsumrx
921 - allow incoming UDP packets over IPv6 with zero checksum field.
926 MACVLAN and MACVTAP Type Support
931 the following additional arguments are supported:
933 .BI "ip link add link " DEVICE " name " NAME
934 .BR type " { " macvlan " | " macvtap " } "
935 .BR mode " { " private " | " vepa " | " bridge " | " passthru
936 .RB " [ " nopromisc " ] | " source " } "
940 .BR type " { " macvlan " | " macvtap " } "
941 - specifies the link type to use.
942 .BR macvlan " creates just a virtual interface, while "
943 .BR macvtap " in addition creates a character device "
944 .BR /dev/tapX " to be used just like a " tuntap " device."
947 - Do not allow communication between
949 instances on the same physical interface, even if the external switch supports
953 - Virtual Ethernet Port Aggregator mode. Data from one
955 instance to the other on the same physical interface is transmitted over the
956 physical interface. Either the attached switch needs to support hairpin mode,
957 or there must be a TCP/IP router forwarding the packets in order to allow
958 communication. This is the default mode.
961 - In bridge mode, all endpoints are directly connected to each other,
962 communication is not redirected through the physical interface's peer.
964 .BR mode " " passthru " [ " nopromisc " ] "
965 - This mode gives more power to a single endpoint, usually in
966 .BR macvtap " mode. It is not allowed for more than one endpoint on the same "
967 physical interface. All traffic will be forwarded to this endpoint, allowing
968 virtio guests to change MAC address or set promiscuous mode in order to bridge
969 the interface or create vlan interfaces on top of it. By default, this mode
970 forces the underlying interface into promiscuous mode. Passing the
971 .BR nopromisc " flag prevents this, so the promisc flag may be controlled "
972 using standard tools.
975 - allows one to set a list of allowed mac address, which is used to match
976 against source mac address from received frames on underlying interface. This
977 allows creating mac based VLAN associations, instead of standard port or tag
978 based. The feature is useful to deploy 802.1x mac based behavior,
979 where drivers of underlying interfaces doesn't allows that.
983 High-availability Seamless Redundancy (HSR) Support
986 the following additional arguments are supported:
988 .BI "ip link add link " DEVICE " name " NAME " type hsr"
989 .BI slave1 " SLAVE1-IF " slave2 " SLAVE2-IF "
992 .BR version " { " 0 " | " 1 " } ]"
997 - specifies the link type to use, here HSR.
999 .BI slave1 " SLAVE1-IF "
1000 - Specifies the physical device used for the first of the two ring ports.
1002 .BI slave2 " SLAVE2-IF "
1003 - Specifies the physical device used for the second of the two ring ports.
1005 .BI supervision " ADDR-BYTE"
1006 - The last byte of the multicast address used for HSR supervision frames.
1007 Default option is "0", possible values 0-255.
1009 .BR version " { " 0 " | " 1 " }"
1010 - Selects the protocol version of the interface. Default option is "0", which
1011 corresponds to the 2010 version of the HSR standard. Option "1" activates the
1019 the following additional arguments are supported:
1021 .BI "ip link add " DEVICE " type bridge "
1023 .BI ageing_time " AGEING_TIME "
1025 .BI group_fwd_mask " MASK "
1027 .BI group_address " ADDRESS "
1029 .BI forward_delay " FORWARD_DELAY "
1031 .BI hello_time " HELLO_TIME "
1033 .BI max_age " MAX_AGE "
1035 .BI stp_state " STP_STATE "
1037 .BI priority " PRIORITY "
1039 .BI vlan_filtering " VLAN_FILTERING "
1041 .BI vlan_protocol " VLAN_PROTOCOL "
1043 .BI vlan_default_pvid " VLAN_DEFAULT_PVID "
1045 .BI vlan_stats_enabled " VLAN_STATS_ENABLED "
1047 .BI mcast_snooping " MULTICAST_SNOOPING "
1049 .BI mcast_router " MULTICAST_ROUTER "
1051 .BI mcast_query_use_ifaddr " MCAST_QUERY_USE_IFADDR "
1053 .BI mcast_querier " MULTICAST_QUERIER "
1055 .BI mcast_hash_elasticity " HASH_ELASTICITY "
1057 .BI mcast_hash_max " HASH_MAX "
1059 .BI mcast_last_member_count " LAST_MEMBER_COUNT "
1061 .BI mcast_startup_query_count " STARTUP_QUERY_COUNT "
1063 .BI mcast_last_member_interval " LAST_MEMBER_INTERVAL "
1065 .BI mcast_membership_interval " MEMBERSHIP_INTERVAL "
1067 .BI mcast_querier_interval " QUERIER_INTERVAL "
1069 .BI mcast_query_interval " QUERY_INTERVAL "
1071 .BI mcast_query_response_interval " QUERY_RESPONSE_INTERVAL "
1073 .BI mcast_startup_query_interval " STARTUP_QUERY_INTERVAL "
1075 .BI mcast_stats_enabled " MCAST_STATS_ENABLED "
1077 .BI mcast_igmp_version " IGMP_VERSION "
1079 .BI mcast_mld_version " MLD_VERSION "
1081 .BI nf_call_iptables " NF_CALL_IPTABLES "
1083 .BI nf_call_ip6tables " NF_CALL_IP6TABLES "
1085 .BI nf_call_arptables " NF_CALL_ARPTABLES "
1090 .BI ageing_time " AGEING_TIME "
1091 - 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.
1093 .BI group_fwd_mask " MASK "
1094 - 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).
1096 .BI group_address " ADDRESS "
1097 - 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].
1099 .BI forward_delay " FORWARD_DELAY "
1100 - 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.
1102 .BI hello_time " HELLO_TIME "
1103 - 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.
1105 .BI max_age " MAX_AGE "
1106 - 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.
1108 .BI stp_state " STP_STATE "
1109 - turn spanning tree protocol on
1110 .RI ( STP_STATE " > 0) "
1112 .RI ( STP_STATE " == 0). "
1115 .BI priority " PRIORITY "
1116 - set this bridge's spanning tree priority, used during STP root bridge election.
1118 is a 16bit unsigned integer.
1120 .BI vlan_filtering " VLAN_FILTERING "
1121 - turn VLAN filtering on
1122 .RI ( VLAN_FILTERING " > 0) "
1124 .RI ( VLAN_FILTERING " == 0). "
1125 When disabled, the bridge will not consider the VLAN tag when handling packets.
1127 .BR vlan_protocol " { " 802.1Q " | " 802.1ad " } "
1128 - set the protocol used for VLAN filtering.
1130 .BI vlan_default_pvid " VLAN_DEFAULT_PVID "
1131 - set the default PVID (native/untagged VLAN ID) for this bridge.
1133 .BI vlan_stats_enabled " VLAN_STATS_ENABLED "
1135 .RI ( VLAN_STATS_ENABLED " == 1) "
1137 .RI ( VLAN_STATS_ENABLED " == 0) "
1138 per-VLAN stats accounting.
1140 .BI mcast_snooping " MULTICAST_SNOOPING "
1141 - turn multicast snooping on
1142 .RI ( MULTICAST_SNOOPING " > 0) "
1144 .RI ( MULTICAST_SNOOPING " == 0). "
1146 .BI mcast_router " MULTICAST_ROUTER "
1147 - set bridge's multicast router if IGMP snooping is enabled.
1149 is an integer value having the following meaning:
1156 - automatic (queried).
1159 - permanently enabled.
1162 .BI mcast_query_use_ifaddr " MCAST_QUERY_USE_IFADDR "
1163 - whether to use the bridge's own IP address as source address for IGMP queries
1164 .RI ( MCAST_QUERY_USE_IFADDR " > 0) "
1165 or the default of 0.0.0.0
1166 .RI ( MCAST_QUERY_USE_IFADDR " == 0). "
1168 .BI mcast_querier " MULTICAST_QUERIER "
1170 .RI ( MULTICAST_QUERIER " > 0) "
1172 .RI ( MULTICAST_QUERIER " == 0) "
1173 IGMP querier, ie sending of multicast queries by the bridge (default: disabled).
1175 .BI mcast_querier_interval " QUERIER_INTERVAL "
1176 - 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
1180 .BI mcast_hash_elasticity " HASH_ELASTICITY "
1181 - set multicast database hash elasticity, ie the maximum chain length in the multicast hash table (defaults to 4).
1183 .BI mcast_hash_max " HASH_MAX "
1184 - set maximum size of multicast hash table (defaults to 512, value must be a power of 2).
1186 .BI mcast_last_member_count " LAST_MEMBER_COUNT "
1187 - 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).
1189 .BI mcast_last_member_interval " LAST_MEMBER_INTERVAL "
1190 - interval between queries to find remaining members of a group, after a "leave" message is received.
1192 .BI mcast_startup_query_count " STARTUP_QUERY_COUNT "
1193 - set the number of IGMP queries to send during startup phase (defaults to 2).
1195 .BI mcast_startup_query_interval " STARTUP_QUERY_INTERVAL "
1196 - interval between queries in the startup phase.
1198 .BI mcast_query_interval " QUERY_INTERVAL "
1199 - interval between queries sent by the bridge after the end of the startup phase.
1201 .BI mcast_query_response_interval " QUERY_RESPONSE_INTERVAL "
1202 - set the Max Response Time/Maximum Response Delay for IGMP/MLD queries sent by the bridge.
1204 .BI mcast_membership_interval " MEMBERSHIP_INTERVAL "
1205 - delay after which the bridge will leave a group, if no membership reports for this group are received.
1207 .BI mcast_stats_enabled " MCAST_STATS_ENABLED "
1209 .RI ( MCAST_STATS_ENABLED " > 0) "
1211 .RI ( MCAST_STATS_ENABLED " == 0) "
1212 multicast (IGMP/MLD) stats accounting.
1214 .BI mcast_igmp_version " IGMP_VERSION "
1215 - set the IGMP version.
1217 .BI mcast_mld_version " MLD_VERSION "
1218 - set the MLD version.
1220 .BI nf_call_iptables " NF_CALL_IPTABLES "
1222 .RI ( NF_CALL_IPTABLES " > 0) "
1224 .RI ( NF_CALL_IPTABLES " == 0) "
1225 iptables hooks on the bridge.
1227 .BI nf_call_ip6tables " NF_CALL_IP6TABLES "
1229 .RI ( NF_CALL_IP6TABLES " > 0) "
1231 .RI ( NF_CALL_IP6TABLES " == 0) "
1232 ip6tables hooks on the bridge.
1234 .BI nf_call_arptables " NF_CALL_ARPTABLES "
1236 .RI ( NF_CALL_ARPTABLES " > 0) "
1238 .RI ( NF_CALL_ARPTABLES " == 0) "
1239 arptables hooks on the bridge.
1248 the following additional arguments are supported:
1250 .BI "ip link add link " DEVICE " name " NAME " type macsec"
1252 .BI address " <lladdr>"
1258 .BI cipher " CIPHER_SUITE"
1263 .BR on " | " off " } ] [ "
1264 .BR send_sci " { " on " | " off " } ] ["
1265 .BR end_station " { " on " | " off " } ] ["
1266 .BR scb " { " on " | " off " } ] ["
1267 .BR protect " { " on " | " off " } ] ["
1268 .BR replay " { " on " | " off " }"
1270 .IR 0..2^32-1 " } ] ["
1271 .BR validate " { " strict " | " check " | " disabled " } ] ["
1272 .BR encodingsa " { "
1277 .BI address " <lladdr> "
1278 - sets the system identifier component of secure channel for this MACsec device.
1282 - sets the port number component of secure channel for this MACsec device, in a
1283 range from 1 to 65535 inclusive. Numbers with a leading " 0 " or " 0x " are
1284 interpreted as octal and hexadecimal, respectively.
1288 - sets the secure channel identifier for this MACsec device.
1290 is a 64bit wide number in hexadecimal format.
1293 .BI cipher " CIPHER_SUITE "
1294 - defines the cipher suite to use.
1297 .BI icvlen " LENGTH "
1298 - sets the length of the Integrity Check Value (ICV).
1301 .BR "encrypt on " or " encrypt off"
1302 - switches between authenticated encryption, or authenticity mode only.
1305 .BR "send_sci on " or " send_sci off"
1306 - specifies whether the SCI is included in every packet, or only when it is necessary.
1309 .BR "end_station on " or " end_station off"
1310 - sets the End Station bit.
1313 .BR "scb on " or " scb off"
1314 - sets the Single Copy Broadcast bit.
1317 .BR "protect on " or " protect off"
1318 - enables MACsec protection on the device.
1321 .BR "replay on " or " replay off"
1322 - enables replay protection on the device.
1328 - sets the size of the replay window.
1333 .BR "validate strict " or " validate check " or " validate disabled"
1334 - sets the validation mode on the device.
1337 .BI encodingsa " AN "
1338 - sets the active secure association for transmission.
1346 the following additional arguments are supported:
1348 .BI "ip link add " DEVICE " type vrf table " TABLE
1352 .BR table " table id associated with VRF device"
1356 .SS ip link delete - delete virtual link
1360 specifies the virtual device to act operate on.
1364 specifies the group of virtual links to delete. Group 0 is not allowed to be
1365 deleted since it is the default group.
1369 specifies the type of the device.
1371 .SS ip link set - change device attributes
1375 If multiple parameter changes are requested,
1377 aborts immediately after any of the changes have failed.
1378 This is the only case when
1380 can move the system to an unpredictable state. The solution
1381 is to avoid changing several parameters with one
1388 specifies network device to operate on. When configuring SR-IOV Virtual Function
1389 (VF) devices, this keyword should specify the associated Physical Function (PF)
1395 has a dual role: If both group and dev are present, then move the device to the
1396 specified group. If only a group is specified, then the command operates on
1397 all devices in that group.
1401 change the state of the device to
1407 .BR "arp on " or " arp off"
1413 .BR "multicast on " or " multicast off"
1419 .BR "protodown on " or " protodown off"
1422 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.
1425 .BR "dynamic on " or " dynamic off"
1428 flag on the device. Indicates that address can change when interface goes down (currently
1434 change the name of the device. This operation is not
1435 recommended if the device is running or has some addresses
1439 .BI txqueuelen " NUMBER"
1441 .BI txqlen " NUMBER"
1442 change the transmit queue length of the device.
1451 .BI address " LLADDRESS"
1452 change the station address of the interface.
1455 .BI broadcast " LLADDRESS"
1457 .BI brd " LLADDRESS"
1459 .BI peer " LLADDRESS"
1460 change the link layer broadcast address or the peer address when
1465 .BI netns " NETNSNAME " \fR| " PID"
1466 move the device to the network namespace associated with name
1470 Some devices are not allowed to change network namespace: loopback, bridge,
1471 ppp, wireless. These are network namespace local devices. In such case
1473 tool will return "Invalid argument" error. It is possible to find out if device is local
1474 to a single network namespace by checking
1476 flag in the output of the
1484 To change network namespace for wireless devices the
1486 tool can be used. But it allows to change network namespace only for physical devices and by process
1491 give the device a symbolic name for easy reference.
1495 specify the group the device belongs to.
1496 The available groups are listed in file
1497 .BR "@SYSCONFDIR@/group" .
1501 specify a Virtual Function device to be configured. The associated PF device
1502 must be specified using the
1507 .BI mac " LLADDRESS"
1508 - change the station address for the specified VF. The
1510 parameter must be specified.
1514 - change the assigned VLAN for the specified VF. When specified, all traffic
1515 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
1516 will be filtered for the specified VLAN ID, and will have all VLAN tags
1517 stripped before being passed to the VF. Setting this parameter to 0 disables
1518 VLAN tagging and filtering. The
1520 parameter must be specified.
1524 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
1525 tags transmitted by the VF will include the specified priority bits in the
1526 VLAN tag. If not specified, the value is assumed to be 0. Both the
1530 parameters must be specified. Setting both
1534 as 0 disables VLAN tagging and filtering for the VF.
1537 .BI proto " VLAN-PROTO"
1538 - assign VLAN PROTOCOL for the VLAN tag, either 802.1Q or 802.1ad.
1539 Setting to 802.1ad, all traffic sent from the VF will be tagged with VLAN S-Tag.
1540 Incoming traffic will have VLAN S-Tags stripped before being passed to the VF.
1541 Setting to 802.1ad also enables an option to concatenate another VLAN tag, so both
1542 S-TAG and C-TAG will be inserted/stripped for outgoing/incoming traffic, respectively.
1543 If not specified, the value is assumed to be 802.1Q. Both the
1547 parameters must be specified.
1551 -- change the allowed transmit bandwidth, in Mbps, for the specified VF.
1552 Setting this parameter to 0 disables rate limiting.
1554 parameter must be specified.
1560 .BI max_tx_rate " TXRATE"
1561 - change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
1563 parameter must be specified.
1566 .BI min_tx_rate " TXRATE"
1567 - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
1568 Minimum TXRATE should be always <= Maximum TXRATE.
1570 parameter must be specified.
1573 .BI spoofchk " on|off"
1574 - turn packet spoof checking on or off for the specified VF.
1576 .BI query_rss " on|off"
1577 - 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.
1579 .BI state " auto|enable|disable"
1580 - set the virtual link state as seen by the specified VF. Setting to auto means a
1581 reflection of the PF link state, enable lets the VF to communicate with other VFs on
1582 this host even if the PF link state is down, disable causes the HW to drop any packets
1586 - trust the specified VF user. This enables that VF user can set a specific feature
1587 which may impact security and/or performance. (e.g. VF multicast promiscuous mode)
1589 .BI node_guid " eui64"
1590 - configure node GUID for Infiniband VFs.
1592 .BI port_guid " eui64"
1593 - configure port GUID for Infiniband VFs.
1597 .B xdp object "|" pinned "|" off
1598 set (or unset) a XDP ("eXpress Data Path") BPF program to run on every
1599 packet at driver level.
1601 output will indicate a
1603 flag for the networking device. If the driver does not have native XDP
1604 support, the kernel will fall back to a slower, driver-independent "generic"
1607 output will in that case indicate
1611 only. If the driver does have native XDP support, but the program is
1613 .B xdpgeneric object "|" pinned
1614 then the kernel will use the generic XDP variant instead of the native one.
1616 has the opposite effect of requestsing that the automatic fallback to the
1617 generic XDP variant be disabled and in case driver is not XDP-capable error
1620 also disables hardware offloads.
1622 in ip link output indicates that the program has been offloaded to hardware
1623 and can also be used to request the "offload" mode, much like
1625 it forces program to be installed specifically in HW/FW of the apater.
1631 - Detaches any currently attached XDP/BPF program from the given device.
1634 - Attaches a XDP/BPF program to the given device. The
1636 points to a BPF ELF file (f.e. generated by LLVM) that contains the BPF
1637 program code, map specifications, etc. If a XDP/BPF program is already
1638 attached to the given device, an error will be thrown. If no XDP/BPF
1639 program is currently attached, the device supports XDP and the program
1640 from the BPF ELF file passes the kernel verifier, then it will be attached
1641 to the device. If the option
1645 then any prior attached XDP/BPF program will be atomically overridden and
1646 no error will be thrown in this case. If no
1648 option is passed, then the default section name ("prog") will be assumed,
1649 otherwise the provided section name will be used. If no
1651 option is passed, then a verifier log will only be dumped on load error.
1654 section for usage examples.
1656 .BI section " NAME "
1657 - Specifies a section name that contains the BPF program code. If no section
1658 name is specified, the default one ("prog") will be used. This option is
1659 to be passed with the
1664 - Act in verbose mode. For example, even in case of success, this will
1665 print the verifier log in case a program was loaded from a BPF ELF file.
1668 - Attaches a XDP/BPF program to the given device. The
1670 points to an already pinned BPF program in the BPF file system. The option
1672 doesn't apply here, but otherwise semantics are the same as with the option
1677 .BI master " DEVICE"
1678 set master device of the device (enslave device).
1682 unset master device of the device (release device).
1685 .BI addrgenmode " eui64|none|stable_secret|random"
1686 set the IPv6 address generation mode
1689 - use a Modified EUI-64 format interface identifier
1692 - disable automatic address generation
1695 - generate the interface identifier based on a preset /proc/sys/net/ipv6/conf/{default,DEVICE}/stable_secret
1698 - like stable_secret, but auto-generate a new random secret if none is set
1702 set peer netnsid for a cross-netns interface
1705 .BI type " ETYPE TYPE_ARGS"
1706 Change type-specific settings. For a list of supported types and arguments refer
1707 to the description of
1709 above. In addition to that, it is possible to manipulate settings to slave
1713 Bridge Slave Support
1714 For a link with master
1716 the following additional arguments are supported:
1718 .B "ip link set type bridge_slave"
1724 .BI priority " PRIO"
1728 .BR guard " { " on " | " off " }"
1730 .BR hairpin " { " on " | " off " }"
1732 .BR fastleave " { " on " | " off " }"
1734 .BR root_block " { " on " | " off " }"
1736 .BR learning " { " on " | " off " }"
1738 .BR flood " { " on " | " off " }"
1740 .BR proxy_arp " { " on " | " off " }"
1742 .BR proxy_arp_wifi " { " on " | " off " }"
1744 .BI mcast_router " MULTICAST_ROUTER"
1746 .BR mcast_fast_leave " { " on " | " off "}"
1748 .BR mcast_flood " { " on " | " off " }"
1750 .BR group_fwd_mask " MASK ]"
1755 - flush bridge slave's fdb dynamic entries.
1760 is a number representing the following states:
1761 .BR 0 " (disabled),"
1762 .BR 1 " (listening),"
1763 .BR 2 " (learning),"
1764 .BR 3 " (forwarding),"
1765 .BR 4 " (blocking)."
1767 .BI priority " PRIO"
1768 - set port priority (allowed values are between 0 and 63, inclusively).
1771 - set port cost (allowed values are between 1 and 65535, inclusively).
1773 .BR guard " { " on " | " off " }"
1774 - block incoming BPDU packets on this port.
1776 .BR hairpin " { " on " | " off " }"
1777 - enable hairpin mode on this port. This will allow incoming packets on this
1778 port to be reflected back.
1780 .BR fastleave " { " on " | " off " }"
1781 - enable multicast fast leave on this port.
1783 .BR root_block " { " on " | " off " }"
1784 - block this port from becoming the bridge's root port.
1786 .BR learning " { " on " | " off " }"
1787 - allow MAC address learning on this port.
1789 .BR flood " { " on " | " off " }"
1790 - open the flood gates on this port, i.e. forward all unicast frames to this
1792 .BR proxy_arp " and " proxy_arp_wifi
1795 .BR proxy_arp " { " on " | " off " }"
1796 - enable proxy ARP on this port.
1798 .BR proxy_arp_wifi " { " on " | " off " }"
1799 - enable proxy ARP on this port which meets extended requirements by IEEE
1800 802.11 and Hotspot 2.0 specifications.
1802 .BI mcast_router " MULTICAST_ROUTER"
1803 - configure this port for having multicast routers attached. A port with a
1804 multicast router will receive all multicast traffic.
1808 to disable multicast routers on this port,
1810 to let the system detect the presence of of routers (this is the default),
1812 to permanently enable multicast traffic forwarding on this port or
1814 to enable multicast routers temporarily on this port, not depending on incoming
1817 .BR mcast_fast_leave " { " on " | " off " }"
1818 - this is a synonym to the
1822 .BR mcast_flood " { " on " | " off " }"
1823 - controls whether a given port will be flooded with multicast traffic for which there is no MDB entry.
1825 .BI group_fwd_mask " MASK "
1826 - 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).
1831 Bonding Slave Support
1832 For a link with master
1834 the following additional arguments are supported:
1836 .B "ip link set type bond_slave"
1844 - set the slave's queue ID (a 16bit unsigned value).
1849 MACVLAN and MACVTAP Support
1850 Modify list of allowed macaddr for link in source mode.
1852 .B "ip link set type { macvlan | macvap } "
1854 .BI macaddr " " "" COMMAND " " MACADDR " ..."
1860 - add MACADDR to allowed list
1863 - replace allowed list
1866 - remove MACADDR from allowed list
1869 - flush whole allowed list
1874 .SS ip link show - display device attributes
1877 .BI dev " NAME " (default)
1879 specifies the network device to show.
1880 If this argument is omitted all devices in the default group are listed.
1885 specifies what group of devices to show.
1889 only display running interfaces.
1892 .BI master " DEVICE "
1894 specifies the master device which enslaves devices to show.
1899 speficies the VRF which enslaves devices to show.
1904 specifies the type of devices to show.
1906 Note that the type name is not checked against the list of supported types -
1907 instead it is sent as-is to the kernel. Later it is used to filter the returned
1908 interface list by comparing it with the relevant attribute in case the kernel
1909 didn't filter already. Therefore any string is accepted, but may lead to empty
1912 .SS ip link xstats - display extended statistics
1917 specifies the type of devices to display extended statistics for.
1919 .SS ip link afstats - display address-family specific statistics
1924 specifies the device to display address-family statistics for.
1926 .SS ip link help - display help
1930 specifies which help of link type to dislpay.
1934 may be a number or a string from the file
1935 .B @SYSCONFDIR@/group
1936 which can be manually filled.
1942 Shows the state of all network interfaces on the system.
1945 ip link show type bridge
1947 Shows the bridge devices.
1950 ip link show type vlan
1952 Shows the vlan devices.
1955 ip link show master br0
1957 Shows devices enslaved by br0
1960 ip link set dev ppp0 mtu 1400
1962 Change the MTU the ppp0 device.
1965 ip link add link eth0 name eth0.10 type vlan id 10
1967 Creates a new vlan device eth0.10 on device eth0.
1970 ip link delete dev eth0.10
1972 Removes vlan device.
1977 Display help for the gre link type.
1980 ip link add name tun1 type ipip remote 192.168.1.1
1981 local 192.168.1.2 ttl 225 encap gue encap-sport auto
1982 encap-dport 5555 encap-csum encap-remcsum
1984 Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
1985 and the outer UDP checksum and remote checksum offload are enabled.
1988 ip link set dev eth0 xdp obj prog.o
1990 Attaches a XDP/BPF program to device eth0, where the program is
1991 located in prog.o, section "prog" (default section). In case a
1992 XDP/BPF program is already attached, throw an error.
1995 ip -force link set dev eth0 xdp obj prog.o sec foo
1997 Attaches a XDP/BPF program to device eth0, where the program is
1998 located in prog.o, section "foo". In case a XDP/BPF program is
1999 already attached, it will be overridden by the new one.
2002 ip -force link set dev eth0 xdp pinned /sys/fs/bpf/foo
2004 Attaches a XDP/BPF program to device eth0, where the program was
2005 previously pinned as an object node into BPF file system under
2009 ip link set dev eth0 xdp off
2011 If a XDP/BPF program is attached on device eth0, detach it and
2012 effectively turn off XDP for device eth0.
2015 ip link add link wpan0 lowpan0 type lowpan
2017 Creates a 6LoWPAN interface named lowpan0 on the underlying
2018 IEEE 802.15.4 device wpan0.
2029 Original Manpage by Michail Litvak <mci@owl.openwall.com>