# ip-link(8) - man - phpMan

[IP-LINK(8)](https://www.chedong.com/phpMan.php/man/IP-LINK/8/markdown)                                      Linux                                     [IP-LINK(8)](https://www.chedong.com/phpMan.php/man/IP-LINK/8/markdown)



## NAME
       ip-link - network device configuration

## SYNOPSIS
       **ip** **link**  { _COMMAND_ | **help** }


       **ip** **link** **add** [ **link** _DEVICE_ ] [ **name** ] _NAME_
               [ **txqueuelen** _PACKETS_ ]
               [ **address** _LLADDR_ ] [ **broadcast** _LLADDR_ ]
               [ **mtu** _MTU_ ] [ **index** _IDX_ ]
               [ **numtxqueues** _QUEUE_COUNT_ ] [ **numrxqueues** _QUEUE_COUNT_ ]
               **[** gso_max_size _BYTES_ ] [ **gso**___**max**___**segs** _SEGMENTS_ ]
               **type** _TYPE_ [ _ARGS_ ]

       **ip** **link** **delete** { _DEVICE_ | **group** _GROUP_ } **type** _TYPE_ [ _ARGS_ ]

       **ip** **link** **set** { _DEVICE_ | **group** _GROUP_ }
               [ { **up** | **down** } ]
               [ **type** _ETYPE_ _TYPE_ARGS_ ]
               [ **arp** { **on** | **off** } ]
               [ **dynamic** { **on** | **off** } ]
               [ **multicast** { **on** | **off** } ]
               [ **allmulticast** { **on** | **off** } ]
               [ **promisc** { **on** | **off** } ]
               [ **protodown** { **on** | **off** } ]
               [ **protodown**___**reason** _PREASON_ { _on_ | _off_ } ]
               [ **trailers** { **on** | **off** } ]
               [ **txqueuelen** _PACKETS_ ]
               [ **name** _NEWNAME_ ]
               [ **address** _LLADDR_ ]
               [ **broadcast** _LLADDR_ ]
               [ **mtu** _MTU_ ]
               [ **netns** { _PID_ | _NETNSNAME_ } ]
               [ **link-netnsid** _ID_ ]
               [ **alias** _NAME_ ]
               [ **vf** _NUM_ [ **mac** _LLADDR_ ]
                        [ _VFVLAN-LIST_ ]
                        [ **rate** _TXRATE_ ]
                        [ **max**___**tx**___**rate** _TXRATE_ ]
                        [ **min**___**tx**___**rate** _TXRATE_ ]
                        [ **spoofchk** { **on** | **off** } ]
                        [ **query**___**rss** { **on** | **off** } ]
                        [ **state** { **auto** | **enable** | **disable** } ]
                        [ **trust** { **on** | **off** } ]
                        [ **node**___**guid** eui64 ]
                        [ **port**___**guid** eui64 ] ]
               [ { **xdp** | **xdpgeneric** | **xdpdrv** | **xdpoffload** } { **off** |
                       **object** _FILE_ [ **section** _NAME_ ] [ **verbose** ] |
                       **pinned** _FILE_ } ]
               [ **master** _DEVICE_ ]
               [ **nomaster** ]
               [ **vrf** _NAME_ ]
               [ **addrgenmode** { **eui64** | **none** | **stable**___**secret** | **random** } ]
               [ **macaddr** [ _MACADDR_ ]
                         [ { **flush** | **add** | **del** } _MACADDR_ ]
                         [ **set** _MACADDR_ ] ]

                 **ip** **link** **show** [ _DEVICE_ | **group** _GROUP_ ] [ **up** ] [ **master** _DEVICE_ ] [ **type** _ETYPE_ ] [ **vrf**
                         _NAME_ ]

                 **ip** **link** **xstats** **type** _TYPE_ [ _ARGS_ ]

                 **ip** **link** **afstats** [ **dev** _DEVICE_ ]

                 **ip** **link** **help** [ _TYPE_ ]

                 _TYPE_ := [ **bridge** | **bond** | **can** | **dummy** | **hsr** | **ifb** | **ipoib** | **macvlan** | **macvtap** |
                         **vcan** | **vxcan** | **veth** | **vlan** | **vxlan** | **ip6tnl** | **ipip** | **sit** | **gre** | **gretap** |
                         **erspan** | **ip6gre** | **ip6gretap** | **ip6erspan** | **vti** | **nlmon** | **ipvlan** | **ipvtap** |
                         **lowpan** | **geneve** | **bareudp** | **vrf** | **macsec** | **netdevsim** | **rmnet** | **xfrm** ]

                 _ETYPE_ := [ _TYPE_ | **bridge**___**slave** | **bond**___**slave** ]

                 _VFVLAN-LIST_ := [ _VFVLAN-LIST_ ] _VFVLAN_

                 _VFVLAN_ := [ **vlan** _VLANID_ [ **qos** _VLAN-QOS_ ] [ **proto** _VLAN-PROTO_ ] ]

         **ip** **link** **property** **add** **dev** _DEVICE_ [ **altname** _NAME_ .. ]

         **ip** **link** **property** **del** **dev** _DEVICE_ [ **altname** _NAME_ .. ]


## DESCRIPTION
### ip link add - add virtual link
       **link** _DEVICE_
              specifies the physical device to act operate on.

              _NAME_ specifies the name of the new virtual device.

              _TYPE_ specifies the type of the new device.

              Link types:

                      **bridge** - Ethernet Bridge device

                      **bond** - Bonding device

                      **dummy** - Dummy network interface

                      **hsr** - High-availability Seamless Redundancy device

                      **ifb** - Intermediate Functional Block device

                      **ipoib** - IP over Infiniband device

                      **macvlan** - Virtual interface base on link layer address (MAC)

                      **macvtap** - Virtual interface based on link layer address (MAC) and TAP.

                      **vcan** - Virtual Controller Area Network interface

                      **vxcan** - Virtual Controller Area Network tunnel interface

                      **veth** - Virtual ethernet interface

                      **vlan** - 802.1q tagged virtual LAN interface

                      **vxlan** - Virtual eXtended LAN

                      **ip6tnl** - Virtual tunnel interface IPv4|IPv6 over IPv6

                      **ipip** - Virtual tunnel interface IPv4 over IPv4

                      **sit** - Virtual tunnel interface IPv6 over IPv4

                      **gre** - Virtual tunnel interface GRE over IPv4

                      **gretap** - Virtual L2 tunnel interface GRE over IPv4

                      **erspan** - Encapsulated Remote SPAN over GRE and IPv4

                      **ip6gre** - Virtual tunnel interface GRE over IPv6

                      **ip6gretap** - Virtual L2 tunnel interface GRE over IPv6

                      **ip6erspan** - Encapsulated Remote SPAN over GRE and IPv6

                      **vti** - Virtual tunnel interface

                      **nlmon** - Netlink monitoring device

                      **ipvlan** - Interface for L3 (IPv6/IPv4) based VLANs

                      **ipvtap** - Interface for L3 (IPv6/IPv4) based VLANs and TAP

                      **lowpan** - Interface for 6LoWPAN (IPv6) over IEEE 802.15.4 / Bluetooth

                      **geneve** - GEneric NEtwork Virtualization Encapsulation

                      **bareudp** - Bare UDP L3 encapsulation support

                      **macsec** - Interface for IEEE 802.1AE MAC Security (MACsec)

                      **vrf** - Interface for L3 VRF domains

                      **netdevsim** - Interface for netdev API tests

                      **rmnet** - Qualcomm rmnet device

                      **xfrm** - Virtual xfrm interface


       **numtxqueues** _QUEUE_COUNT_
              specifies the number of transmit queues for new device.


       **numrxqueues** _QUEUE_COUNT_
              specifies the number of receive queues for new device.


       **gso**___**max**___**size** _BYTES_
              specifies the recommended maximum size of a Generic Segment Offload packet the new de‐
              vice should accept.


       **gso**___**max**___**segs** _SEGMENTS_
              specifies the recommended maximum number of a Generic Segment Offload segments the new
              device should accept.


       **index** _IDX_
              specifies the desired index of the new virtual device. The link creation fails, if the
              index is busy.


       VLAN Type Support
              For a link of type _VLAN_ the following additional arguments are supported:

              **ip** **link** **add** **link** _DEVICE_ **name** _NAME_ **type** **vlan** [ **protocol** _VLAN_PROTO_ ] **id** _VLANID_ [ **re**‐‐
              **order**___**hdr** { **on** | **off** } ] [ **gvrp** { **on** | **off** } ] [ **mvrp** { **on** | **off** } ] [ **loose**___**binding** {
              **on** | **off** } ] [ **bridge**___**binding** { **on** | **off** } ] [ **ingress-qos-map** _QOS-MAP_ ] [ **egress-qos-**
              **map** _QOS-MAP_ ]


                      **protocol** _VLAN_PROTO_ - either 802.1Q or 802.1ad.

                      **id** _VLANID_ - specifies the VLAN Identifier to use. Note that numbers with a
                      leading " 0 " or " 0x " are interpreted as octal or hexadecimal, respectively.

                      **reorder**___**hdr** { **on** | **off** } - specifies whether ethernet headers are reordered or
                      not (default is **on**).

                          If **reorder**___**hdr** is **on** then VLAN header will be not inserted immediately but
                          only before passing to the physical device (if this device does not sup‐
                          port VLAN offloading), the similar on the RX direction - by default the
                          packet will be untagged before being received by VLAN device. Reordering
                          allows to accelerate tagging on egress and to hide VLAN header on ingress
                          so the packet looks like regular Ethernet packet, at the same time it
                          might be confusing for packet capture as the VLAN header does not exist
                          within the packet.

                          VLAN offloading can be checked by [**ethtool**(8)](https://www.chedong.com/phpMan.php/man/ethtool/8/markdown):

                              **ethtool** **-k** <phy_dev> | grep **tx-vlan-offload**

                          where <phy_dev> is the physical device to which VLAN device is bound.

                      **gvrp** { **on** | **off** } - specifies whether this VLAN should be registered using
                      GARP VLAN
                        Registration Protocol.

                      **mvrp** { **on** | **off** } - specifies whether this VLAN should be registered using
                      Multiple VLAN
                        Registration Protocol.

                      **loose**___**binding** { **on** | **off** } - specifies whether the VLAN device state is bound
                      to the physical device state.

                      **bridge**___**binding** { **on** | **off** } - specifies whether the VLAN device link state
                      tracks the state of bridge ports that are members of the VLAN.

                      **ingress-qos-map** _QOS-MAP_ - defines a mapping of VLAN header prio field to the
                      Linux internal packet priority on incoming frames. The format is FROM:TO with
                      multiple mappings separated by spaces.

                      **egress-qos-map** _QOS-MAP_ - defines a mapping of Linux internal packet priority
                      to VLAN header prio field but for outgoing frames. The format is the same as
                      for ingress-qos-map.

                          Linux packet priority can be set by [**iptables**(8)](https://www.chedong.com/phpMan.php/man/iptables/8/markdown)**:**

                              **iptables** -t mangle -A POSTROUTING [...] -j CLASSIFY --set-class 0:4

                          and this "4" priority can be used in the egress qos mapping to set VLAN
                          prio "5":

                              **ip** link set veth0.10 type vlan egress 4:5


       VXLAN Type Support
              For a link of type _VXLAN_ the following additional arguments are supported:

              **ip** **link** **add** _DEVICE_ **type** _vxlan_ **id** _VNI_ [ **dev** _PHYS_DEV_  ] [ { **group** | **remote** } _IPADDR_ ] [
              **local** { _IPADDR_ | _any_ } ] [ **ttl** _TTL_ ] [ **tos** _TOS_ ] [ **df** _DF_ ] [ **flowlabel** _FLOWLABEL_ ] [
              **dstport** _PORT_ ] [ **srcport** _MIN_ _MAX_ ] [ [**no**]**learning** ] [ [**no**]**proxy** ] [ [**no**]**rsc** ] [
              [**no**]**l2miss** ] [ [**no**]**l3miss** ] [ [**no**]**udpcsum** ] [ [**no**]**udp6zerocsumtx** ] [ [**no**]**udp6zeroc**‐‐
              **sumrx** ] [ **ageing** _SECONDS_ ] [ **maxaddress** _NUMBER_ ] [ [**no**]**external** ] [ **gbp** ] [ **gpe** ]


                      **id** _VNI_ - specifies the VXLAN Network Identifier (or VXLAN Segment Identifier)
                      to use.

                      **dev** _PHYS_DEV_ - specifies the physical device to use for tunnel endpoint commu‐
                      nication.


                      **group** _IPADDR_ - specifies the multicast IP address to join.  This parameter
                      cannot be specified with the **remote** parameter.


                      **remote** _IPADDR_ - specifies the unicast destination IP address to use in outgo‐
                      ing packets when the destination link layer address is not known in the VXLAN
                      device forwarding database. This parameter cannot be specified with the **group**
                      parameter.


                      **local** _IPADDR_ - specifies the source IP address to use in outgoing packets.


                      **ttl** _TTL_ - specifies the TTL value to use in outgoing packets.


                      **tos** _TOS_ - specifies the TOS value to use in outgoing packets.


                      **df** _DF_ - specifies the usage of the Don't Fragment flag (DF) bit in outgoing
                      packets with IPv4 headers. The value **inherit** causes the bit to be copied from
                      the original IP header. The values **unset** and **set** cause the bit to be always
                      unset or always set, respectively. By default, the bit is not set.


                      **flowlabel** _FLOWLABEL_ - specifies the flow label to use in outgoing packets.


                      **dstport** _PORT_ - specifies the UDP destination port to communicate to the remote
                        VXLAN tunnel endpoint.


                      **srcport** _MIN_ _MAX_ - specifies the range of port numbers to use as UDP source
                      ports to communicate to the remote VXLAN tunnel endpoint.


                      [**no**]**learning** - specifies if unknown source link layer addresses and IP ad‐
                      dresses are entered into the VXLAN device forwarding database.


                      [**no**]**rsc** - specifies if route short circuit is turned on.


                      [**no**]**proxy** - specifies ARP proxy is turned on.


                      [**no**]**l2miss** - specifies if netlink LLADDR miss notifications are generated.


                      [**no**]**l3miss** - specifies if netlink IP ADDR miss notifications are generated.


                      [**no**]**udpcsum** - specifies if UDP checksum is calculated for transmitted packets
                      over IPv4.


                      [**no**]**udp6zerocsumtx** - skip UDP checksum calculation for transmitted packets
                      over IPv6.


                      [**no**]**udp6zerocsumrx** - allow incoming UDP packets over IPv6 with zero checksum
                      field.


                      **ageing** _SECONDS_ - specifies the lifetime in seconds of FDB entries learnt by
                      the kernel.


                      **maxaddress** _NUMBER_ - specifies the maximum number of FDB entries.


                      [**no**]**external** - specifies whether an external control plane (e.g. **ip** **route** **en**‐‐
                      **cap**) or the internal FDB should be used.


                      **gbp** - enables the Group Policy extension (VXLAN-GBP).

                          Allows to transport group policy context across VXLAN network peers.  If
                          enabled, includes the mark of a packet in the VXLAN header for outgoing
                          packets and fills the packet mark based on the information found in the
                          VXLAN header for incoming packets.

                          Format of upper 16 bits of packet mark (flags);

                            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                            |-|-|-|-|-|-|-|-|-|D|-|-|A|-|-|-|
                            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                            **D** **:=** Don't Learn bit. When set, this bit indicates that the egress VTEP
                            MUST NOT learn the source address of the encapsulated frame.

                            **A** **:=** Indicates that the group policy has already been applied to this
                            packet. Policies MUST NOT be applied by devices when the A bit is set.

                          Format of lower 16 bits of packet mark (policy ID):

                            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                            |        Group Policy ID        |
                            +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Example:
                            iptables -A OUTPUT [...] -j MARK --set-mark 0x800FF



                      **gpe** - enables the Generic Protocol extension (VXLAN-GPE). Currently, this is
                      only supported together with the **external** keyword.



       VETH, VXCAN Type Support
              For a link of types _VETH/VXCAN_ the following additional arguments are supported:

              **ip** **link** **add** _DEVICE_ **type** { **veth** | **vxcan** } [ **peer** **name** _NAME_ ]


                      **peer** **name** _NAME_ - specifies the virtual pair device name of the _VETH/VXCAN_ tun‐
                      nel.



       IPIP, SIT Type Support
              For a link of type _IPIP_or_SIT_ the following additional arguments are supported:

              **ip** **link** **add** _DEVICE_ **type** { **ipip** | **sit** }  **remote** _ADDR_ **local** _ADDR_ [ **encap** { **fou** | **gue** |
              **none** } ] [ **encap-sport** { _PORT_ | **auto** } ] [ **encap-dport** _PORT_ ] [ [**no**]**encap-csum** ] [
              _[no]encap-remcsum_ ] [  _mode_  _{_ _ip6ip_ _|_ _ipip_ _|_ _mplsip_ _|_ _any_ _}_ ] [ **external** ]


                      **remote** _ADDR_ - specifies the remote address of the tunnel.


                      **local** _ADDR_ - specifies the fixed local address for tunneled packets.  It must
                      be an address on another interface on this host.


                      **encap** { **fou** | **gue** | **none** } - specifies type of secondary UDP encapsulation.
                      "fou" indicates Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.


                      **encap-sport** { _PORT_ | **auto** } - specifies the source port in UDP encapsulation.
                      _PORT_ indicates the port by number, "auto" indicates that the port number
                      should be chosen automatically (the kernel picks a flow based on the flow hash
                      of the encapsulated packet).


                      [**no**]**encap-csum** - specifies if UDP checksums are enabled in the secondary en‐
                      capsulation.


                      [**no**]**encap-remcsum** - specifies if Remote Checksum Offload is enabled. This is
                      only applicable for Generic UDP Encapsulation.


                      **mode** _{_ _ip6ip_ _|_ _ipip_ _|_ _mplsip_ _|_ _any_ _}_ - specifies mode in which device should
                      run. "ip6ip" indicates IPv6-Over-IPv4, "ipip" indicates "IPv4-Over-IPv4",
                      "mplsip" indicates MPLS-Over-IPv4, "any" indicates IPv6, IPv4 or MPLS Over
                      IPv4. Supported for SIT where the default is "ip6ip" and IPIP where the de‐
                      fault is "ipip".  IPv6-Over-IPv4 is not supported for IPIP.


                      **external** - make this tunnel externally controlled (e.g. **ip** **route** **encap**).


       GRE Type Support
              For a link of type _GRE_ or _GRETAP_ the following additional arguments are supported:

              **ip** **link** **add** _DEVICE_ **type** { **gre** | **gretap** }  **remote** _ADDR_ **local** _ADDR_ [ [**no**][**i**|**o**]**seq** ] [
              [**i**|**o**]**key** _KEY_ | **no**[**i**|**o**]**key** ] [ [**no**][**i**|**o**]**csum** ] [ **ttl** _TTL_ ] [ **tos** _TOS_ ] [ [**no**]**pmtudisc** ]
              [ [**no**]**ignore-df** ] [ **dev** _PHYS_DEV_ ] [ **encap** { **fou** | **gue** | **none** } ] [ **encap-sport** { _PORT_
              | **auto** } ] [ **encap-dport** _PORT_ ] [ [**no**]**encap-csum** ] [ [**no**]**encap-remcsum** ] [ **external** ]


                      **remote** _ADDR_ - specifies the remote address of the tunnel.


                      **local** _ADDR_ - specifies the fixed local address for tunneled packets.  It must
                      be an address on another interface on this host.


                      [**no**][**i**|**o**]**seq** - serialize packets.  The **oseq** flag enables sequencing of outgo‐
                      ing packets.  The **iseq** flag requires that all input packets are serialized.


                      [**i**|**o**]**key** _KEY_ | **no**[**i**|**o**]**key** - use keyed GRE with key _KEY_. _KEY_ is either a number
                      or an IPv4 address-like dotted quad.  The **key** parameter specifies the same key
                      to use in both directions.  The **ikey** and **okey** parameters specify different
                      keys for input and output.


                      [**no**][**i**|**o**]**csum** - generate/require checksums for tunneled packets.  The **ocsum**
                      flag calculates checksums for outgoing packets.  The **icsum** flag requires that
                      all input packets have the correct checksum. The **csum** flag is equivalent to
                      the combination **icsum** **ocsum** **.**


                      **ttl** _TTL_ - specifies the TTL value to use in outgoing packets.


                      **tos** _TOS_ - specifies the TOS value to use in outgoing packets.


                      [**no**]**pmtudisc** - enables/disables Path MTU Discovery on this tunnel.  It is en‐
                      abled by default. Note that a fixed ttl is incompatible with this option: tun‐
                      neling with a fixed ttl always makes pmtu discovery.


                      [**no**]**ignore-df** - enables/disables IPv4 DF suppression on this tunnel.  Normally
                      datagrams that exceed the MTU will be fragmented; the presence of the DF flag
                      inhibits this, resulting instead in an ICMP Unreachable (Fragmentation Re‐
                      quired) message.  Enabling this attribute causes the DF flag to be ignored.


                      **dev** _PHYS_DEV_ - specifies the physical device to use for tunnel endpoint commu‐
                      nication.


                      **encap** { **fou** | **gue** | **none** } - specifies type of secondary UDP encapsulation.
                      "fou" indicates Foo-Over-UDP, "gue" indicates Generic UDP Encapsulation.


                      **encap-sport** { _PORT_ | **auto** } - specifies the source port in UDP encapsulation.
                      _PORT_ indicates the port by number, "auto" indicates that the port number
                      should be chosen automatically (the kernel picks a flow based on the flow hash
                      of the encapsulated packet).


                      [**no**]**encap-csum** - specifies if UDP checksums are enabled in the secondary en‐
                      capsulation.


                      [**no**]**encap-remcsum** - specifies if Remote Checksum Offload is enabled. This is
                      only applicable for Generic UDP Encapsulation.


                      **external** - make this tunnel externally controlled (e.g. **ip** **route** **encap**).



       IP6GRE/IP6GRETAP Type Support
              For a link of type _IP6GRE/IP6GRETAP_ the following additional arguments are supported:

              **ip** **link** **add** _DEVICE_ **type** { **ip6gre** | **ip6gretap** } **remote** _ADDR_ **local** _ADDR_ [ [**no**][**i**|**o**]**seq** ]
              [ [**i**|**o**]**key** _KEY_ | **no**[**i**|**o**]**key** ] [ [**no**][**i**|**o**]**csum** ] [ **hoplimit** _TTL_ ] [ **encaplimit** _ELIM_ ] [
              **tclass** _TCLASS_ ] [ **flowlabel** _FLOWLABEL_ ] [ **dscp** **inherit** ] [ **[no]allow-localremote** ] [
              **dev** _PHYS_DEV_ ] [ external ]


                      **remote** _ADDR_ - specifies the remote IPv6 address of the tunnel.


                      **local** _ADDR_ - specifies the fixed local IPv6 address for tunneled packets.  It
                      must be an address on another interface on this host.


                      [**no**][**i**|**o**]**seq** - serialize packets.  The **oseq** flag enables sequencing of outgo‐
                      ing packets.  The **iseq** flag requires that all input packets are serialized.


                      [**i**|**o**]**key** _KEY_ | **no**[**i**|**o**]**key** - use keyed GRE with key _KEY_. _KEY_ is either a number
                      or an IPv4 address-like dotted quad.  The **key** parameter specifies the same key
                      to use in both directions.  The **ikey** and **okey** parameters specify different
                      keys for input and output.


                      [**no**][**i**|**o**]**csum** - generate/require checksums for tunneled packets.  The **ocsum**
                      flag calculates checksums for outgoing packets.  The **icsum** flag requires that
                      all input packets have the correct checksum. The **csum** flag is equivalent to
                      the combination **icsum** **ocsum**.


                      **hoplimit** _TTL_ - specifies Hop Limit value to use in outgoing packets.


                      **encaplimit** _ELIM_ - specifies a fixed encapsulation limit. Default is 4.


                      **flowlabel** _FLOWLABEL_ - specifies a fixed flowlabel.


                      **[no]allow-localremote** - specifies whether to allow remote endpoint to have an
                      address configured on local host.


                      **tclass** _TCLASS_ - specifies the traffic class field on tunneled packets, which
                      can be specified as either a two-digit hex value (e.g. c0) or a predefined
                      string (e.g. internet).  The value **inherit** causes the field to be copied from
                      the original IP header. The values **inherit/**_STRING_ or **inherit/**_00_**..**_ff_ will set
                      the field to _STRING_ or _00_.._ff_ when tunneling non-IP packets. The default value
                      is 00.


                      external - make this tunnel externally controlled (or not, which is the de‐
                      fault).  In the kernel, this is referred to as collect metadata mode.  This
                      flag is mutually exclusive with the **remote**, **local**, **seq**, **key,** **csum,** **hoplimit,**
                      **encaplimit,** **flowlabel** and **tclass** options.



       IPoIB Type Support
              For a link of type _IPoIB_ the following additional arguments are supported:

              **ip** **link** **add** _DEVICE_ **name** _NAME_ **type** **ipoib** [ **pkey** _PKEY_ ] [ **mode** _MODE_ ]


                      **pkey** _PKEY_ - specifies the IB P-Key to use.

                      **mode** _MODE_ - specifies the mode (datagram or connected) to use.


       ERSPAN Type Support
              For a link of type _ERSPAN/IP6ERSPAN_ the following additional arguments are supported:

              **ip** **link** **add** _DEVICE_ **type** { **erspan** | **ip6erspan** } **remote** _ADDR_ **local** _ADDR_ **seq** key _KEY_
              **erspan**___**ver** _version_ [ **erspan** _IDX_ ] [ **erspan**___**dir** { _ingress_ | _egress_ } ] [ **erspan**___**hwid**
              _hwid_ ] [ **[no]allow-localremote** ] [ external ]


                      **remote** _ADDR_ - specifies the remote address of the tunnel.


                      **local** _ADDR_ - specifies the fixed local address for tunneled packets.  It must
                      be an address on another interface on this host.


                      **erspan**___**ver** _version_ - specifies the ERSPAN version number.  _version_ indicates
                      the ERSPAN version to be created: 0 for version 0 type I, 1 for version 1
                      (type II) or 2 for version 2 (type III).


                      **erspan** _IDX_ - specifies the ERSPAN v1 index field.  _IDX_ indicates a 20 bit in‐
                      dex/port number associated with the ERSPAN traffic's source port and direc‐
                      tion.


                      **erspan**___**dir** { _ingress_ | _egress_ } - specifies the ERSPAN v2 mirrored traffic's
                      direction.


                      **erspan**___**hwid** _hwid_ - an unique identifier of an ERSPAN v2 engine within a sys‐
                      tem.  _hwid_ is a 6-bit value for users to configure.


                      **[no]allow-localremote** - specifies whether to allow remote endpoint to have an
                      address configured on local host.


                      **external** - make this tunnel externally controlled (or not, which is the de‐
                      fault).  In the kernel, this is referred to as collect metadata mode.  This
                      flag is mutually exclusive with the **remote**, **local**, **erspan**___**ver**, **erspan**,
                      **erspan**___**dir** and **erspan**___**hwid** options.



       GENEVE Type Support
              For a link of type _GENEVE_ the following additional arguments are supported:

              **ip** **link** **add** _DEVICE_ **type** _geneve_ **id** _VNI_ **remote** _IPADDR_ [ **ttl** _TTL_ ] [ **tos** _TOS_ ] [ **df** _DF_ ]
              [ **flowlabel** _FLOWLABEL_ ] [ **dstport** _PORT_ ] [ [**no**]**external** ] [ [**no**]**udpcsum** ] [
              [**no**]**udp6zerocsumtx** ] [ [**no**]**udp6zerocsumrx** ]


                      **id** _VNI_ - specifies the Virtual Network Identifier to use.


                      **remote** _IPADDR_ - specifies the unicast destination IP address to use in outgo‐
                      ing packets.


                      **ttl** _TTL_ - specifies the TTL value to use in outgoing packets. "0" or "auto"
                      means use whatever default value, "inherit" means inherit the inner protocol's
                      ttl. Default option is "0".


                      **tos** _TOS_ - specifies the TOS value to use in outgoing packets.


                      **df** _DF_ - specifies the usage of the Don't Fragment flag (DF) bit in outgoing
                      packets with IPv4 headers. The value **inherit** causes the bit to be copied from
                      the original IP header. The values **unset** and **set** cause the bit to be always
                      unset or always set, respectively. By default, the bit is not set.


                      **flowlabel** _FLOWLABEL_ - specifies the flow label to use in outgoing packets.


                      **dstport** _PORT_ - select a destination port other than the default of 6081.


                      [**no**]**external** - make this tunnel externally controlled (or not, which is the
                      default). This flag is mutually exclusive with the **id**, **remote**, **ttl**, **tos** and
                      **flowlabel** options.


                      [**no**]**udpcsum** - specifies if UDP checksum is calculated for transmitted packets
                      over IPv4.


                      [**no**]**udp6zerocsumtx** - skip UDP checksum calculation for transmitted packets
                      over IPv6.


                      [**no**]**udp6zerocsumrx** - allow incoming UDP packets over IPv6 with zero checksum
                      field.



       Bareudp Type Support
              For a link of type _Bareudp_ the following additional arguments are supported:

              **ip** **link** **add** _DEVICE_ **type** _bareudp_ **dstport** _PORT_ **ethertype** _PROTO_ [ **srcportmin** _PORT_ ] [
              [**no**]**multiproto** ]


                      **dstport** _PORT_ - specifies the destination port for the UDP tunnel.


                      **ethertype** _PROTO_ - specifies the ethertype of the L3 protocol being tunnelled.
                      **ethertype** can be given as plain Ethernet protocol number or using the protocol
                      name ("ipv4", "ipv6", "mpls_uc", etc.).


                      **srcportmin** _PORT_ - selects the lowest value of the UDP tunnel source port
                      range.


                      [**no**]**multiproto** - activates support for protocols similar to the one specified
                      by **ethertype**.  When **ethertype** is "mpls_uc" (that is, unicast MPLS), this al‐
                      lows the tunnel to also handle multicast MPLS.  When **ethertype** is "ipv4", this
                      allows the tunnel to also handle IPv6. This option is disabled by default.


       MACVLAN and MACVTAP Type Support
              For a link of type _MACVLAN_ or _MACVTAP_ the following additional arguments are sup‐
              ported:

              **ip** **link** **add** **link** _DEVICE_ **name** _NAME_ **type** { **macvlan** | **macvtap** } **mode** { **private** | **vepa** |
              **bridge** | **passthru**  [ **nopromisc** ] | **source** [ **nodst** ] }  [ **bcqueuelen** { **LENGTH** } ]


                      **type** { **macvlan** | **macvtap** } - specifies the link type to use.  **macvlan** creates
                      just a virtual interface, while **macvtap** in addition creates a character device
                      **/dev/tapX** to be used just like a **tuntap** device.

                      **mode** **private** - Do not allow communication between **macvlan** instances on the
                      same physical interface, even if the external switch supports hairpin mode.

                      **mode** **vepa** - Virtual Ethernet Port Aggregator mode. Data from one **macvlan** in‐
                      stance to the other on the same physical interface is transmitted over the
                      physical interface. Either the attached switch needs to support hairpin mode,
                      or there must be a TCP/IP router forwarding the packets in order to allow com‐
                      munication. This is the default mode.

                      **mode** **bridge** - In bridge mode, all endpoints are directly connected to each
                      other, communication is not redirected through the physical interface's peer.

                      **mode** **passthru** [ **nopromisc** ] - This mode gives more power to a single endpoint,
                      usually in **macvtap** mode. It is not allowed for more than one endpoint on the
                      same physical interface. All traffic will be forwarded to this endpoint, al‐
                      lowing virtio guests to change MAC address or set promiscuous mode in order to
                      bridge the interface or create vlan interfaces on top of it. By default, this
                      mode forces the underlying interface into promiscuous mode. Passing the **no**‐‐
                      **promisc** flag prevents this, so the promisc flag may be controlled using stan‐
                      dard tools.

                      **mode** **source** [ **nodst** ] - allows one to set a list of allowed mac address, which
                      is used to match against source mac address from received frames on underlying
                      interface. This allows creating mac based VLAN associations, instead of stan‐
                      dard port or tag based. The feature is useful to deploy 802.1x mac based be‐
                      havior, where drivers of underlying interfaces doesn't allows that. By de‐
                      fault, packets are also considered (duplicated) for destination-based MACVLAN.
                      Passing the **nodst** flag stops matching packets from also going through the des‐
                      tination-based flow.

                      **bcqueuelen** { **LENGTH** } - Set the length of the RX queue used to process broad‐
                      cast and multicast packets.  **LENGTH** must be a positive integer in the range
                      [0-4294967295].  Setting a length of 0 will effectively drop all broad‐
                      cast/multicast traffic.  If not specified the macvlan driver default (1000) is
                      used.  Note that all macvlans that share the same underlying device are using
                      the same queue. The parameter here is a **request**, the actual queue length used
                      will be the maximum length that any macvlan interface has requested.  When
                      listing device parameters both the bcqueuelen parameter as well as the actual
                      used bcqueuelen are listed to better help the user understand the setting.


       High-availability Seamless Redundancy (HSR) Support
              For a link of type _HSR_ the following additional arguments are supported:

              **ip** **link** **add** **link** _DEVICE_ **name** _NAME_ **type** **hsr** **slave1** _SLAVE1-IF_ **slave2** _SLAVE2-IF_ [ **super**‐‐
              **vision** _ADDR-BYTE_ ] [ **version** { **0** | **1** } [ **proto** { **0** | **1** } ]


                      **type** hsr - specifies the link type to use, here HSR.

                      **slave1** _SLAVE1-IF_ - Specifies the physical device used for the first of the two
                      ring ports.

                      **slave2** _SLAVE2-IF_ - Specifies the physical device used for the second of the
                      two ring ports.

                      **supervision** _ADDR-BYTE_ - The last byte of the multicast address used for HSR
                      supervision frames.  Default option is "0", possible values 0-255.

                      **version** { **0** | **1** } - Selects the protocol version of the interface. Default op‐
                      tion is "0", which corresponds to the 2010 version of the HSR standard. Option
                      "1" activates the 2012 version.

                      **proto** { **0** | **1** } - Selects the protocol at the interface. Default option is
                      "0", which corresponds to the HSR standard. Option "1" activates the Parallel
                      Redundancy Protocol (PRP).


       BRIDGE Type Support
              For a link of type _BRIDGE_ the following additional arguments are supported:

              **ip** **link** **add** _DEVICE_ **type** **bridge** [ **ageing**___**time** _AGEING_TIME_ ] [ **group**___**fwd**___**mask** _MASK_ ] [
              **group**___**address** _ADDRESS_ ] [ **forward**___**delay** _FORWARD_DELAY_ ] [ **hello**___**time** _HELLO_TIME_ ] [
              **max**___**age** _MAX_AGE_ ] [ **stp**___**state** _STP_STATE_ ] [ **priority** _PRIORITY_ ] [ **vlan**___**filtering**
              _VLAN_FILTERING_ ] [ **vlan**___**protocol** _VLAN_PROTOCOL_ ] [ **vlan**___**default**___**pvid** _VLAN_DEFAULT_PVID_
              ] [ **vlan**___**stats**___**enabled** _VLAN_STATS_ENABLED_ ] [ **vlan**___**stats**___**per**___**port** _VLAN_STATS_PER_PORT_
              ] [ **mcast**___**snooping** _MULTICAST_SNOOPING_ ] [ **mcast**___**router** _MULTICAST_ROUTER_ ] [
              **mcast**___**query**___**use**___**ifaddr** _MCAST_QUERY_USE_IFADDR_ ] [ **mcast**___**querier** _MULTICAST_QUERIER_ ] [
              **mcast**___**hash**___**elasticity** _HASH_ELASTICITY_ ] [ **mcast**___**hash**___**max** _HASH_MAX_ ] [ **mcast**___**last**___**mem**‐‐
              **ber**___**count** _LAST_MEMBER_COUNT_ ] [ **mcast**___**startup**___**query**___**count** _STARTUP_QUERY_COUNT_ ] [
              **mcast**___**last**___**member**___**interval** _LAST_MEMBER_INTERVAL_ ] [ **mcast**___**membership**___**interval** _MEMBER__‐
              _SHIP_INTERVAL_ ] [ **mcast**___**querier**___**interval** _QUERIER_INTERVAL_ ] [ **mcast**___**query**___**interval**
              _QUERY_INTERVAL_ ] [ **mcast**___**query**___**response**___**interval** _QUERY_RESPONSE_INTERVAL_ ] [
              **mcast**___**startup**___**query**___**interval** _STARTUP_QUERY_INTERVAL_ ] [ **mcast**___**stats**___**enabled**
              _MCAST_STATS_ENABLED_ ] [ **mcast**___**igmp**___**version** _IGMP_VERSION_ ] [ **mcast**___**mld**___**version** _MLD_VER__‐
              _SION_ ] [ **nf**___**call**___**iptables** _NF_CALL_IPTABLES_ ] [ **nf**___**call**___**ip6tables** _NF_CALL_IP6TABLES_ ] [
              **nf**___**call**___**arptables** _NF_CALL_ARPTABLES_ ]


                      **ageing**___**time** _AGEING_TIME_ - 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.

                      **group**___**fwd**___**mask** _MASK_ - 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).

                      **group**___**address** _ADDRESS_ - 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].

                      **forward**___**delay** _FORWARD_DELAY_ - 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.

                      **hello**___**time** _HELLO_TIME_ - 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.

                      **max**___**age** _MAX_AGE_ - 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 be‐
                      tween 6 and 40.

                      **stp**___**state** _STP_STATE_ - turn spanning tree protocol on (_STP_STATE_ > 0) or off
                      (_STP_STATE_ == 0).  for this bridge.

                      **priority** _PRIORITY_ - set this bridge's spanning tree priority, used during STP
                      root bridge election.  _PRIORITY_ is a 16bit unsigned integer.

                      **vlan**___**filtering** _VLAN_FILTERING_ - turn VLAN filtering on (_VLAN_FILTERING_ > 0) or
                      off (_VLAN_FILTERING_ == 0).  When disabled, the bridge will not consider the
                      VLAN tag when handling packets.

                      **vlan**___**protocol** { **802.1Q** | **802.1ad** } - set the protocol used for VLAN filtering.

                      **vlan**___**default**___**pvid** _VLAN_DEFAULT_PVID_ - set the default PVID (native/untagged
                      VLAN ID) for this bridge.

                      **vlan**___**stats**___**enabled** _VLAN_STATS_ENABLED_ - enable (_VLAN_STATS_ENABLED_ == 1) or
                      disable (_VLAN_STATS_ENABLED_ == 0) per-VLAN stats accounting.

                      **vlan**___**stats**___**per**___**port** _VLAN_STATS_PER_PORT_ - enable (_VLAN_STATS_PER_PORT_ == 1) or
                      disable (_VLAN_STATS_PER_PORT_ == 0) per-VLAN per-port stats accounting. Can be
                      changed only when there are no port VLANs configured.

                      **mcast**___**snooping** _MULTICAST_SNOOPING_ - turn multicast snooping on (_MULTI__‐
                      _CAST_SNOOPING_ > 0) or off (_MULTICAST_SNOOPING_ == 0).

                      **mcast**___**router** _MULTICAST_ROUTER_ - set bridge's multicast router if IGMP snooping
                      is enabled.  _MULTICAST_ROUTER_ is an integer value having the following mean‐
                      ing:

                              **0** - disabled.

                              **1** - automatic (queried).

                              **2** - permanently enabled.

                      **mcast**___**query**___**use**___**ifaddr** _MCAST_QUERY_USE_IFADDR_ - whether to use the bridge's
                      own IP address as source address for IGMP queries (_MCAST_QUERY_USE_IFADDR_ > 0)
                      or the default of 0.0.0.0 (_MCAST_QUERY_USE_IFADDR_ == 0).

                      **mcast**___**querier** _MULTICAST_QUERIER_ - enable (_MULTICAST_QUERIER_ > 0) or disable
                      (_MULTICAST_QUERIER_ == 0) IGMP querier, ie sending of multicast queries by the
                      bridge (default: disabled).

                      **mcast**___**querier**___**interval** _QUERIER_INTERVAL_ - 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 **mcast**___**querier** was enabled).

                      **mcast**___**hash**___**elasticity** _HASH_ELASTICITY_ - set multicast database hash elastic‐
                      ity, ie the maximum chain length in the multicast hash table (defaults to 4).

                      **mcast**___**hash**___**max** _HASH_MAX_ - set maximum size of multicast hash table (defaults
                      to 512, value must be a power of 2).

                      **mcast**___**last**___**member**___**count** _LAST_MEMBER_COUNT_ - 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).

                      **mcast**___**last**___**member**___**interval** _LAST_MEMBER_INTERVAL_ - interval between queries to
                      find remaining members of a group, after a "leave" message is received.

                      **mcast**___**startup**___**query**___**count** _STARTUP_QUERY_COUNT_ - set the number of IGMP queries
                      to send during startup phase (defaults to 2).

                      **mcast**___**startup**___**query**___**interval** _STARTUP_QUERY_INTERVAL_ - interval between queries
                      in the startup phase.

                      **mcast**___**query**___**interval** _QUERY_INTERVAL_ - interval between queries sent by the
                      bridge after the end of the startup phase.

                      **mcast**___**query**___**response**___**interval** _QUERY_RESPONSE_INTERVAL_ - set the Max Response
                      Time/Maximum Response Delay for IGMP/MLD queries sent by the bridge.

                      **mcast**___**membership**___**interval** _MEMBERSHIP_INTERVAL_ - delay after which the bridge
                      will leave a group, if no membership reports for this group are received.

                      **mcast**___**stats**___**enabled** _MCAST_STATS_ENABLED_ - enable (_MCAST_STATS_ENABLED_ > 0) or
                      disable (_MCAST_STATS_ENABLED_ == 0) multicast (IGMP/MLD) stats accounting.

                      **mcast**___**igmp**___**version** _IGMP_VERSION_ - set the IGMP version.

                      **mcast**___**mld**___**version** _MLD_VERSION_ - set the MLD version.

                      **nf**___**call**___**iptables** _NF_CALL_IPTABLES_ - enable (_NF_CALL_IPTABLES_ > 0) or disable
                      (_NF_CALL_IPTABLES_ == 0) iptables hooks on the bridge.

                      **nf**___**call**___**ip6tables** _NF_CALL_IP6TABLES_ - enable (_NF_CALL_IP6TABLES_ > 0) or dis‐
                      able (_NF_CALL_IP6TABLES_ == 0) ip6tables hooks on the bridge.

                      **nf**___**call**___**arptables** _NF_CALL_ARPTABLES_ - enable (_NF_CALL_ARPTABLES_ > 0) or dis‐
                      able (_NF_CALL_ARPTABLES_ == 0) arptables hooks on the bridge.




       MACsec Type Support
              For a link of type _MACsec_ the following additional arguments are supported:

              **ip** **link** **add** **link** _DEVICE_ **name** _NAME_ **type** **macsec** [ [ **address** _<lladdr>_ ] **port** _PORT_ | **sci**
              _SCI_ ] [ **cipher** _CIPHER_SUITE_ ] [ **icvlen** { _8..16_ } ] [ **encrypt** { **on** | **off** } ] [ **send**___**sci**
              { **on** | **off** } ] [ **end**___**station** { **on** | **off** } ] [ **scb** { **on** | **off** } ] [ **protect** { **on** | **off**
              } ] [ **replay** { **on** | **off** } **window** { _0..2^32-1_ } ] [ **validate** { **strict** | **check** | **dis**‐‐
              **abled** } ] [ **encodingsa** { _0..3_ } ]


                      **address** _<lladdr>_ - sets the system identifier component of secure channel for
                      this MACsec device.


                      **port** _PORT_ - sets the port number component of secure channel for this MACsec
                      device, in a range from 1 to 65535 inclusive. Numbers with a leading " 0 " or
                      " 0x " are interpreted as octal and hexadecimal, respectively.


                      **sci** _SCI_ - sets the secure channel identifier for this MACsec device.  _SCI_ is a
                      64bit wide number in hexadecimal format.


                      **cipher** _CIPHER_SUITE_ - defines the cipher suite to use.


                      **icvlen** _LENGTH_ - sets the length of the Integrity Check Value (ICV).


                      **encrypt** **on** or **encrypt** **off** - switches between authenticated encryption, or au‐
                      thenticity mode only.


                      **send**___**sci** **on** or **send**___**sci** **off** - specifies whether the SCI is included in every
                      packet, or only when it is necessary.


                      **end**___**station** **on** or **end**___**station** **off** - sets the End Station bit.


                      **scb** **on** or **scb** **off** - sets the Single Copy Broadcast bit.


                      **protect** **on** or **protect** **off** - enables MACsec protection on the device.


                      **replay** **on** or **replay** **off** - enables replay protection on the device.



                              **window** _SIZE_ - sets the size of the replay window.



                      **validate** **strict** or **validate** **check** or **validate** **disabled** - sets the validation
                      mode on the device.


                      **encodingsa** _AN_ - sets the active secure association for transmission.



       VRF Type Support
              For a link of type _VRF_ the following additional arguments are supported:

              **ip** **link** **add** _DEVICE_ **type** **vrf** **table** _TABLE_


                      **table** table id associated with VRF device



       RMNET Type Support
              For a link of type _RMNET_ the following additional arguments are supported:

              **ip** **link** **add** **link** _DEVICE_ **name** _NAME_ **type** **rmnet** **mux**___**id** _MUXID_


                      **mux**___**id** _MUXID_ - specifies the mux identifier for the rmnet device, possible
                      values 1-254.



       XFRM Type Support
              For a link of type _XFRM_ the following additional arguments are supported:

              **ip** **link** **add** _DEVICE_ **type** **xfrm** **dev** _PHYS_DEV_ **[** **if**___**id** _IF_ID_ **]**


                      **dev** _PHYS_DEV_ - specifies the underlying physical interface from which trans‐
                      form traffic is sent and received.


                      **if**___**id** _IF-ID_ - specifies the hexadecimal lookup key used to send traffic to and
                      from specific xfrm policies. Policies must be configured with the same key. If
                      not set, the key defaults to 0 and will match any policies which similarly do
                      not have a lookup key configuration.



### ip link delete - delete virtual link
       **dev** _DEVICE_
              specifies the virtual device to act operate on.


       **group** _GROUP_
              specifies the group of virtual links to delete. Group 0 is not allowed to be deleted
              since it is the default group.


       **type** _TYPE_
              specifies the type of the device.


### ip link set - change device attributes
       **Warning:** If multiple parameter changes are requested, **ip** aborts immediately after any of the
       changes have failed.  This is the only case when **ip** can move the system to an unpredictable
       state. The solution is to avoid changing several parameters with one **ip** **link** **set** call.  The
       modifier **change** is equivalent to **set**.



       **dev** _DEVICE_
              _DEVICE_ specifies network device to operate on. When configuring SR-IOV Virtual Func‐
              tion (VF) devices, this keyword should specify the associated Physical Function (PF)
              device.


       **group** _GROUP_
              _GROUP_ has a dual role: If both group and dev are present, then move the device to the
              specified group. If only a group is specified, then the command operates on all de‐
              vices in that group.


       **up** and **down**
              change the state of the device to **UP** or **DOWN**.


       **arp** **on** or **arp** **off**
              change the **NOARP** flag on the device.


       **multicast** **on** or **multicast** **off**
              change the **MULTICAST** flag on the device.


       **allmulticast** **on** or **allmulticast** **off**
              change the **ALLMULTI** flag on the device. When enabled, instructs network driver to re‐
              trieve all multicast packets from the network to the kernel for further processing.


       **promisc** **on** or **promisc** **off**
              change the **PROMISC** flag on the device. When enabled, activates promiscuous operation
              of the network device.


       **trailers** **on** or **trailers** **off**
              change the **NOTRAILERS** flag on the device, **NOT** used by the Linux and exists for BSD
              compatibility.


       **protodown** **on** or **protodown** **off**
              change the **PROTODOWN** state on the device. Indicates that a protocol error has been de‐
              tected on the port. Switch drivers can react to this error by doing a phys down on the
              switch port.


       **protodown**___**reason** **PREASON** **on** or **off**
              set **PROTODOWN** reasons on the device. protodown reason bit names can be enumerated un‐
              der /etc/iproute2/protodown_reasons.d/. possible reasons bits 0-31


       **dynamic** **on** or **dynamic** **off**
              change the **DYNAMIC** flag on the device. Indicates that address can change when inter‐
              face goes down (currently **NOT** used by the Linux).


       **name** _NAME_
              change the name of the device. This operation is not recommended if the device is run‐
              ning or has some addresses already configured.


       **txqueuelen** _NUMBER_

       **txqlen** _NUMBER_
              change the transmit queue length of the device.


       **mtu** _NUMBER_
              change the _MTU_ of the device.


       **address** _LLADDRESS_
              change the station address of the interface.


       **broadcast** _LLADDRESS_

       **brd** _LLADDRESS_

       **peer** _LLADDRESS_
              change the link layer broadcast address or the peer address when the interface is
              _POINTOPOINT_.


       **netns** _NETNSNAME_ | _PID_
              move the device to the network namespace associated with name _NETNSNAME_ or process
              _PID_.

              Some devices are not allowed to change network namespace: loopback, bridge, wireless.
              These are network namespace local devices. In such case **ip** tool will return "Invalid
              argument" error. It is possible to find out if device is local to a single network
              namespace by checking **netns-local** flag in the output of the **ethtool**:

                      **ethtool** **-k** _DEVICE_

              To change network namespace for wireless devices the **iw** tool can be used. But it al‐
              lows to change network namespace only for physical devices and by process _PID_.


       **alias** _NAME_
              give the device a symbolic name for easy reference.


       **group** _GROUP_
              specify the group the device belongs to.  The available groups are listed in file
              **/etc/iproute2/group**.


       **vf** _NUM_ specify a Virtual Function device to be configured. The associated PF device must be
              specified using the **dev** parameter.

                      **mac** _LLADDRESS_ - change the station address for the specified VF. The **vf** param‐
                      eter must be specified.


                      **vlan** _VLANID_ - change the assigned VLAN for the specified VF. When specified,
                      all traffic sent from the VF will be tagged with the specified VLAN ID. Incom‐
                      ing traffic will be filtered for the specified VLAN ID, and will have all VLAN
                      tags stripped before being passed to the VF. Setting this parameter to 0 dis‐
                      ables VLAN tagging and filtering. The **vf** parameter must be specified.


                      **qos** _VLAN-QOS_ - assign VLAN QOS (priority) bits for the VLAN tag. When speci‐
                      fied, all VLAN tags transmitted by the VF will include the specified priority
                      bits in the VLAN tag. If not specified, the value is assumed to be 0. Both the
                      **vf** and **vlan** parameters must be specified. Setting both **vlan** and **qos** as 0 dis‐
                      ables VLAN tagging and filtering for the VF.


                      **proto** _VLAN-PROTO_ - assign VLAN PROTOCOL for the VLAN tag, either 802.1Q or
                      802.1ad.  Setting to 802.1ad, all traffic sent from the VF will be tagged with
                      VLAN S-Tag.  Incoming traffic will have VLAN S-Tags stripped before being
                      passed to the VF.  Setting to 802.1ad also enables an option to concatenate
                      another VLAN tag, so both S-TAG and C-TAG will be inserted/stripped for outgo‐
                      ing/incoming traffic, respectively.  If not specified, the value is assumed to
                      be 802.1Q. Both the **vf** and **vlan** parameters must be specified.


                      **rate** _TXRATE_ -- change the allowed transmit bandwidth, in Mbps, for the speci‐
                      fied VF.  Setting this parameter to 0 disables rate limiting.  **vf** parameter
                      must be specified.  Please use new API **max**___**tx**___**rate** option instead.


                      **max**___**tx**___**rate** _TXRATE_ - change the allowed maximum transmit bandwidth, in Mbps,
                      for the specified VF.  Setting this parameter to 0 disables rate limiting.  **vf**
                      parameter must be specified.


                      **min**___**tx**___**rate** _TXRATE_ - change the allowed minimum transmit bandwidth, in Mbps,
                      for the specified VF.  Minimum TXRATE should be always <= Maximum TXRATE.
                      Setting this parameter to 0 disables rate limiting.  **vf** parameter must be
                      specified.


                      **spoofchk** _on|off_ - turn packet spoof checking on or off for the specified VF.

                      **query**___**rss** _on|off_ - 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.

                      **state** _auto|enable|disable_ - set the virtual link state as seen by the speci‐
                      fied VF. Setting to auto means a reflection of the PF link state, enable lets
                      the VF to communicate with other VFs on this host even if the PF link state is
                      down, disable causes the HW to drop any packets sent by the VF.

                      **trust** _on|off_ - trust the specified VF user. This enables that VF user can set
                      a specific feature which may impact security and/or performance. (e.g. VF mul‐
                      ticast promiscuous mode)

                      **node**___**guid** _eui64_ - configure node GUID for Infiniband VFs.

                      **port**___**guid** _eui64_ - configure port GUID for Infiniband VFs.


### xdp object | pinned | off
              set (or unset) a XDP ("eXpress Data Path") BPF program to run on every packet at
              driver level.  **ip** **link** output will indicate a **xdp** flag for the networking device. If
              the driver does not have native XDP support, the kernel will fall back to a slower,
              driver-independent "generic" XDP variant. The **ip** **link** output will in that case indi‐
              cate **xdpgeneric** instead of **xdp** only. If the driver does have native XDP support, but
              the program is loaded under **xdpgeneric** **object** **|** **pinned** then the kernel will use the
              generic XDP variant instead of the native one.  **xdpdrv** has the opposite effect of re‐
              questsing that the automatic fallback to the generic XDP variant be disabled and in
              case driver is not XDP-capable error should be returned.  **xdpdrv** also disables hard‐
              ware offloads.  **xdpoffload** in ip link output indicates that the program has been off‐
              loaded to hardware and can also be used to request the "offload" mode, much like **xdp**‐‐
              **generic** it forces program to be installed specifically in HW/FW of the apater.

              **off** (or **none** ) - Detaches any currently attached XDP/BPF program from the given de‐
              vice.

              **object** _FILE_ - Attaches a XDP/BPF program to the given device. The _FILE_ points to a BPF
              ELF file (f.e. generated by LLVM) that contains the BPF program code, map specifica‐
              tions, etc. If a XDP/BPF program is already attached to the given device, an error
              will be thrown. If no XDP/BPF program is currently attached, the device supports XDP
              and the program from the BPF ELF file passes the kernel verifier, then it will be at‐
              tached to the device. If the option _-force_ is passed to **ip** then any prior attached
              XDP/BPF program will be atomically overridden and no error will be thrown in this
              case. If no **section** option is passed, then the default section name ("prog") will be
              assumed, otherwise the provided section name will be used. If no **verbose** option is
              passed, then a verifier log will only be dumped on load error.  See also **EXAMPLES** sec‐
              tion for usage examples.

              **section** _NAME_ - Specifies a section name that contains the BPF program code. If no sec‐
              tion name is specified, the default one ("prog") will be used. This option is to be
              passed with the **object** option.

              **verbose** - Act in verbose mode. For example, even in case of success, this will print
              the verifier log in case a program was loaded from a BPF ELF file.

              **pinned** _FILE_ - Attaches a XDP/BPF program to the given device. The _FILE_ points to an
              already pinned BPF program in the BPF file system. The option **section** doesn't apply
              here, but otherwise semantics are the same as with the option **object** described al‐
              ready.


       **master** _DEVICE_
              set master device of the device (enslave device).


### nomaster
              unset master device of the device (release device).


       **addrgenmode** _eui64|none|stable_secret|random_
              set the IPv6 address generation mode

              _eui64_ - use a Modified EUI-64 format interface identifier

              _none_ - disable automatic address generation

              _stable_secret_ - generate the interface identifier based on a preset
                /proc/sys/net/ipv6/conf/{default,DEVICE}/stable_secret

              _random_ - like stable_secret, but auto-generate a new random secret if none is set


### link-netnsid
              set peer netnsid for a cross-netns interface


       **type** _ETYPE_ _TYPE_ARGS_
              Change type-specific settings. For a list of supported types and arguments refer to
              the description of **ip** **link** **add** above. In addition to that, it is possible to manipu‐
              late settings to slave devices:


       Bridge Slave Support
              For a link with master **bridge** the following additional arguments are supported:

              **ip** **link** **set** **type** **bridge**___**slave** [ **fdb**___**flush** ] [ **state** _STATE_ ] [ **priority** _PRIO_ ] [ **cost**
              _COST_ ] [ **guard** { **on** | **off** } ] [ **hairpin** { **on** | **off** } ] [ **fastleave** { **on** | **off** } ] [
              **root**___**block** { **on** | **off** } ] [ **learning** { **on** | **off** } ] [ **flood** { **on** | **off** } ] [ **proxy**___**arp**
              { **on** | **off** } ] [ **proxy**___**arp**___**wifi** { **on** | **off** } ] [ **mcast**___**router** _MULTICAST_ROUTER_ ] [
              **mcast**___**fast**___**leave** { **on** | **off**} ] [ **mcast**___**flood** { **on** | **off** } ] [ **mcast**___**to**___**unicast** { **on** |
              **off** } ] [ **group**___**fwd**___**mask** MASK ] [ **neigh**___**suppress** { **on** | **off** } ] [ **vlan**___**tunnel** { **on** |
              **off** } ] [ **isolated** { **on** | **off** } ] [ **backup**___**port** DEVICE ] [ **nobackup**___**port** ]


                      **fdb**___**flush** - flush bridge slave's fdb dynamic entries.

                      **state** _STATE_ - Set port state.  _STATE_ is a number representing the following
                      states: **0** (disabled), **1** (listening), **2** (learning), **3** (forwarding), **4** (block‐
                      ing).

                      **priority** _PRIO_ - set port priority (allowed values are between 0 and 63, inclu‐
                      sively).

                      **cost** _COST_ - set port cost (allowed values are between 1 and 65535, inclu‐
                      sively).

                      **guard** { **on** | **off** } - block incoming BPDU packets on this port.

                      **hairpin** { **on** | **off** } - enable hairpin mode on this port. This will allow in‐
                      coming packets on this port to be reflected back.

                      **fastleave** { **on** | **off** } - enable multicast fast leave on this port.

                      **root**___**block** { **on** | **off** } - block this port from becoming the bridge's root
                      port.

                      **learning** { **on** | **off** } - allow MAC address learning on this port.

                      **flood** { **on** | **off** } - open the flood gates on this port, i.e. forward all uni‐
                      cast frames to this port also. Requires **proxy**___**arp** and **proxy**___**arp**___**wifi** to be
                      turned off.

                      **proxy**___**arp** { **on** | **off** } - enable proxy ARP on this port.

                      **proxy**___**arp**___**wifi** { **on** | **off** } - enable proxy ARP on this port which meets ex‐
                      tended requirements by IEEE 802.11 and Hotspot 2.0 specifications.

                      **mcast**___**router** _MULTICAST_ROUTER_ - configure this port for having multicast
                      routers attached. A port with a multicast router will receive all multicast
                      traffic.  _MULTICAST_ROUTER_ may be either **0** to disable multicast routers on
                      this port, **1** to let the system detect the presence of routers (this is the de‐
                      fault), **2** to permanently enable multicast traffic forwarding on this port or **3**
                      to enable multicast routers temporarily on this port, not depending on incom‐
                      ing queries.

                      **mcast**___**fast**___**leave** { **on** | **off** } - this is a synonym to the **fastleave** option
                      above.

                      **mcast**___**flood** { **on** | **off** } - controls whether a given port will flood multicast
                      traffic for which
                        there is no MDB entry.

                      **mcast**___**to**___**unicast** { **on** | **off** } - controls whether a given port will replicate
                      packets using unicast
                        instead of multicast. By default this flag is off.

                      **group**___**fwd**___**mask** _MASK_ - set the group forward mask. This is the bitmask that is
                      applied to decide whether to forward incoming frames destined to link-local
                      addresses, ie addresses of the form 01:80:C2:00:00:0X (defaults to 0, ie the
                      bridge does not forward any link-local frames coming on this port).

                      **neigh**___**suppress** { **on** | **off** } - controls whether neigh discovery (arp and nd)
                      proxy and suppression is enabled on the port. By default this flag is off.

                      **vlan**___**tunnel** { **on** | **off** } - controls whether vlan to tunnel mapping is enabled
                      on the port. By default this flag is off.

                      **backup**___**port** _DEVICE_ - if the port loses carrier all traffic will be redirected
                      to the configured backup port

                      **nobackup**___**port** - removes the currently configured backup port



       Bonding Slave Support
              For a link with master **bond** the following additional arguments are supported:

              **ip** **link** **set** **type** **bond**___**slave** [ **queue**___**id** _ID_ ]


                      **queue**___**id** _ID_ - set the slave's queue ID (a 16bit unsigned value).



       MACVLAN and MACVTAP Support
              Modify list of allowed macaddr for link in source mode.

              **ip** **link** **set** **type** **{** **macvlan** **|** **macvap** **}** [ **macaddr** _COMMAND_ _MACADDR_ **...**  ]

              Commands:
                      **add** - add MACADDR to allowed list

                      **set** - replace allowed list

                      **del** - remove MACADDR from allowed list

                      **flush** - flush whole allowed list


              Update the broadcast/multicast queue length.

              **ip** **link** **set** **type** **{** **macvlan** **|** **macvap** **}** [ **bcqueuelen**  _LENGTH_ ]

                      **bcqueuelen** _LENGTH_ - Set the length of the RX queue used to process broadcast
                      and multicast packets.  _LENGTH_ must be a positive integer in the range
                      [0-4294967295].  Setting a length of 0 will effectively drop all broad‐
                      cast/multicast traffic.  If not specified the macvlan driver default (1000) is
                      used.  Note that all macvlans that share the same underlying device are using
                      the same queue. The parameter here is a **request**, the actual queue length used
                      will be the maximum length that any macvlan interface has requested.  When
                      listing device parameters both the bcqueuelen parameter as well as the actual
                      used bcqueuelen are listed to better help the user understand the setting.


### ip link show - display device attributes
       **dev** _NAME_ **(default)**
              _NAME_ specifies the network device to show.


       **group** _GROUP_
              _GROUP_ specifies what group of devices to show.


       **up**     only display running interfaces.


       **master** _DEVICE_
              _DEVICE_ specifies the master device which enslaves devices to show.


       **vrf** _NAME_
              _NAME_ specifies the VRF which enslaves devices to show.


       **type** _TYPE_
              _TYPE_ specifies the type of devices to show.

              Note that the type name is not checked against the list of supported types - instead
              it is sent as-is to the kernel. Later it is used to filter the returned interface list
              by comparing it with the relevant attribute in case the kernel didn't filter already.
              Therefore any string is accepted, but may lead to empty output.


### ip link xstats - display extended statistics
       **type** _TYPE_
              _TYPE_ specifies the type of devices to display extended statistics for.


### ip link afstats - display address-family specific statistics
       **dev** _DEVICE_
              _DEVICE_ specifies the device to display address-family statistics for.


### ip link help - display help
       _TYPE_ specifies which help of link type to display.


   _GROUP_
       may be a number or a string from the file **/etc/iproute2/group** which can be manually filled.


## EXAMPLES
       ip link show
           Shows the state of all network interfaces on the system.

       ip link show type bridge
           Shows the bridge devices.

       ip link show type vlan
           Shows the vlan devices.

       ip link show master br0
           Shows devices enslaved by br0

       ip link set dev ppp0 mtu 1400
           Change the MTU the ppp0 device.

       ip link add link eth0 name eth0.10 type vlan id 10
           Creates a new vlan device eth0.10 on device eth0.

       ip link delete dev eth0.10
           Removes vlan device.

       ip link help gre
           Display help for the gre link type.

       ip link add name tun1 type ipip remote 192.168.1.1 local 192.168.1.2 ttl 225 encap gue encap-
       sport auto encap-dport 5555 encap-csum encap-remcsum
           Creates an IPIP that is encapsulated with Generic UDP Encapsulation, and the outer UDP
           checksum and remote checksum offload are enabled.

       ip link set dev eth0 xdp obj prog.o
           Attaches a XDP/BPF program to device eth0, where the program is located in prog.o, sec‐
           tion "prog" (default section). In case a XDP/BPF program is already attached, throw an
           error.

       ip -force link set dev eth0 xdp obj prog.o sec foo
           Attaches a XDP/BPF program to device eth0, where the program is located in prog.o, sec‐
           tion "foo". In case a XDP/BPF program is already attached, it will be overridden by the
           new one.

       ip -force link set dev eth0 xdp pinned /sys/fs/bpf/foo
           Attaches a XDP/BPF program to device eth0, where the program was previously pinned as an
           object node into BPF file system under name foo.

       ip link set dev eth0 xdp off
           If a XDP/BPF program is attached on device eth0, detach it and effectively turn off XDP
           for device eth0.

       ip link add link wpan0 lowpan0 type lowpan
           Creates a 6LoWPAN interface named lowpan0 on the underlying IEEE 802.15.4 device wpan0.

       ip link add dev ip6erspan11 type ip6erspan seq key 102 local fc00:[100::2](https://www.chedong.com/phpMan.php/perldoc/100%3A%3A2/markdown) remote fc00:[100::1](https://www.chedong.com/phpMan.php/perldoc/100%3A%3A1/markdown)
       erspan_ver 2 erspan_dir ingress erspan_hwid 17
           Creates a IP6ERSPAN version 2 interface named ip6erspan00.


## SEE ALSO
       [**ip**(8)](https://www.chedong.com/phpMan.php/man/ip/8/markdown), [**ip-netns**(8)](https://www.chedong.com/phpMan.php/man/ip-netns/8/markdown), [**ethtool**(8)](https://www.chedong.com/phpMan.php/man/ethtool/8/markdown), [**iptables**(8)](https://www.chedong.com/phpMan.php/man/iptables/8/markdown)


## AUTHOR
       Original Manpage by Michail Litvak <<mci@owl.openwall.com>>



iproute2                                     13 Dec 2012                                  [IP-LINK(8)](https://www.chedong.com/phpMan.php/man/IP-LINK/8/markdown)
