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 " | "
216 .IR ETYPE " := [ " TYPE " |"
217 .BR bridge_slave " | " bond_slave " ]"
220 .IR VFVLAN-LIST " := [ " VFVLAN-LIST " ] " VFVLAN
229 .IR VLAN-PROTO " ] ]"
232 .SS ip link add - add virtual link
236 specifies the physical device to act operate on.
239 specifies the name of the new virtual device.
242 specifies the type of the new device.
248 - Ethernet Bridge device
253 - Controller Area Network interface
256 - Dummy network interface
259 - High-availability Seamless Redundancy device
262 - Intermediate Functional Block device
265 - IP over Infiniband device
268 - Virtual interface base on link layer address (MAC)
271 - Virtual interface based on link layer address (MAC) and TAP.
274 - Virtual Controller Area Network interface
277 - Virtual ethernet interface
280 - 802.1q tagged virtual LAN interface
283 - Virtual eXtended LAN
286 - Virtual tunnel interface IPv4|IPv6 over IPv6
289 - Virtual tunnel interface IPv4 over IPv4
292 - Virtual tunnel interface IPv6 over IPv4
295 - Virtual tunnel interface GRE over IPv4
298 - Virtual L2 tunnel interface GRE over IPv4
301 - Virtual tunnel interface GRE over IPv6
304 - Virtual L2 tunnel interface GRE over IPv6
307 - Virtual tunnel interface
310 - Netlink monitoring device
313 - Interface for L3 (IPv6/IPv4) based VLANs
316 - Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 / Bluetooth
319 - GEneric NEtwork Virtualization Encapsulation
322 - Interface for IEEE 802.1AE MAC Security (MACsec)
325 - Interface for L3 VRF domains
329 .BI numtxqueues " QUEUE_COUNT "
330 specifies the number of transmit queues for new device.
333 .BI numrxqueues " QUEUE_COUNT "
334 specifies the number of receive queues for new device.
338 specifies the desired index of the new virtual device. The link creation fails, if the index is busy.
344 the following additional arguments are supported:
351 .BI protocol " VLAN_PROTO "
355 .BR reorder_hdr " { " on " | " off " } "
358 .BR gvrp " { " on " | " off " } "
361 .BR mvrp " { " on " | " off " } "
364 .BR loose_binding " { " on " | " off " } "
367 .BI ingress-qos-map " QOS-MAP "
370 .BI egress-qos-map " QOS-MAP "
375 .BI protocol " VLAN_PROTO "
376 - either 802.1Q or 802.1ad.
379 - specifies the VLAN Identifer to use. Note that numbers with a leading " 0 " or " 0x " are interpreted as octal or hexadeimal, respectively.
381 .BR reorder_hdr " { " on " | " off " } "
382 - specifies whether ethernet headers are reordered or not (default is
387 .BR reorder_hdr " is " on
388 then VLAN header will be not inserted immediately but only before passing to the
389 physical device (if this device does not support VLAN offloading), the similar
390 on the RX direction - by default the packet will be untagged before being
391 received by VLAN device. Reordering allows to accelerate tagging on egress and
392 to hide VLAN header on ingress so the packet looks like regular Ethernet packet,
393 at the same time it might be confusing for packet capture as the VLAN header
394 does not exist within the packet.
396 VLAN offloading can be checked by
402 .RB grep " tx-vlan-offload"
405 where <phy_dev> is the physical device to which VLAN device is bound.
408 .BR gvrp " { " on " | " off " } "
409 - specifies whether this VLAN should be registered using GARP VLAN Registration Protocol.
411 .BR mvrp " { " on " | " off " } "
412 - specifies whether this VLAN should be registered using Multiple VLAN Registration Protocol.
414 .BR loose_binding " { " on " | " off " } "
415 - specifies whether the VLAN device state is bound to the physical device state.
417 .BI ingress-qos-map " QOS-MAP "
418 - defines a mapping of VLAN header prio field to the Linux internal packet
419 priority on incoming frames. The format is FROM:TO with multiple mappings
422 .BI egress-qos-map " QOS-MAP "
423 - defines a mapping of Linux internal packet priority to VLAN header prio field
424 but for outgoing frames. The format is the same as for ingress-qos-map.
427 Linux packet priority can be set by
432 -t mangle -A POSTROUTING [...] -j CLASSIFY --set-class 0:4
435 and this "4" priority can be used in the egress qos mapping to set VLAN prio "5":
439 link set veth0.10 type vlan egress 4:5
448 the following additional arguments are supported:
450 .BI "ip link add " DEVICE
451 .BI type " vxlan " id " VNI"
454 .RB " ] [ { " group " | " remote " } "
458 .RI "{ "IPADDR " | "any " } "
464 .BI flowlabel " FLOWLABEL "
468 .BI srcport " MIN MAX "
482 .RB [ no ] udp6zerocsumtx
484 .RB [ no ] udp6zerocsumrx
486 .BI ageing " SECONDS "
488 .BI maxaddress " NUMBER "
500 - specifies the VXLAN Network Identifer (or VXLAN Segment
504 - specifies the physical device to use for tunnel endpoint communication.
508 - specifies the multicast IP address to join.
509 This parameter cannot be specified with the
515 - specifies the unicast destination IP address to use in outgoing packets
516 when the destination link layer address is not known in the VXLAN device
517 forwarding database. This parameter cannot be specified with the
523 - specifies the source IP address to use in outgoing packets.
527 - specifies the TTL value to use in outgoing packets.
531 - specifies the TOS value to use in outgoing packets.
534 .BI flowlabel " FLOWLABEL"
535 - specifies the flow label to use in outgoing packets.
539 - specifies the UDP destination port to communicate to the remote VXLAN tunnel endpoint.
542 .BI srcport " MIN MAX"
543 - specifies the range of port numbers to use as UDP
544 source ports to communicate to the remote VXLAN tunnel endpoint.
548 - specifies if unknown source link layer addresses and IP addresses
549 are entered into the VXLAN device forwarding database.
553 - specifies if route short circuit is turned on.
557 - specifies ARP proxy is turned on.
561 - specifies if netlink LLADDR miss notifications are generated.
565 - specifies if netlink IP ADDR miss notifications are generated.
569 - specifies if UDP checksum is calculated for transmitted packets over IPv4.
572 .RB [ no ] udp6zerocsumtx
573 - skip UDP checksum calculation for transmitted packets over IPv6.
576 .RB [ no ] udp6zerocsumrx
577 - allow incoming UDP packets over IPv6 with zero checksum field.
580 .BI ageing " SECONDS"
581 - specifies the lifetime in seconds of FDB entries learnt by the kernel.
584 .BI maxaddress " NUMBER"
585 - specifies the maximum number of FDB entries.
589 - specifies whether an external control plane
590 .RB "(e.g. " "ip route encap" )
591 or the internal FDB should be used.
595 - enables the Group Policy extension (VXLAN-GBP).
598 Allows to transport group policy context across VXLAN network peers.
599 If enabled, includes the mark of a packet in the VXLAN header for outgoing
600 packets and fills the packet mark based on the information found in the
601 VXLAN header for incomming packets.
603 Format of upper 16 bits of packet mark (flags);
606 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
608 |-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|
610 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
613 Don't Learn bit. When set, this bit indicates that the egress
614 VTEP MUST NOT learn the source address of the encapsulated frame.
617 Indicates that the group policy has already been applied to
618 this packet. Policies MUST NOT be applied by devices when the A bit is set.
621 Format of lower 16 bits of packet mark (policy ID):
624 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
628 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
632 iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF
638 - enables the Generic Protocol extension (VXLAN-GPE). Currently, this is
639 only supported together with the
646 GRE, IPIP, SIT Type Support
649 the following additional arguments are supported:
651 .BI "ip link add " DEVICE
652 .BR type " { " gre " | " ipip " | " sit " }"
653 .BI " remote " ADDR " local " ADDR
655 .BR encap " { " fou " | " gue " | " none " }"
657 .BR encap-sport " { " \fIPORT " | " auto " }"
659 .BI "encap-dport " PORT
661 .RB [ no ] encap-csum
663 .I " [no]encap-remcsum "
665 .I " mode " { ip6ip | ipip | mplsip | any } "
671 - specifies the remote address of the tunnel.
675 - specifies the fixed local address for tunneled packets.
676 It must be an address on another interface on this host.
679 .BR encap " { " fou " | " gue " | " none " }"
680 - specifies type of secondary UDP encapsulation. "fou" indicates
681 Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
684 .BR encap-sport " { " \fIPORT " | " auto " }"
685 - specifies the source port in UDP encapsulation.
687 indicates the port by number, "auto"
688 indicates that the port number should be chosen automatically
689 (the kernel picks a flow based on the flow hash of the
690 encapsulated packet).
693 .RB [ no ] encap-csum
694 - specifies if UDP checksums are enabled in the secondary
698 .RB [ no ] encap-remcsum
699 - specifies if Remote Checksum Offload is enabled. This is only
700 applicable for Generic UDP Encapsulation.
703 .BI mode " { ip6ip | ipip | mplsip | any } "
704 - specifies mode in which device should run. "ip6ip" indicates
705 IPv6-Over-IPv4, "ipip" indicates "IPv4-Over-IPv4", "mplsip" indicates
706 MPLS-Over-IPv4, "any" indicates IPv6, IPv4 or MPLS Over IPv4. Supported for
707 SIT where the default is "ip6ip" and IPIP where the default is "ipip".
708 IPv6-Over-IPv4 is not supported for IPIP.
713 IP6GRE/IP6GRETAP Type Support
716 the following additional arguments are supported:
718 .BI "ip link add " DEVICE
719 .BR type " { " ip6gre " | " ip6gretap " }"
720 .BI remote " ADDR " local " ADDR"
731 .BI encaplimit " ELIM "
733 .BI tclass " TCLASS "
735 .BI flowlabel " FLOWLABEL "
745 - specifies the remote IPv6 address of the tunnel.
749 - specifies the fixed local IPv6 address for tunneled packets.
750 It must be an address on another interface on this host.
757 flag enables sequencing of outgoing packets.
760 flag requires that all input packets are serialized.
763 .RB [ i | o ] key " \fIKEY"
764 - use keyed GRE with key
766 is either a number or an IPv4 address-like dotted quad.
769 parameter specifies the same key to use in both directions.
771 .BR ikey " and " okey
772 parameters specify different keys for input and output.
776 - generate/require checksums for tunneled packets.
779 flag calculates checksums for outgoing packets.
782 flag requires that all input packets have the correct
785 flag is equivalent to the combination
790 - specifies Hop Limit value to use in outgoing packets.
793 .BI encaplimit " ELIM"
794 - specifies a fixed encapsulation limit. Default is 4.
797 .BI flowlabel " FLOWLABEL"
798 - specifies a fixed flowlabel.
802 - specifies the traffic class field on
803 tunneled packets, which can be specified as either a two-digit
804 hex value (e.g. c0) or a predefined string (e.g. internet).
807 causes the field to be copied from the original IP header. The
809 .BI "inherit/" STRING
811 .BI "inherit/" 00 ".." ff
812 will set the field to
816 when tunneling non-IP packets. The default value is 00.
824 the following additional arguments are supported:
826 .BI "ip link add " DEVICE " name " NAME
827 .BR "type ipoib " [ " pkey \fIPKEY" " ] [ " mode " \fIMODE \fR]"
832 - specifies the IB P-Key to use.
835 - specifies the mode (datagram or connected) to use.
841 the following additional arguments are supported:
843 .BI "ip link add " DEVICE
844 .BI type " geneve " id " VNI " remote " IPADDR"
850 .BI flowlabel " FLOWLABEL "
858 .RB [ no ] udp6zerocsumtx
860 .RB [ no ] udp6zerocsumrx
866 - specifies the Virtual Network Identifer to use.
870 - specifies the unicast destination IP address to use in outgoing packets.
874 - specifies the TTL value to use in outgoing packets.
878 - specifies the TOS value to use in outgoing packets.
881 .BI flowlabel " FLOWLABEL"
882 - specifies the flow label to use in outgoing packets.
886 - select a destination port other than the default of 6081.
890 - make this tunnel externally controlled (or not, which is the default). This
891 flag is mutually exclusive with the
895 .BR tos " and " flowlabel
900 - specifies if UDP checksum is calculated for transmitted packets over IPv4.
903 .RB [ no ] udp6zerocsumtx
904 - skip UDP checksum calculation for transmitted packets over IPv6.
907 .RB [ no ] udp6zerocsumrx
908 - allow incoming UDP packets over IPv6 with zero checksum field.
913 MACVLAN and MACVTAP Type Support
918 the following additional arguments are supported:
920 .BI "ip link add link " DEVICE " name " NAME
921 .BR type " { " macvlan " | " macvtap " } "
922 .BR mode " { " private " | " vepa " | " bridge " | " passthru
923 .RB " [ " nopromisc " ] | " source " } "
927 .BR type " { " macvlan " | " macvtap " } "
928 - specifies the link type to use.
929 .BR macvlan " creates just a virtual interface, while "
930 .BR macvtap " in addition creates a character device "
931 .BR /dev/tapX " to be used just like a " tuntap " device."
934 - Do not allow communication between
936 instances on the same physical interface, even if the external switch supports
940 - Virtual Ethernet Port Aggregator mode. Data from one
942 instance to the other on the same physical interface is transmitted over the
943 physical interface. Either the attached switch needs to support hairpin mode,
944 or there must be a TCP/IP router forwarding the packets in order to allow
945 communication. This is the default mode.
948 - In bridge mode, all endpoints are directly connected to each other,
949 communication is not redirected through the physical interface's peer.
951 .BR mode " " passthru " [ " nopromisc " ] "
952 - This mode gives more power to a single endpoint, usually in
953 .BR macvtap " mode. It is not allowed for more than one endpoint on the same "
954 physical interface. All traffic will be forwarded to this endpoint, allowing
955 virtio guests to change MAC address or set promiscuous mode in order to bridge
956 the interface or create vlan interfaces on top of it. By default, this mode
957 forces the underlying interface into promiscuous mode. Passing the
958 .BR nopromisc " flag prevents this, so the promisc flag may be controlled "
959 using standard tools.
962 - allows one to set a list of allowed mac address, which is used to match
963 against source mac address from received frames on underlying interface. This
964 allows creating mac based VLAN associations, instead of standard port or tag
965 based. The feature is useful to deploy 802.1x mac based behavior,
966 where drivers of underlying interfaces doesn't allows that.
970 High-availability Seamless Redundancy (HSR) Support
973 the following additional arguments are supported:
975 .BI "ip link add link " DEVICE " name " NAME " type hsr"
976 .BI slave1 " SLAVE1-IF " slave2 " SLAVE2-IF "
979 .BR version " { " 0 " | " 1 " } ]"
984 - specifies the link type to use, here HSR.
986 .BI slave1 " SLAVE1-IF "
987 - Specifies the physical device used for the first of the two ring ports.
989 .BI slave2 " SLAVE2-IF "
990 - Specifies the physical device used for the second of the two ring ports.
992 .BI supervision " ADDR-BYTE"
993 - The last byte of the multicast address used for HSR supervision frames.
994 Default option is "0", possible values 0-255.
996 .BR version " { " 0 " | " 1 " }"
997 - Selects the protocol version of the interface. Default option is "0", which
998 corresponds to the 2010 version of the HSR standard. Option "1" activates the
1006 the following additional arguments are supported:
1008 .BI "ip link add " DEVICE " type bridge "
1010 .BI ageing_time " AGEING_TIME "
1012 .BI group_fwd_mask " MASK "
1014 .BI group_address " ADDRESS "
1016 .BI forward_delay " FORWARD_DELAY "
1018 .BI hello_time " HELLO_TIME "
1020 .BI max_age " MAX_AGE "
1022 .BI stp_state " STP_STATE "
1024 .BI priority " PRIORITY "
1026 .BI vlan_filtering " VLAN_FILTERING "
1028 .BI vlan_protocol " VLAN_PROTOCOL "
1030 .BI vlan_default_pvid " VLAN_DEFAULT_PVID "
1032 .BI vlan_stats_enabled " VLAN_STATS_ENABLED "
1034 .BI mcast_snooping " MULTICAST_SNOOPING "
1036 .BI mcast_router " MULTICAST_ROUTER "
1038 .BI mcast_query_use_ifaddr " MCAST_QUERY_USE_IFADDR "
1040 .BI mcast_querier " MULTICAST_QUERIER "
1042 .BI mcast_hash_elasticity " HASH_ELASTICITY "
1044 .BI mcast_hash_max " HASH_MAX "
1046 .BI mcast_last_member_count " LAST_MEMBER_COUNT "
1048 .BI mcast_startup_query_count " STARTUP_QUERY_COUNT "
1050 .BI mcast_last_member_interval " LAST_MEMBER_INTERVAL "
1052 .BI mcast_membership_interval " MEMBERSHIP_INTERVAL "
1054 .BI mcast_querier_interval " QUERIER_INTERVAL "
1056 .BI mcast_query_interval " QUERY_INTERVAL "
1058 .BI mcast_query_response_interval " QUERY_RESPONSE_INTERVAL "
1060 .BI mcast_startup_query_interval " STARTUP_QUERY_INTERVAL "
1062 .BI mcast_stats_enabled " MCAST_STATS_ENABLED "
1064 .BI mcast_igmp_version " IGMP_VERSION "
1066 .BI mcast_mld_version " MLD_VERSION "
1068 .BI nf_call_iptables " NF_CALL_IPTABLES "
1070 .BI nf_call_ip6tables " NF_CALL_IP6TABLES "
1072 .BI nf_call_arptables " NF_CALL_ARPTABLES "
1077 .BI ageing_time " AGEING_TIME "
1078 - 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.
1080 .BI group_fwd_mask " MASK "
1081 - 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).
1083 .BI group_address " ADDRESS "
1084 - 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].
1086 .BI forward_delay " FORWARD_DELAY "
1087 - 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.
1089 .BI hello_time " HELLO_TIME "
1090 - 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.
1092 .BI max_age " MAX_AGE "
1093 - 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.
1095 .BI stp_state " STP_STATE "
1096 - turn spanning tree protocol on
1097 .RI ( STP_STATE " > 0) "
1099 .RI ( STP_STATE " == 0). "
1102 .BI priority " PRIORITY "
1103 - set this bridge's spanning tree priority, used during STP root bridge election.
1105 is a 16bit unsigned integer.
1107 .BI vlan_filtering " VLAN_FILTERING "
1108 - turn VLAN filtering on
1109 .RI ( VLAN_FILTERING " > 0) "
1111 .RI ( VLAN_FILTERING " == 0). "
1112 When disabled, the bridge will not consider the VLAN tag when handling packets.
1114 .BR vlan_protocol " { " 802.1Q " | " 802.1ad " } "
1115 - set the protocol used for VLAN filtering.
1117 .BI vlan_default_pvid " VLAN_DEFAULT_PVID "
1118 - set the default PVID (native/untagged VLAN ID) for this bridge.
1120 .BI vlan_stats_enabled " VLAN_STATS_ENABLED "
1122 .RI ( VLAN_STATS_ENABLED " == 1) "
1124 .RI ( VLAN_STATS_ENABLED " == 0) "
1125 per-VLAN stats accounting.
1127 .BI mcast_snooping " MULTICAST_SNOOPING "
1128 - turn multicast snooping on
1129 .RI ( MULTICAST_SNOOPING " > 0) "
1131 .RI ( MULTICAST_SNOOPING " == 0). "
1133 .BI mcast_router " MULTICAST_ROUTER "
1134 - set bridge's multicast router if IGMP snooping is enabled.
1136 is an integer value having the following meaning:
1143 - automatic (queried).
1146 - permanently enabled.
1149 .BI mcast_query_use_ifaddr " MCAST_QUERY_USE_IFADDR "
1150 - whether to use the bridge's own IP address as source address for IGMP queries
1151 .RI ( MCAST_QUERY_USE_IFADDR " > 0) "
1152 or the default of 0.0.0.0
1153 .RI ( MCAST_QUERY_USE_IFADDR " == 0). "
1155 .BI mcast_querier " MULTICAST_QUERIER "
1157 .RI ( MULTICAST_QUERIER " > 0) "
1159 .RI ( MULTICAST_QUERIER " == 0) "
1160 IGMP querier, ie sending of multicast queries by the bridge (default: disabled).
1162 .BI mcast_querier_interval " QUERIER_INTERVAL "
1163 - 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
1167 .BI mcast_hash_elasticity " HASH_ELASTICITY "
1168 - set multicast database hash elasticity, ie the maximum chain length in the multicast hash table (defaults to 4).
1170 .BI mcast_hash_max " HASH_MAX "
1171 - set maximum size of multicast hash table (defaults to 512, value must be a power of 2).
1173 .BI mcast_last_member_count " LAST_MEMBER_COUNT "
1174 - 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).
1176 .BI mcast_last_member_interval " LAST_MEMBER_INTERVAL "
1177 - interval between queries to find remaining members of a group, after a "leave" message is received.
1179 .BI mcast_startup_query_count " STARTUP_QUERY_COUNT "
1180 - set the number of IGMP queries to send during startup phase (defaults to 2).
1182 .BI mcast_startup_query_interval " STARTUP_QUERY_INTERVAL "
1183 - interval between queries in the startup phase.
1185 .BI mcast_query_interval " QUERY_INTERVAL "
1186 - interval between queries sent by the bridge after the end of the startup phase.
1188 .BI mcast_query_response_interval " QUERY_RESPONSE_INTERVAL "
1189 - set the Max Response Time/Maximum Response Delay for IGMP/MLD queries sent by the bridge.
1191 .BI mcast_membership_interval " MEMBERSHIP_INTERVAL "
1192 - delay after which the bridge will leave a group, if no membership reports for this group are received.
1194 .BI mcast_stats_enabled " MCAST_STATS_ENABLED "
1196 .RI ( MCAST_STATS_ENABLED " > 0) "
1198 .RI ( MCAST_STATS_ENABLED " == 0) "
1199 multicast (IGMP/MLD) stats accounting.
1201 .BI mcast_igmp_version " IGMP_VERSION "
1202 - set the IGMP version.
1204 .BI mcast_mld_version " MLD_VERSION "
1205 - set the MLD version.
1207 .BI nf_call_iptables " NF_CALL_IPTABLES "
1209 .RI ( NF_CALL_IPTABLES " > 0) "
1211 .RI ( NF_CALL_IPTABLES " == 0) "
1212 iptables hooks on the bridge.
1214 .BI nf_call_ip6tables " NF_CALL_IP6TABLES "
1216 .RI ( NF_CALL_IP6TABLES " > 0) "
1218 .RI ( NF_CALL_IP6TABLES " == 0) "
1219 ip6tables hooks on the bridge.
1221 .BI nf_call_arptables " NF_CALL_ARPTABLES "
1223 .RI ( NF_CALL_ARPTABLES " > 0) "
1225 .RI ( NF_CALL_ARPTABLES " == 0) "
1226 arptables hooks on the bridge.
1235 the following additional arguments are supported:
1237 .BI "ip link add link " DEVICE " name " NAME " type macsec"
1239 .BI address " <lladdr>"
1245 .BI cipher " CIPHER_SUITE"
1250 .BR on " | " off " } ] [ "
1251 .BR send_sci " { " on " | " off " } ] ["
1252 .BR end_station " { " on " | " off " } ] ["
1253 .BR scb " { " on " | " off " } ] ["
1254 .BR protect " { " on " | " off " } ] ["
1255 .BR replay " { " on " | " off " }"
1257 .IR 0..2^32-1 " } ] ["
1258 .BR validate " { " strict " | " check " | " disabled " } ] ["
1259 .BR encodingsa " { "
1264 .BI address " <lladdr> "
1265 - sets the system identifier component of secure channel for this MACsec device.
1269 - sets the port number component of secure channel for this MACsec device, in a
1270 range from 1 to 65535 inclusive. Numbers with a leading " 0 " or " 0x " are
1271 interpreted as octal and hexadecimal, respectively.
1275 - sets the secure channel identifier for this MACsec device.
1277 is a 64bit wide number in hexadecimal format.
1280 .BI cipher " CIPHER_SUITE "
1281 - defines the cipher suite to use.
1284 .BI icvlen " LENGTH "
1285 - sets the length of the Integrity Check Value (ICV).
1288 .BR "encrypt on " or " encrypt off"
1289 - switches between authenticated encryption, or authenticity mode only.
1292 .BR "send_sci on " or " send_sci off"
1293 - specifies whether the SCI is included in every packet, or only when it is necessary.
1296 .BR "end_station on " or " end_station off"
1297 - sets the End Station bit.
1300 .BR "scb on " or " scb off"
1301 - sets the Single Copy Broadcast bit.
1304 .BR "protect on " or " protect off"
1305 - enables MACsec protection on the device.
1308 .BR "replay on " or " replay off"
1309 - enables replay protection on the device.
1315 - sets the size of the replay window.
1320 .BR "validate strict " or " validate check " or " validate disabled"
1321 - sets the validation mode on the device.
1324 .BI encodingsa " AN "
1325 - sets the active secure association for transmission.
1333 the following additional arguments are supported:
1335 .BI "ip link add " DEVICE " type vrf table " TABLE
1339 .BR table " table id associated with VRF device"
1343 .SS ip link delete - delete virtual link
1347 specifies the virtual device to act operate on.
1351 specifies the group of virtual links to delete. Group 0 is not allowed to be
1352 deleted since it is the default group.
1356 specifies the type of the device.
1358 .SS ip link set - change device attributes
1362 If multiple parameter changes are requested,
1364 aborts immediately after any of the changes have failed.
1365 This is the only case when
1367 can move the system to an unpredictable state. The solution
1368 is to avoid changing several parameters with one
1375 specifies network device to operate on. When configuring SR-IOV Virtual Function
1376 (VF) devices, this keyword should specify the associated Physical Function (PF)
1382 has a dual role: If both group and dev are present, then move the device to the
1383 specified group. If only a group is specified, then the command operates on
1384 all devices in that group.
1388 change the state of the device to
1394 .BR "arp on " or " arp off"
1400 .BR "multicast on " or " multicast off"
1406 .BR "protodown on " or " protodown off"
1409 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.
1412 .BR "dynamic on " or " dynamic off"
1415 flag on the device. Indicates that address can change when interface goes down (currently
1421 change the name of the device. This operation is not
1422 recommended if the device is running or has some addresses
1426 .BI txqueuelen " NUMBER"
1428 .BI txqlen " NUMBER"
1429 change the transmit queue length of the device.
1438 .BI address " LLADDRESS"
1439 change the station address of the interface.
1442 .BI broadcast " LLADDRESS"
1444 .BI brd " LLADDRESS"
1446 .BI peer " LLADDRESS"
1447 change the link layer broadcast address or the peer address when
1452 .BI netns " NETNSNAME " \fR| " PID"
1453 move the device to the network namespace associated with name
1457 Some devices are not allowed to change network namespace: loopback, bridge,
1458 ppp, wireless. These are network namespace local devices. In such case
1460 tool will return "Invalid argument" error. It is possible to find out if device is local
1461 to a single network namespace by checking
1463 flag in the output of the
1471 To change network namespace for wireless devices the
1473 tool can be used. But it allows to change network namespace only for physical devices and by process
1478 give the device a symbolic name for easy reference.
1482 specify the group the device belongs to.
1483 The available groups are listed in file
1484 .BR "@SYSCONFDIR@/group" .
1488 specify a Virtual Function device to be configured. The associated PF device
1489 must be specified using the
1494 .BI mac " LLADDRESS"
1495 - change the station address for the specified VF. The
1497 parameter must be specified.
1501 - change the assigned VLAN for the specified VF. When specified, all traffic
1502 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
1503 will be filtered for the specified VLAN ID, and will have all VLAN tags
1504 stripped before being passed to the VF. Setting this parameter to 0 disables
1505 VLAN tagging and filtering. The
1507 parameter must be specified.
1511 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
1512 tags transmitted by the VF will include the specified priority bits in the
1513 VLAN tag. If not specified, the value is assumed to be 0. Both the
1517 parameters must be specified. Setting both
1521 as 0 disables VLAN tagging and filtering for the VF.
1524 .BI proto " VLAN-PROTO"
1525 - assign VLAN PROTOCOL for the VLAN tag, either 802.1Q or 802.1ad.
1526 Setting to 802.1ad, all traffic sent from the VF will be tagged with VLAN S-Tag.
1527 Incoming traffic will have VLAN S-Tags stripped before being passed to the VF.
1528 Setting to 802.1ad also enables an option to concatenate another VLAN tag, so both
1529 S-TAG and C-TAG will be inserted/stripped for outgoing/incoming traffic, respectively.
1530 If not specified, the value is assumed to be 802.1Q. Both the
1534 parameters must be specified.
1538 -- change the allowed transmit bandwidth, in Mbps, for the specified VF.
1539 Setting this parameter to 0 disables rate limiting.
1541 parameter must be specified.
1547 .BI max_tx_rate " TXRATE"
1548 - change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
1550 parameter must be specified.
1553 .BI min_tx_rate " TXRATE"
1554 - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
1555 Minimum TXRATE should be always <= Maximum TXRATE.
1557 parameter must be specified.
1560 .BI spoofchk " on|off"
1561 - turn packet spoof checking on or off for the specified VF.
1563 .BI query_rss " on|off"
1564 - 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.
1566 .BI state " auto|enable|disable"
1567 - set the virtual link state as seen by the specified VF. Setting to auto means a
1568 reflection of the PF link state, enable lets the VF to communicate with other VFs on
1569 this host even if the PF link state is down, disable causes the HW to drop any packets
1573 - trust the specified VF user. This enables that VF user can set a specific feature
1574 which may impact security and/or performance. (e.g. VF multicast promiscuous mode)
1576 .BI node_guid " eui64"
1577 - configure node GUID for Infiniband VFs.
1579 .BI port_guid " eui64"
1580 - configure port GUID for Infiniband VFs.
1584 .B xdp object "|" pinned "|" off
1585 set (or unset) a XDP ("eXpress Data Path") BPF program to run on every
1586 packet at driver level.
1588 output will indicate a
1590 flag for the networking device. If the driver does not have native XDP
1591 support, the kernel will fall back to a slower, driver-independent "generic"
1594 output will in that case indicate
1598 only. If the driver does have native XDP support, but the program is
1600 .B xdpgeneric object "|" pinned
1601 then the kernel will use the generic XDP variant instead of the native one.
1603 has the opposite effect of requestsing that the automatic fallback to the
1604 generic XDP variant be disabled and in case driver is not XDP-capable error
1607 also disables hardware offloads.
1609 in ip link output indicates that the program has been offloaded to hardware
1610 and can also be used to request the "offload" mode, much like
1612 it forces program to be installed specifically in HW/FW of the apater.
1618 - Detaches any currently attached XDP/BPF program from the given device.
1621 - Attaches a XDP/BPF program to the given device. The
1623 points to a BPF ELF file (f.e. generated by LLVM) that contains the BPF
1624 program code, map specifications, etc. If a XDP/BPF program is already
1625 attached to the given device, an error will be thrown. If no XDP/BPF
1626 program is currently attached, the device supports XDP and the program
1627 from the BPF ELF file passes the kernel verifier, then it will be attached
1628 to the device. If the option
1632 then any prior attached XDP/BPF program will be atomically overridden and
1633 no error will be thrown in this case. If no
1635 option is passed, then the default section name ("prog") will be assumed,
1636 otherwise the provided section name will be used. If no
1638 option is passed, then a verifier log will only be dumped on load error.
1641 section for usage examples.
1643 .BI section " NAME "
1644 - Specifies a section name that contains the BPF program code. If no section
1645 name is specified, the default one ("prog") will be used. This option is
1646 to be passed with the
1651 - Act in verbose mode. For example, even in case of success, this will
1652 print the verifier log in case a program was loaded from a BPF ELF file.
1655 - Attaches a XDP/BPF program to the given device. The
1657 points to an already pinned BPF program in the BPF file system. The option
1659 doesn't apply here, but otherwise semantics are the same as with the option
1664 .BI master " DEVICE"
1665 set master device of the device (enslave device).
1669 unset master device of the device (release device).
1672 .BI addrgenmode " eui64|none|stable_secret|random"
1673 set the IPv6 address generation mode
1676 - use a Modified EUI-64 format interface identifier
1679 - disable automatic address generation
1682 - generate the interface identifier based on a preset /proc/sys/net/ipv6/conf/{default,DEVICE}/stable_secret
1685 - like stable_secret, but auto-generate a new random secret if none is set
1689 set peer netnsid for a cross-netns interface
1692 .BI type " ETYPE TYPE_ARGS"
1693 Change type-specific settings. For a list of supported types and arguments refer
1694 to the description of
1696 above. In addition to that, it is possible to manipulate settings to slave
1700 Bridge Slave Support
1701 For a link with master
1703 the following additional arguments are supported:
1705 .B "ip link set type bridge_slave"
1711 .BI priority " PRIO"
1715 .BR guard " { " on " | " off " }"
1717 .BR hairpin " { " on " | " off " }"
1719 .BR fastleave " { " on " | " off " }"
1721 .BR root_block " { " on " | " off " }"
1723 .BR learning " { " on " | " off " }"
1725 .BR flood " { " on " | " off " }"
1727 .BR proxy_arp " { " on " | " off " }"
1729 .BR proxy_arp_wifi " { " on " | " off " }"
1731 .BI mcast_router " MULTICAST_ROUTER"
1733 .BR mcast_fast_leave " { " on " | " off "}"
1735 .BR mcast_flood " { " on " | " off " } ]"
1740 - flush bridge slave's fdb dynamic entries.
1745 is a number representing the following states:
1746 .BR 0 " (disabled),"
1747 .BR 1 " (listening),"
1748 .BR 2 " (learning),"
1749 .BR 3 " (forwarding),"
1750 .BR 4 " (blocking)."
1752 .BI priority " PRIO"
1753 - set port priority (allowed values are between 0 and 63, inclusively).
1756 - set port cost (allowed values are between 1 and 65535, inclusively).
1758 .BR guard " { " on " | " off " }"
1759 - block incoming BPDU packets on this port.
1761 .BR hairpin " { " on " | " off " }"
1762 - enable hairpin mode on this port. This will allow incoming packets on this
1763 port to be reflected back.
1765 .BR fastleave " { " on " | " off " }"
1766 - enable multicast fast leave on this port.
1768 .BR root_block " { " on " | " off " }"
1769 - block this port from becoming the bridge's root port.
1771 .BR learning " { " on " | " off " }"
1772 - allow MAC address learning on this port.
1774 .BR flood " { " on " | " off " }"
1775 - open the flood gates on this port, i.e. forward all unicast frames to this
1777 .BR proxy_arp " and " proxy_arp_wifi
1780 .BR proxy_arp " { " on " | " off " }"
1781 - enable proxy ARP on this port.
1783 .BR proxy_arp_wifi " { " on " | " off " }"
1784 - enable proxy ARP on this port which meets extended requirements by IEEE
1785 802.11 and Hotspot 2.0 specifications.
1787 .BI mcast_router " MULTICAST_ROUTER"
1788 - configure this port for having multicast routers attached. A port with a
1789 multicast router will receive all multicast traffic.
1793 to disable multicast routers on this port,
1795 to let the system detect the presence of of routers (this is the default),
1797 to permanently enable multicast traffic forwarding on this port or
1799 to enable multicast routers temporarily on this port, not depending on incoming
1802 .BR mcast_fast_leave " { " on " | " off " }"
1803 - this is a synonym to the
1807 .BR mcast_flood " { " on " | " off " }"
1808 - controls whether a given port will be flooded with multicast traffic for which there is no MDB entry.
1813 Bonding Slave Support
1814 For a link with master
1816 the following additional arguments are supported:
1818 .B "ip link set type bond_slave"
1826 - set the slave's queue ID (a 16bit unsigned value).
1831 MACVLAN and MACVTAP Support
1832 Modify list of allowed macaddr for link in source mode.
1834 .B "ip link set type { macvlan | macvap } "
1836 .BI macaddr " " "" COMMAND " " MACADDR " ..."
1842 - add MACADDR to allowed list
1845 - replace allowed list
1848 - remove MACADDR from allowed list
1851 - flush whole allowed list
1856 .SS ip link show - display device attributes
1859 .BI dev " NAME " (default)
1861 specifies the network device to show.
1862 If this argument is omitted all devices in the default group are listed.
1867 specifies what group of devices to show.
1871 only display running interfaces.
1874 .BI master " DEVICE "
1876 specifies the master device which enslaves devices to show.
1881 speficies the VRF which enslaves devices to show.
1886 specifies the type of devices to show.
1888 Note that the type name is not checked against the list of supported types -
1889 instead it is sent as-is to the kernel. Later it is used to filter the returned
1890 interface list by comparing it with the relevant attribute in case the kernel
1891 didn't filter already. Therefore any string is accepted, but may lead to empty
1894 .SS ip link xstats - display extended statistics
1899 specifies the type of devices to display extended statistics for.
1901 .SS ip link afstats - display address-family specific statistics
1906 specifies the device to display address-family statistics for.
1908 .SS ip link help - display help
1912 specifies which help of link type to dislpay.
1916 may be a number or a string from the file
1917 .B @SYSCONFDIR@/group
1918 which can be manually filled.
1924 Shows the state of all network interfaces on the system.
1927 ip link show type bridge
1929 Shows the bridge devices.
1932 ip link show type vlan
1934 Shows the vlan devices.
1937 ip link show master br0
1939 Shows devices enslaved by br0
1942 ip link set dev ppp0 mtu 1400
1944 Change the MTU the ppp0 device.
1947 ip link add link eth0 name eth0.10 type vlan id 10
1949 Creates a new vlan device eth0.10 on device eth0.
1952 ip link delete dev eth0.10
1954 Removes vlan device.
1959 Display help for the gre link type.
1962 ip link add name tun1 type ipip remote 192.168.1.1
1963 local 192.168.1.2 ttl 225 encap gue encap-sport auto
1964 encap-dport 5555 encap-csum encap-remcsum
1966 Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
1967 and the outer UDP checksum and remote checksum offload are enabled.
1970 ip link set dev eth0 xdp obj prog.o
1972 Attaches a XDP/BPF program to device eth0, where the program is
1973 located in prog.o, section "prog" (default section). In case a
1974 XDP/BPF program is already attached, throw an error.
1977 ip -force link set dev eth0 xdp obj prog.o sec foo
1979 Attaches a XDP/BPF program to device eth0, where the program is
1980 located in prog.o, section "foo". In case a XDP/BPF program is
1981 already attached, it will be overridden by the new one.
1984 ip -force link set dev eth0 xdp pinned /sys/fs/bpf/foo
1986 Attaches a XDP/BPF program to device eth0, where the program was
1987 previously pinned as an object node into BPF file system under
1991 ip link set dev eth0 xdp off
1993 If a XDP/BPF program is attached on device eth0, detach it and
1994 effectively turn off XDP for device eth0.
1997 ip link add link wpan0 lowpan0 type lowpan
1999 Creates a 6LoWPAN interface named lowpan0 on the underlying
2000 IEEE 802.15.4 device wpan0.
2011 Original Manpage by Michail Litvak <mci@owl.openwall.com>