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 " { " 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 " | "
211 .IR ETYPE " := [ " TYPE " |"
212 .BR bridge_slave " | " bond_slave " ]"
215 .IR VFVLAN-LIST " := [ " VFVLAN-LIST " ] " VFVLAN
224 .IR VLAN-PROTO " ] ]"
227 .SS ip link add - add virtual link
231 specifies the physical device to act operate on.
234 specifies the name of the new virtual device.
237 specifies the type of the new device.
243 - Ethernet Bridge device
248 - Controller Area Network interface
251 - Dummy network interface
254 - High-availability Seamless Redundancy device
257 - Intermediate Functional Block device
260 - IP over Infiniband device
263 - Virtual interface base on link layer address (MAC)
266 - Virtual interface based on link layer address (MAC) and TAP.
269 - Virtual Controller Area Network interface
272 - Virtual ethernet interface
275 - 802.1q tagged virtual LAN interface
278 - Virtual eXtended LAN
281 - Virtual tunnel interface IPv4|IPv6 over IPv6
284 - Virtual tunnel interface IPv4 over IPv4
287 - Virtual tunnel interface IPv6 over IPv4
290 - Virtual tunnel interface GRE over IPv4
293 - Virtual L2 tunnel interface GRE over IPv4
296 - Virtual tunnel interface GRE over IPv6
299 - Virtual L2 tunnel interface GRE over IPv6
302 - Virtual tunnel interface
305 - Netlink monitoring device
308 - Interface for L3 (IPv6/IPv4) based VLANs
311 - Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 / Bluetooth
314 - GEneric NEtwork Virtualization Encapsulation
317 - Interface for IEEE 802.1AE MAC Security (MACsec)
320 - Interface for L3 VRF domains
324 .BI numtxqueues " QUEUE_COUNT "
325 specifies the number of transmit queues for new device.
328 .BI numrxqueues " QUEUE_COUNT "
329 specifies the number of receive queues for new device.
333 specifies the desired index of the new virtual device. The link creation fails, if the index is busy.
339 the following additional arguments are supported:
346 .BI protocol " VLAN_PROTO "
350 .BR reorder_hdr " { " on " | " off " } "
353 .BR gvrp " { " on " | " off " } "
356 .BR mvrp " { " on " | " off " } "
359 .BR loose_binding " { " on " | " off " } "
362 .BI ingress-qos-map " QOS-MAP "
365 .BI egress-qos-map " QOS-MAP "
370 .BI protocol " VLAN_PROTO "
371 - either 802.1Q or 802.1ad.
374 - specifies the VLAN Identifer to use. Note that numbers with a leading " 0 " or " 0x " are interpreted as octal or hexadeimal, respectively.
376 .BR reorder_hdr " { " on " | " off " } "
377 - specifies whether ethernet headers are reordered or not (default is
382 .BR reorder_hdr " is " on
383 then VLAN header will be not inserted immediately but only before passing to the
384 physical device (if this device does not support VLAN offloading), the similar
385 on the RX direction - by default the packet will be untagged before being
386 received by VLAN device. Reordering allows to accelerate tagging on egress and
387 to hide VLAN header on ingress so the packet looks like regular Ethernet packet,
388 at the same time it might be confusing for packet capture as the VLAN header
389 does not exist within the packet.
391 VLAN offloading can be checked by
397 .RB grep " tx-vlan-offload"
400 where <phy_dev> is the physical device to which VLAN device is bound.
403 .BR gvrp " { " on " | " off " } "
404 - specifies whether this VLAN should be registered using GARP VLAN Registration Protocol.
406 .BR mvrp " { " on " | " off " } "
407 - specifies whether this VLAN should be registered using Multiple VLAN Registration Protocol.
409 .BR loose_binding " { " on " | " off " } "
410 - specifies whether the VLAN device state is bound to the physical device state.
412 .BI ingress-qos-map " QOS-MAP "
413 - defines a mapping of VLAN header prio field to the Linux internal packet
414 priority on incoming frames. The format is FROM:TO with multiple mappings
417 .BI egress-qos-map " QOS-MAP "
418 - defines a mapping of Linux internal packet priority to VLAN header prio field
419 but for outgoing frames. The format is the same as for ingress-qos-map.
422 Linux packet priority can be set by
427 -t mangle -A POSTROUTING [...] -j CLASSIFY --set-class 0:4
430 and this "4" priority can be used in the egress qos mapping to set VLAN prio "5":
434 link set veth0.10 type vlan egress 4:5
443 the following additional arguments are supported:
445 .BI "ip link add " DEVICE
446 .BI type " vxlan " id " VNI"
449 .RB " ] [ { " group " | " remote " } "
453 .RI "{ "IPADDR " | "any " } "
459 .BI flowlabel " FLOWLABEL "
463 .BI srcport " MIN MAX "
477 .RB [ no ] udp6zerocsumtx
479 .RB [ no ] udp6zerocsumrx
481 .BI ageing " SECONDS "
483 .BI maxaddress " NUMBER "
495 - specifies the VXLAN Network Identifer (or VXLAN Segment
499 - specifies the physical device to use for tunnel endpoint communication.
503 - specifies the multicast IP address to join.
504 This parameter cannot be specified with the
510 - specifies the unicast destination IP address to use in outgoing packets
511 when the destination link layer address is not known in the VXLAN device
512 forwarding database. This parameter cannot be specified with the
518 - specifies the source IP address to use in outgoing packets.
522 - specifies the TTL value to use in outgoing packets.
526 - specifies the TOS value to use in outgoing packets.
529 .BI flowlabel " FLOWLABEL"
530 - specifies the flow label to use in outgoing packets.
534 - specifies the UDP destination port to communicate to the remote VXLAN tunnel endpoint.
537 .BI srcport " MIN MAX"
538 - specifies the range of port numbers to use as UDP
539 source ports to communicate to the remote VXLAN tunnel endpoint.
543 - specifies if unknown source link layer addresses and IP addresses
544 are entered into the VXLAN device forwarding database.
548 - specifies if route short circuit is turned on.
552 - specifies ARP proxy is turned on.
556 - specifies if netlink LLADDR miss notifications are generated.
560 - specifies if netlink IP ADDR miss notifications are generated.
564 - specifies if UDP checksum is calculated for transmitted packets over IPv4.
567 .RB [ no ] udp6zerocsumtx
568 - skip UDP checksum calculation for transmitted packets over IPv6.
571 .RB [ no ] udp6zerocsumrx
572 - allow incoming UDP packets over IPv6 with zero checksum field.
575 .BI ageing " SECONDS"
576 - specifies the lifetime in seconds of FDB entries learnt by the kernel.
579 .BI maxaddress " NUMBER"
580 - specifies the maximum number of FDB entries.
584 - specifies whether an external control plane
585 .RB "(e.g. " "ip route encap" )
586 or the internal FDB should be used.
590 - enables the Group Policy extension (VXLAN-GBP).
593 Allows to transport group policy context across VXLAN network peers.
594 If enabled, includes the mark of a packet in the VXLAN header for outgoing
595 packets and fills the packet mark based on the information found in the
596 VXLAN header for incomming packets.
598 Format of upper 16 bits of packet mark (flags);
601 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
603 |-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|
605 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
608 Don't Learn bit. When set, this bit indicates that the egress
609 VTEP MUST NOT learn the source address of the encapsulated frame.
612 Indicates that the group policy has already been applied to
613 this packet. Policies MUST NOT be applied by devices when the A bit is set.
616 Format of lower 16 bits of packet mark (policy ID):
619 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
623 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
627 iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF
633 - enables the Generic Protocol extension (VXLAN-GPE). Currently, this is
634 only supported together with the
641 GRE, IPIP, SIT Type Support
644 the following additional arguments are supported:
646 .BI "ip link add " DEVICE
647 .BR type " { " gre " | " ipip " | " sit " }"
648 .BI " remote " ADDR " local " ADDR
650 .BR encap " { " fou " | " gue " | " none " }"
652 .BR encap-sport " { " \fIPORT " | " auto " }"
654 .BI "encap-dport " PORT
656 .RB [ no ] encap-csum
658 .RB [ no ] encap-remcsum
664 - specifies the remote address of the tunnel.
668 - specifies the fixed local address for tunneled packets.
669 It must be an address on another interface on this host.
672 .BR encap " { " fou " | " gue " | " none " }"
673 - specifies type of secondary UDP encapsulation. "fou" indicates
674 Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
677 .BR encap-sport " { " \fIPORT " | " auto " }"
678 - specifies the source port in UDP encapsulation.
680 indicates the port by number, "auto"
681 indicates that the port number should be chosen automatically
682 (the kernel picks a flow based on the flow hash of the
683 encapsulated packet).
686 .RB [ no ] encap-csum
687 - specifies if UDP checksums are enabled in the secondary
691 .RB [ no ] encap-remcsum
692 - specifies if Remote Checksum Offload is enabled. This is only
693 applicable for Generic UDP Encapsulation.
698 IP6GRE/IP6GRETAP Type Support
701 the following additional arguments are supported:
703 .BI "ip link add " DEVICE
704 .BR type " { " ip6gre " | " ip6gretap " }"
705 .BI remote " ADDR " local " ADDR"
716 .BI encaplimit " ELIM "
718 .BI tclass " TCLASS "
720 .BI flowlabel " FLOWLABEL "
730 - specifies the remote IPv6 address of the tunnel.
734 - specifies the fixed local IPv6 address for tunneled packets.
735 It must be an address on another interface on this host.
742 flag enables sequencing of outgoing packets.
745 flag requires that all input packets are serialized.
748 .RB [ i | o ] key " \fIKEY"
749 - use keyed GRE with key
751 is either a number or an IPv4 address-like dotted quad.
754 parameter specifies the same key to use in both directions.
756 .BR ikey " and " okey
757 parameters specify different keys for input and output.
761 - generate/require checksums for tunneled packets.
764 flag calculates checksums for outgoing packets.
767 flag requires that all input packets have the correct
770 flag is equivalent to the combination
775 - specifies Hop Limit value to use in outgoing packets.
778 .BI encaplimit " ELIM"
779 - specifies a fixed encapsulation limit. Default is 4.
782 .BI flowlabel " FLOWLABEL"
783 - specifies a fixed flowlabel.
787 - specifies the traffic class field on
788 tunneled packets, which can be specified as either a two-digit
789 hex value (e.g. c0) or a predefined string (e.g. internet).
792 causes the field to be copied from the original IP header. The
794 .BI "inherit/" STRING
796 .BI "inherit/" 00 ".." ff
797 will set the field to
801 when tunneling non-IP packets. The default value is 00.
809 the following additional arguments are supported:
811 .BI "ip link add " DEVICE " name " NAME
812 .BR "type ipoib " [ " pkey \fIPKEY" " ] [ " mode " \fIMODE \fR]"
817 - specifies the IB P-Key to use.
820 - specifies the mode (datagram or connected) to use.
826 the following additional arguments are supported:
828 .BI "ip link add " DEVICE
829 .BI type " geneve " id " VNI " remote " IPADDR"
835 .BI flowlabel " FLOWLABEL "
843 .RB [ no ] udp6zerocsumtx
845 .RB [ no ] udp6zerocsumrx
851 - specifies the Virtual Network Identifer to use.
855 - specifies the unicast destination IP address to use in outgoing packets.
859 - specifies the TTL value to use in outgoing packets.
863 - specifies the TOS value to use in outgoing packets.
866 .BI flowlabel " FLOWLABEL"
867 - specifies the flow label to use in outgoing packets.
871 - select a destination port other than the default of 6081.
875 - make this tunnel externally controlled (or not, which is the default). This
876 flag is mutually exclusive with the
880 .BR tos " and " flowlabel
885 - specifies if UDP checksum is calculated for transmitted packets over IPv4.
888 .RB [ no ] udp6zerocsumtx
889 - skip UDP checksum calculation for transmitted packets over IPv6.
892 .RB [ no ] udp6zerocsumrx
893 - allow incoming UDP packets over IPv6 with zero checksum field.
898 MACVLAN and MACVTAP Type Support
903 the following additional arguments are supported:
905 .BI "ip link add link " DEVICE " name " NAME
906 .BR type " { " macvlan " | " macvtap " } "
907 .BR mode " { " private " | " vepa " | " bridge " | " passthru
908 .RB " [ " nopromisc " ] | " source " } "
912 .BR type " { " macvlan " | " macvtap " } "
913 - specifies the link type to use.
914 .BR macvlan " creates just a virtual interface, while "
915 .BR macvtap " in addition creates a character device "
916 .BR /dev/tapX " to be used just like a " tuntap " device."
919 - Do not allow communication between
921 instances on the same physical interface, even if the external switch supports
925 - Virtual Ethernet Port Aggregator mode. Data from one
927 instance to the other on the same physical interface is transmitted over the
928 physical interface. Either the attached switch needs to support hairpin mode,
929 or there must be a TCP/IP router forwarding the packets in order to allow
930 communication. This is the default mode.
933 - In bridge mode, all endpoints are directly connected to each other,
934 communication is not redirected through the physical interface's peer.
936 .BR mode " " passthru " [ " nopromisc " ] "
937 - This mode gives more power to a single endpoint, usually in
938 .BR macvtap " mode. It is not allowed for more than one endpoint on the same "
939 physical interface. All traffic will be forwarded to this endpoint, allowing
940 virtio guests to change MAC address or set promiscuous mode in order to bridge
941 the interface or create vlan interfaces on top of it. By default, this mode
942 forces the underlying interface into promiscuous mode. Passing the
943 .BR nopromisc " flag prevents this, so the promisc flag may be controlled "
944 using standard tools.
947 - allows one to set a list of allowed mac address, which is used to match
948 against source mac address from received frames on underlying interface. This
949 allows creating mac based VLAN associations, instead of standard port or tag
950 based. The feature is useful to deploy 802.1x mac based behavior,
951 where drivers of underlying interfaces doesn't allows that.
955 High-availability Seamless Redundancy (HSR) Support
958 the following additional arguments are supported:
960 .BI "ip link add link " DEVICE " name " NAME " type hsr"
961 .BI slave1 " SLAVE1-IF " slave2 " SLAVE2-IF "
964 .BR version " { " 0 " | " 1 " } ]"
969 - specifies the link type to use, here HSR.
971 .BI slave1 " SLAVE1-IF "
972 - Specifies the physical device used for the first of the two ring ports.
974 .BI slave2 " SLAVE2-IF "
975 - Specifies the physical device used for the second of the two ring ports.
977 .BI supervision " ADDR-BYTE"
978 - The last byte of the multicast address used for HSR supervision frames.
979 Default option is "0", possible values 0-255.
981 .BR version " { " 0 " | " 1 " }"
982 - Selects the protocol version of the interface. Default option is "0", which
983 corresponds to the 2010 version of the HSR standard. Option "1" activates the
991 the following additional arguments are supported:
993 .BI "ip link add link " DEVICE " name " NAME " type macsec"
995 .BI address " <lladdr>"
1001 .BI cipher " CIPHER_SUITE"
1006 .BR on " | " off " } ] [ "
1007 .BR send_sci " { " on " | " off " } ] ["
1008 .BR end_station " { " on " | " off " } ] ["
1009 .BR scb " { " on " | " off " } ] ["
1010 .BR protect " { " on " | " off " } ] ["
1011 .BR replay " { " on " | " off " }"
1013 .IR 0..2^32-1 " } ] ["
1014 .BR validate " { " strict " | " check " | " disabled " } ] ["
1015 .BR encodingsa " { "
1020 .BI address " <lladdr> "
1021 - sets the system identifier component of secure channel for this MACsec device.
1025 - sets the port number component of secure channel for this MACsec device, in a
1026 range from 1 to 65535 inclusive. Numbers with a leading " 0 " or " 0x " are
1027 interpreted as octal and hexadecimal, respectively.
1031 - sets the secure channel identifier for this MACsec device.
1033 is a 64bit wide number in hexadecimal format.
1036 .BI cipher " CIPHER_SUITE "
1037 - defines the cipher suite to use.
1040 .BI icvlen " LENGTH "
1041 - sets the length of the Integrity Check Value (ICV).
1044 .BR "encrypt on " or " encrypt off"
1045 - switches between authenticated encryption, or authenticity mode only.
1048 .BR "send_sci on " or " send_sci off"
1049 - specifies whether the SCI is included in every packet, or only when it is necessary.
1052 .BR "end_station on " or " end_station off"
1053 - sets the End Station bit.
1056 .BR "scb on " or " scb off"
1057 - sets the Single Copy Broadcast bit.
1060 .BR "protect on " or " protect off"
1061 - enables MACsec protection on the device.
1064 .BR "replay on " or " replay off"
1065 - enables replay protection on the device.
1071 - sets the size of the replay window.
1076 .BR "validate strict " or " validate check " or " validate disabled"
1077 - sets the validation mode on the device.
1080 .BI encodingsa " AN "
1081 - sets the active secure association for transmission.
1089 the following additional arguments are supported:
1091 .BI "ip link add " DEVICE " type vrf table " TABLE
1095 .BR table " table id associated with VRF device"
1099 .SS ip link delete - delete virtual link
1103 specifies the virtual device to act operate on.
1107 specifies the group of virtual links to delete. Group 0 is not allowed to be
1108 deleted since it is the default group.
1112 specifies the type of the device.
1114 .SS ip link set - change device attributes
1118 If multiple parameter changes are requested,
1120 aborts immediately after any of the changes have failed.
1121 This is the only case when
1123 can move the system to an unpredictable state. The solution
1124 is to avoid changing several parameters with one
1131 specifies network device to operate on. When configuring SR-IOV Virtual Function
1132 (VF) devices, this keyword should specify the associated Physical Function (PF)
1138 has a dual role: If both group and dev are present, then move the device to the
1139 specified group. If only a group is specified, then the command operates on
1140 all devices in that group.
1144 change the state of the device to
1150 .BR "arp on " or " arp off"
1156 .BR "multicast on " or " multicast off"
1162 .BR "protodown on " or " protodown off"
1165 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.
1168 .BR "dynamic on " or " dynamic off"
1171 flag on the device. Indicates that address can change when interface goes down (currently
1177 change the name of the device. This operation is not
1178 recommended if the device is running or has some addresses
1182 .BI txqueuelen " NUMBER"
1184 .BI txqlen " NUMBER"
1185 change the transmit queue length of the device.
1194 .BI address " LLADDRESS"
1195 change the station address of the interface.
1198 .BI broadcast " LLADDRESS"
1200 .BI brd " LLADDRESS"
1202 .BI peer " LLADDRESS"
1203 change the link layer broadcast address or the peer address when
1208 .BI netns " NETNSNAME " \fR| " PID"
1209 move the device to the network namespace associated with name
1213 Some devices are not allowed to change network namespace: loopback, bridge,
1214 ppp, wireless. These are network namespace local devices. In such case
1216 tool will return "Invalid argument" error. It is possible to find out if device is local
1217 to a single network namespace by checking
1219 flag in the output of the
1227 To change network namespace for wireless devices the
1229 tool can be used. But it allows to change network namespace only for physical devices and by process
1234 give the device a symbolic name for easy reference.
1238 specify the group the device belongs to.
1239 The available groups are listed in file
1240 .BR "@SYSCONFDIR@/group" .
1244 specify a Virtual Function device to be configured. The associated PF device
1245 must be specified using the
1250 .BI mac " LLADDRESS"
1251 - change the station address for the specified VF. The
1253 parameter must be specified.
1257 - change the assigned VLAN for the specified VF. When specified, all traffic
1258 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
1259 will be filtered for the specified VLAN ID, and will have all VLAN tags
1260 stripped before being passed to the VF. Setting this parameter to 0 disables
1261 VLAN tagging and filtering. The
1263 parameter must be specified.
1267 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
1268 tags transmitted by the VF will include the specified priority bits in the
1269 VLAN tag. If not specified, the value is assumed to be 0. Both the
1273 parameters must be specified. Setting both
1277 as 0 disables VLAN tagging and filtering for the VF.
1280 .BI proto " VLAN-PROTO"
1281 - assign VLAN PROTOCOL for the VLAN tag, either 802.1Q or 802.1ad.
1282 Setting to 802.1ad, all traffic sent from the VF will be tagged with VLAN S-Tag.
1283 Incoming traffic will have VLAN S-Tags stripped before being passed to the VF.
1284 Setting to 802.1ad also enables an option to concatenate another VLAN tag, so both
1285 S-TAG and C-TAG will be inserted/stripped for outgoing/incoming traffic, respectively.
1286 If not specified, the value is assumed to be 802.1Q. Both the
1290 parameters must be specified.
1294 -- change the allowed transmit bandwidth, in Mbps, for the specified VF.
1295 Setting this parameter to 0 disables rate limiting.
1297 parameter must be specified.
1303 .BI max_tx_rate " TXRATE"
1304 - change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
1306 parameter must be specified.
1309 .BI min_tx_rate " TXRATE"
1310 - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
1311 Minimum TXRATE should be always <= Maximum TXRATE.
1313 parameter must be specified.
1316 .BI spoofchk " on|off"
1317 - turn packet spoof checking on or off for the specified VF.
1319 .BI query_rss " on|off"
1320 - 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.
1322 .BI state " auto|enable|disable"
1323 - set the virtual link state as seen by the specified VF. Setting to auto means a
1324 reflection of the PF link state, enable lets the VF to communicate with other VFs on
1325 this host even if the PF link state is down, disable causes the HW to drop any packets
1329 - trust the specified VF user. This enables that VF user can set a specific feature
1330 which may impact security and/or performance. (e.g. VF multicast promiscuous mode)
1332 .BI node_guid " eui64"
1333 - configure node GUID for the VF.
1335 .BI port_guid " eui64"
1336 - configure port GUID for the VF.
1340 .B xdp object "|" pinned "|" off
1341 set (or unset) a XDP ("express data path") BPF program to run on every
1342 packet at driver level.
1348 - Detaches any currently attached XDP/BPF program from the given device.
1351 - Attaches a XDP/BPF program to the given device. The
1353 points to a BPF ELF file (f.e. generated by LLVM) that contains the BPF
1354 program code, map specifications, etc. If a XDP/BPF program is already
1355 attached to the given device, an error will be thrown. If no XDP/BPF
1356 program is currently attached, the device supports XDP and the program
1357 from the BPF ELF file passes the kernel verifier, then it will be attached
1358 to the device. If the option
1362 then any prior attached XDP/BPF program will be atomically overridden and
1363 no error will be thrown in this case. If no
1365 option is passed, then the default section name ("prog") will be assumed,
1366 otherwise the provided section name will be used. If no
1368 option is passed, then a verifier log will only be dumped on load error.
1371 section for usage examples.
1373 .BI section " NAME "
1374 - Specifies a section name that contains the BPF program code. If no section
1375 name is specified, the default one ("prog") will be used. This option is
1376 to be passed with the
1381 - Act in verbose mode. For example, even in case of success, this will
1382 print the verifier log in case a program was loaded from a BPF ELF file.
1385 - Attaches a XDP/BPF program to the given device. The
1387 points to an already pinned BPF program in the BPF file system. The option
1389 doesn't apply here, but otherwise semantics are the same as with the option
1394 .BI master " DEVICE"
1395 set master device of the device (enslave device).
1399 unset master device of the device (release device).
1402 .BI addrgenmode " eui64|none|stable_secret|random"
1403 set the IPv6 address generation mode
1406 - use a Modified EUI-64 format interface identifier
1409 - disable automatic address generation
1412 - generate the interface identifier based on a preset /proc/sys/net/ipv6/conf/{default,DEVICE}/stable_secret
1415 - like stable_secret, but auto-generate a new random secret if none is set
1419 set peer netnsid for a cross-netns interface
1422 .BI type " ETYPE TYPE_ARGS"
1423 Change type-specific settings. For a list of supported types and arguments refer
1424 to the description of
1426 above. In addition to that, it is possible to manipulate settings to slave
1430 Bridge Slave Support
1431 For a link with master
1433 the following additional arguments are supported:
1435 .B "ip link set type bridge_slave"
1441 .BI priority " PRIO"
1445 .BR guard " { " on " | " off " }"
1447 .BR hairpin " { " on " | " off " }"
1449 .BR fastleave " { " on " | " off " }"
1451 .BR root_block " { " on " | " off " }"
1453 .BR learning " { " on " | " off " }"
1455 .BR flood " { " on " | " off " }"
1457 .BR proxy_arp " { " on " | " off " }"
1459 .BR proxy_arp_wifi " { " on " | " off " }"
1461 .BI mcast_router " MULTICAST_ROUTER"
1463 .BR mcast_fast_leave " { " on " | " off "}"
1465 .BR mcast_flood " { " on " | " off " } ]"
1470 - flush bridge slave's fdb dynamic entries.
1475 is a number representing the following states:
1476 .BR 0 " (disabled),"
1477 .BR 1 " (listening),"
1478 .BR 2 " (learning),"
1479 .BR 3 " (forwarding),"
1480 .BR 4 " (blocking)."
1482 .BI priority " PRIO"
1483 - set port priority (a 16bit unsigned value).
1486 - set port cost (a 32bit unsigned value).
1488 .BR guard " { " on " | " off " }"
1489 - block incoming BPDU packets on this port.
1491 .BR hairpin " { " on " | " off " }"
1492 - enable hairpin mode on this port. This will allow incoming packets on this
1493 port to be reflected back.
1495 .BR fastleave " { " on " | " off " }"
1496 - enable multicast fast leave on this port.
1498 .BR root_block " { " on " | " off " }"
1499 - block this port from becoming the bridge's root port.
1501 .BR learning " { " on " | " off " }"
1502 - allow MAC address learning on this port.
1504 .BR flood " { " on " | " off " }"
1505 - open the flood gates on this port, i.e. forward all unicast frames to this
1507 .BR proxy_arp " and " proxy_arp_wifi
1510 .BR proxy_arp " { " on " | " off " }"
1511 - enable proxy ARP on this port.
1513 .BR proxy_arp_wifi " { " on " | " off " }"
1514 - enable proxy ARP on this port which meets extended requirements by IEEE
1515 802.11 and Hotspot 2.0 specifications.
1517 .BI mcast_router " MULTICAST_ROUTER"
1518 - configure this port for having multicast routers attached. A port with a
1519 multicast router will receive all multicast traffic.
1523 to disable multicast routers on this port,
1525 to let the system detect the presence of of routers (this is the default),
1527 to permanently enable multicast traffic forwarding on this port or
1529 to enable multicast routers temporarily on this port, not depending on incoming
1532 .BR mcast_fast_leave " { " on " | " off " }"
1533 - this is a synonym to the
1537 .BR mcast_flood " { " on " | " off " }"
1538 - controls whether a given port will be flooded with multicast traffic for which there is no MDB entry.
1543 Bonding Slave Support
1544 For a link with master
1546 the following additional arguments are supported:
1548 .B "ip link set type bond_slave"
1556 - set the slave's queue ID (a 16bit unsigned value).
1561 MACVLAN and MACVTAP Support
1562 Modify list of allowed macaddr for link in source mode.
1564 .B "ip link set type { macvlan | macvap } "
1566 .BI macaddr " " "" COMMAND " " MACADDR " ..."
1572 - add MACADDR to allowed list
1575 - replace allowed list
1578 - remove MACADDR from allowed list
1581 - flush whole allowed list
1586 .SS ip link show - display device attributes
1589 .BI dev " NAME " (default)
1591 specifies the network device to show.
1592 If this argument is omitted all devices in the default group are listed.
1597 specifies what group of devices to show.
1601 only display running interfaces.
1604 .BI master " DEVICE "
1606 specifies the master device which enslaves devices to show.
1611 speficies the VRF which enslaves devices to show.
1616 specifies the type of devices to show.
1618 Note that the type name is not checked against the list of supported types -
1619 instead it is sent as-is to the kernel. Later it is used to filter the returned
1620 interface list by comparing it with the relevant attribute in case the kernel
1621 didn't filter already. Therefore any string is accepted, but may lead to empty
1624 .SS ip link xstats - display extended statistics
1629 specifies the type of devices to display extended statistics for.
1631 .SS ip link help - display help
1635 specifies which help of link type to dislpay.
1639 may be a number or a string from the file
1640 .B @SYSCONFDIR@/group
1641 which can be manually filled.
1647 Shows the state of all network interfaces on the system.
1650 ip link show type bridge
1652 Shows the bridge devices.
1655 ip link show type vlan
1657 Shows the vlan devices.
1660 ip link show master br0
1662 Shows devices enslaved by br0
1665 ip link set dev ppp0 mtu 1400
1667 Change the MTU the ppp0 device.
1670 ip link add link eth0 name eth0.10 type vlan id 10
1672 Creates a new vlan device eth0.10 on device eth0.
1675 ip link delete dev eth0.10
1677 Removes vlan device.
1682 Display help for the gre link type.
1685 ip link add name tun1 type ipip remote 192.168.1.1
1686 local 192.168.1.2 ttl 225 encap gue encap-sport auto
1687 encap-dport 5555 encap-csum encap-remcsum
1689 Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
1690 and the outer UDP checksum and remote checksum offload are enabled.
1693 ip link set dev eth0 xdp obj prog.o
1695 Attaches a XDP/BPF program to device eth0, where the program is
1696 located in prog.o, section "prog" (default section). In case a
1697 XDP/BPF program is already attached, throw an error.
1700 ip -force link set dev eth0 xdp obj prog.o sec foo
1702 Attaches a XDP/BPF program to device eth0, where the program is
1703 located in prog.o, section "foo". In case a XDP/BPF program is
1704 already attached, it will be overridden by the new one.
1707 ip -force link set dev eth0 xdp pinned /sys/fs/bpf/foo
1709 Attaches a XDP/BPF program to device eth0, where the program was
1710 previously pinned as an object node into BPF file system under
1714 ip link set dev eth0 xdp off
1716 If a XDP/BPF program is attached on device eth0, detach it and
1717 effectively turn off XDP for device eth0.
1720 ip link add link wpan0 lowpan0 type lowpan
1722 Creates a 6LoWPAN interface named lowpan0 on the underlying
1723 IEEE 802.15.4 device wpan0.
1734 Original Manpage by Michail Litvak <mci@owl.openwall.com>