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
255 - Controller Area Network interface
258 - Dummy network interface
261 - High-availability Seamless Redundancy device
264 - Intermediate Functional Block device
267 - IP over Infiniband device
270 - Virtual interface base on link layer address (MAC)
273 - Virtual interface based on link layer address (MAC) and TAP.
276 - Virtual Controller Area Network interface
279 - Virtual ethernet interface
282 - 802.1q tagged virtual LAN interface
285 - Virtual eXtended LAN
288 - Virtual tunnel interface IPv4|IPv6 over IPv6
291 - Virtual tunnel interface IPv4 over IPv4
294 - Virtual tunnel interface IPv6 over IPv4
297 - Virtual tunnel interface GRE over IPv4
300 - Virtual L2 tunnel interface GRE over IPv4
303 - Encapsulated Remote SPAN over GRE and IPv4
306 - Virtual tunnel interface GRE over IPv6
309 - Virtual L2 tunnel interface GRE over IPv6
312 - Virtual tunnel interface
315 - Netlink monitoring device
318 - Interface for L3 (IPv6/IPv4) based VLANs
321 - Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 / Bluetooth
324 - GEneric NEtwork Virtualization Encapsulation
327 - Interface for IEEE 802.1AE MAC Security (MACsec)
330 - Interface for L3 VRF domains
334 .BI numtxqueues " QUEUE_COUNT "
335 specifies the number of transmit queues for new device.
338 .BI numrxqueues " QUEUE_COUNT "
339 specifies the number of receive queues for new device.
343 specifies the desired index of the new virtual device. The link creation fails, if the index is busy.
349 the following additional arguments are supported:
356 .BI protocol " VLAN_PROTO "
360 .BR reorder_hdr " { " on " | " off " } "
363 .BR gvrp " { " on " | " off " } "
366 .BR mvrp " { " on " | " off " } "
369 .BR loose_binding " { " on " | " off " } "
372 .BI ingress-qos-map " QOS-MAP "
375 .BI egress-qos-map " QOS-MAP "
380 .BI protocol " VLAN_PROTO "
381 - either 802.1Q or 802.1ad.
384 - specifies the VLAN Identifer to use. Note that numbers with a leading " 0 " or " 0x " are interpreted as octal or hexadeimal, respectively.
386 .BR reorder_hdr " { " on " | " off " } "
387 - specifies whether ethernet headers are reordered or not (default is
392 .BR reorder_hdr " is " on
393 then VLAN header will be not inserted immediately but only before passing to the
394 physical device (if this device does not support VLAN offloading), the similar
395 on the RX direction - by default the packet will be untagged before being
396 received by VLAN device. Reordering allows to accelerate tagging on egress and
397 to hide VLAN header on ingress so the packet looks like regular Ethernet packet,
398 at the same time it might be confusing for packet capture as the VLAN header
399 does not exist within the packet.
401 VLAN offloading can be checked by
407 .RB grep " tx-vlan-offload"
410 where <phy_dev> is the physical device to which VLAN device is bound.
413 .BR gvrp " { " on " | " off " } "
414 - specifies whether this VLAN should be registered using GARP VLAN Registration Protocol.
416 .BR mvrp " { " on " | " off " } "
417 - specifies whether this VLAN should be registered using Multiple VLAN Registration Protocol.
419 .BR loose_binding " { " on " | " off " } "
420 - specifies whether the VLAN device state is bound to the physical device state.
422 .BI ingress-qos-map " QOS-MAP "
423 - defines a mapping of VLAN header prio field to the Linux internal packet
424 priority on incoming frames. The format is FROM:TO with multiple mappings
427 .BI egress-qos-map " QOS-MAP "
428 - defines a mapping of Linux internal packet priority to VLAN header prio field
429 but for outgoing frames. The format is the same as for ingress-qos-map.
432 Linux packet priority can be set by
437 -t mangle -A POSTROUTING [...] -j CLASSIFY --set-class 0:4
440 and this "4" priority can be used in the egress qos mapping to set VLAN prio "5":
444 link set veth0.10 type vlan egress 4:5
453 the following additional arguments are supported:
455 .BI "ip link add " DEVICE
456 .BI type " vxlan " id " VNI"
459 .RB " ] [ { " group " | " remote " } "
463 .RI "{ "IPADDR " | "any " } "
469 .BI flowlabel " FLOWLABEL "
473 .BI srcport " MIN MAX "
487 .RB [ no ] udp6zerocsumtx
489 .RB [ no ] udp6zerocsumrx
491 .BI ageing " SECONDS "
493 .BI maxaddress " NUMBER "
505 - specifies the VXLAN Network Identifer (or VXLAN Segment
509 - specifies the physical device to use for tunnel endpoint communication.
513 - specifies the multicast IP address to join.
514 This parameter cannot be specified with the
520 - specifies the unicast destination IP address to use in outgoing packets
521 when the destination link layer address is not known in the VXLAN device
522 forwarding database. This parameter cannot be specified with the
528 - specifies the source IP address to use in outgoing packets.
532 - specifies the TTL value to use in outgoing packets.
536 - specifies the TOS value to use in outgoing packets.
539 .BI flowlabel " FLOWLABEL"
540 - specifies the flow label to use in outgoing packets.
544 - specifies the UDP destination port to communicate to the remote VXLAN tunnel endpoint.
547 .BI srcport " MIN MAX"
548 - specifies the range of port numbers to use as UDP
549 source ports to communicate to the remote VXLAN tunnel endpoint.
553 - specifies if unknown source link layer addresses and IP addresses
554 are entered into the VXLAN device forwarding database.
558 - specifies if route short circuit is turned on.
562 - specifies ARP proxy is turned on.
566 - specifies if netlink LLADDR miss notifications are generated.
570 - specifies if netlink IP ADDR miss notifications are generated.
574 - specifies if UDP checksum is calculated for transmitted packets over IPv4.
577 .RB [ no ] udp6zerocsumtx
578 - skip UDP checksum calculation for transmitted packets over IPv6.
581 .RB [ no ] udp6zerocsumrx
582 - allow incoming UDP packets over IPv6 with zero checksum field.
585 .BI ageing " SECONDS"
586 - specifies the lifetime in seconds of FDB entries learnt by the kernel.
589 .BI maxaddress " NUMBER"
590 - specifies the maximum number of FDB entries.
594 - specifies whether an external control plane
595 .RB "(e.g. " "ip route encap" )
596 or the internal FDB should be used.
600 - enables the Group Policy extension (VXLAN-GBP).
603 Allows to transport group policy context across VXLAN network peers.
604 If enabled, includes the mark of a packet in the VXLAN header for outgoing
605 packets and fills the packet mark based on the information found in the
606 VXLAN header for incomming packets.
608 Format of upper 16 bits of packet mark (flags);
611 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
613 |-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|
615 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
618 Don't Learn bit. When set, this bit indicates that the egress
619 VTEP MUST NOT learn the source address of the encapsulated frame.
622 Indicates that the group policy has already been applied to
623 this packet. Policies MUST NOT be applied by devices when the A bit is set.
626 Format of lower 16 bits of packet mark (policy ID):
629 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
633 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
637 iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF
643 - enables the Generic Protocol extension (VXLAN-GPE). Currently, this is
644 only supported together with the
651 GRE, IPIP, SIT, ERSPAN Type Support
653 .I GRE/IPIP/SIT/ERSPAN
654 the following additional arguments are supported:
656 .BI "ip link add " DEVICE
657 .BR type " { " gre " | " ipip " | " sit " | " erspan " }"
658 .BI " remote " ADDR " local " ADDR
660 .BR encap " { " fou " | " gue " | " none " }"
662 .BR encap-sport " { " \fIPORT " | " auto " }"
664 .BI "encap-dport " PORT
666 .RB [ no ] encap-csum
668 .I " [no]encap-remcsum "
670 .I " mode " { ip6ip | ipip | mplsip | any } "
672 .BR erspan " \fIIDX "
678 - specifies the remote address of the tunnel.
682 - specifies the fixed local address for tunneled packets.
683 It must be an address on another interface on this host.
686 .BR encap " { " fou " | " gue " | " none " }"
687 - specifies type of secondary UDP encapsulation. "fou" indicates
688 Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
691 .BR encap-sport " { " \fIPORT " | " auto " }"
692 - specifies the source port in UDP encapsulation.
694 indicates the port by number, "auto"
695 indicates that the port number should be chosen automatically
696 (the kernel picks a flow based on the flow hash of the
697 encapsulated packet).
700 .RB [ no ] encap-csum
701 - specifies if UDP checksums are enabled in the secondary
705 .RB [ no ] encap-remcsum
706 - specifies if Remote Checksum Offload is enabled. This is only
707 applicable for Generic UDP Encapsulation.
710 .BI mode " { ip6ip | ipip | mplsip | any } "
711 - specifies mode in which device should run. "ip6ip" indicates
712 IPv6-Over-IPv4, "ipip" indicates "IPv4-Over-IPv4", "mplsip" indicates
713 MPLS-Over-IPv4, "any" indicates IPv6, IPv4 or MPLS Over IPv4. Supported for
714 SIT where the default is "ip6ip" and IPIP where the default is "ipip".
715 IPv6-Over-IPv4 is not supported for IPIP.
718 .BR erspan " \fIIDX "
719 - specifies the ERSPAN index field.
721 indicates a 20 bit index/port number associated with the ERSPAN
722 traffic's source port and direction.
727 IP6GRE/IP6GRETAP Type Support
730 the following additional arguments are supported:
732 .BI "ip link add " DEVICE
733 .BR type " { " ip6gre " | " ip6gretap " }"
734 .BI remote " ADDR " local " ADDR"
745 .BI encaplimit " ELIM "
747 .BI tclass " TCLASS "
749 .BI flowlabel " FLOWLABEL "
759 - specifies the remote IPv6 address of the tunnel.
763 - specifies the fixed local IPv6 address for tunneled packets.
764 It must be an address on another interface on this host.
771 flag enables sequencing of outgoing packets.
774 flag requires that all input packets are serialized.
777 .RB [ i | o ] key " \fIKEY"
778 - use keyed GRE with key
780 is either a number or an IPv4 address-like dotted quad.
783 parameter specifies the same key to use in both directions.
785 .BR ikey " and " okey
786 parameters specify different keys for input and output.
790 - generate/require checksums for tunneled packets.
793 flag calculates checksums for outgoing packets.
796 flag requires that all input packets have the correct
799 flag is equivalent to the combination
804 - specifies Hop Limit value to use in outgoing packets.
807 .BI encaplimit " ELIM"
808 - specifies a fixed encapsulation limit. Default is 4.
811 .BI flowlabel " FLOWLABEL"
812 - specifies a fixed flowlabel.
816 - specifies the traffic class field on
817 tunneled packets, which can be specified as either a two-digit
818 hex value (e.g. c0) or a predefined string (e.g. internet).
821 causes the field to be copied from the original IP header. The
823 .BI "inherit/" STRING
825 .BI "inherit/" 00 ".." ff
826 will set the field to
830 when tunneling non-IP packets. The default value is 00.
838 the following additional arguments are supported:
840 .BI "ip link add " DEVICE " name " NAME
841 .BR "type ipoib " [ " pkey \fIPKEY" " ] [ " mode " \fIMODE \fR]"
846 - specifies the IB P-Key to use.
849 - specifies the mode (datagram or connected) to use.
855 the following additional arguments are supported:
857 .BI "ip link add " DEVICE
858 .BI type " geneve " id " VNI " remote " IPADDR"
864 .BI flowlabel " FLOWLABEL "
872 .RB [ no ] udp6zerocsumtx
874 .RB [ no ] udp6zerocsumrx
880 - specifies the Virtual Network Identifer to use.
884 - specifies the unicast destination IP address to use in outgoing packets.
888 - specifies the TTL value to use in outgoing packets.
892 - specifies the TOS value to use in outgoing packets.
895 .BI flowlabel " FLOWLABEL"
896 - specifies the flow label to use in outgoing packets.
900 - select a destination port other than the default of 6081.
904 - make this tunnel externally controlled (or not, which is the default). This
905 flag is mutually exclusive with the
909 .BR tos " and " flowlabel
914 - specifies if UDP checksum is calculated for transmitted packets over IPv4.
917 .RB [ no ] udp6zerocsumtx
918 - skip UDP checksum calculation for transmitted packets over IPv6.
921 .RB [ no ] udp6zerocsumrx
922 - allow incoming UDP packets over IPv6 with zero checksum field.
927 MACVLAN and MACVTAP Type Support
932 the following additional arguments are supported:
934 .BI "ip link add link " DEVICE " name " NAME
935 .BR type " { " macvlan " | " macvtap " } "
936 .BR mode " { " private " | " vepa " | " bridge " | " passthru
937 .RB " [ " nopromisc " ] | " source " } "
941 .BR type " { " macvlan " | " macvtap " } "
942 - specifies the link type to use.
943 .BR macvlan " creates just a virtual interface, while "
944 .BR macvtap " in addition creates a character device "
945 .BR /dev/tapX " to be used just like a " tuntap " device."
948 - Do not allow communication between
950 instances on the same physical interface, even if the external switch supports
954 - Virtual Ethernet Port Aggregator mode. Data from one
956 instance to the other on the same physical interface is transmitted over the
957 physical interface. Either the attached switch needs to support hairpin mode,
958 or there must be a TCP/IP router forwarding the packets in order to allow
959 communication. This is the default mode.
962 - In bridge mode, all endpoints are directly connected to each other,
963 communication is not redirected through the physical interface's peer.
965 .BR mode " " passthru " [ " nopromisc " ] "
966 - This mode gives more power to a single endpoint, usually in
967 .BR macvtap " mode. It is not allowed for more than one endpoint on the same "
968 physical interface. All traffic will be forwarded to this endpoint, allowing
969 virtio guests to change MAC address or set promiscuous mode in order to bridge
970 the interface or create vlan interfaces on top of it. By default, this mode
971 forces the underlying interface into promiscuous mode. Passing the
972 .BR nopromisc " flag prevents this, so the promisc flag may be controlled "
973 using standard tools.
976 - allows one to set a list of allowed mac address, which is used to match
977 against source mac address from received frames on underlying interface. This
978 allows creating mac based VLAN associations, instead of standard port or tag
979 based. The feature is useful to deploy 802.1x mac based behavior,
980 where drivers of underlying interfaces doesn't allows that.
984 High-availability Seamless Redundancy (HSR) Support
987 the following additional arguments are supported:
989 .BI "ip link add link " DEVICE " name " NAME " type hsr"
990 .BI slave1 " SLAVE1-IF " slave2 " SLAVE2-IF "
993 .BR version " { " 0 " | " 1 " } ]"
998 - specifies the link type to use, here HSR.
1000 .BI slave1 " SLAVE1-IF "
1001 - Specifies the physical device used for the first of the two ring ports.
1003 .BI slave2 " SLAVE2-IF "
1004 - Specifies the physical device used for the second of the two ring ports.
1006 .BI supervision " ADDR-BYTE"
1007 - The last byte of the multicast address used for HSR supervision frames.
1008 Default option is "0", possible values 0-255.
1010 .BR version " { " 0 " | " 1 " }"
1011 - Selects the protocol version of the interface. Default option is "0", which
1012 corresponds to the 2010 version of the HSR standard. Option "1" activates the
1020 the following additional arguments are supported:
1022 .BI "ip link add " DEVICE " type bridge "
1024 .BI ageing_time " AGEING_TIME "
1026 .BI group_fwd_mask " MASK "
1028 .BI group_address " ADDRESS "
1030 .BI forward_delay " FORWARD_DELAY "
1032 .BI hello_time " HELLO_TIME "
1034 .BI max_age " MAX_AGE "
1036 .BI stp_state " STP_STATE "
1038 .BI priority " PRIORITY "
1040 .BI vlan_filtering " VLAN_FILTERING "
1042 .BI vlan_protocol " VLAN_PROTOCOL "
1044 .BI vlan_default_pvid " VLAN_DEFAULT_PVID "
1046 .BI vlan_stats_enabled " VLAN_STATS_ENABLED "
1048 .BI mcast_snooping " MULTICAST_SNOOPING "
1050 .BI mcast_router " MULTICAST_ROUTER "
1052 .BI mcast_query_use_ifaddr " MCAST_QUERY_USE_IFADDR "
1054 .BI mcast_querier " MULTICAST_QUERIER "
1056 .BI mcast_hash_elasticity " HASH_ELASTICITY "
1058 .BI mcast_hash_max " HASH_MAX "
1060 .BI mcast_last_member_count " LAST_MEMBER_COUNT "
1062 .BI mcast_startup_query_count " STARTUP_QUERY_COUNT "
1064 .BI mcast_last_member_interval " LAST_MEMBER_INTERVAL "
1066 .BI mcast_membership_interval " MEMBERSHIP_INTERVAL "
1068 .BI mcast_querier_interval " QUERIER_INTERVAL "
1070 .BI mcast_query_interval " QUERY_INTERVAL "
1072 .BI mcast_query_response_interval " QUERY_RESPONSE_INTERVAL "
1074 .BI mcast_startup_query_interval " STARTUP_QUERY_INTERVAL "
1076 .BI mcast_stats_enabled " MCAST_STATS_ENABLED "
1078 .BI mcast_igmp_version " IGMP_VERSION "
1080 .BI mcast_mld_version " MLD_VERSION "
1082 .BI nf_call_iptables " NF_CALL_IPTABLES "
1084 .BI nf_call_ip6tables " NF_CALL_IP6TABLES "
1086 .BI nf_call_arptables " NF_CALL_ARPTABLES "
1091 .BI ageing_time " AGEING_TIME "
1092 - 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.
1094 .BI group_fwd_mask " MASK "
1095 - 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).
1097 .BI group_address " ADDRESS "
1098 - 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].
1100 .BI forward_delay " FORWARD_DELAY "
1101 - 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.
1103 .BI hello_time " HELLO_TIME "
1104 - 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.
1106 .BI max_age " MAX_AGE "
1107 - 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.
1109 .BI stp_state " STP_STATE "
1110 - turn spanning tree protocol on
1111 .RI ( STP_STATE " > 0) "
1113 .RI ( STP_STATE " == 0). "
1116 .BI priority " PRIORITY "
1117 - set this bridge's spanning tree priority, used during STP root bridge election.
1119 is a 16bit unsigned integer.
1121 .BI vlan_filtering " VLAN_FILTERING "
1122 - turn VLAN filtering on
1123 .RI ( VLAN_FILTERING " > 0) "
1125 .RI ( VLAN_FILTERING " == 0). "
1126 When disabled, the bridge will not consider the VLAN tag when handling packets.
1128 .BR vlan_protocol " { " 802.1Q " | " 802.1ad " } "
1129 - set the protocol used for VLAN filtering.
1131 .BI vlan_default_pvid " VLAN_DEFAULT_PVID "
1132 - set the default PVID (native/untagged VLAN ID) for this bridge.
1134 .BI vlan_stats_enabled " VLAN_STATS_ENABLED "
1136 .RI ( VLAN_STATS_ENABLED " == 1) "
1138 .RI ( VLAN_STATS_ENABLED " == 0) "
1139 per-VLAN stats accounting.
1141 .BI mcast_snooping " MULTICAST_SNOOPING "
1142 - turn multicast snooping on
1143 .RI ( MULTICAST_SNOOPING " > 0) "
1145 .RI ( MULTICAST_SNOOPING " == 0). "
1147 .BI mcast_router " MULTICAST_ROUTER "
1148 - set bridge's multicast router if IGMP snooping is enabled.
1150 is an integer value having the following meaning:
1157 - automatic (queried).
1160 - permanently enabled.
1163 .BI mcast_query_use_ifaddr " MCAST_QUERY_USE_IFADDR "
1164 - whether to use the bridge's own IP address as source address for IGMP queries
1165 .RI ( MCAST_QUERY_USE_IFADDR " > 0) "
1166 or the default of 0.0.0.0
1167 .RI ( MCAST_QUERY_USE_IFADDR " == 0). "
1169 .BI mcast_querier " MULTICAST_QUERIER "
1171 .RI ( MULTICAST_QUERIER " > 0) "
1173 .RI ( MULTICAST_QUERIER " == 0) "
1174 IGMP querier, ie sending of multicast queries by the bridge (default: disabled).
1176 .BI mcast_querier_interval " QUERIER_INTERVAL "
1177 - 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
1181 .BI mcast_hash_elasticity " HASH_ELASTICITY "
1182 - set multicast database hash elasticity, ie the maximum chain length in the multicast hash table (defaults to 4).
1184 .BI mcast_hash_max " HASH_MAX "
1185 - set maximum size of multicast hash table (defaults to 512, value must be a power of 2).
1187 .BI mcast_last_member_count " LAST_MEMBER_COUNT "
1188 - 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).
1190 .BI mcast_last_member_interval " LAST_MEMBER_INTERVAL "
1191 - interval between queries to find remaining members of a group, after a "leave" message is received.
1193 .BI mcast_startup_query_count " STARTUP_QUERY_COUNT "
1194 - set the number of IGMP queries to send during startup phase (defaults to 2).
1196 .BI mcast_startup_query_interval " STARTUP_QUERY_INTERVAL "
1197 - interval between queries in the startup phase.
1199 .BI mcast_query_interval " QUERY_INTERVAL "
1200 - interval between queries sent by the bridge after the end of the startup phase.
1202 .BI mcast_query_response_interval " QUERY_RESPONSE_INTERVAL "
1203 - set the Max Response Time/Maximum Response Delay for IGMP/MLD queries sent by the bridge.
1205 .BI mcast_membership_interval " MEMBERSHIP_INTERVAL "
1206 - delay after which the bridge will leave a group, if no membership reports for this group are received.
1208 .BI mcast_stats_enabled " MCAST_STATS_ENABLED "
1210 .RI ( MCAST_STATS_ENABLED " > 0) "
1212 .RI ( MCAST_STATS_ENABLED " == 0) "
1213 multicast (IGMP/MLD) stats accounting.
1215 .BI mcast_igmp_version " IGMP_VERSION "
1216 - set the IGMP version.
1218 .BI mcast_mld_version " MLD_VERSION "
1219 - set the MLD version.
1221 .BI nf_call_iptables " NF_CALL_IPTABLES "
1223 .RI ( NF_CALL_IPTABLES " > 0) "
1225 .RI ( NF_CALL_IPTABLES " == 0) "
1226 iptables hooks on the bridge.
1228 .BI nf_call_ip6tables " NF_CALL_IP6TABLES "
1230 .RI ( NF_CALL_IP6TABLES " > 0) "
1232 .RI ( NF_CALL_IP6TABLES " == 0) "
1233 ip6tables hooks on the bridge.
1235 .BI nf_call_arptables " NF_CALL_ARPTABLES "
1237 .RI ( NF_CALL_ARPTABLES " > 0) "
1239 .RI ( NF_CALL_ARPTABLES " == 0) "
1240 arptables hooks on the bridge.
1249 the following additional arguments are supported:
1251 .BI "ip link add link " DEVICE " name " NAME " type macsec"
1253 .BI address " <lladdr>"
1259 .BI cipher " CIPHER_SUITE"
1264 .BR on " | " off " } ] [ "
1265 .BR send_sci " { " on " | " off " } ] ["
1266 .BR end_station " { " on " | " off " } ] ["
1267 .BR scb " { " on " | " off " } ] ["
1268 .BR protect " { " on " | " off " } ] ["
1269 .BR replay " { " on " | " off " }"
1271 .IR 0..2^32-1 " } ] ["
1272 .BR validate " { " strict " | " check " | " disabled " } ] ["
1273 .BR encodingsa " { "
1278 .BI address " <lladdr> "
1279 - sets the system identifier component of secure channel for this MACsec device.
1283 - sets the port number component of secure channel for this MACsec device, in a
1284 range from 1 to 65535 inclusive. Numbers with a leading " 0 " or " 0x " are
1285 interpreted as octal and hexadecimal, respectively.
1289 - sets the secure channel identifier for this MACsec device.
1291 is a 64bit wide number in hexadecimal format.
1294 .BI cipher " CIPHER_SUITE "
1295 - defines the cipher suite to use.
1298 .BI icvlen " LENGTH "
1299 - sets the length of the Integrity Check Value (ICV).
1302 .BR "encrypt on " or " encrypt off"
1303 - switches between authenticated encryption, or authenticity mode only.
1306 .BR "send_sci on " or " send_sci off"
1307 - specifies whether the SCI is included in every packet, or only when it is necessary.
1310 .BR "end_station on " or " end_station off"
1311 - sets the End Station bit.
1314 .BR "scb on " or " scb off"
1315 - sets the Single Copy Broadcast bit.
1318 .BR "protect on " or " protect off"
1319 - enables MACsec protection on the device.
1322 .BR "replay on " or " replay off"
1323 - enables replay protection on the device.
1329 - sets the size of the replay window.
1334 .BR "validate strict " or " validate check " or " validate disabled"
1335 - sets the validation mode on the device.
1338 .BI encodingsa " AN "
1339 - sets the active secure association for transmission.
1347 the following additional arguments are supported:
1349 .BI "ip link add " DEVICE " type vrf table " TABLE
1353 .BR table " table id associated with VRF device"
1357 .SS ip link delete - delete virtual link
1361 specifies the virtual device to act operate on.
1365 specifies the group of virtual links to delete. Group 0 is not allowed to be
1366 deleted since it is the default group.
1370 specifies the type of the device.
1372 .SS ip link set - change device attributes
1376 If multiple parameter changes are requested,
1378 aborts immediately after any of the changes have failed.
1379 This is the only case when
1381 can move the system to an unpredictable state. The solution
1382 is to avoid changing several parameters with one
1389 specifies network device to operate on. When configuring SR-IOV Virtual Function
1390 (VF) devices, this keyword should specify the associated Physical Function (PF)
1396 has a dual role: If both group and dev are present, then move the device to the
1397 specified group. If only a group is specified, then the command operates on
1398 all devices in that group.
1402 change the state of the device to
1408 .BR "arp on " or " arp off"
1414 .BR "multicast on " or " multicast off"
1420 .BR "protodown on " or " protodown off"
1423 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.
1426 .BR "dynamic on " or " dynamic off"
1429 flag on the device. Indicates that address can change when interface goes down (currently
1435 change the name of the device. This operation is not
1436 recommended if the device is running or has some addresses
1440 .BI txqueuelen " NUMBER"
1442 .BI txqlen " NUMBER"
1443 change the transmit queue length of the device.
1452 .BI address " LLADDRESS"
1453 change the station address of the interface.
1456 .BI broadcast " LLADDRESS"
1458 .BI brd " LLADDRESS"
1460 .BI peer " LLADDRESS"
1461 change the link layer broadcast address or the peer address when
1466 .BI netns " NETNSNAME " \fR| " PID"
1467 move the device to the network namespace associated with name
1471 Some devices are not allowed to change network namespace: loopback, bridge,
1472 ppp, wireless. These are network namespace local devices. In such case
1474 tool will return "Invalid argument" error. It is possible to find out if device is local
1475 to a single network namespace by checking
1477 flag in the output of the
1485 To change network namespace for wireless devices the
1487 tool can be used. But it allows to change network namespace only for physical devices and by process
1492 give the device a symbolic name for easy reference.
1496 specify the group the device belongs to.
1497 The available groups are listed in file
1498 .BR "@SYSCONFDIR@/group" .
1502 specify a Virtual Function device to be configured. The associated PF device
1503 must be specified using the
1508 .BI mac " LLADDRESS"
1509 - change the station address for the specified VF. The
1511 parameter must be specified.
1515 - change the assigned VLAN for the specified VF. When specified, all traffic
1516 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
1517 will be filtered for the specified VLAN ID, and will have all VLAN tags
1518 stripped before being passed to the VF. Setting this parameter to 0 disables
1519 VLAN tagging and filtering. The
1521 parameter must be specified.
1525 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
1526 tags transmitted by the VF will include the specified priority bits in the
1527 VLAN tag. If not specified, the value is assumed to be 0. Both the
1531 parameters must be specified. Setting both
1535 as 0 disables VLAN tagging and filtering for the VF.
1538 .BI proto " VLAN-PROTO"
1539 - assign VLAN PROTOCOL for the VLAN tag, either 802.1Q or 802.1ad.
1540 Setting to 802.1ad, all traffic sent from the VF will be tagged with VLAN S-Tag.
1541 Incoming traffic will have VLAN S-Tags stripped before being passed to the VF.
1542 Setting to 802.1ad also enables an option to concatenate another VLAN tag, so both
1543 S-TAG and C-TAG will be inserted/stripped for outgoing/incoming traffic, respectively.
1544 If not specified, the value is assumed to be 802.1Q. Both the
1548 parameters must be specified.
1552 -- change the allowed transmit bandwidth, in Mbps, for the specified VF.
1553 Setting this parameter to 0 disables rate limiting.
1555 parameter must be specified.
1561 .BI max_tx_rate " TXRATE"
1562 - change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
1564 parameter must be specified.
1567 .BI min_tx_rate " TXRATE"
1568 - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
1569 Minimum TXRATE should be always <= Maximum TXRATE.
1571 parameter must be specified.
1574 .BI spoofchk " on|off"
1575 - turn packet spoof checking on or off for the specified VF.
1577 .BI query_rss " on|off"
1578 - 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.
1580 .BI state " auto|enable|disable"
1581 - set the virtual link state as seen by the specified VF. Setting to auto means a
1582 reflection of the PF link state, enable lets the VF to communicate with other VFs on
1583 this host even if the PF link state is down, disable causes the HW to drop any packets
1587 - trust the specified VF user. This enables that VF user can set a specific feature
1588 which may impact security and/or performance. (e.g. VF multicast promiscuous mode)
1590 .BI node_guid " eui64"
1591 - configure node GUID for Infiniband VFs.
1593 .BI port_guid " eui64"
1594 - configure port GUID for Infiniband VFs.
1598 .B xdp object "|" pinned "|" off
1599 set (or unset) a XDP ("eXpress Data Path") BPF program to run on every
1600 packet at driver level.
1602 output will indicate a
1604 flag for the networking device. If the driver does not have native XDP
1605 support, the kernel will fall back to a slower, driver-independent "generic"
1608 output will in that case indicate
1612 only. If the driver does have native XDP support, but the program is
1614 .B xdpgeneric object "|" pinned
1615 then the kernel will use the generic XDP variant instead of the native one.
1617 has the opposite effect of requestsing that the automatic fallback to the
1618 generic XDP variant be disabled and in case driver is not XDP-capable error
1621 also disables hardware offloads.
1623 in ip link output indicates that the program has been offloaded to hardware
1624 and can also be used to request the "offload" mode, much like
1626 it forces program to be installed specifically in HW/FW of the apater.
1632 - Detaches any currently attached XDP/BPF program from the given device.
1635 - Attaches a XDP/BPF program to the given device. The
1637 points to a BPF ELF file (f.e. generated by LLVM) that contains the BPF
1638 program code, map specifications, etc. If a XDP/BPF program is already
1639 attached to the given device, an error will be thrown. If no XDP/BPF
1640 program is currently attached, the device supports XDP and the program
1641 from the BPF ELF file passes the kernel verifier, then it will be attached
1642 to the device. If the option
1646 then any prior attached XDP/BPF program will be atomically overridden and
1647 no error will be thrown in this case. If no
1649 option is passed, then the default section name ("prog") will be assumed,
1650 otherwise the provided section name will be used. If no
1652 option is passed, then a verifier log will only be dumped on load error.
1655 section for usage examples.
1657 .BI section " NAME "
1658 - Specifies a section name that contains the BPF program code. If no section
1659 name is specified, the default one ("prog") will be used. This option is
1660 to be passed with the
1665 - Act in verbose mode. For example, even in case of success, this will
1666 print the verifier log in case a program was loaded from a BPF ELF file.
1669 - Attaches a XDP/BPF program to the given device. The
1671 points to an already pinned BPF program in the BPF file system. The option
1673 doesn't apply here, but otherwise semantics are the same as with the option
1678 .BI master " DEVICE"
1679 set master device of the device (enslave device).
1683 unset master device of the device (release device).
1686 .BI addrgenmode " eui64|none|stable_secret|random"
1687 set the IPv6 address generation mode
1690 - use a Modified EUI-64 format interface identifier
1693 - disable automatic address generation
1696 - generate the interface identifier based on a preset /proc/sys/net/ipv6/conf/{default,DEVICE}/stable_secret
1699 - like stable_secret, but auto-generate a new random secret if none is set
1703 set peer netnsid for a cross-netns interface
1706 .BI type " ETYPE TYPE_ARGS"
1707 Change type-specific settings. For a list of supported types and arguments refer
1708 to the description of
1710 above. In addition to that, it is possible to manipulate settings to slave
1714 Bridge Slave Support
1715 For a link with master
1717 the following additional arguments are supported:
1719 .B "ip link set type bridge_slave"
1725 .BI priority " PRIO"
1729 .BR guard " { " on " | " off " }"
1731 .BR hairpin " { " on " | " off " }"
1733 .BR fastleave " { " on " | " off " }"
1735 .BR root_block " { " on " | " off " }"
1737 .BR learning " { " on " | " off " }"
1739 .BR flood " { " on " | " off " }"
1741 .BR proxy_arp " { " on " | " off " }"
1743 .BR proxy_arp_wifi " { " on " | " off " }"
1745 .BI mcast_router " MULTICAST_ROUTER"
1747 .BR mcast_fast_leave " { " on " | " off "}"
1749 .BR mcast_flood " { " on " | " off " }"
1751 .BR group_fwd_mask " MASK"
1753 .BR neigh_suppress " { " on " | " off " } ]"
1758 - flush bridge slave's fdb dynamic entries.
1763 is a number representing the following states:
1764 .BR 0 " (disabled),"
1765 .BR 1 " (listening),"
1766 .BR 2 " (learning),"
1767 .BR 3 " (forwarding),"
1768 .BR 4 " (blocking)."
1770 .BI priority " PRIO"
1771 - set port priority (allowed values are between 0 and 63, inclusively).
1774 - set port cost (allowed values are between 1 and 65535, inclusively).
1776 .BR guard " { " on " | " off " }"
1777 - block incoming BPDU packets on this port.
1779 .BR hairpin " { " on " | " off " }"
1780 - enable hairpin mode on this port. This will allow incoming packets on this
1781 port to be reflected back.
1783 .BR fastleave " { " on " | " off " }"
1784 - enable multicast fast leave on this port.
1786 .BR root_block " { " on " | " off " }"
1787 - block this port from becoming the bridge's root port.
1789 .BR learning " { " on " | " off " }"
1790 - allow MAC address learning on this port.
1792 .BR flood " { " on " | " off " }"
1793 - open the flood gates on this port, i.e. forward all unicast frames to this
1795 .BR proxy_arp " and " proxy_arp_wifi
1798 .BR proxy_arp " { " on " | " off " }"
1799 - enable proxy ARP on this port.
1801 .BR proxy_arp_wifi " { " on " | " off " }"
1802 - enable proxy ARP on this port which meets extended requirements by IEEE
1803 802.11 and Hotspot 2.0 specifications.
1805 .BI mcast_router " MULTICAST_ROUTER"
1806 - configure this port for having multicast routers attached. A port with a
1807 multicast router will receive all multicast traffic.
1811 to disable multicast routers on this port,
1813 to let the system detect the presence of of routers (this is the default),
1815 to permanently enable multicast traffic forwarding on this port or
1817 to enable multicast routers temporarily on this port, not depending on incoming
1820 .BR mcast_fast_leave " { " on " | " off " }"
1821 - this is a synonym to the
1825 .BR mcast_flood " { " on " | " off " }"
1826 - controls whether a given port will be flooded with multicast traffic for which there is no MDB entry.
1828 .BI group_fwd_mask " MASK "
1829 - 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 .BR neigh_suppress " { " on " | " off " }"
1832 - controls whether neigh discovery (arp and nd) proxy and suppression is enabled on the port. By default this flag is off.
1837 Bonding Slave Support
1838 For a link with master
1840 the following additional arguments are supported:
1842 .B "ip link set type bond_slave"
1850 - set the slave's queue ID (a 16bit unsigned value).
1855 MACVLAN and MACVTAP Support
1856 Modify list of allowed macaddr for link in source mode.
1858 .B "ip link set type { macvlan | macvap } "
1860 .BI macaddr " " "" COMMAND " " MACADDR " ..."
1866 - add MACADDR to allowed list
1869 - replace allowed list
1872 - remove MACADDR from allowed list
1875 - flush whole allowed list
1880 .SS ip link show - display device attributes
1883 .BI dev " NAME " (default)
1885 specifies the network device to show.
1886 If this argument is omitted all devices in the default group are listed.
1891 specifies what group of devices to show.
1895 only display running interfaces.
1898 .BI master " DEVICE "
1900 specifies the master device which enslaves devices to show.
1905 speficies the VRF which enslaves devices to show.
1910 specifies the type of devices to show.
1912 Note that the type name is not checked against the list of supported types -
1913 instead it is sent as-is to the kernel. Later it is used to filter the returned
1914 interface list by comparing it with the relevant attribute in case the kernel
1915 didn't filter already. Therefore any string is accepted, but may lead to empty
1918 .SS ip link xstats - display extended statistics
1923 specifies the type of devices to display extended statistics for.
1925 .SS ip link afstats - display address-family specific statistics
1930 specifies the device to display address-family statistics for.
1932 .SS ip link help - display help
1936 specifies which help of link type to dislpay.
1940 may be a number or a string from the file
1941 .B @SYSCONFDIR@/group
1942 which can be manually filled.
1948 Shows the state of all network interfaces on the system.
1951 ip link show type bridge
1953 Shows the bridge devices.
1956 ip link show type vlan
1958 Shows the vlan devices.
1961 ip link show master br0
1963 Shows devices enslaved by br0
1966 ip link set dev ppp0 mtu 1400
1968 Change the MTU the ppp0 device.
1971 ip link add link eth0 name eth0.10 type vlan id 10
1973 Creates a new vlan device eth0.10 on device eth0.
1976 ip link delete dev eth0.10
1978 Removes vlan device.
1983 Display help for the gre link type.
1986 ip link add name tun1 type ipip remote 192.168.1.1
1987 local 192.168.1.2 ttl 225 encap gue encap-sport auto
1988 encap-dport 5555 encap-csum encap-remcsum
1990 Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
1991 and the outer UDP checksum and remote checksum offload are enabled.
1994 ip link set dev eth0 xdp obj prog.o
1996 Attaches a XDP/BPF program to device eth0, where the program is
1997 located in prog.o, section "prog" (default section). In case a
1998 XDP/BPF program is already attached, throw an error.
2001 ip -force link set dev eth0 xdp obj prog.o sec foo
2003 Attaches a XDP/BPF program to device eth0, where the program is
2004 located in prog.o, section "foo". In case a XDP/BPF program is
2005 already attached, it will be overridden by the new one.
2008 ip -force link set dev eth0 xdp pinned /sys/fs/bpf/foo
2010 Attaches a XDP/BPF program to device eth0, where the program was
2011 previously pinned as an object node into BPF file system under
2015 ip link set dev eth0 xdp off
2017 If a XDP/BPF program is attached on device eth0, detach it and
2018 effectively turn off XDP for device eth0.
2021 ip link add link wpan0 lowpan0 type lowpan
2023 Creates a 6LoWPAN interface named lowpan0 on the underlying
2024 IEEE 802.15.4 device wpan0.
2035 Original Manpage by Michail Litvak <mci@owl.openwall.com>