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 " | "
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 .RB [ no ] encap-remcsum
669 - specifies the remote address of the tunnel.
673 - specifies the fixed local address for tunneled packets.
674 It must be an address on another interface on this host.
677 .BR encap " { " fou " | " gue " | " none " }"
678 - specifies type of secondary UDP encapsulation. "fou" indicates
679 Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.
682 .BR encap-sport " { " \fIPORT " | " auto " }"
683 - specifies the source port in UDP encapsulation.
685 indicates the port by number, "auto"
686 indicates that the port number should be chosen automatically
687 (the kernel picks a flow based on the flow hash of the
688 encapsulated packet).
691 .RB [ no ] encap-csum
692 - specifies if UDP checksums are enabled in the secondary
696 .RB [ no ] encap-remcsum
697 - specifies if Remote Checksum Offload is enabled. This is only
698 applicable for Generic UDP Encapsulation.
703 IP6GRE/IP6GRETAP Type Support
706 the following additional arguments are supported:
708 .BI "ip link add " DEVICE
709 .BR type " { " ip6gre " | " ip6gretap " }"
710 .BI remote " ADDR " local " ADDR"
721 .BI encaplimit " ELIM "
723 .BI tclass " TCLASS "
725 .BI flowlabel " FLOWLABEL "
735 - specifies the remote IPv6 address of the tunnel.
739 - specifies the fixed local IPv6 address for tunneled packets.
740 It must be an address on another interface on this host.
747 flag enables sequencing of outgoing packets.
750 flag requires that all input packets are serialized.
753 .RB [ i | o ] key " \fIKEY"
754 - use keyed GRE with key
756 is either a number or an IPv4 address-like dotted quad.
759 parameter specifies the same key to use in both directions.
761 .BR ikey " and " okey
762 parameters specify different keys for input and output.
766 - generate/require checksums for tunneled packets.
769 flag calculates checksums for outgoing packets.
772 flag requires that all input packets have the correct
775 flag is equivalent to the combination
780 - specifies Hop Limit value to use in outgoing packets.
783 .BI encaplimit " ELIM"
784 - specifies a fixed encapsulation limit. Default is 4.
787 .BI flowlabel " FLOWLABEL"
788 - specifies a fixed flowlabel.
792 - specifies the traffic class field on
793 tunneled packets, which can be specified as either a two-digit
794 hex value (e.g. c0) or a predefined string (e.g. internet).
797 causes the field to be copied from the original IP header. The
799 .BI "inherit/" STRING
801 .BI "inherit/" 00 ".." ff
802 will set the field to
806 when tunneling non-IP packets. The default value is 00.
814 the following additional arguments are supported:
816 .BI "ip link add " DEVICE " name " NAME
817 .BR "type ipoib " [ " pkey \fIPKEY" " ] [ " mode " \fIMODE \fR]"
822 - specifies the IB P-Key to use.
825 - specifies the mode (datagram or connected) to use.
831 the following additional arguments are supported:
833 .BI "ip link add " DEVICE
834 .BI type " geneve " id " VNI " remote " IPADDR"
840 .BI flowlabel " FLOWLABEL "
848 .RB [ no ] udp6zerocsumtx
850 .RB [ no ] udp6zerocsumrx
856 - specifies the Virtual Network Identifer to use.
860 - specifies the unicast destination IP address to use in outgoing packets.
864 - specifies the TTL value to use in outgoing packets.
868 - specifies the TOS value to use in outgoing packets.
871 .BI flowlabel " FLOWLABEL"
872 - specifies the flow label to use in outgoing packets.
876 - select a destination port other than the default of 6081.
880 - make this tunnel externally controlled (or not, which is the default). This
881 flag is mutually exclusive with the
885 .BR tos " and " flowlabel
890 - specifies if UDP checksum is calculated for transmitted packets over IPv4.
893 .RB [ no ] udp6zerocsumtx
894 - skip UDP checksum calculation for transmitted packets over IPv6.
897 .RB [ no ] udp6zerocsumrx
898 - allow incoming UDP packets over IPv6 with zero checksum field.
903 MACVLAN and MACVTAP Type Support
908 the following additional arguments are supported:
910 .BI "ip link add link " DEVICE " name " NAME
911 .BR type " { " macvlan " | " macvtap " } "
912 .BR mode " { " private " | " vepa " | " bridge " | " passthru
913 .RB " [ " nopromisc " ] | " source " } "
917 .BR type " { " macvlan " | " macvtap " } "
918 - specifies the link type to use.
919 .BR macvlan " creates just a virtual interface, while "
920 .BR macvtap " in addition creates a character device "
921 .BR /dev/tapX " to be used just like a " tuntap " device."
924 - Do not allow communication between
926 instances on the same physical interface, even if the external switch supports
930 - Virtual Ethernet Port Aggregator mode. Data from one
932 instance to the other on the same physical interface is transmitted over the
933 physical interface. Either the attached switch needs to support hairpin mode,
934 or there must be a TCP/IP router forwarding the packets in order to allow
935 communication. This is the default mode.
938 - In bridge mode, all endpoints are directly connected to each other,
939 communication is not redirected through the physical interface's peer.
941 .BR mode " " passthru " [ " nopromisc " ] "
942 - This mode gives more power to a single endpoint, usually in
943 .BR macvtap " mode. It is not allowed for more than one endpoint on the same "
944 physical interface. All traffic will be forwarded to this endpoint, allowing
945 virtio guests to change MAC address or set promiscuous mode in order to bridge
946 the interface or create vlan interfaces on top of it. By default, this mode
947 forces the underlying interface into promiscuous mode. Passing the
948 .BR nopromisc " flag prevents this, so the promisc flag may be controlled "
949 using standard tools.
952 - allows one to set a list of allowed mac address, which is used to match
953 against source mac address from received frames on underlying interface. This
954 allows creating mac based VLAN associations, instead of standard port or tag
955 based. The feature is useful to deploy 802.1x mac based behavior,
956 where drivers of underlying interfaces doesn't allows that.
960 High-availability Seamless Redundancy (HSR) Support
963 the following additional arguments are supported:
965 .BI "ip link add link " DEVICE " name " NAME " type hsr"
966 .BI slave1 " SLAVE1-IF " slave2 " SLAVE2-IF "
969 .BR version " { " 0 " | " 1 " } ]"
974 - specifies the link type to use, here HSR.
976 .BI slave1 " SLAVE1-IF "
977 - Specifies the physical device used for the first of the two ring ports.
979 .BI slave2 " SLAVE2-IF "
980 - Specifies the physical device used for the second of the two ring ports.
982 .BI supervision " ADDR-BYTE"
983 - The last byte of the multicast address used for HSR supervision frames.
984 Default option is "0", possible values 0-255.
986 .BR version " { " 0 " | " 1 " }"
987 - Selects the protocol version of the interface. Default option is "0", which
988 corresponds to the 2010 version of the HSR standard. Option "1" activates the
996 the following additional arguments are supported:
998 .BI "ip link add link " DEVICE " name " NAME " type macsec"
1000 .BI address " <lladdr>"
1006 .BI cipher " CIPHER_SUITE"
1011 .BR on " | " off " } ] [ "
1012 .BR send_sci " { " on " | " off " } ] ["
1013 .BR end_station " { " on " | " off " } ] ["
1014 .BR scb " { " on " | " off " } ] ["
1015 .BR protect " { " on " | " off " } ] ["
1016 .BR replay " { " on " | " off " }"
1018 .IR 0..2^32-1 " } ] ["
1019 .BR validate " { " strict " | " check " | " disabled " } ] ["
1020 .BR encodingsa " { "
1025 .BI address " <lladdr> "
1026 - sets the system identifier component of secure channel for this MACsec device.
1030 - sets the port number component of secure channel for this MACsec device, in a
1031 range from 1 to 65535 inclusive. Numbers with a leading " 0 " or " 0x " are
1032 interpreted as octal and hexadecimal, respectively.
1036 - sets the secure channel identifier for this MACsec device.
1038 is a 64bit wide number in hexadecimal format.
1041 .BI cipher " CIPHER_SUITE "
1042 - defines the cipher suite to use.
1045 .BI icvlen " LENGTH "
1046 - sets the length of the Integrity Check Value (ICV).
1049 .BR "encrypt on " or " encrypt off"
1050 - switches between authenticated encryption, or authenticity mode only.
1053 .BR "send_sci on " or " send_sci off"
1054 - specifies whether the SCI is included in every packet, or only when it is necessary.
1057 .BR "end_station on " or " end_station off"
1058 - sets the End Station bit.
1061 .BR "scb on " or " scb off"
1062 - sets the Single Copy Broadcast bit.
1065 .BR "protect on " or " protect off"
1066 - enables MACsec protection on the device.
1069 .BR "replay on " or " replay off"
1070 - enables replay protection on the device.
1076 - sets the size of the replay window.
1081 .BR "validate strict " or " validate check " or " validate disabled"
1082 - sets the validation mode on the device.
1085 .BI encodingsa " AN "
1086 - sets the active secure association for transmission.
1094 the following additional arguments are supported:
1096 .BI "ip link add " DEVICE " type vrf table " TABLE
1100 .BR table " table id associated with VRF device"
1104 .SS ip link delete - delete virtual link
1108 specifies the virtual device to act operate on.
1112 specifies the group of virtual links to delete. Group 0 is not allowed to be
1113 deleted since it is the default group.
1117 specifies the type of the device.
1119 .SS ip link set - change device attributes
1123 If multiple parameter changes are requested,
1125 aborts immediately after any of the changes have failed.
1126 This is the only case when
1128 can move the system to an unpredictable state. The solution
1129 is to avoid changing several parameters with one
1136 specifies network device to operate on. When configuring SR-IOV Virtual Function
1137 (VF) devices, this keyword should specify the associated Physical Function (PF)
1143 has a dual role: If both group and dev are present, then move the device to the
1144 specified group. If only a group is specified, then the command operates on
1145 all devices in that group.
1149 change the state of the device to
1155 .BR "arp on " or " arp off"
1161 .BR "multicast on " or " multicast off"
1167 .BR "protodown on " or " protodown off"
1170 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.
1173 .BR "dynamic on " or " dynamic off"
1176 flag on the device. Indicates that address can change when interface goes down (currently
1182 change the name of the device. This operation is not
1183 recommended if the device is running or has some addresses
1187 .BI txqueuelen " NUMBER"
1189 .BI txqlen " NUMBER"
1190 change the transmit queue length of the device.
1199 .BI address " LLADDRESS"
1200 change the station address of the interface.
1203 .BI broadcast " LLADDRESS"
1205 .BI brd " LLADDRESS"
1207 .BI peer " LLADDRESS"
1208 change the link layer broadcast address or the peer address when
1213 .BI netns " NETNSNAME " \fR| " PID"
1214 move the device to the network namespace associated with name
1218 Some devices are not allowed to change network namespace: loopback, bridge,
1219 ppp, wireless. These are network namespace local devices. In such case
1221 tool will return "Invalid argument" error. It is possible to find out if device is local
1222 to a single network namespace by checking
1224 flag in the output of the
1232 To change network namespace for wireless devices the
1234 tool can be used. But it allows to change network namespace only for physical devices and by process
1239 give the device a symbolic name for easy reference.
1243 specify the group the device belongs to.
1244 The available groups are listed in file
1245 .BR "@SYSCONFDIR@/group" .
1249 specify a Virtual Function device to be configured. The associated PF device
1250 must be specified using the
1255 .BI mac " LLADDRESS"
1256 - change the station address for the specified VF. The
1258 parameter must be specified.
1262 - change the assigned VLAN for the specified VF. When specified, all traffic
1263 sent from the VF will be tagged with the specified VLAN ID. Incoming traffic
1264 will be filtered for the specified VLAN ID, and will have all VLAN tags
1265 stripped before being passed to the VF. Setting this parameter to 0 disables
1266 VLAN tagging and filtering. The
1268 parameter must be specified.
1272 - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN
1273 tags transmitted by the VF will include the specified priority bits in the
1274 VLAN tag. If not specified, the value is assumed to be 0. Both the
1278 parameters must be specified. Setting both
1282 as 0 disables VLAN tagging and filtering for the VF.
1285 .BI proto " VLAN-PROTO"
1286 - assign VLAN PROTOCOL for the VLAN tag, either 802.1Q or 802.1ad.
1287 Setting to 802.1ad, all traffic sent from the VF will be tagged with VLAN S-Tag.
1288 Incoming traffic will have VLAN S-Tags stripped before being passed to the VF.
1289 Setting to 802.1ad also enables an option to concatenate another VLAN tag, so both
1290 S-TAG and C-TAG will be inserted/stripped for outgoing/incoming traffic, respectively.
1291 If not specified, the value is assumed to be 802.1Q. Both the
1295 parameters must be specified.
1299 -- change the allowed transmit bandwidth, in Mbps, for the specified VF.
1300 Setting this parameter to 0 disables rate limiting.
1302 parameter must be specified.
1308 .BI max_tx_rate " TXRATE"
1309 - change the allowed maximum transmit bandwidth, in Mbps, for the specified VF.
1311 parameter must be specified.
1314 .BI min_tx_rate " TXRATE"
1315 - change the allowed minimum transmit bandwidth, in Mbps, for the specified VF.
1316 Minimum TXRATE should be always <= Maximum TXRATE.
1318 parameter must be specified.
1321 .BI spoofchk " on|off"
1322 - turn packet spoof checking on or off for the specified VF.
1324 .BI query_rss " on|off"
1325 - 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.
1327 .BI state " auto|enable|disable"
1328 - set the virtual link state as seen by the specified VF. Setting to auto means a
1329 reflection of the PF link state, enable lets the VF to communicate with other VFs on
1330 this host even if the PF link state is down, disable causes the HW to drop any packets
1334 - trust the specified VF user. This enables that VF user can set a specific feature
1335 which may impact security and/or performance. (e.g. VF multicast promiscuous mode)
1337 .BI node_guid " eui64"
1338 - configure node GUID for the VF.
1340 .BI port_guid " eui64"
1341 - configure port GUID for the VF.
1345 .B xdp object "|" pinned "|" off
1346 set (or unset) a XDP ("express data path") BPF program to run on every
1347 packet at driver level.
1353 - Detaches any currently attached XDP/BPF program from the given device.
1356 - Attaches a XDP/BPF program to the given device. The
1358 points to a BPF ELF file (f.e. generated by LLVM) that contains the BPF
1359 program code, map specifications, etc. If a XDP/BPF program is already
1360 attached to the given device, an error will be thrown. If no XDP/BPF
1361 program is currently attached, the device supports XDP and the program
1362 from the BPF ELF file passes the kernel verifier, then it will be attached
1363 to the device. If the option
1367 then any prior attached XDP/BPF program will be atomically overridden and
1368 no error will be thrown in this case. If no
1370 option is passed, then the default section name ("prog") will be assumed,
1371 otherwise the provided section name will be used. If no
1373 option is passed, then a verifier log will only be dumped on load error.
1376 section for usage examples.
1378 .BI section " NAME "
1379 - Specifies a section name that contains the BPF program code. If no section
1380 name is specified, the default one ("prog") will be used. This option is
1381 to be passed with the
1386 - Act in verbose mode. For example, even in case of success, this will
1387 print the verifier log in case a program was loaded from a BPF ELF file.
1390 - Attaches a XDP/BPF program to the given device. The
1392 points to an already pinned BPF program in the BPF file system. The option
1394 doesn't apply here, but otherwise semantics are the same as with the option
1399 .BI master " DEVICE"
1400 set master device of the device (enslave device).
1404 unset master device of the device (release device).
1407 .BI addrgenmode " eui64|none|stable_secret|random"
1408 set the IPv6 address generation mode
1411 - use a Modified EUI-64 format interface identifier
1414 - disable automatic address generation
1417 - generate the interface identifier based on a preset /proc/sys/net/ipv6/conf/{default,DEVICE}/stable_secret
1420 - like stable_secret, but auto-generate a new random secret if none is set
1424 set peer netnsid for a cross-netns interface
1427 .BI type " ETYPE TYPE_ARGS"
1428 Change type-specific settings. For a list of supported types and arguments refer
1429 to the description of
1431 above. In addition to that, it is possible to manipulate settings to slave
1435 Bridge Slave Support
1436 For a link with master
1438 the following additional arguments are supported:
1440 .B "ip link set type bridge_slave"
1446 .BI priority " PRIO"
1450 .BR guard " { " on " | " off " }"
1452 .BR hairpin " { " on " | " off " }"
1454 .BR fastleave " { " on " | " off " }"
1456 .BR root_block " { " on " | " off " }"
1458 .BR learning " { " on " | " off " }"
1460 .BR flood " { " on " | " off " }"
1462 .BR proxy_arp " { " on " | " off " }"
1464 .BR proxy_arp_wifi " { " on " | " off " }"
1466 .BI mcast_router " MULTICAST_ROUTER"
1468 .BR mcast_fast_leave " { " on " | " off "}"
1470 .BR mcast_flood " { " on " | " off " } ]"
1475 - flush bridge slave's fdb dynamic entries.
1480 is a number representing the following states:
1481 .BR 0 " (disabled),"
1482 .BR 1 " (listening),"
1483 .BR 2 " (learning),"
1484 .BR 3 " (forwarding),"
1485 .BR 4 " (blocking)."
1487 .BI priority " PRIO"
1488 - set port priority (a 16bit unsigned value).
1491 - set port cost (a 32bit unsigned value).
1493 .BR guard " { " on " | " off " }"
1494 - block incoming BPDU packets on this port.
1496 .BR hairpin " { " on " | " off " }"
1497 - enable hairpin mode on this port. This will allow incoming packets on this
1498 port to be reflected back.
1500 .BR fastleave " { " on " | " off " }"
1501 - enable multicast fast leave on this port.
1503 .BR root_block " { " on " | " off " }"
1504 - block this port from becoming the bridge's root port.
1506 .BR learning " { " on " | " off " }"
1507 - allow MAC address learning on this port.
1509 .BR flood " { " on " | " off " }"
1510 - open the flood gates on this port, i.e. forward all unicast frames to this
1512 .BR proxy_arp " and " proxy_arp_wifi
1515 .BR proxy_arp " { " on " | " off " }"
1516 - enable proxy ARP on this port.
1518 .BR proxy_arp_wifi " { " on " | " off " }"
1519 - enable proxy ARP on this port which meets extended requirements by IEEE
1520 802.11 and Hotspot 2.0 specifications.
1522 .BI mcast_router " MULTICAST_ROUTER"
1523 - configure this port for having multicast routers attached. A port with a
1524 multicast router will receive all multicast traffic.
1528 to disable multicast routers on this port,
1530 to let the system detect the presence of of routers (this is the default),
1532 to permanently enable multicast traffic forwarding on this port or
1534 to enable multicast routers temporarily on this port, not depending on incoming
1537 .BR mcast_fast_leave " { " on " | " off " }"
1538 - this is a synonym to the
1542 .BR mcast_flood " { " on " | " off " }"
1543 - controls whether a given port will be flooded with multicast traffic for which there is no MDB entry.
1548 Bonding Slave Support
1549 For a link with master
1551 the following additional arguments are supported:
1553 .B "ip link set type bond_slave"
1561 - set the slave's queue ID (a 16bit unsigned value).
1566 MACVLAN and MACVTAP Support
1567 Modify list of allowed macaddr for link in source mode.
1569 .B "ip link set type { macvlan | macvap } "
1571 .BI macaddr " " "" COMMAND " " MACADDR " ..."
1577 - add MACADDR to allowed list
1580 - replace allowed list
1583 - remove MACADDR from allowed list
1586 - flush whole allowed list
1591 .SS ip link show - display device attributes
1594 .BI dev " NAME " (default)
1596 specifies the network device to show.
1597 If this argument is omitted all devices in the default group are listed.
1602 specifies what group of devices to show.
1606 only display running interfaces.
1609 .BI master " DEVICE "
1611 specifies the master device which enslaves devices to show.
1616 speficies the VRF which enslaves devices to show.
1621 specifies the type of devices to show.
1623 Note that the type name is not checked against the list of supported types -
1624 instead it is sent as-is to the kernel. Later it is used to filter the returned
1625 interface list by comparing it with the relevant attribute in case the kernel
1626 didn't filter already. Therefore any string is accepted, but may lead to empty
1629 .SS ip link xstats - display extended statistics
1634 specifies the type of devices to display extended statistics for.
1636 .SS ip link afstats - display address-family specific statistics
1641 specifies the device to display address-family statistics for.
1643 .SS ip link help - display help
1647 specifies which help of link type to dislpay.
1651 may be a number or a string from the file
1652 .B @SYSCONFDIR@/group
1653 which can be manually filled.
1659 Shows the state of all network interfaces on the system.
1662 ip link show type bridge
1664 Shows the bridge devices.
1667 ip link show type vlan
1669 Shows the vlan devices.
1672 ip link show master br0
1674 Shows devices enslaved by br0
1677 ip link set dev ppp0 mtu 1400
1679 Change the MTU the ppp0 device.
1682 ip link add link eth0 name eth0.10 type vlan id 10
1684 Creates a new vlan device eth0.10 on device eth0.
1687 ip link delete dev eth0.10
1689 Removes vlan device.
1694 Display help for the gre link type.
1697 ip link add name tun1 type ipip remote 192.168.1.1
1698 local 192.168.1.2 ttl 225 encap gue encap-sport auto
1699 encap-dport 5555 encap-csum encap-remcsum
1701 Creates an IPIP that is encapsulated with Generic UDP Encapsulation,
1702 and the outer UDP checksum and remote checksum offload are enabled.
1705 ip link set dev eth0 xdp obj prog.o
1707 Attaches a XDP/BPF program to device eth0, where the program is
1708 located in prog.o, section "prog" (default section). In case a
1709 XDP/BPF program is already attached, throw an error.
1712 ip -force link set dev eth0 xdp obj prog.o sec foo
1714 Attaches a XDP/BPF program to device eth0, where the program is
1715 located in prog.o, section "foo". In case a XDP/BPF program is
1716 already attached, it will be overridden by the new one.
1719 ip -force link set dev eth0 xdp pinned /sys/fs/bpf/foo
1721 Attaches a XDP/BPF program to device eth0, where the program was
1722 previously pinned as an object node into BPF file system under
1726 ip link set dev eth0 xdp off
1728 If a XDP/BPF program is attached on device eth0, detach it and
1729 effectively turn off XDP for device eth0.
1732 ip link add link wpan0 lowpan0 type lowpan
1734 Creates a 6LoWPAN interface named lowpan0 on the underlying
1735 IEEE 802.15.4 device wpan0.
1746 Original Manpage by Michail Litvak <mci@owl.openwall.com>